News · November 18, 2026

Tool calling: which models accept tools?

Four catalogue models expose the tools capability. JSON schema, tool_calls response, client-side loop and the real cost of each tool turn.

· 4 min read · Effrenus Team · RSS

tool-callingapipython

A model does not trigger a function: it proposes a call, described in JSON, which your code executes afterwards. That is the whole tool calling contract, and it is available on POST /v1/chat/completions with the OpenAI format. Four catalogue identifiers advertise the tools capability; the two other served models remain usable in plain conversation, without tool calls.

What the gateway forwards, and what it never runs

You send a tools list — name, description, parameters as JSON Schema — and optionally a tool_choice. The gateway forwards the request body to the vLLM backend after rewriting the model name; it neither builds nor interprets tool calls. Splitting the output is done on the backend side, by the --enable-auto-tool-choice and --tool-call-parser hermes options declared in the catalogue.

The direct consequence: the API never executes your functions. The model returns text, or one or more tool_calls with JSON arguments. You run the tool, then send the result back in a role: "tool" message carrying the matching tool_call_id. The gateway bills that second turn like the first, per token.

Typical use cases: reading an internal database, computing an amount, querying a business API, booking a slot. For purely deterministic logic, call your function directly: the model adds no guarantee of accuracy, and a badly described schema produces wrong arguments.

Four catalogue models advertise the tools capability

The capability belongs to the model, not to the API. Out of the six public identifiers in the catalogue, four declare tools:

  • Dolphin 3.0 (Llama 3.1 8B) — dolphin-3.0-llama3.1-8b, 32,768-token context, €0.20/M input and €0.55/M output;
  • Qwen2.5 32B (abliterated) — qwen2.5-32b-abliterated, 32,768-token context, €0.55/M input and €1.60/M output;
  • Qwen3.6 35B A3B (abliterated) — qwen3.6-35b-a3b-abliterated, 65,536-token context, €0.30/M input and €0.90/M output;
  • Qwen3.8 27B (abliterated) — qwen3.8-27b-abliterated, 65,536-token context, €0.20/M input and €0.60/M output.

The other two — Llama 3.3 70B (abliterated) and DeepSeek R1 Distill 8B (abliterated) — are served without a tool parser. This is not a configuration mistake: the schema is forwarded, the model answers in text and tool_calls stays empty. The capability can be read without guessing, in the capabilities field of GET /v1/models or on the model page.

The prices above come from the public grid, in euros per million tokens. They do not change depending on whether you use tools. What does change is that the tool schema counts as input tokens, on every turn where you send it back.

The complete loop

import json
from openai import OpenAI

client = OpenAI(base_url="https://api.effrenus.com/v1", api_key="sk-ef-...")

def balance(client_id: str) -> dict:
    return {"client_id": client_id, "balance_eur": 42}

tools = [{
    "type": "function",
    "function": {
        "name": "balance",
        "description": "Balance of a customer (demonstration data).",
        "parameters": {
            "type": "object",
            "properties": {"client_id": {"type": "string"}},
            "required": ["client_id"],
        },
    },
}]

messages = [{"role": "user", "content": "What is customer 42's balance?"}]
response = client.chat.completions.create(
    model="dolphin-3.0-llama3.1-8b",
    messages=messages, tools=tools, tool_choice="auto",
)
message = response.choices[0].message
messages.append(message)

for call in message.tool_calls or []:
    try:
        arguments = json.loads(call.function.arguments or "{}")
    except json.JSONDecodeError:
        arguments = {}
    if call.function.name == "balance":
        result = balance(**arguments)
    else:
        result = {"error": "unknown tool"}
    messages.append({
        "role": "tool",
        "tool_call_id": call.id,
        "content": json.dumps(result),
    })

final = client.chat.completions.create(
    model="dolphin-3.0-llama3.1-8b", messages=messages, tools=tools,
)
print(final.choices[0].message.content)

The second call is not decorative: it is what turns the raw result into a readable sentence. It is billed as a normal call, with the tool schema back in the input tokens — hence the value of short descriptions if you loop often.

Reading a response and capping the loop

  • finish_reason is tool_calls when the model wants to call a tool. A stop without tool_calls is an ordinary text answer.
  • Each call carries a unique id: send it back as-is in the tool message, otherwise the backend cannot attach the result.
  • function.arguments is a JSON string, sometimes empty, sometimes invalid. Parse it inside a try and hand the error back to the model rather than crashing the loop.
  • Several calls can arrive in the same message: one tool message per call, with its identifier.
  • In streaming mode, calls arrive as delta.tool_calls fragments, with an index and partial arguments. Accumulate them before executing; the streaming SSE guide describes the event format.
  • tool_choice accepts "auto", "required" or a named tool. The constraint is not followed to the letter by every model: validate the response before executing.
  • Cap the number of turns, between four and eight, and set a max_tokens ceiling: a model can call the same tool over and over. A tool that writes to a database or triggers a payment must be validated server-side, not merely described in the prompt.

The models on the service are open-weight and served without a learned refusal layer. That moves the boundary, it does not remove it: refusals remain possible, and the legal framework does not change with the model you pick. The full format, pitfalls and loop are detailed in the tool calling documentation; per-million-token prices are on the Pricing page, per-model capabilities in the catalogue, and rate limits in the FAQ.

Read next

From reading to API calls

Create a key, top up from €5 and test the catalogue.

Create API key

← All news