Appearance
Tools
Function calling, as OpenAI specifies it: tools with functions, tool_choice (auto, none, required, or {"type": "function", "function": {"name": ...}}), parallel_tool_calls, and the history of calls and results in messages.
The model's own chat template carries the tool definitions, and the engine parses what the model writes back into tool_calls, family by family, as llama.cpp's server does. A coding agent (OpenCode, Cline, Continue in agent mode) talks to it directly: Compatibility lists what was run.
One round trip
python
from openai import OpenAI
client = OpenAI(base_url="https://coordinator.internal:8443/v1", api_key=KEY)
tools = [{
"type": "function",
"function": {
"name": "get_weather",
"description": "The weather in a city",
"parameters": {"type": "object",
"properties": {"city": {"type": "string"}},
"required": ["city"]},
},
}]
messages = [{"role": "user", "content": "What is the weather in Paris?"}]
first = client.chat.completions.create(model="qwen3-14b", messages=messages, tools=tools)
call = first.choices[0].message.tool_calls[0] # finish_reason == "tool_calls"
messages += [first.choices[0].message,
{"role": "tool", "tool_call_id": call.id, "content": "18 degrees, sunny"}]
answer = client.chat.completions.create(model="qwen3-14b", messages=messages, tools=tools)Point the SDK at the deployment's CA with SSL_CERT_FILE (Python) or NODE_EXTRA_CA_CERTS (Node).
Streamed
A call arrives as a first delta carrying id, type and function.name, then deltas of function.arguments that add up to a JSON string. Several calls in one answer have increasing index values. The last chunk of the choice says finish_reason: "tool_calls".
On the reference backend
A safetensors model served by the reference backend (on a CPU, or split over machines) calls tools when its chat template is Qwen-style (<tool_call> blocks, as Qwen 2.5 and Qwen 3 write them), with tool_choice auto or none. tool_choice: "required", a named function, and any other template are refused by name: they need a grammar, which that backend does not have. Serve the model from GGUF for those.
