{"record":{"id":"1502d09899639359","repo":"BerriAI/litellm","slug":"unable-to-map-bedrock-request-to-provider","errorCode":null,"errorMessage":"Unable to map Bedrock request to provider","messagePattern":"Unable to map Bedrock request to provider","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/embed/embedding.py","lineNumber":517,"sourceCode":"                    provider=provider,\n                    is_async_invoke=has_async_invoke,\n                )\n            returned_response: Final = self._single_func_embeddings(\n                client=(client if client is not None and isinstance(client, HTTPHandler) else None),\n                timeout=timeout,\n                batch_data=batch_data,\n                credentials=credentials,\n                extra_headers=extra_headers,\n                endpoint_url=endpoint_url,\n                aws_region_name=aws_region_name,\n                model=model,\n                logging_obj=logging_obj,\n                api_key=api_key,\n                provider=provider,\n                is_async_invoke=has_async_invoke,\n            )\n            if returned_response is None:\n                raise Exception(\"Unable to map Bedrock request to provider\")\n            return returned_response\n        elif data is None:\n            raise Exception(\"Unable to map Bedrock request to provider\")\n\n        headers = {\"Content-Type\": \"application/json\"}\n        if extra_headers is not None:\n            headers = {\"Content-Type\": \"application/json\", **extra_headers}\n\n        prepped: Final = self.get_request_headers(\n            credentials=credentials,\n            aws_region_name=aws_region_name,\n            extra_headers=extra_headers,\n            endpoint_url=endpoint_url,\n            data=json.dumps(data),\n            headers=headers,\n            api_key=api_key,\n        )\n","sourceCodeStart":499,"sourceCodeEnd":535,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/embed/embedding.py#L499-L535","documentation":"On the batch path (batch_data built for providers that chunk inputs, e.g. cohere/titan/twelvelabs), the delegated _async_func_embeddings/_single_func_embeddings call returned None, so there is nothing to hand back to the caller. It signals an internal dispatch/mapping failure rather than an AWS error.","triggerScenarios":"Input list length > 1 (or provider requires batching) routes to the batch branch; a provider sub-path returns None from _transform_response (see error 1263) which propagates up as this wrapper exception.","commonSituations":"Same root causes as 1263 (unmapped/new model response shape), surfaced on multi-input embedding calls instead of single-input calls.","solutions":["Upgrade litellm to pick up new provider transformations.","Reproduce with a single-element input list to see the underlying mapping error more directly.","Confirm the model id exactly matches a supported provider model.","Report model + litellm version upstream if the model is supported."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    resp = litellm.embedding(model=model, input=inputs)\nexcept Exception as e:\n    if \"Unable to map Bedrock request to provider\" in str(e):\n        return litellm.embedding(model=FALLBACK_MODEL, input=inputs)\n    raise","preventionTips":["Smoke-test multi-input (batch) calls, not just single inputs, in CI.","Keep litellm updated when adopting new Bedrock embedding models.","Configure a known-good fallback model for batch embedding pipelines."],"tags":["bedrock","embedding","batch","internal"],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}