Models

Atlas with GLM-5: Z.ai's Frontier Tier for Coding Agents in 2026

Updated 5 min read

GLM-5 from Z.ai, released February 2026, is the generational jump past the 4.x line: a 200K tokens (204,800) context, a 131,072 max output, and reasoning, at $1.00 per Mtok input and $3.20 per Mtok output. GLM-5 costs about 1.5x GLM-4.7 and is the first GLM positioned as a frontier competitor rather than a value option. Inside Atlas, GLM-5 is the model you put in the planning slot: strong enough to make architectural decisions worth acting on, and still priced at a fraction of Western frontier pricing.

What makes GLM-5 a frontier model rather than a value model?

GLM-5, released by Z.ai in February 2026, is the first GLM positioned as a frontier competitor rather than a value option. GLM-5 charges $1.00 per Mtok input and $3.20 per Mtok output, about 1.5x GLM-4.7, and it is the stronger reasoner of the two.

The 4.x line competed on price. GLM-5 competes on capability and then happens to be cheap, which is a different product entirely. $1.00 per Mtok input for a frontier-tier reasoning model sits well under GLM-5.1 and GLM-5.2's $1.40, and it remains a fraction of Western frontier pricing. For Atlas, where the cost of a bad architectural plan is measured in hours of human review rather than dollars of inference, buying up to GLM-5 for the planning slot is usually the cheapest decision available.

How much context and output does GLM-5 give Atlas?

GLM-5 provides a 204,800 token context with a 131,072 output cap, enough to hold a large service plus its tests and still emit a full rewrite. The 200K tokens (204,800) window matches GLM-4.7's while the reasoning underneath it is stronger.

Holding a service and its tests in the same window is what lets a model reason about behavior rather than syntax. Atlas indexes code by AST declarations using tree-sitter, not blind line windows, so the 204,800 tokens GLM-5 gets are filled with whole functions and types rather than arbitrary slices. The 131,072 output cap then means GLM-5 can emit the full rewrite in one turn. Atlas snapshots file changes as git patches so edits can be diffed and rolled back, which is what makes accepting a rewrite of that size a reasonable thing to do.

How do you split GLM-5 and a Flash model across Atlas's two slots?

Pin "model": "zai/glm-5" with "small_model": "zai/glm-4.7-flash" in atlas.json. Atlas then keeps the $3.20 per Mtok output rate on the thinking and off the mechanics, because GLM-4.7-Flash is free and absorbs the background traffic.

Atlas drafts a plan in a read-only plan agent and asks before switching to a build agent, and that boundary is exactly where the model split should land. Let the plan agent run on GLM-5, where reasoning quality earns its $1.00 per Mtok input, and hand execution to a Flash tier model where volume dominates. Atlas fans out work to subagents that can run in the foreground or in parallel background sessions, so keeping those subagents on the free GLM-4.7-Flash tier is what keeps a frontier model economically sane inside a fan-out architecture.

Is GLM-5.2's 1,000,000 token window worth the upgrade?

GLM-5.2 has a 1,000,000 token context, roughly 5x GLM-5's 204,800, for $0.40 more per Mtok input. For large-repo work in Atlas that is a big jump, and it is the single strongest reason to move off GLM-5.

Window size is the one axis where GLM-5 is clearly beaten inside its own family. A 1,000,000 token context changes what a coding agent can consider at once: not a service and its tests, but a substantial slice of a monorepo. If your Atlas sessions repeatedly run into GLM-5's 204,800 token ceiling and you find yourself hand-scoping retrieval to fit, the $0.40 per Mtok input step to GLM-5.2 is buying something concrete. If your work is service-sized, GLM-5's 204,800 tokens is not a constraint you will feel, and the $1.00 input rate is the better deal.

How does GLM-5 fit with the rest of the GLM-5 line?

GLM-5 is the base of the GLM-5 line, so it shares the family's tooling and prompt conventions with GLM-5-Turbo and GLM-5.1. Moving between them inside Atlas is a drop-in id swap in atlas.json, not a prompt rewrite.

