Tool calling

Check before you build. A model that answers prose beautifully will still fail the moment an agent expects a structured call.

The state of it

Every model in the catalogue calls tools. Send a tools array and it comes back with finish_reason: tool_calls and arguments that parse, the same as any frontier model. Tool calling depends on how a model is served as well as on its weights, so a model card is not evidence on its own: the tools count in GET /v1/counts is this catalogue's tool-capability statement.

The call

Nothing here is specific to this gateway. It is an OpenAI-shaped tool call, and any client that already sends one needs no change.

curl https://189.24.66.33/v1/chat/completions \
  -H "Authorization: Bearer sk-relay-..." \
  -H "Content-Type: application/json" \
  -d '{
    "model": "glm-5.3-flash-xploded",
    "messages": [{"role": "user", "content": "What is the weather in Shanghai?"}],
    "tools": [{
      "type": "function",
      "function": {
        "name": "get_weather",
        "parameters": {
          "type": "object",
          "properties": {"city": {"type": "string"}},
          "required": ["city"]
        }
      }
    }]
  }'

The reply carries finish_reason: "tool_calls" and one call to get_weather (with {"city": "Shanghai"}). Answer it with a role: "tool" message the way you would anywhere else.

It thinks before it answers

Reasoning-capable models deliver their thinking in delta.reasoning ahead of any delta.content. On a short prompt that is a few hundred characters of reasoning before the first word of the reply, so a client that only renders content shows nothing for a second or two and then the whole answer at once. That silence is the model working, not a stall. It matters for max_tokens: reasoning is counted as output, so a tight cap can be spent entirely on thinking and return an empty message with finish_reason: "length". Leave room, or leave the cap off.