Skip to main content
Tera supports tool calling on models that advertise the tools feature in their catalog entry. The request and response shapes match the OpenAI Chat Completions API.

Defining tools

Response

When the model decides to call a tool, the response carries tool_calls and finish_reason: "tool_calls":

Returning tool results

Append the assistant’s tool call and your tool’s output to messages, then call the API again:

tool_choice

Default is "auto" — the model decides whether to call a tool. Other modes:
  • "none" — disable tool calling for this request
  • "required" — force a tool call
  • {"type": "function", "function": {"name": "..."}} — force a specific tool

Streaming tool calls

With stream: true, tool call arguments arrive as deltas. Concatenate delta.tool_calls[i].function.arguments strings across chunks to reconstruct the full JSON.

Model support

Not every model in our catalog supports tools. Check supported_features in /v1/models — only models that include "tools" will reliably call functions. See Models.