{"record":{"id":"414758d6169bf154","repo":"BerriAI/litellm","slug":"unable-to-map-model-response-to-known-provider-for","errorCode":null,"errorMessage":"Unable to map model response to known provider format. model={model}","messagePattern":"Unable to map model response to known provider format\\. model=(.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/embed/embedding.py","lineNumber":223,"sourceCode":"                returned_response = AmazonTitanG1Config()._transform_response(response_list=response_list, model=model)\n            elif model == \"amazon.titan-embed-text-v2:0\":\n                returned_response = AmazonTitanV2Config()._transform_response(response_list=response_list, model=model)\n            elif model == \"amazon.titan-embed-g1-text-02\":\n                returned_response = AmazonTitanG1Config()._transform_response(response_list=response_list, model=model)\n            elif provider == \"twelvelabs\":\n                returned_response = TwelveLabsMarengoEmbeddingConfig()._transform_response(\n                    response_list=response_list, model=model\n                )\n            elif provider == \"nova\":\n                returned_response = AmazonNovaEmbeddingConfig()._transform_response(\n                    response_list=response_list, model=model, batch_data=batch_data\n                )\n\n        ##########################################################\n        # Validate returned response\n        ##########################################################\n        if returned_response is None:\n            raise Exception(f\"Unable to map model response to known provider format. model={model}\")\n        return returned_response\n\n    def _single_func_embeddings(\n        self,\n        client: HTTPHandler | None,\n        timeout: float | httpx.Timeout | None,\n        batch_data: list[dict],\n        credentials: Any,\n        extra_headers: dict | None,\n        endpoint_url: str,\n        aws_region_name: str,\n        model: str,\n        logging_obj: Any,\n        provider: BEDROCK_EMBEDDING_PROVIDERS_LITERAL,\n        api_key: str | None = None,\n        is_async_invoke: bool | None = False,\n    ):\n        responses: Final[list[dict]] = []","sourceCodeStart":205,"sourceCodeEnd":241,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/embed/embedding.py#L205-L241","documentation":"After dispatching the raw Bedrock responses to the per-provider _transform_response handlers, the dispatcher found returned_response still None — meaning the provider selected for the model produced no mapped EmbeddingResponse. This is an internal mapping gap (or an unrecognized response shape) rather than a user input error in the usual sense.","triggerScenarios":"A model string that routes to a provider branch which returns None (e.g. a provider case that does not match, or a response payload shape the transformer does not recognize), so the final 'Validate returned response' guard fires.","commonSituations":"Using a newly released Bedrock embedding model not yet in the installed LiteLLM version's transformation map; a provider branch silently not setting returned_response; upgrading AWS model versions while running an older litellm release.","solutions":["Upgrade litellm to the latest release — new Bedrock embedding models are added frequently.","Print the exact model string passed (after async_invoke/ stripping) and compare with litellm's supported bedrock embedding providers (cohere, amazon, titan, twelvelabs, nova).","If the model is genuinely unsupported, switch to a supported equivalent (e.g. amazon.titan-embed-text-v2:0).","Report the model + raw response to the litellm repo if the model is listed as supported."],"exampleFix":"# before\nresp = litellm.embedding(model=\"bedrock/<brand-new-embedding-model>\", input=[\"hi\"])\n\n# after\npip install -U litellm\nresp = litellm.embedding(model=\"bedrock/amazon.titan-embed-text-v2:0\", input=[\"hi\"])","handlingStrategy":"validation","validationCode":"import litellm\nfrom litellm.llms.bedrock.embed.embedding import BedrockEmbeddingConfig\nSUPPORTED = {\"cohere\", \"amazon\", \"titan\", \"twelvelabs\", \"nova\"}\nassert model.split(\"/\")[-1].split(\".\")[0] in SUPPORTED or \"titan\" in model","typeGuard":"def is_supported_bedrock_embedding_model(model: str) -> bool:\n    stem = model.removeprefix(\"bedrock/\").removeprefix(\"async_invoke/\")\n    return any(p in stem for p in (\"cohere\", \"titan\", \"amazon\", \"twelvelabs\", \"nova\"))","tryCatchPattern":"try:\n    resp = litellm.embedding(model=model, input=[\"hi\"])\nexcept Exception as e:\n    if \"Unable to map model response\" in str(e):\n        log.warning(\"unsupported bedrock embedding model %s on litellm %s\", model, litellm.__version__)\n    raise","preventionTips":["Pin the litellm version in CI and add a smoke test per model you use.","Test new Bedrock embedding models against your installed litellm version before rollout.","Keep a curated allow-list of validated model ids in config."],"tags":["bedrock","embedding","unsupported-model","mapping"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}