Chat Completions API uses the OpenAI chat tool format: define tools, receive tool_calls, and return tool results as role: tool messages.
Use this when you need tool calling but want to keep an existing chat-based client or agent stack.
Request Shape
Assistant Tool Call
When the model decides to call a tool, the assistant message includestool_calls.
Return Tool Results
Send tool results back as arole: tool message with the matching tool_call_id.
reasoning_details alongside tool calls. If you want continuity across turns, return that reasoning payload unchanged with the assistant message in the follow-up request. See Chat Completions Reasoning.
Streaming Behavior
When streaming is enabled, tool arguments arrive incrementally indelta.tool_calls[].function.arguments.
Caveats
- the chat wire shape uses
tool_calls, notfunction_callitems - the follow-up tool result must be a
role: toolmessage, not afunction_call_outputitem parallel_tool_callsis a request-level flag when you need to constrain parallel tool execution behavior
Common mistakes
- sending tool results back in Responses format instead of chat message format
- assuming the assistant will always produce final text in the same turn as the tool call
- not buffering streamed
tool_callsarguments until they are complete