mirror of
https://github.com/tiennm99/litellm.git
synced 2026-07-13 03:05:31 +00:00
6eb8c25e88
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.
In total litellm runs 1000+ tests
[02/20/2025] Update:
To make it easier to contribute and map what behavior is tested,
we've started mapping the litellm directory in tests/test_litellm
This folder can only run mock tests.