Skip to content

Z.AI Thinking Control

Z.AI GLM models can generate an internal reasoning chain (reasoning_content) before producing a response. This improves answer quality, but reasoning tokens are billed as output, consume the shared max_tokens budget, and increase latency.

Thinking is OFF by default (opt-in) on thinking-capable GLM models other than GLM-5.3 and GLM-5.3-Flash. A plain request to those models spends no reasoning tokens. Thinking only runs when you explicitly ask for it:

  1. Model slug suffixzai/glm-5.1:think (enable) / zai/glm-5.1:fast (disable)
  2. Body field{ "reasoning": true } (enable) / { "reasoning": false } (disable)

For models other than those two exceptions, the gateway forwards thinking: { "type": "disabled" } when neither suffix nor body is given.

ModelLLMTR defaultExplicitly enableable?
GLM-5.3-FlashAlways on, at lowCannot be disabled; pick a level
GLM-5.3Always on, at lowCannot be disabled; pick a level
GLM-5.2Off (opt-in)Yes, via reasoning_effort
GLM-5.1, GLM-5, GLM-5-TurboOff (opt-in)Yes
GLM-5V-TurboOff (opt-in)Yes
GLM-4.7, GLM-4.7-FlashXOff (opt-in)Yes
GLM-4.6, GLM-4.6V, GLM-4.6V-FlashXOff (opt-in)Yes
GLM-4.5, GLM-4.5-X, GLM-4.5-Air, GLM-4.5-AirX, GLM-4.5VOff (opt-in)Yes
GLM-OCR, GLM-4-32B-0414-128KNo

Behaviour is identical across every thinking-capable GLM model except GLM-5.3 and GLM-5.3-Flash: the model produces a reasoning chain when :think or reasoning: true is sent, and answers directly otherwise.

Reasoning cannot be switched off on GLM-5.3 or GLM-5.3-Flash. Any request that tries to disable it is refused with a 400. LLMTR stops such a request before it reaches the provider and names the levels you can choose instead.

RequestResult
zai/glm-5.3 (plain)Works. LLMTR sends the low level.
zai/glm-5.3:low, :high, :maxWorks. The chosen level is sent.
zai/glm-5.3:thinkWorks. Reasoning is already on, so the level stays low.
zai/glm-5.3:fast400 — reasoning cannot be disabled.
"reasoning": false400 — reasoning cannot be disabled.
"thinking": { "type": "disabled" }400 — reasoning cannot be disabled.
:none, :minimal, :medium, :xhigh400 — this model accepts only low, high, max.

The table applies to zai/glm-5.3-flash as well. The Flash model also accepts image input; see GLM-5.3-Flash for examples and its time-windowed pricing.

Why does LLMTR default to low? The model's own default is max, the deepest and most expensive level. Even a short prompt then produces dozens of reasoning tokens, and those are billed as output. Sending plain requests at low keeps simple calls cheap and leaves the decision to raise the level with you.

Terminal window
curl https://llmtr.com/v1/chat/completions -H "Authorization: Bearer llmtr-your_key" -H "Content-Type: application/json" -d '{
"model": "zai/glm-5.3:max",
"messages": [
{"role": "user", "content": "Find and fix the race condition in this service"}
],
"max_tokens": 8000
}'

You can also pass the level in the body. When suffix and body are both present, the body wins.

from openai import OpenAI
client = OpenAI(base_url="https://llmtr.com/v1", api_key="llmtr-your_key")
response = client.chat.completions.create(
model="zai/glm-5.3",
messages=[{"role": "user", "content": "Optimize this function"}],
reasoning_effort="high",
max_tokens=8000,
)
print(response.choices[0].message.content)

Migrating from GLM-5.2: replace calls that used :fast or reasoning: false with plain zai/glm-5.3. The low default LLMTR applies is the level Z.AI itself recommends for that migration. GLM-5.3 accepts text input only; requests carrying an image return 400.

The :fast suffix disables thinking. Use it for latency-sensitive requests or when max_tokens is constrained.

Terminal window
curl https://llmtr.com/v1/chat/completions \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "zai/glm-5.1:fast",
"messages": [
{"role": "user", "content": "Hello"}
]
}'

The :think suffix explicitly enables thinking (required for deep analysis, since the default is off):

Terminal window
"model": "zai/glm-4.5-air:think"

reasoning: false disables thinking, reasoning: true enables it. When both suffix and body field are provided, the body field takes precedence.

Terminal window
curl https://llmtr.com/v1/chat/completions \
-H "Authorization: Bearer llmtr-your_key" \
-H "Content-Type: application/json" \
-d '{
"model": "zai/glm-5.1",
"reasoning": false,
"messages": [
{"role": "user", "content": "Quick response please"}
]
}'
from openai import OpenAI
client = OpenAI(
base_url="https://llmtr.com/v1",
api_key="llmtr-your_key",
)
# Thinking off — fast mode
response = client.chat.completions.create(
model="zai/glm-5.1:fast",
messages=[{"role": "user", "content": "Write a short greeting"}],
)
print(response.choices[0].message.content)
# Thinking on — deep analysis
response = client.chat.completions.create(
model="zai/glm-5.1:think",
messages=[{"role": "user", "content": "Explain the time complexity of this algorithm"}],
max_tokens=4000,
)
print(response.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://llmtr.com/v1",
apiKey: process.env.LLMTR_API_KEY,
});
// Thinking disabled
const fast = await client.chat.completions.create({
model: "zai/glm-4.7:fast",
messages: [{ role: "user", content: "Hello" }],
});
// Thinking enabled via body field
const deep = await client.chat.completions.create({
model: "zai/glm-4.5-air",
messages: [{ role: "user", content: "Review this code and list any bugs" }],
extra_body: { reasoning: true },
max_tokens: 4000,
});

Thinking tokens count against the max_tokens budget. With thinking enabled and a low max_tokens value, the model may exhaust the budget during its reasoning chain and return an empty response.

Recommended minimum max_tokens values:

ScenarioRecommended minimum
Thinking on, simple question1 500
Thinking on, complex question4 000+
Thinking off (:fast)256

With thinking disabled no reasoning tokens are spent; standard token counts are sufficient.

Reasoning tokens are billed as output tokens. On models where thinking is optional, reduce cost by disabling it with the :fast suffix. On GLM-5.3 and GLM-5.3-Flash, use the low level instead. See the Billing page for details.