{"record":{"id":"71bdb3a7b954bca5","repo":"BerriAI/litellm","slug":"unable-to-determine-bedrock-embedding-provider-for","errorCode":null,"errorMessage":"Unable to determine bedrock embedding provider for model: {model}. Supported providers: {list(get_args(BEDROCK_EMBEDDING_PROVIDERS_LITERAL))}","messagePattern":"Unable to determine bedrock embedding provider for model: (.+?)\\. Supported providers: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/embed/embedding.py","lineNumber":397,"sourceCode":"        api_key: str | None = None,\n    ) -> EmbeddingResponse:\n        credentials, aws_region_name = self._load_credentials(optional_params)\n\n        ### TRANSFORMATION ###\n        unencoded_model_id: Final = optional_params.pop(\"model_id\", None) or model  # default to model if not passed\n        modelId: Final = urllib.parse.quote(unencoded_model_id, safe=\"\")\n        aws_region_name = self._get_aws_region_name(\n            optional_params={\"aws_region_name\": aws_region_name},\n            model=model,\n            model_id=unencoded_model_id,\n        )\n        # Check async invoke needs to be used\n        has_async_invoke: Final = \"async_invoke/\" in model\n        if has_async_invoke:\n            model = model.replace(\"async_invoke/\", \"\", 1)\n        provider: Final = self.get_bedrock_embedding_provider(model)\n        if provider is None:\n            raise Exception(\n                f\"Unable to determine bedrock embedding provider for model: {model}. \"\n                f\"Supported providers: {list(get_args(BEDROCK_EMBEDDING_PROVIDERS_LITERAL))}\"\n            )\n        inference_params = copy.deepcopy(optional_params)\n        inference_params = {\n            k: v for k, v in inference_params.items() if k.lower() not in self.aws_authentication_params\n        }\n        inference_params.pop(\"user\", None)  # make sure user is not passed in for bedrock call\n\n        data: CohereEmbeddingRequest | None = None\n        batch_data: list | None = None\n        if provider == \"cohere\":\n            data = BedrockCohereEmbeddingConfig()._transform_request(\n                model=model, input=input, inference_params=inference_params\n            )\n        elif provider == \"amazon\" and model in [\n            \"amazon.titan-embed-image-v1\",\n            \"amazon.titan-embed-text-v1\",","sourceCodeStart":379,"sourceCodeEnd":415,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/embed/embedding.py#L379-L415","documentation":"get_bedrock_embedding_provider() could not infer which transformation family the model belongs to (cohere / amazon / titan / twelvelabs / nova) from the model string, so the request cannot be serialized. The message lists the providers get_args(BEDROCK_EMBEDDING_PROVIDERS_LITERAL) accepts, which is the authoritative set.","triggerScenarios":"Calling bedrock embeddings with a model string whose prefix matches no known family — e.g. 'bedrock/somevendor.embed-foo-v1', a typo like 'bedrock/cohere.embed-english-v2' (nonexistent version), or a chat/completion model id accidentally passed to litellm.embedding().","commonSituations":"Typos in the model id; passing non-embedding Bedrock models to the embedding endpoint; using a provider added in a newer litellm than the installed one; forgetting the 'bedrock/' prefix conventions.","solutions":["Check the exact model id against the error's supported-provider list and fix typos (e.g. bedrock/cohere.embed-english-v3).","Upgrade litellm if the provider family is genuinely new.","Ensure you are calling litellm.embedding()/aembedding() with an actual Bedrock embedding model, not a chat model.","For custom/unmapped ids, subclass or register a config via the Bedrock provider extension points."],"exampleFix":"# before\nresp = litellm.embedding(model=\"bedrock/cohere.embed-english-v2\", input=[\"hi\"])\n\n# after\nresp = litellm.embedding(model=\"bedrock/cohere.embed-english-v3\", input=[\"hi\"])","handlingStrategy":"validation","validationCode":"KNOWN_PREFIXES = (\"cohere.\", \"amazon.\", \"twelvelabs.\")\ndef check(model: str):\n    stem = model.removeprefix(\"bedrock/\")\n    assert stem.startswith(KNOWN_PREFIXES), f\"model {model!r} has no bedrock embedding provider\"","typeGuard":"def is_bedrock_embedding_model_id(model: str) -> bool:\n    stem = model.removeprefix(\"bedrock/\").removeprefix(\"async_invoke/\")\n    return stem.startswith((\"cohere.\", \"amazon.\", \"twelvelabs.\"))","tryCatchPattern":null,"preventionTips":["Validate model ids against a config-curated list before calling the SDK.","Never pass chat model ids to litellm.embedding().","Unit-test the model-to-provider mapping for every model string you configure."],"tags":["bedrock","embedding","model-id","validation"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}