Skip to content
One AI API Key
Blog

GLM-5.4 for code review: the reviewer and planner deployment pattern

KingBench 4 shows GLM-5.4 reasons on nearly every step and burns 1.04M reasoning tokens. Why that profile fits code review, planning and security work.

One AI API Key TeamPublished 20 min read
On this page

Most coverage of GLM-5.4 leads with the launch facts: image input, a coding upgrade, 50% more quota for plan subscribers. Those are the headlines, and our GLM-5.4 launch post covers them in full. But the most useful thing anyone has learned about this model so far is not in the announcement. It is in AICodeKing’s early KingBench 4 run, and it is a deployment hint: GLM-5.4 profiles as a reviewer and a planner, not as a raw code generator.

That single sentence changes how you should build with this model. Point it at a finished diff and ask it to find the security hole, and its deep per-step reasoning is exactly the right tool. Point it at an empty file and ask it to write the whole feature, and you are paying a reasoning-heavy model to do work a cheaper generator would finish faster. This post walks the numbers behind that profile, then gives a concrete pattern for using GLM-5.4 as a review and planning layer over a faster generator.

What third-party testers actually concluded

Before the numbers, it helps to know who is saying what, because almost everything we know about GLM-5.4’s real behavior comes from one independent tester rather than from Z.ai. Kingy AI, reviewing the launch, noted that there is “no first-party scorecard” from Z.ai at all: no official benchmark table, no published model card with measured results. That is an unusual situation for a flagship release and it is why third-party runs carry so much weight this week.

The run everyone is quoting is AICodeKing’s, a reviewer with a large following who states plainly that he is not sponsored. His verdict after running GLM-5.4 through KingBench 4 had three parts. On its strengths, he called it the “best Open Model you can use right now,” “an honest effort,” “not benchmaxxed,” and “the most careful model that I have ever used.” On what it is good at, he said it catches “bugs and security vulnerabilities that competitors missed,” and named it best as a reviewer for bugs and security, as a planner, or for big-picture work. On its limits, he was equally direct: “I wouldn’t recommend you to just use this model” as an end-to-end coder, it is “not recommended for 3D or frontend,” and it is “not the absolute best overall.”

That combination, a careful model that finds what others miss but should not be your only coder, is the whole basis for the reviewer and planner pattern this post describes. A second tester, @0xLogicrw, reached a similar conclusion from a different angle, calling GLM-5.4 the “most cautious model” and noting that it “suffers from overthinking.” TheBlockBeats, a Chinese outlet covering the same run, summarized the cost of that caution: GLM-5.4 ranked seventh in the coding test while using reasoning tokens at nearly fifteen times the rate of Google’s Neon. Even the skepticism is informative. When AICodeKing posted the first score, a reply from @asifroyal pointed out it was “the first number I’ve seen for 5.4” and that “Z.ai hasn’t put out a model card,” then asked whether it was run at max effort. The answer is yes, and that detail matters for the effort-dial section below.

So the picture from third-party testers is consistent even where it is cautionary. GLM-5.4 thinks more than anything else in its weight class, that extra thinking finds real defects, and the price of it is speed and token spend. The rest of this post is about turning that trade into a deployment you can actually run.

The profile: a model that reasons on nearly every step

The clearest signal from the KingBench 4 run is how GLM-5.4 spends its effort. Set against a frontier comparator AICodeKing calls “Neon,” GLM-5.4 generated about 1.04 million reasoning tokens against Neon’s roughly 70,000. It took 1,128 steps against Neon’s 244. Its per-step speed was similar, 22.9 seconds against Neon’s 26.7, so the extra time came from doing far more steps, not from slower steps. The total run took 431 minutes against Neon’s 109, roughly four times longer.

KingBench 4 comparison showing GLM-5.4 generating 1.04M reasoning tokens across 1128 steps versus a frontier comparator at roughly 70,000 tokens and 244 steps
The shape of GLM-5.4 reasoning: many steps, heavy token use, steady per-step speed.

