Skip to content
, ,

GLM-5.4 Guide: Z.ai’s Loop Transformer, Coding Plan Access and Claude Code Setup

10–15 minutes
Woman in a neon PC room holding a card reading GLM, hook GLM-5.4 is here

Z.ai (the company behind the GLM models, formerly Zhipu AI) released GLM-5.4 on 23 November 2026. It is the lab’s first flagship built as a Loop Transformer, it can now read images, and it is aimed squarely at coding agents.

There is a catch. Right now you can only use it through the GLM Coding Plan (and Z.ai’s own chat and ZCode apps). The pay-as-you-go API, the open weights and the official benchmark table are all still “coming”.

This guide explains what changed, what is confirmed and what is not, how to switch Claude Code, Cline and OpenCode to GLM-5.4 today, what the Coding Plan really costs, and how it compares with GLM-5.3 and the big closed models.

TL;DR

  • What: GLM-5.4, Z.ai’s new coding-focused flagship, released 23 Nov 2026.
  • New design: a Loop Transformer. The model runs the same layers twice per token, adding depth without adding weights. Z.ai describes it as roughly 750B parameters.
  • New ability: image input (screenshots, UI mockups, charts). GLM-5.3 was text only.
  • Access today: all GLM Coding Plan tiers (Lite from $18/month), plus chat.z.ai and ZCode. No public API yet.
  • Quota: Z.ai says weekly-quota users get 50% more GLM-5.4 usage than they got with GLM-5.3.
  • Not yet published: API price, open weights, licence, active parameter count and an official benchmark table.
  • Claude Code model name: glm-5.4[1m] with base URL https://api.z.ai/api/anthropic.

What Z.ai Launched

Z.ai published a blog post titled “Toward Generalized Coding with Our First Loop Transformer” on 23 November. The same day, Z.ai’s Zixuan Li posted that “GLM-5.4 is now available to all GLM Coding Plan users”, and the official @Zai_org account followed with the launch post.

The pitch is “generalized coding”: one model that can plan, write and review code, and now also look at a screenshot of a broken page or a design mockup. Here is how it fits into the GLM line:

Model Type Image input Weights
GLM-4.7-Flash Small open model No Open
GLM-5 (base) Large MoE base model No Open
GLM-5.3 Standard transformer flagship No (text only, per Z.ai docs) Open (GLM-5.3 licence, per press reports)
GLM-5.3-Flash Fast, cheap model Yes (visual understanding) Reported open
GLM-5.4 Loop Transformer flagship Yes Not yet (“after safety hardening”)

If you want a GLM model you can run on your own PC today, GLM-5.4 is not it yet. See our GLM-4.7-Flash run-locally guide for the open option.

The Loop Transformer, Explained Simply

A normal transformer pushes each token through its layers once. A Loop Transformer sends it through the same layers a second time, using the same weights. You get the “thinking depth” of a deeper model without storing more parameters.

According to Z.ai’s blog (as reported by DataCamp, Let’s Data Science and FelloAI), GLM-5.4 works like this:

  • Built on GLM-5: Z.ai converted the pre-trained GLM-5 base with continued training, rather than training a looped model from scratch. It says from-scratch looped models still trail normal ones at the same compute.
  • 28 layers, two passes: the looped block runs twice per forward pass.
  • Per-token gates: the first pass writes cautiously; the second pass opens the gates to refine.
  • Hybrid KV cache: the second loop reuses the first pass’s KV cache and keeps only a sliding window of its own, so the extra loop costs “one sliding window of KV cache”.
  • Tested at four sizes: 1B, 4B, 30B and the ~750B flagship.

Why it matters: Z.ai claims GLM-5.4 reaches “intelligence levels comparable to 2T-3T parameter models”. That claim has no published benchmark behind it yet, so treat it as a vendor goal, not a result.

GLM-5.4 Specs: Confirmed vs Unconfirmed

Coverage of this launch mixes official facts with guesses. This table separates them.

