# GLM-5.4

> Source: https://aiwiki.ai/wiki/glm_5_4
> Updated: 2026-11-25
> Categories: AI Code Generation, AI Models, China AI, Large Language Models, Reasoning Models
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) - attribute to "AI Wiki (aiwiki.ai)"
> Cite as: AI Wiki. "GLM-5.4." aiwiki.ai, 25 Nov 2026. https://aiwiki.ai/wiki/glm_5_4
> From AI Wiki (https://aiwiki.ai), the free encyclopedia of artificial intelligence. Reuse freely with attribution.

GLM-5.4 is a [reasoning](https://aiwiki.ai/wiki/reasoning_models) and coding model from [Z.ai](https://aiwiki.ai/wiki/z_ai), released to GLM Coding Plan users on November 23, 2026. ZCode version 4.0.0 introduced it as a built-in model with vision capabilities and broader coding support.[1] The ZCode documentation describes its agent as co-tuned with GLM-5.4 for long tasks, context retention and repeated tool use.[2]

## Access and model settings

The following settings are documented for GLM-5.4 in ZCode, checked on November 25, 2026.[3]

| Setting | Documented value |
| --- | --- |
| Model identifier | `glm-5.4` |
| Context window | 1M tokens; the FAQ specifies `1000000` when configuring it manually |
| Thinking levels | Low, High and Max |
| Default thinking level | Max |
| Coding Plan access | Lite, Pro, Max and Team |
| Claude Code model setting | `glm-5.4[1m]` |

GLM-5.4 is available through the Coding Plan in supported coding tools, rather than being restricted to ZCode. Earlier [GLM-5.3](https://aiwiki.ai/wiki/glm_5_3) and [GLM-5.3-Flash](https://aiwiki.ai/wiki/glm_5_3_flash) remain selectable; the client does not automatically replace them with GLM-5.4. The same FAQ says there is no GLM-5.4 Flash model.[3]

Z.ai's November 23 announcement listed a general model API and downloadable weights as forthcoming, with weight release dependent on safety hardening.[4]

Coding Plan access through compatible endpoints should therefore be distinguished from the separately announced general API release. A Coding Plan API key spends subscription quota on coding workloads.[5]

## Loop Transformer architecture

Z.ai adapted a pretrained [GLM-5](https://aiwiki.ai/wiki/glm_5) base through continued training. Its published design runs 28 layers twice, sharing weights across the two passes. The announcement describes development at the 750B scale; that scale description is not an exact downloadable-checkpoint parameter count.[4]

| Mechanism | Published design |
| --- | --- |
| Gated updates | Per-token gates control residual updates in each iteration.[4] |
| Hybrid [KV cache](https://aiwiki.ai/wiki/kv_cache) | The second pass reuses first-pass sparse KV and maintains its own local sliding window.[4] |
| Sparse index reuse | The second pass reuses the first pass's attention indices.[4] |

The controlled ablation described in the announcement used a 30B model, not the flagship. Z.ai reported improved results with about 10% more training compute after long-context supervised fine-tuning, and 10-14% shorter output on most benchmarks such as GPQA-Diamond and MMLU-Pro.[4] Those small-model results should not be read as a measured flagship scorecard.

## Research background

Weight sharing across computational depth predates GLM-5.4. Dehghani and colleagues' Universal Transformer paper, submitted in 2018 and published at ICLR 2019, proposed a recurrent self-attention model with a dynamic per-position halting mechanism.[6] It provides background for shared-depth computation, rather than an evaluation of GLM-5.4.

Geiping and colleagues' 2025 [recurrent-depth research](https://aiwiki.ai/wiki/recurrent_depth_reasoning) studied extra computation in hidden representations rather than through additional output tokens. Their proof-of-concept model had 3.5 billion parameters and was trained on 800 billion tokens.[7] That work concerns a separate model and does not establish GLM-5.4's performance or training recipe.

## Using GLM-5.4 in coding tools

ZCode separates the model from the surrounding agent. Its agent can work with repository files, terminal output, browser state and Git state, while the model supplies reasoning and tool decisions.[2] A model's ability to interpret images does not by itself give an application a browser, terminal or permission to change files.

The model selector exposes Low for faster responses on simple tasks, High for everyday development, and Max for more demanding architecture, debugging and long tasks. The effort control changes reasoning depth, while separate execution modes govern permission requests.[2]

For other supported tools, the Coding Plan configuration uses the model name `glm-5.4`. ZCode's FAQ gives `glm-5.4[1m]` for [Claude Code](https://aiwiki.ai/wiki/claude_code). If the model is missing, it recommends updating the client and refreshing the model list.[3]

### Endpoints and billing scope

The official connection guide distinguishes Coding Plan routes from the general prepaid-balance API.[5]

| Access route | Global Z.ai base URL | Billing scope |
| --- | --- | --- |
| OpenAI-compatible Coding Plan | `https://api.z.ai/api/coding/paas/v4` | Coding Plan quota, coding workloads |
| Anthropic-compatible Coding Plan | `https://api.z.ai/api/anthropic` | Coding Plan access through the compatible protocol |
| General OpenAI-compatible API | `https://api.z.ai/api/paas/v4` | Resource packages or prepaid balance; a distinct service route |

Listing the general route does not establish that GLM-5.4 is enabled on it. Account authorization can configure Coding Plan routing automatically. Users in mainland China can use the corresponding BigModel service; the connection guide documents its separate hostnames.[5]

AutoClaw's November 23 release note also confirms GLM-5.4 integration through the GLM Coding Plan. It identifies V2, V3 and Team users as eligible for its advertised 1.5x quota.[8]

## Context, quotas and trials

ZCode's [context window](https://aiwiki.ai/wiki/context_window) meter includes room reserved for generation and a safety buffer. Its FAQ describes automatic compaction around 966K tokens for a 1M window. Compaction is client behavior, so the nominal window does not mean a session can fill every token with unchanged history before summarization.[3]

The connection guide describes a five-day Start Plan trial with a daily allocation of 3 million tokens for GLM-5.4 and 5 million for GLM-5.3-Flash. These are trial allowances, not permanent free quotas; the account's Start Plan page shows its actual entitlements.[5]

The developer plan notice separates current credits-based subscriptions from legacy plans. Its legacy V2 reference lists GLM-5.4 quota multipliers of 0.67x off-peak and 2x at peak, compared with GLM-5.3's 1x and 3x. Peak hours are Monday to Friday, 14:00-18:00 Singapore time (UTC+8).[9] Those multipliers are subscription-accounting rules, not dollar prices per million API tokens.

## Limitations and evidence

Z.ai acknowledges that GLM-5.4 can enter excessively long reasoning loops.[4]

The ZCode FAQ likewise warns that the highest thinking setting can take longer and consume quota quickly; lower effort is available for simpler work.[3]

The model's published architectural explanation, controlled small-model ablation and product integration documentation answer different questions. None alone measures reliability on an arbitrary repository or establishes that every generated patch is correct. Actual agent behavior also depends on the tools, permissions and verification supplied by the client.[2]

## References

1. Z.ai. [ZCode releases and updates, version 4.0.0](https://zcode.z.ai/en/changelog). November 23, 2026; accessed November 25, 2026.
2. Z.ai. [ZCode Agent](https://zcode.z.ai/en/docs/agents). Accessed November 25, 2026.
3. Z.ai. [FAQ (Q&A)](https://zcode.z.ai/en/docs/qa). Accessed November 25, 2026.
4. Z.ai. [GLM-5.4: Toward Generalized Coding with Our First Loop Transformer](https://z.ai/blog/glm-5.4). November 23, 2026; accessed November 25, 2026.
5. Z.ai. [Connect Models & Plans](https://zcode.z.ai/en/docs/configuration). Accessed November 25, 2026.
6. Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit and Lukasz Kaiser. [Universal Transformers](https://arxiv.org/abs/1807.03819). arXiv:1807.03819, submitted July 10, 2018; ICLR 2019.
7. Jonas Geiping and colleagues. [Scaling up Test-Time Compute with Latent Reasoning: A Recurrent Depth Approach](https://arxiv.org/abs/2502.05171). arXiv:2502.05171, February 2025.
8. AutoClaw Team. [Meet GLM-5.4 in AutoClaw](https://autoclaw.z.ai/en/blog/model/GLM-5.4/). November 23, 2026; accessed November 25, 2026.
9. Z.ai. [Plan Update Announcement](https://docs.z.ai/devpack/notice/usage-revision). Published July 30, 2026, subsequently updated; accessed November 25, 2026.