The detail that makes this a reasoning profile rather than just a slow one is the near-zero figure. GLM-5.4 produced reasoning on nearly every step. Under 1% of its steps showed near-zero reasoning. GPT models in the same run showed a 14 to 39% near-zero rate, meaning they frequently act without thinking. GLM-5.4 almost never does. At max reasoning effort it produces about 1.5 times the reasoning of high effort, so the dial gives you real control over how much thinking you buy.

The speed numbers deserve their own look, because “four times slower” is misleading on its own. GLM-5.4’s per-step time of 22.9 seconds was actually faster than Neon’s 26.7. The model is not sluggish at any individual step. It is slower overall because it elects to take 1,128 steps where Neon takes 244. That distinction is the difference between a model that is inherently slow and a model that chooses thoroughness, and it is the reason the pattern in this post works. A reviewer that could be made faster by simply thinking less is a reviewer you can tune, and the effort dial is exactly that tuning knob.

KingBench 4 speed comparison showing GLM-5.4 per-step time of 22.9 seconds versus Neon at 26.7 seconds, with total run time of 431 minutes versus 109
Per-step speed is similar. The four-times-longer total run comes from far more reasoning steps, not slower ones.

AICodeKing’s read on what that means for real use was the three-part verdict covered above. GLM-5.4 is best as a reviewer for bugs and security, a planner, or for big-picture work. It is not an end-to-end state-of-the-art code generator you point at a task and let run. The reasoning that makes it thorough in review makes it expensive and slow at generation.

Why deep per-step reasoning suits security review

Code review and code generation reward different behaviors. A generator optimizes for producing a plausible solution fast. A reviewer has to hold the whole change in mind, trace data flow across files, consider what an attacker would try, and refuse to accept the first reading that works. That second job is what per-step reasoning is for.

Think about what a security review actually requires. You are looking at a diff that adds a new endpoint. The question is not whether the code runs. It is whether user input reaches a query without escaping, whether an auth check happens before the handler, whether an error message leaks internal state, whether a rate limit exists. Each of those is a separate chain of reasoning, and a model that reasons on every step is far more likely to actually walk each chain than to pattern-match a familiar shape and move on.

This is where the near-1% figure earns its place. A model that skips reasoning on 14 to 39% of steps will occasionally take a shortcut on exactly the step that mattered, the one where an unsanitized input slips through. A model that reasons on essentially every step is slower but much harder to trip. For a security review, where the cost of a miss is an incident and the cost of slowness is a few extra minutes, that trade is usually worth making. The 1 million token context window, the same one GLM-5.3 carries, means the model can take the whole repository into account while it works, and our GLM-5.4 context window post covers what that enables.

AICodeKing’s claim that GLM-5.4 finds “bugs and security vulnerabilities that competitors missed” is the most quoted line from the run, and it is worth treating carefully. It is his observation on the tasks KingBench 4 contains, not a measured vulnerability-detection benchmark. No one has published a score for how many classes of vulnerability GLM-5.4 catches. What we have is a reasoning profile that matches the shape of security work, plus a use-case read from someone who ran it on a harness that includes security-flavored tasks. Treat it as a strong hypothesis, and validate it on your own diffs before you trust it in a pipeline.

The deployment pattern: review layer over a fast generator

The practical takeaway from the KingBench profile is not “use GLM-5.4 for coding.” It is “use GLM-5.4 for the part of coding where deep reasoning pays.” That suggests a two-model pattern, where a fast generator writes code and GLM-5.4 sits on top as a review and planning layer.

The flow looks like this. A developer, or an agent, describes a task. A fast, cheap generator produces the first draft. GLM-5.4 then receives the draft, the relevant context and a review prompt, and returns findings: bugs, security issues, edge cases the generator missed, and a plan for the next iteration. If you are using it as a planner instead, GLM-5.4 receives the task before any code is written and returns a step-by-step implementation plan that the generator then executes.

two-model review pattern
Task description
      |
      v
[ Fast generator ]  --- draft code --->  [ GLM-5.4 reviewer ]
      ^                                        |
      |                                        v
      +--------- revision plan <---- findings + plan

The reason this split works is cost. A generator that produces a draft in one pass is cheap per token. GLM-5.4, which spends roughly 1.04 million reasoning tokens on a hard task in the KingBench run, is expensive per task when metered by the token. Putting the expensive model only on the review step, where its thoroughness is the point, keeps the bill proportionate. Our GLM-5.4 pricing post covers the cost picture, and GLM-5.4 vs GLM-5.3 shows what changed from the model you may already be routing review traffic to.

