mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-15 23:31:29 +00:00
BREAKING CHANGE: a complexity_router_config.tiers map that omits a tier, or names one with an empty pool or an empty pin, is now rejected at config load A tier with no models of its own did not route nowhere; it routed somewhere else. Resolution fell through to another tier's pool or to default_model, so traffic an operator had classified as COMPLEX was answered by whatever the chain reached, and the only evidence was in a spend log. That substitution is what this removes: the model named for a tier is the model that tier gets The check runs on ComplexityRouterConfig, so it covers config.yaml, /model/new, the SDK and the UI alike, and it names every missing tier at once rather than one per restart. Omitting `tiers` entirely is unaffected and still fills in all four defaults, so this only reaches configs that opted into naming tiers and left some out Three behaviors become unreachable and their tests now assert the rejection instead: default_model standing in for an unconfigured tier, the empty-pool error raised when a tier was first selected rather than at load, and escalation skipping an intermediate tier that had no models. The fallback code paths stay as defense for configs built outside the validator; removing them is a separate change The repo's own suites carried 28 partial tiers maps, all of them incidental setup for tests about something else, which is a fair signal that real configs do the same. They are completed here without changing what each test exercises |
||
|---|---|---|
| .. | ||
| .coverage_baseline | ||
| __init__.py | ||
| _coverage_check.py | ||
| _pin_check.py | ||
| conftest.py | ||
| test_background_health.py | ||
| test_exception_handlers.py | ||
| test_harness_smoke.py | ||
| test_lifecycle.py | ||
| test_openapi_customization.py | ||
| test_proxy_config.py | ||
| test_routes_anthropic_beta.py | ||
| test_routes_assistants.py | ||
| test_routes_audio.py | ||
| test_routes_chat_completions.py | ||
| test_routes_completions.py | ||
| test_routes_config.py | ||
| test_routes_embeddings.py | ||
| test_routes_invitation.py | ||
| test_routes_login_sso.py | ||
| test_routes_misc.py | ||
| test_routes_model_cost_map.py | ||
| test_routes_model_info.py | ||
| test_routes_model_metrics.py | ||
| test_routes_models.py | ||
| test_routes_moderations.py | ||
| test_routes_onboarding.py | ||
| test_routes_queue.py | ||
| test_routes_threads.py | ||
| test_routes_utils.py | ||
| test_spend_counters.py | ||
| test_streaming_helpers.py | ||
| test_team_model_name_translation.py | ||