litellm/tests/e2e/router
Yuneng Jiang fd4b540a44
test(e2e): require spent completion tokens before accepting empty fallback content
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.
2026-08-29 16:19:41 -07:00
..
complexity_router_client.py test(e2e): rename Gateway to ProxyClient and expose it as a session-scoped fixture (#33750) 2026-07-18 18:41:18 +00:00
conftest.py test(e2e): add reliability suite covering fallback, timeout, and cache behavior (#34023) 2026-07-20 23:06:46 +00:00
reliability_support.py test(e2e): require spent completion tokens before accepting empty fallback content 2026-08-29 16:19:41 -07:00
test_auto_router_regressions_e2e.py test(e2e): pin the tag-routing denial to its actual cause 2026-08-18 20:49:12 -07:00
test_complexity_router_e2e.py test(e2e): add reliability suite covering fallback, timeout, and cache behavior (#34023) 2026-07-20 23:06:46 +00:00
test_reliability_cache_e2e.py test(e2e): harden the suite against response-cache cross-talk, slow providers and single upstream blips (#37957) 2026-08-22 14:47:03 -07:00
test_reliability_fallbacks_e2e.py test(e2e): require spent completion tokens before accepting empty fallback content 2026-08-29 16:19:41 -07:00
test_reliability_timeouts_e2e.py test(e2e): add reliability suite covering fallback, timeout, and cache behavior (#34023) 2026-07-20 23:06:46 +00:00