Item Value Status
Release date 23 Nov 2026 Confirmed (Z.ai)
Architecture Loop Transformer on the GLM-5 base Confirmed (Z.ai blog)
Total parameters “About 750B” Z.ai description; exact count not printed. Some testers say ~700B
Active parameters Not published Unknown
Context window 1M tokens (Coding Plan label, [1m] model name) Likely; Z.ai docs set a 1,000,000 compact window
Input Text + images Confirmed
Output Text and code Confirmed
Max output tokens Not published Unknown
Speed Up to ~200 tokens/s off-peak, 70-80 tokens/s at peak Vendor-reported
API price Not published “After safety evaluation”
Open weights / licence Not released “After safety hardening”, no date

Benchmarks: What the Numbers Say So Far

Z.ai has not published a benchmark table for the 750B GLM-5.4 model. Its blog says scores will come later. What exists today is a small-model ablation from Z.ai and one independent early review.

Vendor-reported: the 30B loop ablation

Z.ai compared a 30B looped model against a 30B normal model with the same parameter count (the looped one used about 10% more training compute). Reported by FelloAI from Z.ai’s table:

Benchmark (30B test models) Normal Looped
AIME25 19.17 30.42
GPQA-Diamond 47.58 56.26
AA-LCR (long context) 40.33 47.67

Z.ai also says the looped model wrote answers 10-14% shorter on most benchmarks. These are not GLM-5.4 scores; they show why Z.ai bet on the design.

Independent: one early review (KingBench 4)

Reviewer AICodeKing ran GLM-5.4 on his KingBench 4 coding suite with early access (figures as reported by DataCamp and FelloAI):

Model KingBench 4 score (/60)
Claude Fable 5.2 42.0
Gemini 4 Neon 37.9
GLM-5.4 (max effort, rerun) 33.2 (7th of 19, best open-lab model)
GLM-5.3 27.5 (partial run after a timeout)

Read with care: GLM-5.4 took 431 minutes and about 1.04M tokens for the suite, against 109 minutes and about 70,000 tokens for Gemini 4 Neon. Gemini graded most tasks, two tasks were rerun with clearer prompts, and the effort setting has been questioned. One reviewer is not a benchmark consensus.

How to Get GLM-5.4 Today

Route Available? Notes
GLM Coding Plan (Lite, Pro, Max) Yes Works in Claude Code, Cline, OpenCode, ZCode and 20+ agent tools
Z.ai Chat (chat.z.ai) Reported yes Model picker after login; some reports say Coding Plan only
ZCode (zcode.z.ai) Reported yes Z.ai’s own coding app
Pay-as-you-go API No “Coming soon”, after safety evaluation
OpenRouter / other routers No Not listed as of 23 Nov
Hugging Face weights No No repo or model card yet

GLM Coding Plan Prices and Quotas

The Coding Plan is a monthly subscription that gives you credits instead of a per-token bill. Z.ai’s docs say it starts at $18 per month. Usage is limited both per 5 hours and per week:

Plan Price 5-hour credits Weekly credits
Lite From $18/month (Z.ai) 2,000 10,000
Pro $80/month (reported, not on Z.ai’s page) 12,000 60,000
Max $168/month (reported, not on Z.ai’s page) 28,000 140,000

Credits used = (input tokens x input multiplier + cached tokens x cached multiplier + output tokens x output multiplier) / 10,000. Off-peak usage costs half. Peak hours are Monday to Friday, 14:00-18:00 Singapore time (11:30-15:30 IST).

Model Input Cached input Output Source
GLM-5.3 6.9 1.7 24 Z.ai docs
GLM-5.4 4.6 1.1 16 Reported by FelloAI; not yet on the docs page we checked
GLM-5.3-Flash 2.3 0.56 8 Z.ai docs

The reported GLM-5.4 multipliers are exactly two-thirds of GLM-5.3’s. That matches Zixuan Li’s statement: “For users with weekly quotas, GLM-5.4 now comes with 50% more quota compared to GLM-5.3.” Put simply, the same weekly credits stretch about 1.5x further on GLM-5.4.

Tip: long agent runs burn output tokens fast. Schedule big refactors outside 11:30-15:30 IST on weekdays to pay half the credits.

Use GLM-5.4 in Claude Code (Step by Step)

