{"record":{"id":"6a27e95f62bd8d9b","repo":"BerriAI/litellm","slug":"embedding-model-config-semantic-matching-embeddi","errorCode":null,"errorMessage":"embedding model '{config.semantic_matching.embedding_model}' is not a known embedding model","messagePattern":"embedding model '(.+?)' is not a known embedding model","errorType":"exception","errorClass":"ConfigGenerationError","httpStatus":null,"severity":"error","filePath":"litellm/proxy/client/cli/commands/autoroute/config.py","lineNumber":128,"sourceCode":"    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 {\n        \"model_name\": name,\n        \"litellm_params\": {\n            \"model\": f\"litellm_proxy/{name}\",\n            \"api_base\": base_url,\n            \"api_key\": api_key,\n        },\n    }\n\n\ndef build_generated_model_list(config: AutorouteConfig) -> list[JsonValue]:\n    \"\"\"Build the model_list for the ephemeral proxy's config.yaml.\n","sourceCodeStart":110,"sourceCodeEnd":146,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/proxy/client/cli/commands/autoroute/config.py#L110-L146","documentation":"Raised by validate_config when semantic matching is enabled and config.semantic_matching.embedding_model is not among the discovered embedding models. Semantic tier matching needs that embedding model at request time; referencing an unknown or non-embedding model aborts config validation with ConfigGenerationError.","triggerScenarios":"Thrown at litellm/proxy/client/cli/commands/autoroute/config.py:128 when the library encounters an invalid state.","commonSituations":"The autoroute embedding model is not a recognized embedding model.","solutions":["Set semantic_matching.embedding_model to a known embedding model."],"exampleFix":"semantic_matching:\n  embedding_model: text-embedding-3-small","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-14T00:17:10.932Z"}