ZICQ
中 Log in / Sign up
Newsroom Official LLMs & Foundation Models #Z.ai #GLM 5.4 #Loop Transformer #Multimodal AI #1M-Token Context

Z.ai Brings GLM 5.4 to Vercel AI Gateway with Loop Transformer

Avatar of Mr.Xu

By Mr.Xu Compiled & Reviewed by Editorial

Published:

中文阅读 (Chinese) English Version
Co-reading Select any sentence in the article to highlight, annotate, or copy a quote card. Join discussion ↓

Summary:Vercel AI Gateway has added Z.ai's GLM 5.4, a new flagship for coding and agentic workloads. GLM 5.4 is the first GLM model to use a Loop Transformer: a shared block runs twice per forward pass, reusing parameters to add computation depth while moving some visible reasoning into the second pass. It adds image input, extends code generation toward video, games, 3D scenes and CAD-style design, and retains a 1M-token context with sparse attention and caching, plus tool calling and structured output


Event Boundary: Z.ai Built the Model; Vercel Added the Access Layer

Vercel Blog's announcement confirms one immediate event: GLM 5.4 is now available through Vercel AI Gateway. Z.ai is the model developer, while Vercel provides hosting, access and governance infrastructure. The update should therefore not be described as Vercel releasing GLM. Vercel positions GLM 5.4 as a new flagship for coding and agentic workloads and says it is the first GLM model built on Loop Transformer.

Loop Transformer: Reused Parameters Do Not Make Computation Free

Based on the disclosed design, a Loop Transformer can be abstracted as a reusable module F_theta receiving input representation X, producing h1 = F_theta(X), and then executing the same parameterized module again as h2 = F_theta(h1), with the second pass contributing to the output. The central benefit is not a second set of layers, but allowing the same weights to participate in two rounds of computation and gain additional computational depth with fewer parameters.

Compared with stacking another independent set of layers, this is parameter-efficient. Compared with an ordinary single-pass forward path, however, it adds at least one execution of the shared block. Parameter count, FLOPs, activation memory and inference latency are separate dimensions, so weight reuse alone does not imply a lower deployment cost. The announcement does not disclose how much of the network is inside the loop, making it impossible to quantify the impact on time to first token or token-by-token decoding.

Z.ai also says that some reasoning has moved from visible thinking tokens into the second pass, shortening the externally visible chain of thought. This may reduce decoding and transfer time for generated reasoning tokens, but it adds internal forward computation. From a product perspective, it also makes the reasoning process less directly inspectable. A shorter visible chain is not equivalent to lower total computation; the net result depends on the cost of the extra pass relative to the saved output tokens.

A 1M-Token Context Still Has a KV Cache Cost

GLM 5.4 retains a 1M-token context window and uses sparse attention and caching. For a sparse pattern in which each token attends to an average of k keys, attention computation can move from approximately O(N²) to O(Nk). Sparse attention, however, does not automatically remove the storage pressure created by long-context KV caches.

Without sharding, quantization or compression, the KV footprint of one sequence can be approximated as:

KV_bytes ≈ 2 × N × Σ_l(n_kv,l × d_head) × bytes_per_element

Here, N is the context length and n_kv,l is the number of KV heads at layer l. At 1M tokens, KV capacity, memory paging and cross-request reuse become practical bottlenecks. Prompt caching can avoid repeated prefill for stable prefixes, but it increases resident memory pressure, and its benefit depends on hit rate.

The interaction between Loop Transformer and prefix caching is especially implementation-dependent. If the second pass consumes hidden states updated by the first, a first-pass KV cache cannot automatically be treated as a complete cache of the final state. Whether KV states are reused, whether computation can be shared across passes and how cache namespaces are structured will directly affect long-context latency and cost. The announcement provides none of these details.

From Image Input to Generalized Coding

Unlike earlier GLM flagship models, GLM 5.4 accepts image input. Z.ai pairs this with generalized coding: the model can write code to produce videos and games, build 3D scenes and perform CAD-style mechanical design rather than only conventional software development.

This does not make GLM 5.4 a native video, 3D or CAD generator. The more accurate pipeline is that the model emits executable code, while a renderer, game engine, 3D framework or CAD kernel produces the final artifact. End-to-end quality therefore depends not only on code correctness, but also on stable tool interfaces, a complete runtime environment and an agent's ability to repair failures from compiler or tool errors. Structured outputs and tool calling provide the foundation for this workflow, but production deployments still need schema validation, permission isolation, iteration limits and artifact-level tests.

Vercel AI Gateway Adds Production Governance

Through its unified API, GLM 5.4 can be selected in coding agents such as Claude Code, Codex and Cursor. Vercel AI Gateway also provides usage and cost tracking, retries, failover, performance optimization, custom reporting, API key budgets, routing rules and zero data retention support. Vercel states that it reflects provider pricing without markup and does not charge a platform inference fee, including on bring-your-own-key requests.

These features reduce the operational burden of multi-model access, but failover is not necessarily an equivalent substitution. A different provider may change model behavior, context handling, cache hits, pricing and data residency. Zero data retention should also be verified by provider, region and request type rather than inferred from a gateway-level label.

The Evaluation Evidence Remains Incomplete

The announcement does not provide parameter counts, active parameter counts, training methods, benchmark scores, throughput, TTFT, TPOT, peak memory, cache hit rates or long-context retrieval quality. The coding, vision and agentic capabilities currently rest mainly on qualitative claims from Z.ai, which is insufficient to establish the real gain over the previous GLM generation or models with a similar compute budget.

A stronger evaluation should include:

  • Loop Transformer versus a single-pass baseline under matched parameter, FLOP and output-token budgets;
  • TTFT, token latency, concurrent throughput, cache hit rate and total cost per completed task;
  • Long-range retrieval and cross-segment reasoning across input lengths from tens of thousands to 1M tokens;
  • Artifact-level validation for video, game, 3D and CAD tasks through execution, rendering and geometric constraints rather than code-text scoring alone;
  • Tool-call argument accuracy, failure recovery rates and the measured contribution of vision input on coding tasks.

Deployment Guidance

  1. Update the Vercel CLI, complete setup according to the coding-agent guide, and select the model name zai/glm-5.4.
  2. Start with a controlled comparison against the previous GLM generation and the current production model. Track task success, human rework, total tokens and end-to-end duration.
  3. Enable prompt caching for stable prefixes, but monitor resident cache usage, eviction frequency and hit rate instead of treating the 1M-token limit as automatically usable context.
  4. Define strict JSON Schemas for tools, execute generated code in sandboxes and restrict file, network and process permissions.
  5. Validate CAD, 3D and video deliverables with geometric checks, executability, visual quality and rendering time rather than relying on model self-assessment.
  6. Test quality drift, regional availability, data-retention behavior and final invoices after provider failover in production traffic.

Source: Vercel Blog (2026-12-01)

— END —

Tags: #Z.ai #GLM 5.4 #Loop Transformer #Multimodal AI #1M-Token Context

Editorial & Fact-Checking Note: This article is compiled from primary research, official release documentation, and source papers by the ZICQ Newsroom pipeline with automated entity verification and human editorial review. If you notice any technical inaccuracy, please submit a correction via our corrections policy or email our editorial desk directly.

What's your take on this story?
Explore & Submit Works

Community Comments

Loading live comments and annotations…