Z.ai’s Claude Code page gives a manual config that points Claude Code at its Anthropic-compatible endpoint. If you have used our Claude Code Router guide, this is simpler: no router is needed.

  1. Subscribe to any GLM Coding Plan tier on z.ai and create an API key in your account.
  2. Install Claude Code if you have not: npm install -g @anthropic-ai/claude-code (Node.js 18+).
  3. Open ~/.claude/settings.json (on Windows: C:\Users\<you>\.claude\settings.json). Back it up first.
  4. Merge these keys into the "env" block. Do not delete your other settings.
  5. Restart Claude Code and run /status to confirm the model shows glm-5.4[1m].
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "your_zai_api_key",
    "ANTHROPIC_BASE_URL": "https://api.z.ai/api/anthropic",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "glm-5.3-flash[1m]",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "glm-5.4[1m]",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "glm-5.4[1m]",
    "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "1000000",
    "API_TIMEOUT_MS": "3000000"
  }
}

This is Z.ai’s own mapping: the fast “Haiku” slot stays on GLM-5.3-Flash and the main slots use GLM-5.4. Some guides put glm-5.4[1m] in all three slots; that works too but spends more credits on small background tasks.

On macOS and Linux, Z.ai also offers a setup script (claude_code_zai_env.sh from its CDN) that writes the base URL, token and timeout for you. Read any script before you run it.

Effort levels: Z.ai’s docs say the default effort is max. In Claude Code, medium and high map to Z.ai’s “high” and low maps to “low”. If runs feel slow, lower the effort first.

Use GLM-5.4 in Cline and OpenCode

Cline (VS Code)

  1. Open Cline settings and set API Provider to OpenAI Compatible.
  2. Base URL: https://api.z.ai/api/coding/paas/v4
  3. API key: your Z.ai Coding Plan key.
  4. Model: Custom Model, ID glm-5.4.
  5. Tick “Support Images” (Z.ai tells GLM-5.3 users to untick it, but GLM-5.4 reads images) and set Context Window Size to 1000000.

OpenCode

Use the zai-coding-plan provider and set the model in opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "model": "zai-coding-plan/glm-5.4"
}

Not sure which agent to pick? Our OpenCode vs Claude Code comparison covers the trade-offs. Cursor, Copilot and cloud platforms (Vertex, Bedrock, Azure) have no confirmed GLM-5.4 support yet.

GLM-5.4 vs GLM-5.3 vs Closed Models

GLM-5.4 GLM-5.3 Gemini 4 Neon Claude Fable 5.2
Design Loop Transformer Standard transformer Closed Closed
Image input Yes No Yes Yes
API price (per 1M in/out) Not published $1.40 / $4.40 (Z.ai) See Google pricing See Anthropic pricing
Coding Plan multipliers 4.6 / 1.1 / 16 (reported) 6.9 / 1.7 / 24 n/a n/a
Open weights Planned Yes No No
KingBench 4 (one reviewer) 33.2 27.5 (partial) 37.9 42.0

Who should use which:

  • Already on the Coding Plan: switch to GLM-5.4 now. It costs fewer credits than GLM-5.3 and adds vision.
  • On the GLM-5.3 API: stay until GLM-5.4 API pricing is published.
  • Need the best results, cost no object: Fable 5.2 and Gemini 4 Neon still lead in early testing.
  • Need local or private hosting: wait for the weights, or use GLM-5.3 / GLM-4.7-Flash.

Known Problems and Limits

  • “Marathon thinking”: Z.ai itself says GLM-5.4 can get stuck in very long reasoning loops. It says this still improves accuracy, but it costs time and credits.
  • Timeouts: in AICodeKing’s tests, High and Max effort hit a 180-second timeout on a security task while Medium passed in 95 seconds. This is why Z.ai’s config sets API_TIMEOUT_MS to 3,000,000.
  • Slow on long tasks: roughly 4x slower than Gemini 4 Neon at max effort in that review.
  • Tool-call errors: 1.56% failure rate (mid-table), mostly bad edit arguments; about two-thirds recovered on retry.
  • Weak spots: testers advise against it for 3D and front-end design work; it was better as a second reviewer for bugs and security.
  • Privacy: Z.ai is a China-based company and the Coding Plan runs on its servers. Check your company’s data policy before sending private code. Self-hosting will only be possible once weights ship.
  • Licence: no GLM-5.4 licence exists yet because no weights or model card are out.

