Files
litellm/tests/test_litellm
mateo-berri 6eb8c25e88 fix(translation): lenient post-send finish_reason boundary for openai_compat (critic-openai M1+M4)
M4 (signed off at integration per the PR #30138 tenet clause): a quirky
compat finish value fired a typed error AFTER the request was sent and
billed, where no v1 fallback exists; v1 is deliberately lenient there
(map_finish_reason + native stash). The native string now rides the wire
body/chunk verbatim and BOTH sides normalize through the live
Choices/StreamingChoices map_finish_reason, so v2 inherits v1's lenient
mapping with no mirror table. Loud errors stay for semantics-changing
shapes (n>1, legacy function_call output/delta/finish, audio, logprobs).
New differential rows pin mapped ("eos") and unmapped finish strings on
the response path and an "eos" stream replayed through the SDK's lenient
construct_type (the production seam; model_validate would reject what
the SDK serves).

M1: the frozenset-membership narrowing that needed `type: ignore` in the
strict zone is gone; the semantic IR finish narrows through a literal
match (_semantic_finish), no suppressions left in the package.
2026-06-12 06:19:08 +00:00
..
2026-06-10 10:34:07 -07:00
2026-06-08 13:49:52 -07:00
2026-03-27 21:21:43 +05:30
2026-02-27 13:33:34 +05:30
2026-05-18 16:27:44 -07:00
2026-06-10 10:34:07 -07:00
2026-03-28 19:17:38 -07:00

Testing for litellm/

This directory 1:1 maps the the litellm/ directory, and can only contain mocked tests.

The point of this is to:

  1. Increase test coverage of litellm/
  2. Make it easy for contributors to add tests for the litellm/ package and easily run tests without needing LLM API keys.

File name conventions

  • litellm/proxy/test_caching_routes.py maps to litellm/proxy/caching_routes.py
  • test_<filename>.py maps to litellm/<filename>.py