mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
The first pass accepted any empty completion whose finish_reason was "length", which also swallowed a fallback that produced nothing at all. Require the response to have billed completion tokens as well, so empty content is accepted only when the budget was demonstrably spent on non-visible reasoning. Asserts on completion_tokens rather than reasoning_tokens because the latter is provider-optional; with empty content and a refusal of null, consumed completion tokens are reasoning by elimination, since visible text would be content. Both counts are reported in the failure message. Folds the three body accessors onto one _parsed helper instead of re-parsing per call, and adds completion_tokens_of / reasoning_tokens_of alongside. |
||
|---|---|---|
| .. | ||
| complexity_router_client.py | ||
| conftest.py | ||
| reliability_support.py | ||
| test_auto_router_regressions_e2e.py | ||
| test_complexity_router_e2e.py | ||
| test_reliability_cache_e2e.py | ||
| test_reliability_fallbacks_e2e.py | ||
| test_reliability_timeouts_e2e.py | ||