DEV Community

Cover image for GLM-5.4 vs GLM-5.3 for Coding Agents: A Migration Decision You Can Measure
boluo
boluo

Posted on

GLM-5.4 vs GLM-5.3 for Coding Agents: A Migration Decision You Can Measure

A model upgrade in a coding agent is expensive when the new model writes a convincing patch that breaks a neighboring feature. GLM-5.4 introduces Z.ai’s Loop Transformer and lower Coding Plan credit multipliers. GLM-5.3 already has a documented text API and published coding results. Which change matters more depends on the task and on the interface through which the agent receives its input.

I checked Z.ai’s launch material, GLM-5.3 specification, and Coding Plan documentation on November 23, 2026. The calculations here use published multipliers; they are examples, not results from a matched GLM-5.4/GLM-5.3 run.

The short migration decision

Your workflow What to do now What would change the decision
Text-only application using a documented API Keep the GLM-5.3 path and make model selection configurable A formal GLM-5.4 input/output contract plus a passing regression task
Long-running Coding Plan agent Trial GLM-5.4 on a frozen repository issue More accepted patches per credit after repair time is counted
Screenshot-to-frontend task Verify the image path and render both desktop and mobile pages Evidence that the model, rather than an attached vision tool, interpreted the image
Weekly quota is the bottleneck Recalculate the task’s ordinary input, cached input, output, and MCP usage A lower credit total for the actual mix, not only for a marketing example

None of these rows assumes that architectural depth automatically eliminates cross-file bugs. It gives you a way to decide where the new model has earned a place in your workflow.

What the Loop Transformer actually changes

In its GLM-5.4 technical announcement, Z.ai says the model runs a block of 28 layers from the GLM-5 base twice, sharing those layers’ weights. Another iteration adds computation depth without duplicating that block’s parameter count.

Three design choices keep a second pass from becoming a simple doubling of every resource:

  • Gated progressive updates limit how much a pass writes into the hidden state. Z.ai describes the first pass as building broad context and the second as refining it.
  • Hybrid KV caching reuses sparse KV from the first pass while retaining a local sliding window of new KV for the second.
  • Sparse attention index reuse lets the second pass use the indices chosen by the first, avoiding another indexing step.

This is a meaningful architectural distinction, but it is not “reasoning versus no reasoning.” GLM-5.3’s model documentation says reasoning is always on, with low, high, and max effort settings. Z.ai describes GLM-5.3’s improvement over GLM-5.2 as primarily post-training on the same base model. What remains unmeasured is how these different routes to better reasoning perform on the same repository task.

The controlled experiment in the GLM-5.4 announcement concerns a 30B-parameter ablation, not the final two-model comparison. At the same parameter count and with about 10% more total training compute, the looped 30B model improved in math, science reasoning, and long context. Average output length on benchmarks including GPQA-Diamond and MMLU-Pro fell by about 10–14%. Neither number predicts a 10–14% reduction in your API bill or elapsed agent time. Z.ai’s comparison with models of 2T–3T parameters is its characterization of GLM-5.4’s capability, not an engineering acceptance test.

Evidence for code, vision, and speed

GLM-5.3 has published coding and security figures, though their baseline is GLM-5.2. Z.ai reports Terminal Bench 3.0 moving 4.6 → 28.3, DeepSWE v1.1 46.2 → 66.9, CyberGym 77.2% → 84.5%, and ExploitBench 24.4% → 54.4%. The roughly 50% improvement reported on its internal Z.ai Code Bench also compares GLM-5.3 with GLM-5.2. It is unrelated to the subscription credit calculation below.

For GLM-5.4, the launch material presents code-generated video and games, a FreeCAD robotic arm, and an interactive GLSL 3D scene. It also claims progress in vision. These are interesting candidate tasks; they are not side-by-side GLM-5.3 outputs under the same prompt, tools, and test budget.

The image-input claim needs an interface boundary. GLM-5.3’s model page explicitly lists text-only input, a one-million-token context window, and a 128K-token maximum output. The Coding Plan overview says all plans include vision understanding; its credit table places “Vision Understanding MCP” in the GLM-5.3-Flash row. As of November 23, a separate GLM-5.4 model specification did not establish its image request fields, image limits, or formal API context/output ceilings. The launch post’s discussion of cache cost at one-million-token lengths is not an API limit document.

