BerriAI/litellm · error · ConfigGenerationError

embedding model '{config.semantic_matching.embedding_model}'

Error message

embedding model '{config.semantic_matching.embedding_model}' is not a known embedding model

What it means

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.

Source

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

    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 {
        "model_name": name,
        "litellm_params": {
            "model": f"litellm_proxy/{name}",
            "api_base": base_url,
            "api_key": api_key,
        },
    }


def build_generated_model_list(config: AutorouteConfig) -> list[JsonValue]:
    """Build the model_list for the ephemeral proxy's config.yaml.

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Set semantic_matching.embedding_model to a known embedding model.

Example fix

semantic_matching:
  embedding_model: text-embedding-3-small
Defensive patterns

Strategy: validation

When it happens

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

Common situations: The autoroute embedding model is not a recognized embedding model.


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