{"record":{"id":"72782dbca0307c72","repo":"BerriAI/litellm","slug":"bedrock-batch-embedding-currently-supports-only-am","errorCode":null,"errorMessage":"Bedrock batch embedding currently supports only Amazon Titan Text Embeddings V2 (model id contains 'titan-embed-text-v2'). Got model={model!r}. Track other embedding models in https://github.com/BerriAI/litellm/issues.","messagePattern":"Bedrock batch embedding currently supports only Amazon Titan Text Embeddings V2 \\(model id contains 'titan-embed-text-v2'\\)\\. Got model=(.+?)\\. Track other embedding models in https://github\\.com/BerriAI/litellm/issues\\.","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/files/transformation.py","lineNumber":673,"sourceCode":"        Currently routes Amazon Titan Text Embeddings V2 only; other\n        embedding providers (Titan G1, Titan Multimodal, Cohere Embed,\n        Nova Multimodal Embeddings) raise NotImplementedError until they\n        get a dedicated branch. Splitting them keeps PR scope tight and\n        lets each model's request schema be exercised by its own tests.\n\n        AWS docs (Titan v2 InvokeModel body):\n        https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-titan-embed-text.html\n        \"\"\"\n        from litellm.llms.bedrock.embed.amazon_titan_v2_transformation import (\n            AmazonTitanV2Config,\n        )\n\n        if not self._is_titan_v2_embed_model(model):\n            # Refuse early instead of silently shaping the body for the wrong\n            # provider. The synchronous /v1/embeddings path supports more\n            # models, but each has a different InvokeModel schema; mapping\n            # them here without dedicated tests would risk corrupt batches.\n            raise NotImplementedError(\n                \"Bedrock batch embedding currently supports only Amazon \"\n                \"Titan Text Embeddings V2 (model id contains \"\n                f\"'titan-embed-text-v2'). Got model={model!r}. Track other \"\n                \"embedding models in https://github.com/BerriAI/litellm/issues.\"\n            )\n\n        input_text: Final = self._coerce_embedding_input_to_string(openai_request_body.get(\"input\"), model=model)\n\n        # Map OpenAI-style params (dimensions, encoding_format) onto the\n        # Titan v2 schema (dimensions, embeddingTypes) via the embed config\n        # so this stays in sync with the synchronous /v1/embeddings path.\n        non_default_params: Final = {k: v for k, v in openai_request_body.items() if k not in (\"model\", \"input\")}\n        titan_config: Final = AmazonTitanV2Config()\n        inference_params: Final = titan_config.map_openai_params(\n            non_default_params=non_default_params,\n            optional_params={},\n        )\n        return dict(titan_config._transform_request(input=input_text, inference_params=inference_params))","sourceCodeStart":655,"sourceCodeEnd":691,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/bedrock/files/transformation.py#L655-L691","documentation":"LiteLLM's Bedrock batch path only implements the InvokeModel schema for Amazon Titan Text Embeddings V2. When the record's model (after litellm.model_alias_map resolution) does not contain 'titan-embed-text-v2', it refuses early instead of silently building a modelInput for the wrong provider, because each embedding model has a different InvokeModel body. The synchronous /v1/embeddings endpoint supports more models, but batch mappings for others are not yet written.","triggerScenarios":"A batch file containing an embedding record whose body.model is e.g. 'amazon.titan-embed-text-v1:0', 'cohere.embed-english-v3:0', or 'amazon.nova-embed-v1', or a model_alias_map entry that resolves to one of those. Also triggered when no model resolves and the target model string lacks the marker.","commonSituations":"Porting an existing OpenAI/Bedrock embedding batch job to LiteLLM files API; using a company alias that points at Cohere/Titan G1 embeddings; assuming batch parity with the sync /v1/embeddings model list.","solutions":["Switch the record's model to a Titan v2 id such as 'amazon.titan-embed-text-v2:0' (cross-region prefixes like 'us.amazon.titan-embed-text-v2:0' are detected via the substring fallback)","If you must embed with Cohere/Titan G1/Nova, use the real-time /v1/embeddings path instead of batch","Check litellm.model_alias_map for an override remapping your model to a non-Titan-v2 id","File or upvote a GitHub issue (BerriAI/litellm) for the embedding model you need in batch"],"exampleFix":"// before (JSONL line)\n{\"custom_id\": \"req_1\", \"url\": \"/v1/embeddings\", \"body\": {\"model\": \"cohere.embed-english-v3:0\", \"input\": \"hello\"}}\n\n// after\n{\"custom_id\": \"req_1\", \"url\": \"/v1/embeddings\", \"body\": {\"model\": \"amazon.titan-embed-text-v2:0\", \"input\": \"hello\"}}","handlingStrategy":"fallback","validationCode":"TITAN_V2 = \"titan-embed-text-v2\"\n\ndef batch_embedding_supported(model: str) -> bool:\n    return TITAN_V2 in model\n\nassert all(batch_embedding_supported(r[\"body\"][\"model\"]) for r in records if r.get(\"url\") == \"/v1/embeddings\")","typeGuard":"def is_titan_v2_embed_model(model: str) -> bool:\n    return \"titan-embed-text-v2\" in model","tryCatchPattern":"try:\n    file = await client.files.create(file=batch_file, purpose=\"batch\")\nexcept NotImplementedError as e:\n    if \"Titan Text Embeddings V2\" in str(e):\n        # fall back to real-time embeddings for this workload\n        results = [await client.embeddings.create(model=m, input=x) for m, x in embedding_pairs]","preventionTips":["Standardize embedding batch jobs on amazon.titan-embed-text-v2:0 unless another model gets batch support","Check litellm.model_alias_map so aliases don't resolve to unsupported embedding models","Watch the LiteLLM changelog for new Bedrock batch embedding providers"],"tags":["bedrock","embeddings","batch","model-support","not-implemented","litellm"],"backgroundTag":"unsupported-model","analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}