Skip to main content
The model asks for a tool call, your code runs the function, and you send the result back in a tool message. Repeat until finish_reason is stop.
The assistant message goes back into messages unchanged, with its tool_calls and any reasoning_details. Some models lose their reasoning between tool calls if you rebuild the message from its fields. tool_choice takes auto, none, required or {"type": "function", "function": {"name": "..."}}. parallel_tool_calls: false asks for one call per turn. The rules NagaAI enforces, such as a result for every call, are in Tool calling.