litellm/tests/test_litellm/router_utils
Mateo Wang f769aa4675
fix(router): give cooldowns their own cache so siblings see a bench in ~1s (#40025)
Cooldown entries rode the router-wide DualCache, which re-reads a key that is
missing from memory at most once every 10s. A deployment benched on one replica
therefore kept taking traffic on its siblings for up to 10 seconds, and the same
shared in-memory tier could evict a live cooldown once 200 unrelated router keys
crowded it out, which sent even the benching replica back to the dead deployment.

CooldownCache now owns a DualCache over the router's Redis with a 1s read
interval and an in-memory tier that only holds cooldown keys. Redis is attached
lazily because the router builds the cooldown cache before it wires Redis up.
2026-09-08 10:11:20 -07:00
..
pre_call_checks fix: skip one-shot Claude Code cache injection (#40175) 2026-09-07 18:03:43 -07:00
test_add_retry_fallback_headers.py feat(router): add separate ITPM/OTPM deployment rate limits (#31952) 2026-07-05 21:58:35 +05:30
test_auto_router_model_naming.py feat(router): meter auto-router tier and prompt customization against the auto_router license feature (#39674) 2026-09-05 09:51:23 -07:00
test_auto_router_tuning_baseline.py feat(complexity_router): add declarative custom dimensions to the heuristic scorer (#40156) 2026-09-07 18:17:30 -07:00
test_cooldown_cache.py fix(router): give cooldowns their own cache so siblings see a bench in ~1s (#40025) 2026-09-08 10:11:20 -07:00
test_cooldown_handlers.py feat(router): make routing groups callable as virtual models and list them in /v1/models (#36519) 2026-08-11 18:41:19 -07:00
test_fallback_event_handlers.py fix(router): preserve bound router fallbacks for subagents 2026-09-02 16:01:15 -07:00
test_get_retry_from_policy.py refactor(router): resolve retry policy by exception MRO and add DefaultRetries 2026-09-04 16:09:01 -07:00
test_health_check_allowed_fails_integration.py feat(health): opt-in model-group allowlist for background health checks and health-check routing (#38539) 2026-08-27 12:25:56 -07:00
test_health_state_cache.py feat(health): opt-in model-group allowlist for background health checks and health-check routing (#38539) 2026-08-27 12:25:56 -07:00
test_pattern_match_deployments.py fix(proxy): make the invalid-model 403 path cheap under a burst of rejections (#39892) 2026-09-05 11:53:04 -07:00
test_reasoning_effort_capability.py fix(cost-map): stop advertising reasoning_effort max on the azure gpt-6-astra rows 2026-09-05 22:31:32 -07:00
test_router_health_check_routing.py feat(health): opt-in model-group allowlist for background health checks and health-check routing (#38539) 2026-08-27 12:25:56 -07:00
test_router_interactions_endpoints.py Gemini managed agents support (#28270) 2026-05-19 16:02:03 -07:00
test_router_utils_common_utils.py fix(router): warn when a deployment's credentials contradict its provider (#36486) 2026-08-10 18:41:19 -07:00