{"record":{"id":"4e4b0a916a2815f1","repo":"BerriAI/litellm","slug":"tier-tier-references-unknown-chat-model-model","errorCode":null,"errorMessage":"Tier {tier} references unknown chat model '{model}'","messagePattern":"Tier (.+?) references unknown chat model '(.+?)'","errorType":"exception","errorClass":"ConfigGenerationError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/client/cli/commands/autoroute/config.py","lineNumber":116,"sourceCode":"    api_key: str\n    # Each tier maps to a pool of one or more models; complexity_router picks randomly among\n    # them per request (or, in adaptive mode, learns which to prefer within the pool).\n    tiers: dict[str, tuple[str, ...]]\n    default_model: str\n    classifier: ClassifierChoice = Field(default_factory=HeuristicClassifier)\n    semantic_matching: SemanticMatchingChoice = Field(default_factory=NoSemanticMatching)\n    adaptive: bool = False\n\n\ndef validate_config(config: AutorouteConfig, discovered: tuple[DiscoveredModel, ...]) -> None:\n    \"\"\"Raise ConfigGenerationError if config references a model discovery didn't return.\"\"\"\n    chat_names: Final[frozenset[str]] = frozenset(m.name for m in chat_models(discovered))\n    embedding_names: Final[frozenset[str]] = frozenset(m.name for m in embedding_models(discovered))\n\n    for tier, models in config.tiers.items():\n        for model in models:\n            if model not in chat_names:\n                raise ConfigGenerationError(f\"Tier {tier} references unknown chat model '{model}'\")\n\n    if config.default_model not in chat_names:\n        raise ConfigGenerationError(f\"default_model '{config.default_model}' is not a known chat model\")\n\n    if isinstance(config.classifier, LLMClassifier) and config.classifier.model not in chat_names:\n        raise ConfigGenerationError(f\"classifier model '{config.classifier.model}' is not a known chat model\")\n\n    if (\n        isinstance(config.semantic_matching, SemanticMatching)\n        and config.semantic_matching.embedding_model not in embedding_names\n    ):\n        raise ConfigGenerationError(\n            f\"embedding model '{config.semantic_matching.embedding_model}' is not a known embedding model\"\n        )\n\n\ndef _litellm_proxy_deployment(name: str, base_url: str, api_key: str) -> dict[str, JsonValue]:\n    return {","sourceCodeStart":98,"sourceCodeEnd":134,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/client/cli/commands/autoroute/config.py#L98-L134","documentation":"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.","triggerScenarios":"Thrown at litellm/proxy/client/cli/commands/autoroute/config.py:116 when the library encounters an invalid state.","commonSituations":"An autoroute tier references a model the CLI does not recognize as a chat model.","solutions":["Point the tier at a chat model known to the CLI (a valid model name).","Check the model name for typos."],"exampleFix":"Set the tier model to a known chat model, e.g. gpt-4o.","handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}