BerriAI/litellm · error · ConfigGenerationError

Tier {tier} references unknown chat model '{model}'

Error message

Tier {tier} references unknown chat model '{model}'

What it means

Raised by validate_config when an autoroute tier references a chat model name that model discovery did not return — the generated config names a model the live proxy does not expose (typo, model removed, or discovery ran against a different proxy). Tier-to-model pools cannot contain unknown models, so config generation/validation aborts with ConfigGenerationError.

Source

Thrown at litellm/proxy/client/cli/commands/autoroute/config.py:116

    api_key: str
    # Each tier maps to a pool of one or more models; complexity_router picks randomly among
    # them per request (or, in adaptive mode, learns which to prefer within the pool).
    tiers: dict[str, tuple[str, ...]]
    default_model: str
    classifier: ClassifierChoice = Field(default_factory=HeuristicClassifier)
    semantic_matching: SemanticMatchingChoice = Field(default_factory=NoSemanticMatching)
    adaptive: bool = False


def validate_config(config: AutorouteConfig, discovered: tuple[DiscoveredModel, ...]) -> None:
    """Raise ConfigGenerationError if config references a model discovery didn't return."""
    chat_names: Final[frozenset[str]] = frozenset(m.name for m in chat_models(discovered))
    embedding_names: Final[frozenset[str]] = frozenset(m.name for m in embedding_models(discovered))

    for tier, models in config.tiers.items():
        for model in models:
            if model not in chat_names:
                raise ConfigGenerationError(f"Tier {tier} references unknown chat model '{model}'")

    if config.default_model not in chat_names:
        raise ConfigGenerationError(f"default_model '{config.default_model}' is not a known chat model")

    if isinstance(config.classifier, LLMClassifier) and config.classifier.model not in chat_names:
        raise ConfigGenerationError(f"classifier model '{config.classifier.model}' is not a known chat model")

    if (
        isinstance(config.semantic_matching, SemanticMatching)
        and config.semantic_matching.embedding_model not in embedding_names
    ):
        raise ConfigGenerationError(
            f"embedding model '{config.semantic_matching.embedding_model}' is not a known embedding model"
        )


def _litellm_proxy_deployment(name: str, base_url: str, api_key: str) -> dict[str, JsonValue]:
    return {

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Point the tier at a chat model known to the CLI (a valid model name).
  2. Check the model name for typos.

Example fix

Set the tier model to a known chat model, e.g. gpt-4o.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/client/cli/commands/autoroute/config.py:116 when the library encounters an invalid state.

Common situations: An autoroute tier references a model the CLI does not recognize as a chat model.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/4e4b0a916a2815f1. Report an issue: GitHub.