Quick answer: GLM 5.4 reasoning effort is set with the reasoning_effort request field and supports only low, high and max. The default and Z.ai's recommended value is max. You cannot disable thinking on GLM 5.4 (thinking.type only accepts enabled), so reasoning_effort plus max_tokens (up to 131,072) is your only control over how long the model thinks. Reasoning tokens bill as output at $4.40 per million tokens, so the setting is mostly a cost and latency dial.
If you came from GLM 5.2, you may expect none, minimal, medium or xhigh to work. They exist in Z.ai's API reference, but the docs list GLM-5.4, GLM-5.3 and GLM-5.3-Flash as supporting only three values. And because Z.ai's own GLM-5.4 page warns that the model "tends to get caught in overly long 'marathon thinking' loops," choosing the right GLM 5.4 reasoning effort is not a detail. It decides whether a request returns in seconds or runs into your timeout. Facts below are from Z.ai's docs, checked December 3, 2026; the per-task guidance is our editorial judgment, labeled as such.
GLM 5.4 reasoning effort values
| GLM 5.4 reasoning effort value | Supported | Typical use (our guidance) |
|---|---|---|
low | Yes | Extraction, classification, short edits, tool routing |
high | Yes | Everyday coding, multi-step tool loops, reviews |
max | Yes, default and recommended | Hard bugs, architecture, math, long agent planning |
none, minimal | No (GLM 5.2 only skips thinking with these) | — |
medium, xhigh | No (mapped only on GLM 5.2) | — |
Z.ai documents the mapping of extra values only for GLM 5.2: none/minimal skip thinking, low/medium become high, and xhigh becomes max. Do not assume the same mapping on GLM 5.4; send one of the three supported values.
What this GLM 5.4 reasoning effort guide fixes
The pain we see is two-sided. Some teams leave GLM 5.4 reasoning effort at max for every call and get slow, expensive answers to trivial prompts. Others port GLM 5.2 code that sends thinking: {"type": "disabled"} and get errors. Most GLM 5.4 parameter pages simply copy Z.ai's recommended settings. This one adds what those pages skip: a budget rule for max_tokens, cost per setting, and a test plan to pick a GLM 5.4 reasoning effort per task.
How GLM 5.4 reasoning effort and thinking work
GLM 5.4 is a Loop Transformer: it runs 28 shared GLM-5 layers twice per token. Z.ai says part of the reasoning moves "into the implicit depth of the loop," and that on a 30B test model the loop cut output length by 10–14% on benchmarks like GPQA-Diamond and MMLU-Pro. So some thinking happens in hidden depth, and the rest is visible as reasoning_content.
Two related settings shape the GLM 5.4 reasoning effort behavior:
thinking.type: onlyenabled. Forced thinking is listed for GLM-5.4, GLM-5.3 and GLM-5.3-Flash.thinking.clear_thinking: defaults tofalsefrom GLM 5.4 onward, so earlier reasoning stays in context. You must sendreasoning_contentback unmodified in multi-turn and tool loops.
Setting GLM 5.4 reasoning effort in code
resp = client.chat.completions.create(
model="glm-5.4",
messages=messages,
temperature=1,
top_p=0.95,
max_tokens=12000,
extra_body={
"reasoning_effort": "high",
"thinking": {"type": "enabled", "clear_thinking": False},
},
)
print(resp.usage)
The GLM 5.4 reasoning effort setting is a top-level reasoning_effort field on Z.ai's endpoint. With the OpenAI Python SDK, pass it in extra_body as above so the SDK forwards it unchanged.
Budgeting max_tokens for GLM 5.4 reasoning effort
max_tokens covers reasoning plus answer, from 1 to 131,072. If the GLM 5.4 reasoning effort is high and the budget is small, the model can spend the budget thinking and return a short or empty answer. Our starting budgets:
| Task | GLM 5.4 reasoning effort | Starting max_tokens |
|---|---|---|
| Label, extract, route | low | 2,000–4,000 |
| Single-file code change | high | 8,000–16,000 |
| Multi-file change, review | high or max | 16,000–32,000 |
| Hard bug, design, proof | max | 32,000–64,000 |
Then check usage on real traffic and tighten. These are editorial starting points, not Z.ai numbers.
Cost of each GLM 5.4 reasoning effort level
Reasoning bills as output at $4.40 per million tokens on Z.ai. Every 1,000 reasoning tokens therefore costs about $0.0044. If moving from max to high saves 3,000 reasoning tokens per call, that is about $0.013 per call, or $13 per 1,000 calls. Z.ai has not published average token counts per GLM 5.4 reasoning effort level, so measure your own before you budget.
GLM 5.4 reasoning effort latency follows the same math. Z.ai lists GLM 5.4 at up to 200 tokens/s off-peak and 70–80 tokens/s at peak. At 75 tokens/s, 3,000 extra reasoning tokens add about 40 seconds.
Want to feel the difference before you change production? Run a hard prompt on GLM 5.4 in glm5.app chat and watch how long the thinking phase lasts.
A test plan to pick GLM 5.4 reasoning effort per task
- Collect 20–30 real prompts for one task type, with known correct answers.
- Run each at
low,highandmaxwith the samemax_tokens. - Record correctness,
usage.completion_tokensand wall time. - Choose the lowest GLM 5.4 reasoning effort whose accuracy matches
maxwithin your tolerance. - Re-run monthly; Z.ai may tune serving.
If low still fails too often on a task, consider whether the task needs GLM 5.4 at all. GLM 5.3 Flash supports the same three values at $0.15 / $0.50 per million tokens. See GLM 5.4 vs GLM 5.3 Flash for a routing setup.
Parameters that interact with GLM 5.4 reasoning effort
| Parameter | Z.ai guidance next to GLM 5.4 reasoning effort | Note |
|---|---|---|
temperature | 1 | Recommended with top_p 0.95 |
top_p | 0.95 | — |
do_sample | Default true | When false, temperature and top_p are ignored |
stream + tool_stream | Both true when streaming | Needed for streamed tool calls |
response_format | json_object supported | Reasoning still runs before the JSON |
stop | One stop word | Docs say only one is supported |
Troubleshooting GLM 5.4 reasoning effort
| Symptom | Likely cause | Fix |
|---|---|---|
Error on thinking.type: disabled | Not allowed on GLM 5.4 | Remove it; use reasoning_effort: low |
Error or odd behavior with medium | Unsupported value | Use low, high or max |
| Empty or cut-off answer | Reasoning used the max_tokens budget | Raise max_tokens or lower effort |
| Client timeout | Long thinking at peak speed | Raise timeout; stream the response |
| Agent repeats steps | reasoning_content dropped | Return it unmodified each turn |
Using GLM 5.4 on glm5.app
glm5.app is an independent service that serves glm-5.4 in chat and through an OpenAI-compatible API on prepaid credits. The API docs list supported request fields, and the pricing page shows credit rates. Direct Z.ai access is cheaper per token for large volumes.
FAQs
What is the default GLM 5.4 reasoning effort?
max, which is also Z.ai's recommended setting.
Can GLM 5.4 reasoning effort turn off thinking?
No. thinking.type only supports enabled. Use reasoning_effort: low and a tight max_tokens for fast calls.
Does GLM 5.4 reasoning effort support medium?
No. The docs list only low, high and max as GLM 5.4 reasoning effort values.
Does a lower GLM 5.4 reasoning effort reduce cost?
Usually, because fewer reasoning tokens are billed as output. Measure with usage to confirm on your tasks.
Is GLM 5.4 reasoning effort the same as on GLM 5.3?
Yes. GLM 5.3 and GLM 5.3 Flash support the same three GLM 5.4 reasoning effort values with forced thinking.
GLM 5.4 reasoning effort: final take
Treat GLM 5.4 reasoning effort as a per-task dial: low for routing and extraction, high for everyday coding, max for the hard problems GLM 5.4 was built for, and always a max_tokens cap. Visit the GLM 5.4 page for access options, or test it in chat.
Sources
- Z.ai Docs: Chat Completion API:
reasoning_effortvalues,thinking,max_tokens,do_sample,stop - Z.ai Docs: GLM-5.4: recommended settings, loop depth, marathon thinking, speed
- Z.ai Docs: Thinking Mode: forced and preserved thinking
- Z.ai Pricing: GLM-5.4 output rate
Checked December 3, 2026 against Z.ai's docs.




