BerriAI/litellm · error · ValueError
Batch record for /v1/completions is missing required `prompt
Error message
Batch record for /v1/completions is missing required `prompt` field: model={openai_request_body.get('model', '')} What it means
Error "Batch record for /v1/completions is missing required `prompt` field: model={openai_request_body.get('model', '')}" thrown in BerriAI/litellm.
Source
Thrown at litellm/llms/bedrock/files/transformation.py:646
non_default_params=non_default_params,
optional_params={},
)
return dict(titan_config._transform_request(input=input_text, inference_params=inference_params))
@staticmethod
def _transform_text_completion_body_to_chat_body(
openai_request_body: _OpenAIBatchRecordBody,
) -> Mapping[str, object]:
"""
Rewrite an OpenAI `/v1/completions` batch body as a Chat Completions body.
Bedrock batch `modelInput` is the model's InvokeModel/Converse body, and
no Bedrock batch model takes a bare `prompt`, so the wrapping that
`litellm.text_completion` does in real time has to happen here too.
"""
prompt: Final = openai_request_body.get("prompt")
if prompt is None:
raise ValueError(
"Batch record for /v1/completions is missing required `prompt` field: "
f"model={openai_request_body.get('model', '')}"
)
return _frozen_mapping(
chain(
((key, value) for key, value in openai_request_body.items() if key != "prompt"),
(("messages", text_completion_prompt_to_messages(prompt)),),
)
)
@staticmethod
def _transform_responses_body_to_chat_body(openai_request_body: _OpenAIBatchRecordBody) -> Mapping[str, object]:
"""
Rewrite an OpenAI `/v1/responses` batch body as a Chat Completions body.
Delegates to the same Responses-to-Chat bridge the real-time path uses
for providers without a native Responses API (which is every Bedrock
model), so `input`, `instructions`, `max_output_tokens` and the toolView on GitHub (pinned to 6c2dcb801b)
Solutions
- Include a `prompt` field in each /v1/completions batch record.
When it happens
Trigger: Thrown at litellm/llms/bedrock/files/transformation.py:646 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/0f9425475027eda4.
Report an issue: GitHub.