Messages and tools
Text, images and function calls can be replayed across turns. Provider-private reasoning is not returned or replayed; validated reasoning-token counts remain in usage. Image input uses only routes with verified image capability.
Instruction and user messages
System and developer messages are text-only and must form one leading instruction. User content accepts text plus image_url parts with URL/data URL and auto, low or high detail.
Assistant messages
Assistant content may be null when tool_calls is present. Provider-private reasoning_content/reasoning is not portable history; refusal must be null and annotations must be empty.
Tool results
A tool message requires text content and tool_call_id. It must answer a pending assistant function call before the conversation continues.
Function schema
Each tool uses type function and a function object with a unique name, optional description, JSON-object parameters and optional strict.