Hey guys!
I’m trying to make the following request to the /v1/responses endpoint via the Vercel AI SDK. This is my request body -
{
"model": "o3",
"input": [
{
"role": "developer",
"content": "system prompt"
},
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "User Input"
}
]
},
{
"type": "reasoning",
"id": "rs_686832016440819aae34aca212b73f790919064fb8db1403",
"encrypted_content": null,
"summary": [
{
"type": "summary_text",
"text": "reasoning summary"
}
]
},
{
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Output Text"
}
]
},
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "Input Text"
}
]
}
],
"reasoning": {
"summary": "detailed"
},
"tools": [
{
"type": "function",
"name": "toolName",
"description": "Tool Description",
"parameters": {
"type": "object",
"properties": {},
"additionalProperties": false,
"$schema": "http://json-schema.org/draft-07/schema#"
},
"strict": false
}
],
"tool_choice": "auto",
"stream": true
}
This is the whole response body -
{
"error": {
"message": "Item 'rs_686832016440819aae34aca212b73f790919064fb8db1403' of type 'reasoning' was provided without its required following item.",
"type": "invalid_request_error",
"param": "input",
"code": null
}
}
I’m not sure what the exact issue is. Please let me know if anyone else has faced a smilar issue and how to fix this. Its not really clear from the error message what exact field is missing from ‘reasoning’.