Troubleshooting

Problem Likely cause Fix
Claude Code still shows Claude or GLM-5.3 Old env values or a project-level settings file Check .claude/settings.json in the project folder too, restart, run /status
“Model not found” Wrong ID for the tool Use glm-5.4[1m] in Claude Code and glm-5.4 in Cline/OpenCode
Requests time out mid-answer Max effort with long thinking Set API_TIMEOUT_MS to 3000000 and lower the effort
Images ignored in Cline “Support Images” unticked Tick it in the model settings
Credits vanish fast Peak hours and max effort Work off-peak (half rate), use medium effort, keep Haiku slot on GLM-5.3-Flash
401 / auth error Using a normal API key on the coding endpoint, or a typo Use your Coding Plan key with the api.z.ai/api/anthropic or /coding/paas/v4 URLs

My Take

The interesting part of GLM-5.4 is not the size, it is the bet. Running the same layers twice is a cheap way to buy depth, and the 30B ablation numbers suggest the idea works. If the 750B version holds up, it could change how open labs scale without the GPU budgets of US giants.

But today this is a subscriber preview, not a full launch. There is no API price, no weights and no official benchmarks, and the one independent review shows a model that is strong for an open-lab release but slow and token-hungry.

My advice: if you already pay for the Coding Plan, switch now, because it is cheaper per task than GLM-5.3 and adds vision. Everyone else should wait for the API price and the weights, and I will update this post when they land.

FAQ

Is GLM-5.4 free?

No. It is included in the paid GLM Coding Plan (from $18/month). Z.ai Chat access has been reported, but there is no free API tier yet.

Is GLM-5.4 open source?

Not yet. Z.ai says it will release the weights “after safety hardening” but has given no date or licence.

How many parameters does GLM-5.4 have?

Z.ai describes it as about 750 billion. It has not published the exact count or the number of active parameters.

What is the GLM-5.4 context window?

The Coding Plan lists it as 1M tokens and Z.ai’s Claude Code config uses a 1,000,000-token window. A full spec sheet has not been published.

Can GLM-5.4 read images?

Yes. Image input is new in GLM-5.4, so you can paste screenshots, mockups or charts. It outputs text and code only.

When will the GLM-5.4 API be available?

Z.ai says API access opens after its safety evaluation. No date or price has been announced.

Can I run GLM-5.4 locally?

No, because the weights are not out. Even when they are, a ~750B model needs server-class hardware or heavy quantisation and lots of RAM.

What does “50% more quota” mean?

Weekly-quota users get about 1.5x as much GLM-5.4 usage as they had with GLM-5.3, because GLM-5.4 costs fewer credits per token.

Sources

  • Z.ai blog, “Toward Generalized Coding with Our First Loop Transformer” (z.ai/blog/glm-5.4), 23 Nov 2026
  • Z.ai docs: Claude Code setup (docs.z.ai/devpack/tool/claude), Coding Plan overview (docs.z.ai/devpack/overview), latest model and endpoints (docs.z.ai/devpack/latest-model), pricing (docs.z.ai/guides/overview/pricing)
  • Zixuan Li (Z.ai) and @Zai_org posts on X, 23 Nov 2026
  • DataCamp, “GLM-5.4: Z.ai’s First Loop Transformer and the Push Toward Generalized Coding”
  • FelloAI, “GLM 5.4: Z.ai’s Loop Transformer, Access and Real Cost”
  • Let’s Data Science, “Z.ai Launches GLM-5.4, Its First Loop Transformer Flagship”
  • ExplainX, “GLM-5.4 Coding Plan: +50% Quota, Vision”; Build Fast with AI, “GLM-5.4 Review”; DEV Community launch summary
Free weekly email

Get new AI guides every week

One short weekly email with our newest local AI, ComfyUI and AI tool guides. No spam, no pop-ups, just the good stuff.

Free. Unsubscribe anytime in one click. We only use your email to send this newsletter. See our privacy policy.

Woman in a neon PC room holding a card reading GLM, hook GLM-5.4 is here