Hello everyone.
I’ve started to experience the error I mentioned in the title today. OpenAI Responses API is triggering that error when doing this:
- After the first prompt, I’m getting an output like this (yes, I’m using “Computer Use” feature):
[
{
"type": "reasoning",
"id": "rs_67e298fa71e48191804f5ef7dc01a79f058d08e67dc0a7e4",
"summary": []
},
{
"type": "computer_call",
"id": "cu_67e298fd07a88191891aa0cfd233b95f058d08e67dc0a7e4",
"call_id": "call_vjl9d5iUZJntCiFa5CSz3E05",
"action": {
"type": "click",
"button": "left",
"x": 481,
"y": 377
},
"pending_safety_checks": [],
"status": "completed"
}
]
- My application makes another request to the api with this input:
[
{
type: 'reasoning',
id: 'rs_67e298fa71e48191804f5ef7dc01a79f058d08e67dc0a7e4',
summary: []
},
{
call_id: 'call_vjl9d5iUZJntCiFa5CSz3E05',
type: 'computer_call_output',
output: {
type: 'input_image',
image_url: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABQAAAALQCAIAAABAH0oBAAAAAXNSR0IArs4c6QAAIABJREFUeJzsnemW3DayrQMpyZZkzbL74e856577fKetWbLUkipxfyQDsWMCwamq3F1cXnCIlUmA' ....
},
current_url: 'about:home'
}
]
And this is the code snippet how I use the endpoint (in Node.JS):
response = await openai.responses.create({
model: "computer-use-preview",
previous_response_id: response?.id,
tools: [
{
type: "computer_use_preview",
...dimensions,
environment: "browser", // other possible values: "mac", "windows", "ubuntu"
},
...functions,
],
input: input,
truncation: "auto",
});
Currently, for me it’s unknown how to deal with outputs of type “reasoning”, so I just add them back to the input because they don’t provide any information on what I should do with these objects. Sometimes the api returns a reasoning object alone in “response.output”, so I’ve used to add the reasoning object back to the input in such situations. It was working. But since today, it’s stopped working. And even if I add “reasoning” objects to the input always, while the documentation says it’s not required as “previous_response_id” is used, it’s throwing that error still.
Looking forward to get an answer from OpenAI devs as they know what’s going on.
Thanks.