litellm/tests/test_litellm/router_strategy
tin-berri eb45a088d3
fix(router): resolve team-scoped auto-routers by their public name (#40432)
A team-scoped auto-router is stored under an internal
model_name_{team_id}_{uuid} with the caller-facing name in
model_info.team_public_model_name, and the four pre-routing strategy
registries key on that internal name. A team key asks for the public name,
so the strategy lookup missed, the team early-resolve exit handed back the
marker deployment itself, and every call 400'd with "Unmapped LLM provider".

The strategy lookup now resolves the requested name through the same
team-first, then global, then admin-across-teams deployment resolution the
deployment path uses, and looks the registries up under the model_name of
whatever that resolves to. Both exits of _common_checks_available_deployment
drop strategy markers through one helper, so a marker-only resolution is
rejected as uncallable on every path. The request team id has one reader.

Resolves LIT-7363


Claude-Session: https://claude.ai/code/session_01NU97S7d2FUDDvTk59k53Wp

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-09 15:53:05 -07:00
..
adaptive_router Merge pull request #39955 from BerriAI/litellm_fix_adaptive_router_bandit_prior 2026-09-05 18:02:04 -07:00
test_auto_router.py address review: trim remaining comment verbosity 2026-09-05 15:43:03 -07:00
test_base_routing_strategy.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_budget_limiter_hotpath.py fix(router): enforce deployment budgets for dynamically added models (#29273) 2026-05-29 19:43:14 -07:00
test_complexity_router.py fix(router): resolve team-scoped auto-routers by their public name (#40432) 2026-09-09 15:53:05 -07:00
test_complexity_tier_predictor.py feat(router): add heuristic v2 complexity routing (#39276) 2026-09-02 23:33:04 +00:00
test_lar1_routing.py chore: litellm oss staging (#31185) 2026-06-26 09:17:44 -07:00
test_least_busy.py fix(least-busy): keep the shared count readable, counted once, and off the loop 2026-09-06 00:20:05 -07:00
test_litellm_encoder.py fix: address cross-version CI failures 2026-09-02 14:17:19 -07:00
test_lowest_cost.py fix(router): give cost-based routing its own cache key so it stops overwriting latency samples (#40225) 2026-09-08 13:56:06 -07:00
test_lowest_latency.py feat(router): support percentile-based TTFT routing (#40352) 2026-09-09 10:47:34 -07:00
test_quality_router.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_router_routing_groups.py fix(router): keep per-request routing_strategy override selectors out of global callbacks (#40229) 2026-09-08 13:54:05 -07:00
test_router_routing_plugins.py fix(router): let prompt-management plugins see the caller's own messages 2026-09-06 02:44:45 -07:00
test_router_tag_regex_routing.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_router_tag_routing.py fix(router): keep deployment tags out of retry and fallback tag routing (#40226) 2026-09-08 21:15:36 +00:00
test_savings_baseline.py fix(router): drop a tier param the routed target cannot take (#38622) 2026-08-28 14:17:49 -07:00
test_simple_shuffle.py fix(router): let simple-shuffle weight by any deployment's weight/rpm/tpm (#40222) 2026-09-08 13:55:36 -07:00
test_stall_detector.py fix(router): anchor stall detection on the newest tool call 2026-09-04 16:03:20 -07:00