Inference Router Tool Calling
Declare a Function Tool
Declare function tools as you would for the OpenAI Chat Completions or Anthropic Messages API. The router passes them to the model. When the model calls one, the response has finish_reason: "tool_calls" and the calls in message.tool_calls.
Run the function yourself, then send its result back in a message with role: "tool" and the tool_call_id of the call. The model then answers.
Whether a model honors tool_choice is up to the model’s vendor.
Combine With Web Tools
A request can declare function tools and web tools together. The router runs a turn that calls only web tools and continues. A turn that calls one of your function tools comes back to you with the tool calls, and the router does not run web tools in that turn. When a request declares both kinds, parallel_tool_calls defaults to true unless you set it.