Family consistency is underrated when you are running an agent rather than a chatbot, because prompt behavior that drifts between models breaks tool-calling reliability in ways that are tedious to debug. Starting on GLM-5 gives you a clean path: keep the same conventions and swap the id to GLM-5-Turbo or GLM-5.1 when a workload calls for it. Confirm with `atlas models zai` that `glm-5` resolves from the models.dev registry first, then pin it. One caveat stands across the whole line: the API is China-hosted, so US or EU data-residency requirements push you to a gateway.

Setup

  1. 01Export ZHIPU_API_KEY, or run `atlas login` and choose Z.ai.
  2. 02Run `atlas models zai` and confirm that `glm-5` resolves from the models.dev registry.
  3. 03Pin "model": "zai/glm-5" in atlas.json.
  4. 04Set "small_model": "zai/glm-4.7-flash" to keep Atlas background traffic free.
  5. 05Let Atlas's plan agent run on GLM-5 and hand execution to a Flash tier model, which keeps the $3.20 per Mtok output rate on the thinking and off the mechanics.

Frequently asked questions

how much does glm-5 cost per million tokens
GLM-5 costs $1.00 per Mtok input and $3.20 per Mtok output, about 1.5x the price of GLM-4.7.
what is the glm-5 context window
GLM-5 has a 200K tokens (204,800) context window with a 131,072 max output cap, and reasoning is enabled.
glm-5 vs glm-4.7 which should I use in atlas
GLM-5 is the stronger reasoner at $1.00 / $3.20 against GLM-4.7's $0.60 / $2.20. Use GLM-5 when planning quality is the binding constraint.
how do I run atlas on glm-5
Export ZHIPU_API_KEY, run `atlas models zai` to confirm `glm-5` resolves from the models.dev registry, then pin "model": "zai/glm-5" in atlas.json.
glm-5 vs glm-5.2 context window
GLM-5.2 has a 1,000,000 token context, roughly 5x GLM-5's 204,800, for $0.40 more per Mtok input. That matters for large-repo work.
how do I keep glm-5 costs down in atlas
Set "small_model": "zai/glm-4.7-flash" so background traffic is free, and let the plan agent run on GLM-5 while a Flash tier model handles execution.
is glm-5 hosted in china
Yes. The GLM-5 API is China-hosted, so US or EU data-residency requirements push you to a gateway rather than calling Z.ai directly.

Try Atlas in your terminal

The terminal-native AI coding agent. Free core, single binary.

Install Atlas

Related guides

Atlas for Nuxt: Auto-Imports, useAsyncData, and Nitro Handlers in 2026

Atlas is a terminal-native AI coding agent for Nuxt in 2026. It reads nuxt.config.ts, pages/ routes, composables/ auto-imports, and server/api/ Nitro handlers, and tests with @nuxt/test-utils.

Atlas for SQL in 2026

Atlas is a terminal-native AI coding agent for SQL in 2026. Run it in a repo with your migrations or .sql files, optimize a query, and review the diff before applying.

Atlas for Deno: Terminal-Native AI Coding in 2026

Atlas is a terminal-native AI coding agent for Deno. Tighten --allow-all down to real permission scopes, add JSR deps, and run deno test and deno check in 2026.

Plan a Multi-File Change Before Editing with Atlas in 2026

How to plan a multi-file change with Atlas in 2026: the plan agent denies all edit tools, you research with codebase_search and lsp, then plan_exit hands off.

Atlas vs Graphite: Terminal AI Coding Agents in 2026

Comparing Atlas and Graphite in 2026: Atlas offers a terminal-native AI coding agent with local privacy, while Graphite focuses on stacked PR workflows and GitHub integration.

Atlas for Go in 2026

Atlas, the terminal-native AI coding agent, empowers Go developers in 2026 with intelligent code understanding, safe refactoring, and robust testing capabilities.

Atlas for C in 2026

Atlas is a terminal-native AI coding agent for C in 2026. Run it in a project with a Makefile, have it find memory leaks or add Unity tests, and review the diff.

Atlas vs Qodo: Choosing Your AI Coding Agent in 2026

Comparing Atlas, the terminal-native AI coding agent, with Qodo 2.0, the multi-agent PR reviewer, for developers in 2026. Evaluate features, pricing, and workflow.

Browse this resource hub