Parameters & tools
Function calls, JSON output and reasoning settings.
Check the model first
Requires an account with paid inference access. Check supported_parameters as well as the uRouter schema. seed, penalties, logprobs, provider selection and arbitrary extra fields are not accepted.
Function tools
Use OpenAI-style function tools with an explicit type: "function". The schema accepts up to 100 definitions. Your application executes the function; the model only requests it. Validate arguments and apply your own authorization before executing a tool.
{
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Read the weather for a city.",
"parameters": {
"type": "object",
"properties": {
"city": {
"type": "string"
}
},
"required": [
"city"
],
"additionalProperties": false
},
"strict": true
}
}
],
"tool_choice": "auto"
}Return a tool result
Append the assistant tool-call message, then a tool message referencing its ID. Function arguments and results are JSON-encoded strings. tool_choice accepts auto, none, required, or an object selecting a named function.
{
"messages": [
{
"role": "assistant",
"content": null,
"tool_calls": [
{
"id": "call_weather",
"type": "function",
"function": {
"name": "get_weather",
"arguments": "{\"city\":\"Paris\"}"
}
}
]
},
{
"role": "tool",
"tool_call_id": "call_weather",
"content": "{\"temperature_c\":18}"
}
]
}Structured output
response_format accepts text, json_object or json_schema. Use a model that advertises this option. JSON mode is not the same as schema validation; validate the returned value in your application.
{
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "answer",
"strict": true,
"schema": {
"type": "object",
"properties": {
"answer": {
"type": "string"
}
},
"required": [
"answer"
],
"additionalProperties": false
}
}
}
}Reasoning
Use the spelling reported by the model. reasoning_effort and reasoning are different fields; do not assume they are interchangeable or send both. The catalog does not enumerate supported effort values per model.
| Field | Shape |
|---|---|
reasoning_effort | One of none, minimal, low, medium, high, xhigh, max. Model support may be narrower. |
reasoning | Object with optional effort (string, ≤30 characters), max_tokens (positive integer), exclude (boolean). |