Live
Consolidating State Health Agency Workflows with Gemini Agent SkillsAI agent database load: patterns, pitfalls, and ScyllaDB mitigationsAI agents for healthcare: deployment patterns and operational impact for cloud and DevOps teamsDesigning an Agent‑Ready Platform: Webflow’s Blueprint for Safe AI‑Generated CodeSelf‑service scaling to 5,000 GKE nodes in under five minutesStable Kubernetes Foundations Power AI Agent Workloads on Amazon EKSObject‑Level RBAC in Basin Catalog: Granular Permissions for EngineersEvidence‑Driven Trustworthy AI Models: What Engineers Need to Adjust TodayConsolidating State Health Agency Workflows with Gemini Agent SkillsAI agent database load: patterns, pitfalls, and ScyllaDB mitigationsAI agents for healthcare: deployment patterns and operational impact for cloud and DevOps teamsDesigning an Agent‑Ready Platform: Webflow’s Blueprint for Safe AI‑Generated CodeSelf‑service scaling to 5,000 GKE nodes in under five minutesStable Kubernetes Foundations Power AI Agent Workloads on Amazon EKSObject‑Level RBAC in Basin Catalog: Granular Permissions for EngineersEvidence‑Driven Trustworthy AI Models: What Engineers Need to Adjust Today
Anthropic

GLM‑5.4 coding model: higher token cost for modest accuracy gains over Claude Sonnet 5.5

AI SummaryPowered by AI

GLM‑5.4 adds image input and a double‑layer token pass, but delivers similar or slower results than Claude Sonnet 5.5 while consuming far more tokens and time. Practitioners must weigh the extra cost and latency against the narrow functional edge when choosing a coding assistant.

The latest release from Z.ai, GLM‑5.4, introduces image‑reading capability and a claim that each token is processed through 28 layers twice, effectively “reasoning” like a larger model. In head‑to‑head tests against Anthropic’s Claude Sonnet 5.5, the new model matches or exceeds Sonnet on a few micro‑benchmarks but does so with dramatically higher token volume, longer turn counts, and a subscription‑level price tag.

What changed in GLM‑5.4?

Two concrete changes are documented:

  • Support for image inputs, demonstrated by a page‑reconstruction task that required reading bar‑chart screenshots.
  • A processing pipeline that repeats 28 layers for every generated token, which Z.ai describes as a “thunderous thinking” mode.

Both changes are reflected in the test methodology: the image task was exclusive to GLM‑5.4, while the other two tasks (speed‑optimisation and bug‑fixing) were identical for both models.

Performance and cost comparison

Three benchmark scenarios illustrate the trade‑offs:

  • Page reconstruction from screenshots (153 points): Sonnet 5.5 achieved a perfect 153, while GLM‑5.4 scored 147, missing only accented place‑name characters. GLM‑5.4 required 105 turns, 10,228,819 input tokens, 129,258 output tokens, and roughly 2,383 seconds of wall‑clock time. Sonnet 5.5 completed in 19 turns, 520,188 input tokens, 18,435 output tokens, and 127 seconds, costing $0.41.
  • Speed‑optimisation of a six‑stage pipeline: GLM‑5.4 earned 483 points versus Sonnet 5.5’s 457.3, translating to an average speed‑up factor of ~265× versus ~197×. However, GLM‑5.4 used 137 turns, 18,284,975 input tokens, 211,848 output tokens, and 2,226 seconds, costing the $18 plan. Sonnet 5.5 finished in 13 turns, 188,792 input tokens, 14,621 output tokens, 103 seconds, and $0.24.
  • Real‑world bug‑fixing in SQLGlot: GLM‑5.4 exhausted its weekly allowance after 202 turns, scoring only 16 points and fixing two bugs before the subscription limit halted execution. Sonnet 5.5 completed the test (after a budget reset) with 83 points and 15 fully fixed bugs.

Across all scenarios, GLM‑5.4 consumes orders of magnitude more tokens and time, and its subscription tier ($18/month) is substantially higher than the per‑request cost observed for Sonnet 5.5.

Architectural and operational implications

From an engineering perspective, the double‑layer token pass implies higher compute per token, which directly inflates token‑based pricing and latency. Integrating GLM‑5.4 therefore requires:

  • Provisioning a dedicated subscription with a five‑hour usage window, as the model’s token budget can be exhausted within a single test run.
  • Designing workflows that tolerate longer turn counts (up to 105–137 turns observed) and extended wall‑clock times (up to 40 minutes of active processing plus waiting periods).
  • Accounting for image‑input handling in the data pipeline, including any preprocessing needed to feed screenshots to the model.

Operationally, the cost model shifts from per‑token pricing (as with Sonnet 5.5) to a flat‑rate subscription that may be under‑utilised if workloads are intermittent. Teams must monitor token consumption against the subscription cap to avoid unexpected throttling, as demonstrated by the halted bug‑fixing run.

Related CloudNinjas coverage: AI engineering.

What This Means For Practitioners

When evaluating coding assistants, consider the following actions:

  • Reserve GLM‑5.4 for tasks that explicitly require image analysis; otherwise, Sonnet 5.5 offers comparable accuracy with far lower token usage and cost.
  • Incorporate token‑budget alerts into CI/CD pipelines to prevent subscription limits from interrupting long‑running jobs.
  • Benchmark any new model against existing tools on representative workloads before committing to a higher‑priced subscription.
  • Factor in the higher latency of GLM‑5.4 when designing interactive developer tools; the 40‑minute processing window may be unsuitable for real‑time assistance.

Overall, GLM‑5.4’s new capabilities come with a steep operational price tag, and the modest accuracy advantage does not outweigh the increased resource consumption for most everyday coding tasks.

Originally published atThe New Stack