litellm/tests/test_litellm/router_utils
Yassin Kortam d8762bf4db
fix(router): warn when a deployment's credentials contradict its provider (#36486)
A deployment that carries one provider's credentials while resolving to
another is silently broken: litellm ignores the credentials and sends the
request to the resolved provider. The common shape is a Bedrock model
group where one entry lost its route prefix, so `model: claude-sonnet-5`
with aws_region_name set resolves to the first-party Anthropic API and
returns "x-api-key header is required". Because the router load balances
across the group, only the fraction of requests routed to that entry
fails, which reads as an intermittent provider outage rather than a
config error, and nothing at startup says otherwise.

Warn at deployment registration when provider-scoped credential params
(aws_*, vertex_*) sit on a model that resolves elsewhere, naming the
params, the resolved provider, and the likely missing prefix. Warn only:
an operator may be overriding a route deliberately, so this must not
block startup. Deployments litellm cannot classify are left alone.

Resolves LIT-5391
2026-08-10 18:41:19 -07:00
..
pre_call_checks feat(router): independent, default-on deployment affinity for the auto-router (#36146) 2026-08-08 13:02:29 -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(complexity_router): let operators rename the four complexity tiers (#35893) 2026-08-05 09:42:57 -07:00
test_cooldown_cache.py fix(router): cool down failed fallback deployments and correct cooldown TTL after Redis backfill (#35104) 2026-08-10 16:51:55 -07:00
test_cooldown_handlers.py feat(router): add per-deployment allowed_fails_policy and cooldown_time override support (#34416) 2026-08-10 11:02:06 -07:00
test_fallback_event_handlers.py fix(router): cool down failed fallback deployments and correct cooldown TTL after Redis backfill (#35104) 2026-08-10 16:51:55 -07:00
test_health_check_allowed_fails_integration.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_health_state_cache.py feat(router): add health-check-driven routing behind opt-in flag 2026-03-27 20:57:08 +05:30
test_router_health_check_routing.py Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00: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