BerriAI/litellm · error · ValueError
No models configured for tier {tier_key}
Error message
No models configured for tier {tier_key} What it means
Routing guard in the complexity router: the tier has no entry in config.tiers at all (and no default_model fallback applied), so the router cannot map this complexity tier to any model.
Source
Thrown at litellm/router_strategy/complexity_router/complexity_router.py:1200
self,
tier: ComplexityTier,
raw_messages: list[dict[str, Any]] | None,
resolved_messages: list[dict[str, Any]] | None,
request_kwargs: dict,
) -> str:
if not self.config.plugins:
return self.get_model_for_tier(tier)
from litellm.types.router import RoutingContext
tier_key: Final = tier.value
metadata_key: Final = "litellm_metadata" if "litellm_metadata" in request_kwargs else "metadata"
pool: Final = tuple(self._tier_pools().get(tier_key, ()))
if not pool:
# Nothing for the plugins to filter. Falling through would raise the
# plugin-filtering error below and send the operator hunting for a policy
# plugin that never ran, so name the real problem: the tier has no models.
raise ValueError(f"No models configured for tier {tier_key}")
context = RoutingContext(
raw_messages=raw_messages or [],
structured_messages=resolved_messages or [],
candidate_models=list(pool),
metadata=request_kwargs.get(metadata_key) or {},
)
for plugin in self.config.plugins:
context = await plugin.run(context)
if not context.candidate_models:
# A plugin narrowing a tier to zero candidates is a policy decision (e.g. no
# model this tenant's budget allows) -- falling back to default_model here
# (which was never checked against the plugins) would let that policy be
# silently bypassed. Raise instead, matching the Router-level plugin
# pipeline's own fail-closed behavior for the same situation.
raise ValueError(f"No candidate models left for tier {tier_key} after routing-plugin filtering")
return self._pick_from_tier_value(context.candidate_models, tier_key)
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Configure models for the tier in the complexity router config.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/router_strategy/complexity_router/complexity_router.py:1200 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/a9de7d511107eb12.
Report an issue: GitHub.