Skip to main content
writer-0.1 calls functions on both APIs. A call only ever names a function from the request’s tools. With no tools, or with tool_choice: "none", the model answers in text.

Chat Completions

Offer functions in tools. Set tool_choice to auto (the default), none, required, or a named function to force that call. Set parallel_tool_calls: false to ask for at most one call.
When the model calls functions, finish_reason is tool_calls and the message carries tool_calls in OpenAI’s format. arguments is a JSON string. Streamed calls arrive as delta.tool_calls. Send the assistant message with its tool_calls and one tool message per call back in the history. Only function tools are sent to the model; other tool types are ignored. A tool call in the history whose arguments aren’t valid JSON, or a custom tool call, reaches the model as text.
The legacy functions parameter is ignored, and a legacy function_call that names a function is rejected with 400 unsupported_parameter. Use tools and tool_choice.

Responses API

Functions are flat: {type: "function", name, description, parameters, strict}. tool_choice takes "auto", "none", "required" or {type: "function", name}.
Calls are function_call items in response.output, and arguments is a JSON string. The Responses API keeps no conversation state (previous_response_id isn’t supported), so send the earlier input and output items each time, followed by a function_call_output for each call. Notra still keeps every request in your workspace’s Logs; see Data and privacy. Only message text counts toward the SDK’s output_text. Function arguments stream as response.function_call_arguments.delta and response.function_call_arguments.done. Tools other than functions, like built-in and custom tools, are rejected with 400 unsupported_parameter.
Last modified on December 5, 2026