For planning, the same logic applies. A model that reasons on every step is good at decomposing a vague request into ordered work, spotting dependencies, and flagging risks before any code exists. That is cheaper to fix at the plan stage than at the review stage, so some teams will want GLM-5.4 at the front of the pipeline as well as the back. Which roles you give it depends on how token-hungry your plan quota can afford to be.

Tool-call reliability: the number that makes agentic review work

A review layer is only useful if the model can actually run the tools a review needs: reading files, running a linter, executing tests, searching the repository. GLM-5.4’s tool-calling numbers from the KingBench run are solid on that front. The tool-call failure rate came in at 1.56%, which placed it 11th of 17 harnesses. More important is what happened to those failures: 66% of them were recovered by retry. So the effective failure rate after a retry is well under 1%.

That recovery figure matters more than the raw failure rate for agentic use. A single failed tool call does not break a review if the harness can simply retry it, and GLM-5.4’s failures mostly clear on the second attempt. AICodeKing noted that this recovery rate was better than every Claude and Codex model he tested, which is a meaningful claim given how much agentic coding work those models are assumed to own. For a reviewer that may issue dozens of tool calls across a large diff, that reliability is the difference between a review that completes and one that stalls.

Two more operational numbers round out the picture. Cache hit rate ran 96 to 99%, which is high and helps if you are re-running reviews against a repo that changes little between runs. Median time to first token was 4.1 seconds. That is slow enough that you would not want GLM-5.4 driving a live typing assistant, but fast enough for an interactive review workflow where a developer submits a diff and waits a few seconds for findings to start appearing. The split of roughly 75% of time generating and 25% on builds and tests also tells you the model spends most of its wall-clock in reasoning, not in tool overhead, and our GLM-5.4 KingBench 4 post breaks the full run down further.

The overthinking tradeoff, and why High is the sweet spot

The most practical warning from third-party testers is about a failure mode rather than a capability. @0xLogicrw, who called GLM-5.4 the “most cautious model,” also said it “suffers from overthinking,” and the KingBench run produced a concrete example. On one security task, both High and Max reasoning effort hit a 180-second timeout while the model was still thinking. The same task at Medium effort passed in 95 seconds.

That result is the clearest argument against the instinct to always run a reasoning model at its maximum setting. More thinking is not more correctness once the model runs out of time to answer. On a task where High and Max both exhaust a generous timeout without producing a result, and Medium solves it cleanly, the extra reasoning was not buying accuracy. It was buying nothing. AICodeKing’s verdict after seeing that pattern was that “High is the best sweet spot,” and @0xLogicrw independently landed on the same read, calling High “the choice that combines ability and speed.”

For a review workflow this is actionable in a specific way. Default your review calls to High effort. Reserve Max for the small number of diffs where the stakes justify a longer, more expensive pass and where a timeout is an acceptable outcome you can retry. Use Medium for the long tail of routine changes where a fast, decent review is worth more than a slow, thorough one that may not finish. The 180-second timeout is not a property of GLM-5.4 specifically, it is a property of the harness, but the lesson generalizes: a reasoning model that can think indefinitely needs a budget, and on at least one security task that budget was the binding constraint at the two highest settings.

Tuning the effort dial against the cost

One practical lever the KingBench numbers expose is the reasoning-effort setting, and the overthinking result above is the reason to use it deliberately rather than maxing it. At max effort GLM-5.4 produces about 1.5 times the reasoning of high effort, and the token spend scales with it. That gives you a real choice about where on the thoroughness-versus-cost curve a given review sits.

effort selection by diff risk
Match reasoning effort to the stakes of the diff:

  low stakes   -> config, copy, comments   -> Medium effort
  medium       -> feature logic, refactor   -> High effort (default)
  high stakes  -> auth, payments, data,
                  user input, crypto       -> High, consider Max

Note: on one security task both High and Max hit a
180s timeout while still thinking. Medium passed in 95s.
Start at High, not Max.

