BerriAI/litellm · error · ValueError
Embedding batch records do not have a chat-completion equiva
Error message
Embedding batch records do not have a chat-completion equivalent
What it means
Error "Embedding batch records do not have a chat-completion equivalent" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/bedrock/files/transformation.py:710
@staticmethod
def _transform_batch_body_to_chat_body(
openai_request_body: _OpenAIBatchRecordBody,
record_kind: BedrockBatchRecordKind,
) -> Mapping[str, object]:
"""
Normalize a non-embedding batch body to the Chat Completions shape the
per-provider Bedrock transformations expect.
"""
match record_kind:
case BedrockBatchRecordKind.TEXT_COMPLETION:
return BedrockFilesConfig._transform_text_completion_body_to_chat_body(openai_request_body)
case BedrockBatchRecordKind.RESPONSES:
return BedrockFilesConfig._transform_responses_body_to_chat_body(openai_request_body)
case BedrockBatchRecordKind.CHAT:
return openai_request_body
case BedrockBatchRecordKind.EMBEDDING:
raise ValueError("Embedding batch records do not have a chat-completion equivalent")
def _map_openai_to_bedrock_params(
self,
openai_request_body: Mapping[str, Any],
model: str,
provider: str | None = None,
) -> dict[str, object]:
"""
Transform OpenAI request body to Bedrock-compatible modelInput
parameters using existing transformation logic.
Routes to the correct per-provider transformation so that the
resulting dict matches the InvokeModel body that Bedrock expects
for batch inference.
"""
from litellm.types.utils import LlmProviders
messages: Final = openai_request_body.get("messages", [])View on GitHub (pinned to 6c2dcb801b)
Solutions
- Embedding batch records cannot be converted to chat-completion format; use an embedding route.
When it happens
Trigger: Thrown at litellm/llms/bedrock/files/transformation.py:710 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/a751f78456fe6397.
Report an issue: GitHub.