BerriAI/litellm · error · Exception

Unable to determine bedrock embedding provider for model

Error message

Unable to determine bedrock embedding provider for model: {model}. Supported providers: {list(get_args(BEDROCK_EMBEDDING_PROVIDERS_LITERAL))}

What it means

Dispatch guard in Bedrock embeddings: the model does not map to any provider in BEDROCK_EMBEDDING_PROVIDERS_LITERAL, so no transformation config exists to build the invoke request. The model name is the input at fault.

Solutions

  1. Use one of the supported Bedrock embedding providers listed in the error.
  2. Check the model id for typos.
  3. Pass a model id that identifies a known embedding provider (e.g. amazon.titan-embed-text-v2:0).
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/llms/bedrock/embed/embedding.py:397 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/71bdb3a7b954bca5. Report an issue: GitHub.

Appendix: source

Thrown at litellm/llms/bedrock/embed/embedding.py:397

        api_key: str | None = None,
    ) -> EmbeddingResponse:
        credentials, aws_region_name = self._load_credentials(optional_params)

        ### TRANSFORMATION ###
        unencoded_model_id: Final = optional_params.pop("model_id", None) or model  # default to model if not passed
        modelId: Final = urllib.parse.quote(unencoded_model_id, safe="")
        aws_region_name = self._get_aws_region_name(
            optional_params={"aws_region_name": aws_region_name},
            model=model,
            model_id=unencoded_model_id,
        )
        # Check async invoke needs to be used
        has_async_invoke: Final = "async_invoke/" in model
        if has_async_invoke:
            model = model.replace("async_invoke/", "", 1)
        provider: Final = self.get_bedrock_embedding_provider(model)
        if provider is None:
            raise Exception(
                f"Unable to determine bedrock embedding provider for model: {model}. "
                f"Supported providers: {list(get_args(BEDROCK_EMBEDDING_PROVIDERS_LITERAL))}"
            )
        inference_params = copy.deepcopy(optional_params)
        inference_params = {
            k: v for k, v in inference_params.items() if k.lower() not in self.aws_authentication_params
        }
        inference_params.pop("user", None)  # make sure user is not passed in for bedrock call

        data: CohereEmbeddingRequest | None = None
        batch_data: list | None = None
        if provider == "cohere":
            data = BedrockCohereEmbeddingConfig()._transform_request(
                model=model, input=input, inference_params=inference_params
            )
        elif provider == "amazon" and model in [
            "amazon.titan-embed-image-v1",
            "amazon.titan-embed-text-v1",

View on GitHub (pinned to 77b7c6c40c)