litellm/tests/e2e/router
Yassin Kortam 53a2138d05 test(e2e): cover router strategy selection and context-window fallback
Adds live coverage for four routing-strategy registry cells (cost, tpm,
simple-shuffle weight, latency) and for context-window fallback rerouting. Each
routing test builds a model group whose deployments differ in only the dimension
the strategy under test reads, drives the strategy per request through
router_settings_override, and asserts which deployment served the call from the
x-litellm-model-id header. The fallback test overflows a real gpt-4 deployment's
context window and asserts the same prompt is served by the gpt-5.5 fallback

least_busy.picks_lowest_traffic is deliberately left uncovered. Proving it needs
the router's in-flight tally for a deployment to be observable at the moment of
the pick, and the proxy exposes no such read: the tally is absent from the
in-memory cache dump, prometheus is off, and spend rows only land once a call
finishes. Every barrier available instead observes an earlier layer, which would
make the assertion a probability bet rather than a proof
2026-07-27 17:06:27 -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): add reliability suite covering fallback, timeout, and cache behavior (#34023) 2026-07-20 23:06:46 +00: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): add reliability suite covering fallback, timeout, and cache behavior (#34023) 2026-07-20 23:06:46 +00:00
test_reliability_context_window_fallback_e2e.py test(e2e): cover router strategy selection and context-window fallback 2026-07-27 17:06:27 -07:00
test_reliability_fallbacks_e2e.py test(e2e): add reliability suite covering fallback, timeout, and cache behavior (#34023) 2026-07-20 23:06:46 +00:00
test_reliability_routing_e2e.py test(e2e): cover router strategy selection and context-window fallback 2026-07-27 17:06:27 -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