GLM-5.4: Power-User Guide to the Coding Plan, Claude Code and Limits

Last updated: November 23, 2026

GLM-5.4 is Z.ai’s new flagship coding model, released November 23, 2026, and its first built on a Loop Transformer. It has a 1M-token context and 128K maximum output, reads images and video, and is available now on every GLM Coding Plan tier. The pay-as-you-go API and open weights have not shipped yet.

Contents

What is new in GLM-5.4

Z.ai’s GLM-5.4 launch post describes a new architecture rather than a bigger model. In a Loop Transformer, a group of weight-shared layers runs more than once per forward pass. GLM-5.4 loops 28 layers of the GLM-5 base model for two iterations, at what Z.ai calls the 750B scale.

Z.ai says this reaches intelligence comparable to 2T to 3T parameter models. The company also calls the release the start of “Generalized Coding,” where the model writes code to edit video, build games and produce 3D and CAD designs.

The GLM-5.4 model page lists the specifications that matter for daily work:

Specification GLM-5.4
Input Video, image, text, file
Output Text
Context length 1M tokens
Maximum output 128K tokens
Capabilities Thinking mode, streaming, function calling, context caching, structured output (JSON)
Speed (Z.ai figures) Up to 200 tokens/s off-peak; 70 to 80 tokens/s at peak
Where to use it GLM Coding Plan, ZCode, Z.ai Chat; Model API coming soon

Z.ai’s architecture notes explain how it kept costs down. A hybrid KV cache means the second loop adds only one sliding window of cache rather than a full copy, and the second pass reuses the first pass’s sparse attention indices. In a 30B test model, looping cut average output length by 10 to 14% on benchmarks such as GPQA-Diamond and MMLU-Pro, because part of the reasoning moves into the loop instead of visible thinking tokens.

Plans, credits and cost

For now, the only paid route is the GLM Coding Plan. The Coding Plan overview says all plans support GLM-5.4, GLM-5.3 and GLM-5.3-Flash, and plans start at $18 per month. The Z.ai pricing page still has no GLM-5.4 row, so there is no per-token price to quote.

Each plan has a 5-hour and a weekly credit limit. Usage is calculated as (input tokens × input multiplier + cached input × cached multiplier + output × output multiplier) / 10,000. GLM-5.4’s multipliers are lower than GLM-5.3’s, and Z.ai says weekly-quota users get 1.5 times the quota for GLM-5.4 that they had for GLM-5.3.

Item GLM-5.4 GLM-5.3
Input multiplier 4.6 6.9
Cached input multiplier 1.1 1.7
Output multiplier 16 24
Lite weekly estimate (95% cache hit) 72 to 146M tokens 48 to 97M tokens
Pro weekly estimate (95% cache hit) 440 to 870M tokens 290 to 580M tokens
Max weekly estimate (95% cache hit) 1,014 to 2,028M tokens 676 to 1,352M tokens

Plan credits are 2,000 per 5 hours and 10,000 per week on Lite, 12,000 and 60,000 on Pro, and 28,000 and 140,000 on Max. Off-peak usage is charged at 50% of the standard rate. Peak hours are Monday to Friday, 14:00 to 18:00 Singapore time, which is 1:00 to 5:00 a.m. Eastern time.

How to set up GLM-5.4 in Claude Code

Z.ai’s model-switching guide assumes you already have an active Coding Plan, a Z.ai API key and a tool that can call an existing GLM model. For Claude Code, the Anthropic-compatible endpoint is https://api.z.ai/api/anthropic.

  1. Confirm a basic call works with an existing model such as glm-5.3-flash. Fix any errors before switching.
  2. Open ~/.claude/settings.json (on Windows, %USERPROFILE%\.claude\settings.json). Edit only the keys below; do not replace the whole file.
  3. Under env, set ANTHROPIC_DEFAULT_HAIKU_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_OPUS_MODEL to glm-5.4[1m].
  4. Add "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000" so compaction matches the 1M context.
  5. Run claude, type /status, and check that the settings source is your settings.json and the model shows glm-5.4 or glm-5.4[1m].
  6. Type /effort to change thinking intensity. The default is max.

