litellm/tests/test_litellm/router_strategy/adaptive_router
devin-ai-integration[bot] 95b438013a
fix(router): fall back from unhealthy auto-router tier (#40757)
* fix(router): fall back from unhealthy auto-router tier

Co-Authored-By: Claude Code <noreply@anthropic.com>
(cherry picked from commit 00c7fd8376)

* fix(router): treat budget and tag exhaustion as a no-capacity verdict

The eligibility probe only read typed router errors as "nothing here can
serve this". Provider and deployment budget exhaustion, and tag routing
with no matching deployment, report it as a bare ValueError carrying a
RouterErrors marker, so the probe read a spent tier as live, skipped the
peer and default recovery, and failed the request.

---------

Co-authored-by: Tin Chi Lo <tin@berri.ai>
Co-authored-by: Claude Code <noreply@anthropic.com>
2026-09-11 11:51:55 -07:00
..
fixtures feat: add adaptive routing to litellm 2026-04-18 16:35:17 -07:00
__init__.py feat: add adaptive routing to litellm 2026-04-18 16:35:17 -07:00
test_adaptive_router.py fix(router): fall back from unhealthy auto-router tier (#40757) 2026-09-11 11:51:55 -07:00
test_async_pre_routing.py feat(router): record why the auto-router picked a tier and show it in the logs (#35016) 2026-07-30 11:55:10 -07:00
test_bandit.py test: require a match= on broad pytest.raises, and drop duplicate parametrize cases (#37769) 2026-08-20 20:24:49 -07:00
test_classifier.py feat: add adaptive routing to litellm 2026-04-18 16:35:17 -07:00
test_config.py feat: add adaptive routing to litellm 2026-04-18 16:35:17 -07:00
test_e2e_adaptive_router.py address review: trim verbose comments, fix wrong-request-type assertion 2026-09-05 15:32:48 -07:00
test_hooks.py feat(router): soft-floor adaptive mode for complexity router (#32947) 2026-07-11 21:56:33 -07:00
test_router_dispatch.py address review: trim comments, add behavioral pick_model regression tests 2026-09-05 15:25:06 -07:00
test_signals.py fix(adaptive_router): enforce satisfaction gate, stop false-flagging empty tool output 2026-04-20 17:47:25 -07:00
test_state_endpoint.py fix(router): tag-aware pre-routing strategy selection for shared model_name (#33691) 2026-07-17 09:26:07 -07:00
test_update_queue.py refactor(adaptive_router): move update_queue out of litellm.proxy 2026-04-21 18:02:44 -07:00