The sensible mapping is to match effort to stakes. A routine change to a config file or a copy string does not need max reasoning, and running it there is paying 1.5 times the tokens for a review the stakes do not justify. A change to authentication, payments, data access or anything that touches user input is exactly where the extra reasoning pays for itself, and it is the class of diff where AICodeKing’s “bugs and security vulnerabilities competitors missed” claim is most relevant. Setting effort per review, rather than one setting for every diff, is how you get the benefit of the deep-reasoning profile without paying it on every task. Our GLM-5.4 API guide covers how effort is set on a call.

This is also where the 4.1 second median time to first token and the 96 to 99% cache hit rate become operational levers rather than just benchmark figures. The high cache rate means repeated reviews against a repository that changes slowly will reuse a lot of prior work, which softens the token bill on the second and third pass. The TTFT figure means a max-effort review of a large diff is something a developer waits for, not something they watch stream live, so it belongs in a submit-and-wait workflow rather than an inline typing assistant.

Planner, not just reviewer

Review is the use case the KingBench profile points to most directly, but AICodeKing’s read named planning in the same breath, and it is worth treating planning as its own job rather than a variant of review. A planner works before code exists. It receives a goal and returns an ordered breakdown of what to build, what the dependencies are, and where the risk sits. That is a reasoning task from end to end, and it is exactly the shape a model that thinks on nearly every step is built for.

The reason planning rewards this profile is that the expensive part of planning is not writing the plan. It is noticing what the goal leaves out. A request like “add team workspaces to this app” hides a dozen decisions about data isolation, migration, permissions and billing, and a model that reasons per step is more likely to surface each one than to accept the first plausible structure and start generating. Catching a missing decision at the plan stage costs a paragraph of prose. Catching it at the review stage costs a rewrite, and catching it in production costs an incident.

For teams that want to use GLM-5.4 at the front of the pipeline instead of the back, the pattern is the mirror of review. The generator executes a plan GLM-5.4 wrote rather than reviewing a draft GLM-5.4 received. Some teams will run it in both positions, using the same model to plan the work and then review the result, which doubles the reasoning-token spend but keeps a single consistent model looking at the task from both ends. Whether that is worth it depends on your plan quota and how much a missed requirement costs you downstream. Our GLM-5.4 context window post covers why the 1M window matters specifically for planning across a large codebase, where the model may need to read many files before it can propose an order of work.

One thing the testers agree GLM-5.4 is not is a frontend or 3D generator. AICodeKing said so explicitly. That matters for how you scope the planner role, because a planning layer that tries to design visual work is using the wrong model for the job. Keep the planner pointed at logic, data and architecture, and route visual and interactive work to a model tested for it.

How this fits the launch picture

None of this changes the availability facts. GLM-5.4 is live for GLM Coding Plan subscribers as of 23 November 2026, it is not yet on the pay-as-you-go token API, and our GLM-5.4 API guide covers the plan path in detail.

GLM-5.4 launch announcement showing the new vision capabilities, stronger coding performance, and 50 percent more quota for weekly-limit users
What Z.ai announced: image input, a coding upgrade, and more quota. No benchmark scores shipped with it.

Z.ai’s published coding claim for the model is a vendor claim with no benchmark table behind it, which is the “no first-party scorecard” gap Kingy AI flagged, and the KingBench run is the only independent signal available today. The architecture behind the profile, which Z.ai attributes to three months of work scaling what it calls the Loop and model size, is covered in our GLM-5.4 loop transformer post, and the broader coding picture is in GLM-5.4 coding performance.

One thing worth separating from the review story is the new vision capability. Image input at the flagship level is new, and it opens a review use case the KingBench run did not test: pointing the same careful reviewer at screenshots, design mocks or architecture diagrams. AICodeKing did not test vision, so there is no third-party read on how good that reviewer is yet. Our GLM-5.4 vision post covers what shipped and what is unverified.

If you are weighing GLM-5.4 against the wider open-model field before committing a review pipeline to it, our GLM-5.4 alternatives post lines up DeepSeek V4.1 Flash 1017, Kimi K3.1 Pro, GLM-5.3 and GLM-5.3-Flash for the same work, and GLM-5.4 vs frontier sets it against the closed flagships. For a broad view of the models competing at the top of the boards this month, see our best frontier models roundup.

