OpenAI Chat Completions
Nested
function schema, tool_calls array, role: "tool" results.OpenAI Responses
Flat function schema,
function_call items, function_call_output results.Anthropic Messages
input_schema shape, tool_use blocks, tool_result blocks.Quick comparison
| Chat Completions | Responses | Anthropic Messages | |
|---|---|---|---|
| Tool def shape | {type, function: {…}} | {type, name, parameters} | {name, input_schema} |
| Model returns | message.tool_calls[] | output[].function_call | content[].tool_use |
| Continue with | role: "tool" message | function_call_output item | tool_result content block |
| Stream marker | finish_reason: "tool_calls" | response.function_call.done | stop_reason: "tool_use" |
