cd /news/large-language-models/glm-5-4-now-available-on-ai-gateway · home › topics › large-language-models › article
[ARTICLE · art-179952] src=vercel.com ↗ pub= topic=large-language-models verified=true sentiment=↑ positive

GLM 5.4 now available on AI Gateway

Z.ai's GLM 5.4, the company's new flagship model for coding and agentic work, is now available on Vercel's AI Gateway under the model name zai/glm-5.4. GLM 5.4 is the first GLM model built on a Loop Transformer architecture, which runs a shared block of layers twice per forward pass so the model reasons more deeply without adding parameters; Z.ai reports part of the reasoning shifts into that second pass, shortening the chain of thought. The model adds image input, keeps a 1M-token context window with caching and sparse attention, and supports tool calling, structured outputs, and prompt caching, and it can be used in Claude Code, Codex, and Cursor via the latest Vercel CLI.

key takeaway

GLM 5.4 runs a shared block of layers twice per forward pass, which Z.ai says deepens reasoning without adding parameters and moves part of the reasoning out of visible thinking tokens, while keeping a 1M-token context window with caching and sparse attention.

by read1 min views2 publishedDec 1, 2026

GLM 5.4 from Z.ai is now available on AI Gateway. It is Z.ai's new flagship model for coding and agentic work, and the first GLM model built on a Loop Transformer architecture.

The Loop Transformer runs a shared block of layers twice per forward pass, so the model reasons more deeply without adding parameters. Z.ai reports that part of the reasoning moves from visible thinking tokens into that second pass, which shortens the chain of thought. It also notes that on some hard tasks the model can still reason for a long time before answering.

Unlike earlier GLM flagship models, GLM 5.4 accepts image input. Z.ai pairs the improved vision with what it calls generalized coding: writing code to produce videos and games, build 3D scenes, and do CAD-style mechanical design, not just conventional software. It keeps a 1M-token context window, with caching and sparse attention designed to keep long-context requests efficient, and supports tool calling, structured outputs, and prompt caching.

Use zai/glm-5.4 as the model name: To use it in Claude Code, Codex, Cursor, and more, install the latest Vercel CLI and run setup:

Then select `zai/glm-5.4` in the agent. See the [coding agents guide](https://vercel.com/docs/ai-gateway/coding-agents) for details.

Try GLM 5.4 in the [model playground](https://vercel.com/ai-gateway/models/glm-5.4).

AI Gateway provides a unified API for calling models, tracking usage and cost, and configuring retries, failover, and performance optimizations for higher-than-provider uptime. It includes built-in custom reporting, Zero Data Retention support, budgets for API keys, routing rules, and more.

AI Gateway reflects provider pricing with no markup and does not charge a platform fee on inference, including on Bring Your Own Key (BYOK) requests.

You can view all language models available on AI Gateway.

── more in #large-language-models 4 stories · sorted by recency
── more on @z.ai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/glm-5-4-now-availabl…] indexed:0 read:1min 2026-12-01 · —