If Claude Code reports that the [1m] model does not exist, Z.ai says to upgrade Claude Code to the latest version and try again. Turning thinking off does not switch models; Z.ai converts it to the low effort level, which still performs light thinking.

For background on recent Claude Code changes such as auto mode and /tasks, see our Claude Code 2.1.330 guide.

Codex, Cline and other tools

Z.ai lists separate endpoints by tool type: https://api.z.ai/api/v1 for Codex and https://api.z.ai/api/coding/paas/v4 for other OpenAI-compatible tools. Codex users set effort through reasoning.effort; Z.ai maps minimal, light and low to low, medium and high to high, and xhigh, max and ultra to max.

In Cline, choose OpenAI Compatible as the provider, enter the coding endpoint and your Z.ai key, pick Custom Model, and type glm-5.4. Z.ai recommends ticking Support Images and setting the context window size to 1000000. Our guides to Codex CLI 0.171 and Cline Cloud Agents cover those tools in more depth.

Power-user tips

Use max effort for hard coding work. Z.ai recommends max for coding tasks for deeper reasoning and more stable results on complex jobs. Use low for quick edits.

Schedule long jobs off-peak. Because off-peak usage costs half the credits, a large refactor or test-generation run started outside 1:00 to 5:00 a.m. Eastern on weekdays stretches your weekly quota further. The Thanksgiving weekend is a quiet window for long agent runs.

Keep the cache warm. Z.ai’s token estimates rise with cache hit rate, so keep stable instructions and project context at the start of the prompt and avoid reshuffling them between turns.

Try visual tasks. GLM-5.4 accepts images and video. Paste a screenshot of a broken layout and ask for the CSS fix. Z.ai’s own demos include a FreeCAD robotic arm and a GLSL bird-watching scene built from code.

Compare with other Z.ai options. If you need a pay-as-you-go API today, GLM-5.3 variants are priced on the Z.ai pricing page; see our GLM-5.3-FlashX-Legal guide and Vercel Token Pass guide for GLM-5.3 Flash access.

Limitations

  • Long thinking: Z.ai says the model tends to get caught in overly long “marathon thinking” loops, though it says this extra reflection improves accuracy.
  • No API yet: the Model API will open after a security assessment, with no date given.
  • No open weights yet: Z.ai plans to release them after safety hardening.
  • Vendor claims only: the 2T to 3T comparison and speed figures come from Z.ai.
  • Peak slowdowns: Z.ai quotes 70 to 80 tokens per second at peak, versus up to 200 off-peak.

Frequently asked questions

What is GLM-5.4?

GLM-5.4 is Z.ai’s new flagship model, released November 23, 2026, and its first built on a Loop Transformer. It runs 28 layers of the GLM-5 base model twice, which Z.ai says gives intelligence comparable to 2T to 3T parameter models. It accepts video, image, text and file input and has a 1M-token context.

How can I use GLM-5.4 today?

Through the GLM Coding Plan (Lite, Pro and Max), in coding agents such as Claude Code, Codex and Cline, or in ZCode and Z.ai Chat. The pay-as-you-go Model API is listed as coming soon, after Z.ai completes a security assessment.

How much does GLM-5.4 cost?

There is no per-token API price yet; the Z.ai pricing page has no GLM-5.4 row. On the GLM Coding Plan, which starts at $18 per month, GLM-5.4 uses credit multipliers of 4.6 for input, 1.1 for cached input and 16 for output, lower than GLM-5.3’s 6.9, 1.7 and 24.

How do I enable the 1M context in Claude Code?

Set the model to glm-5.4[1m] in the ANTHROPIC_DEFAULT_*_MODEL variables of ~/.claude/settings.json and set CLAUDE_CODE_AUTO_COMPACT_WINDOW to 1000000. If Claude Code says the [1m] model does not exist, update Claude Code and try again.

Are GLM-5.4 open weights available?

Not yet. Z.ai says it plans to open-source the weights responsibly after completing necessary safety hardening, but it has not given a date.

Sources

Image: official GLM-5.4 announcement image by Z.ai, from the Z.ai blog, used for editorial purposes and resized. FreeAnswers is not affiliated with Z.ai.

Related answers

Leave a Comment