mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-14 09:03:16 +00:00
fix(complexity_router): replace retired claude-sonnet-4-20250514 default with claude-sonnet-5-5
Anthropic retired claude-sonnet-4-20250514 and names claude-sonnet-5-5 as its replacement. A complexity router that relies on the default tiers sends COMPLEX and REASONING requests to the retired model. The new test checks that every default tier names a model in LiteLLM's model cost map
This commit is contained in:
parent
ff91b89b8d
commit
d6d18367e3
2 changed files with 9 additions and 2 deletions
|
|
@ -487,8 +487,8 @@ DEFAULT_TOKEN_THRESHOLDS: Final[dict[str, int]] = {
|
|||
DEFAULT_TIER_MODELS: Final[dict[str, str]] = {
|
||||
"SIMPLE": "gpt-4o-mini",
|
||||
"MEDIUM": "gpt-4o",
|
||||
"COMPLEX": "claude-sonnet-4-20250514",
|
||||
"REASONING": "claude-sonnet-4-20250514",
|
||||
"COMPLEX": "claude-sonnet-5-5",
|
||||
"REASONING": "claude-sonnet-5-5",
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -285,6 +285,13 @@ class TestComplexityRouterInit:
|
|||
assert router.config.tiers == DEFAULT_COMPLEXITY_CONFIG.tiers
|
||||
assert router.config is not DEFAULT_COMPLEXITY_CONFIG # Not a singleton
|
||||
|
||||
@pytest.mark.usefixtures("local_model_cost_map")
|
||||
def test_default_tiers_route_to_models_litellm_knows(self):
|
||||
unknown: Final = {
|
||||
tier: model for tier, model in DEFAULT_COMPLEXITY_CONFIG.tiers.items() if model not in litellm.model_cost
|
||||
}
|
||||
assert unknown == {}
|
||||
|
||||
def test_init_with_default_model(self, mock_router_instance, basic_config):
|
||||
"""Test initialization with default_model override."""
|
||||
router = ComplexityRouter(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue