{"record":{"id":"0f9425475027eda4","repo":"BerriAI/litellm","slug":"batch-record-for-v1-completions-is-missing-requir","errorCode":null,"errorMessage":"Batch record for /v1/completions is missing required `prompt` field: model={openai_request_body.get('model', '')}","messagePattern":"Batch record for /v1/completions is missing required `prompt` field: model=(.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/bedrock/files/transformation.py","lineNumber":646,"sourceCode":"            non_default_params=non_default_params,\n            optional_params={},\n        )\n        return dict(titan_config._transform_request(input=input_text, inference_params=inference_params))\n\n    @staticmethod\n    def _transform_text_completion_body_to_chat_body(\n        openai_request_body: _OpenAIBatchRecordBody,\n    ) -> Mapping[str, object]:\n        \"\"\"\n        Rewrite an OpenAI `/v1/completions` batch body as a Chat Completions body.\n\n        Bedrock batch `modelInput` is the model's InvokeModel/Converse body, and\n        no Bedrock batch model takes a bare `prompt`, so the wrapping that\n        `litellm.text_completion` does in real time has to happen here too.\n        \"\"\"\n        prompt: Final = openai_request_body.get(\"prompt\")\n        if prompt is None:\n            raise ValueError(\n                \"Batch record for /v1/completions is missing required `prompt` field: \"\n                f\"model={openai_request_body.get('model', '')}\"\n            )\n        return _frozen_mapping(\n            chain(\n                ((key, value) for key, value in openai_request_body.items() if key != \"prompt\"),\n                ((\"messages\", text_completion_prompt_to_messages(prompt)),),\n            )\n        )\n\n    @staticmethod\n    def _transform_responses_body_to_chat_body(openai_request_body: _OpenAIBatchRecordBody) -> Mapping[str, object]:\n        \"\"\"\n        Rewrite an OpenAI `/v1/responses` batch body as a Chat Completions body.\n\n        Delegates to the same Responses-to-Chat bridge the real-time path uses\n        for providers without a native Responses API (which is every Bedrock\n        model), so `input`, `instructions`, `max_output_tokens` and the tool","sourceCodeStart":628,"sourceCodeEnd":664,"githubUrl":"https://github.com/BerriAI/litellm/blob/6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d/litellm/llms/bedrock/files/transformation.py#L628-L664","documentation":"Error \"Batch record for /v1/completions is missing required `prompt` field: model={openai_request_body.get('model', '')}\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/bedrock/files/transformation.py:646 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Include a `prompt` field in each /v1/completions batch record."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6c2dcb801bf2b75c18f1bb24140e7cf57465cc4d","analyzedAt":"2026-08-15T07:12:03.035Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}