Tools
Use OpenAI-compatible tools, tool choice, structured output, and web search fields.
Nodal forwards OpenAI-style tool and structured output fields through the chat gateway when the selected provider model supports them.
Tool Calling
Send tools and tool_choice to /v1/chat/completions:
{
"model": "Smart",
"messages": [{ "role": "user", "content": "Look up this order." }],
"tools": [
{
"type": "function",
"function": {
"name": "get_order",
"description": "Return order details by id",
"parameters": {
"type": "object",
"properties": {
"id": { "type": "string" }
},
"required": ["id"]
}
}
}
],
"tool_choice": "auto"
}
Nodal does not execute your functions. Your application receives tool calls from the model, runs the corresponding function, and sends follow-up tool messages.
Structured Output
Use response_format for provider-supported JSON and schema-guided outputs. Model support varies; choose models with matching capabilities.
Web Search
Send web_search_options to request provider-native web search:
{
"model": "Smart",
"messages": [{ "role": "user", "content": "Summarize recent pricing changes." }],
"web_search_options": {
"search_context_size": "medium"
}
}
Allowed context sizes are low, medium, and high. When the object is present without a valid size, Nodal normalizes to medium.
Web search can add billing surcharges and may stream provider annotations as citation deltas.