Function calling
Chat completions accept the usual OpenAItools and tool_choice fields
and return tool_calls with finish_reason: tool_calls. Tool definitions
count toward the input-token reservation, so large schemas reserve more
credit up front.
content: null and a tool_calls
array. Execute the function yourself, append a tool-role message with the
result, and call again — the standard OpenAI loop, unchanged.
The legacy /v1/completions endpoint has no tool
channel; use chat for tools.