Z.ai quotes up to 200 tokens/s off peak and 70–80 tokens/s at peak load for GLM-5.4, and acknowledges unusually long “marathon thinking” in some cases. Without a GLM-5.3 number measured under the same load, output settings, and workload, those values cannot rank end-to-end completion time.

For model selection in a provider layer, the Crazyrouter Zhipu model directory is a place to inspect names. Record the exact ID and request contract used in your own run; a directory label and a Coding Plan entitlement describe different things.

The credit calculation, including a cache-heavy case

The Coding Plan limits are identical whichever of the two models you choose: Lite provides 2,000 credits per five hours and 10,000 per week; Pro 12,000 / 60,000; Max 28,000 / 140,000.

The published multipliers for ordinary input / cached input / output are 6.9 / 1.7 / 24 for GLM-5.3 and 4.6 / 1.1 / 16 for GLM-5.4. Model credits are (ordinary input × input multiplier + cached input × cache multiplier + output × output multiplier) / 10,000. MCP calls are charged separately.

First, take 10,000 ordinary input tokens plus 2,000 output tokens, without cache or MCP calls. GLM-5.3 uses 11.7 credits; GLM-5.4 uses 7.8. The same token mix consumes one-third fewer credits. A fixed credit budget could cover 11.7 / 7.8 = 1.5 times as many identical tasks. The plan’s weekly credit cap itself has not risen by 50%.

Now keep the total input and output constant, but make 95% of the 10,000 input tokens cached: 500 ordinary input, 9,500 cached input, 2,000 output. The GLM-5.3 example becomes (500×6.9 + 9,500×1.7 + 2,000×24)/10,000 = 6.76 credits. GLM-5.4 becomes (500×4.6 + 9,500×1.1 + 2,000×16)/10,000 = 4.475 credits. The budget ratio is about 1.51 for this example. If the new model produces more output or makes more MCP calls, measure those too.

Published Coding Plan multipliers applied to two illustrative token mixes

Z.ai’s separate Pro-plan estimate at 95% cache hit rate is 290–580 million tokens per week for GLM-5.3 and 440–870 million for GLM-5.4. The lower bound uses standard credit rates; the upper bound assumes all model use happens off peak at half the standard rate. Peak hours are Monday through Friday, 14:00–18:00 Singapore time. These ranges also depend on the assumed token mix, so treat them as planning estimates.

If you compare a Coding Plan subscription with an API-based workflow, inspect the current model and pricing list on Crazyrouter separately. Subscription credits are not a currency conversion formula for API calls.

An agent evaluation that catches the expensive failures

Freeze a repository commit and choose an issue that spans at least two files. A useful example is form validation implemented in a shared module, with an error message rendered on a specific page. Give both models the same agent, prompt, tool permissions, deadline, and number of repair attempts. Record model and agent versions, since an agent upgrade could otherwise become part of the comparison.

The first score is whether the final patch meets the task:

  1. Build and pre-existing tests pass.
  2. A regression test fails before the fix and passes afterward.
  3. A second consumer of the shared module keeps its prior behavior.
  4. Manual edits needed to reach an accepted patch are counted.

For screenshot-driven work, add the same image to both runs and log who interprets it: model input, vision MCP, or another tool. Render the resulting page at desktop and mobile widths. Check navigation, text overflow, layout, and new console errors. Source code that looks like the screenshot but fails to render is a failed result.

Only then compare elapsed time, tokens, tool calls, and credits per accepted patch. If the task matters to a release, repeat across several issues of the same class and retain failed runs. That will tell you more about multi-file stability than a single vendor demo.

Z.ai lists GLM-5.4 in Coding Plan, ZCode, and Z.ai Chat. Its November 23 announcement still marks the official model API “Coming Soon” and describes open weights as a plan. For an API product, the migration gate is a published request/response contract plus your acceptance result. For a Coding Plan agent, it is accepted work per credit on your own tasks.

AI disclosure: This article was drafted by an AI agent and checked against the named technical sources. The numerical examples are calculations, not a claim of personally running both models.

Sources checked November 23, 2026: Z.ai’s GLM-5.4 and GLM-5.3 announcements; GLM-5.3 model documentation; Coding Plan Overview.

Top comments (0)