Future update: what is still unmeasured

This section will be updated once Z.ai publishes an official benchmark table. Kingy AI’s review of the launch was explicit that there is “no first-party scorecard,” and every capability claim in this post that rests on Z.ai’s own description of the model is a vendor claim rather than a measured result. Based on Z.ai’s history with the GLM line, where prior flagships shipped with published evaluation tables either at launch or shortly after, a reasonable expectation is a technical report covering coding and reasoning benchmarks, which Z.ai has said is coming. That is inference from Z.ai’s track record, not an announced document.

Two numbers in this post are the ones most likely to be revised, and it is worth being precise about both. The 1.04 million reasoning tokens and the 1,128 steps come from one independent run of one harness by one reviewer at max effort, and AICodeKing’s own first commenters treated it as a first look rather than a settled figure. The bug and security finding claim is his qualitative read on that run, not a scored benchmark. Neither number has been replicated by a second tester yet. Until Z.ai publishes its own results or a second independent run appears, treat the reviewer profile as well-supported but single-sourced, and treat any specific vulnerability-detection rate as unknown rather than as the number you wish it were.

What this does not tell you yet

It is worth being precise about the limits of the evidence, because the gap between “one strong independent run” and “a proven reviewer” is exactly where a bad deployment decision hides. Everything above rests on one independent run, on one harness, by one reviewer who was explicit about not being sponsored. No one has published a measured bug-detection rate, a vulnerability-detection benchmark, or a planning-quality score for GLM-5.4. Z.ai’s own coding claim for the model is a vendor claim with no benchmark table behind it, and the technical report that would explain the architecture is still to come. Our GLM-5.4 benchmarks post will cover the official numbers when they land.

That does not make the KingBench profile wrong. It makes it a strong hypothesis with a clear mechanism behind it, which is a good reason to run your own test and a bad reason to assume the result generalizes to every repo and every class of bug. The model’s reasoning profile matches the shape of review and planning work, the tool-calling numbers say it can actually drive a review harness, and those two facts together justify a small controlled trial on your own code. They do not justify wiring it into a security-critical gate on day one. If you want the full detail behind the placement and the per-step figures, our GLM-5.4 KingBench 4 post covers the run end to end.

Getting started with a review workflow

If you want to try the reviewer pattern, the smallest useful test is a single diff. Take a recent pull request your team merged, submit the diff to GLM-5.4 through the Coding Plan with a review prompt, and record what it finds. Compare that against what your current reviewer, human or model, caught. You are looking for two things: issues GLM-5.4 finds that your current process missed, and how long the review takes end to end.

a starting review prompt
Review prompt shape to start with:

- Paste or attach the diff.
- State the review goal: bugs, security, or both.
- Ask for findings as a list, each with a severity
  and the specific line or symbol it concerns.
- Ask explicitly for what the diff does NOT address,
  since a reviewer that reasons per step is also good
  at spotting missing cases.

Keep the test small and measure it. Because GLM-5.4 is token-hungry, a review of a large diff will consume meaningfully more output tokens than a generation of the same size. That is fine inside a plan quota, and the 50% quota bump for weekly-limit users gives subscribers room to experiment. It is a real cost consideration the moment a token price is published, and our GLM-5.4 open weights and GLM-5.4 self-hosting posts cover the option of running the model yourself if the weights are released.

Sign up for a key to call GLM models through hosted access, browse the model catalogue, or run your own volumes through the cost calculator before committing a review pipeline to any model.

More GLM-5.4 coverage

This post is part of a series on GLM-5.4. The rest of the cluster goes deeper on the areas this one only sketched, and each links back to the launch hub:

More in Blog

Try it

One API key for Claude, GPT, Grok, DeepSeek, Kimi, Qwen, GLM, MiniMax, Step, Crow, Dots, Beam, Nemotron, Jailbreak, MiMo, Gemini, Muse and Mistral.

One AI API Key speaks the OpenAI and Anthropic formats, so you change the base URL and the key, not your code. Credit packs start at $10, and every model has a published per-token rate.