I’m experimenting with the Realtime API (text-only, gpt-4o-mini-realtime-preview).
My flow is roughly:
- I receive response.function_call_arguments.done
{
"type": "response.function_call_arguments.done",
"name": "add",
"call_id": "call_I63LY4m3iJCJ6g4H",
"arguments": "{\"a\":2,\"b\":3}"
}
-
I execute the tool locally (2 + 3 = 5).
-
I try to send the result and ask the model for the next assistant response in one WebSocket message:
{
"type": "response.create",
"response": {
"modalities": ["text"],
"input": [
{
"type": "function_call_output",
"call_id": "call_I63LY4m3iJCJ6g4H",
"output": "{\"result\":5}"
}
]
}
}
- The server immediately replies:
error
Tool call ID ‘call_I63LY4m3iJCJ6g4H’ not found in conversation.
Things to note
-
I temporarily commented out all session.update / session.updated handling to see whether the call_id issue was session-related. Likewise, after routing to a different agent I skipped the extra session.update as a test to check if the session state was influencing the call_id pairing.
-
If I revert to the classic two-step flow
(1) conversation.item.create with function_call_output, then
(2) separate response.create,
everything works—so the tool call ID is valid in the server’s history.
Questions
- Is there a minimal, working example of sending function_call_output in a single response.create message?
- Does skipping session.update after switching agents invalidate the conversation state in a way that breaks tool-call pairing?
Any pointers or sample payloads would be greatly appreciated!
Thanks in advance.