Models

GLM-5.1

TL;DR

Open-source

Open-source long-horizon autonomous coding agent.

Available on

GoProProviderMax 10×Max 20×Teams ProEnterprise

Open-source models are available on every plan, including Go ($1/mo).

Switch with

/model

Pick GLM-5.1 from the selector.

Intelligence Index

GLM-5.1 vs the Z AI lineup

40.2

GLM-5.2

51.1

GLM-5.1

40.2

GLM-5

39.5

Speed

~81

tokens / sec

Input

$1.40

per M tokens

Output

$4.40

per M tokens

GLM-5.1 in Command Code

GLM-5.1 is Z AI's open-source model — long-horizon autonomous coding agent. It runs in Command Code with a 200K-token context window, switchable any time with /model.

It scores 40.2 on the Intelligence Index — #24 of the 38 scored models in the Command Code lineup.

GLM-5.1 specs at a glance

What GLM-5.1 accepts, how much it can hold in context, and what you need to run it.

SpecGLM-5.1
Context window200K tokens
Input modalitiestext
ReasoningNo
Release date2026-04-07
Minimum planGo

GLM-5.1 vs the Command Code lineup

GLM-5.1 alongside its nearest real alternatives in the lineup — every price straight from the billing tables.

ModelIntelligenceCodingSpeedInput $/MOutput $/MBlended $/MContext
Claude Fable 559.976.5~62 tok/s$10.00$50.00$201M
Tencent Hy341.258.8~58 tok/s$0.00$0.00free262K
DeepSeek V4 Flash40.356.2~106 tok/s$0.14$0.28$0.1751M
GLM-5.1 (this page)40.255.8~81 tok/s$1.40$4.40$2.15200K
Qwen 3.6 Max Preview40~46 tok/s$1.30$7.80$2.925200K
GPT-5.4 Mini4056.1~171 tok/s$0.75$4.50$1.6875400K
Qwen 3.6 Plus39.654.5~53 tok/s$0.50$3.00$1.125200K

What GLM-5.1 is best for

GLM-5.1 is a open-source model from Z AI, priced at $2.15 blended per million tokens.

The honest way to place it: run your own session with /model and compare against the lineup table above — the numbers on this page update as the registry and billing tables change.

When to switch away from GLM-5.1

No single model wins every task. These are GLM-5.1's computed nearest alternatives — one step up, one step down in cost, one for speed, one from the same family — each switchable mid-session with /model.

Switch to DeepSeek V4 Flash

DeepSeek V4 Flash scores 40.3 on the Intelligence Index to GLM-5.1's 40.2 — the nearest genuine step up — at $0.175 blended per million tokens versus $2.15. Reach for it when a task keeps hitting GLM-5.1's ceiling.

Switch to Qwen 3.7 Max

Qwen 3.7 Max runs about 13% cheaper blended ($1.875 versus $2.15 per million tokens) while scoring 46 on the Intelligence Index. Switch down for high-volume work where GLM-5.1's edge isn't earning its rate.

Switch to GLM-5.2

GLM-5.2 streams ~208 tokens/sec to GLM-5.1's ~81 at a comparable blended cost ($2.15 per million tokens). Use it when iteration speed matters more than squeezing out the last point of quality.

Switch to GLM-5

GLM-5 is the nearest Z AI sibling — same house style, lower price point ($1.55 versus $2.15 blended per million tokens). The natural swap when you want to stay in the family.

What you pay for GLM-5.1

GLM-5.1 is billed per token at the rates below — the same billing tables the Usage page charges against, so this page cannot quote a different price than you pay.

Blended cost (3:1 input:output, the shape of a typical coding session) works out to $2.15 per million tokens.

Per 1M tokensInputOutputCache read
All requests$1.40$4.40$0.26

In Command Code: caching and taste-1

Open-source models are routed across multiple upstream providers for high availability. The price you see is the mean per-provider rate; the Usage page reflects what was actually charged.

Where supported by the upstream, prompt caching is on by default — cache reads are billed at $0.26 per million tokens versus $1.40 for fresh input.

taste-1 sits between the model and the agent loop, rewriting and reranking candidate edits to match your codebase conventions.

Plan availability

GLM-5.1 is an open-source model, available on every plan including Go.

Command Code is a subscription with model usage at API rates. Each plan ships with monthly LLM credits; credits roll over and never expire, and auto top-up keeps you running if you go over.

PlanPrice/moLLM creditsModels
Go$1$10Open-source only
Pro$15$30Open-source + premium
Provider$15Pay as you goOpen-source + premium
Max 10×$100$150Open-source + premium
Max 20×$200$300Open-source + premium
Teams Pro$40 / seat$40 / seatOpen-source + premium
EnterpriseCustomCustomCustom pool, SSO, audit logs

Switching models with /model

In an interactive Command Code session, run /model to open the model selector. Pick GLM-5.1 and it applies to this session and to future sessions until you change it again. Premium models require Pro or higher; open-source models are available on every plan, including Go.

cmd               # start an interactive session
/model            # open the selector and pick GLM-5.1

All Command Code models, ranked by quality and speed

Quality is the Intelligence Index — an aggregate score across reasoning, math, coding, and knowledge evaluations. Speed is measured output tokens per second. Models without a published score are noted. This table is regenerated from the model registry, so it is always current.

ModelTierIntelligence IndexOutput speed
Claude Fable 5Premium59.9~62 tok/s
GPT-5.6 SolPremium58.9~77 tok/s
Claude Opus 4.8Premium55.7~55 tok/s
GPT-5.6 TerraPremium55~155 tok/s
GPT-5.5Premium54.8~81 tok/s
Grok 4.5Open-source53.8~114 tok/s
Claude Opus 4.7Premium53.5~52 tok/s
Claude Sonnet 5Premium53.4~79 tok/s
GPT-5.4Premium51.4~164 tok/s
GPT-5.6 LunaPremium51.2~234 tok/s
GLM-5.2Open-source51.1~208 tok/s
Muse Spark 1.1Premium50.6~130 tok/s
Gemini 3.5 FlashPremium50.2~236 tok/s
Claude Sonnet 4.6Premium47.2~55 tok/s
Qwen 3.7 MaxOpen-source46~196 tok/s
MiniMax M3Open-source44.4~113 tok/s
DeepSeek V4 ProOpen-source44.3~62 tok/s
GPT-5.3 CodexPremium44.3~106 tok/s
Kimi K2.6Open-source44.2~43 tok/s
MiMo V2.5 ProOpen-source42.2~56 tok/s
Kimi K2.7 CodeOpen-source41.9~46 tok/s
Tencent Hy3Open-source41.2~58 tok/s
DeepSeek V4 FlashOpen-source40.3~106 tok/s
GLM-5.1 (this page)Open-source40.2~81 tok/s
Qwen 3.6 Max PreviewOpen-source40~46 tok/s
GPT-5.4 MiniPremium40~171 tok/s
Qwen 3.6 PlusOpen-source39.6~53 tok/s
GLM-5Open-source39.5~51 tok/s
Qwen 3.7 PlusOpen-source39~52 tok/s
Kimi K2.5Open-source38.1~51 tok/s
MiniMax M2.7Open-source38.1~49 tok/s
Nemotron 3 UltraOpen-source37.8~204 tok/s
MiMo V2.5Open-source37.2~88 tok/s
MiniMax M2.5Open-source33.7~78 tok/s
Step 3.7 FlashOpen-source30.3~407 tok/s
Step 3.5 FlashOpen-source26~207 tok/s
Gemini 3.1 Flash LitePremium25~300 tok/s
Claude Haiku 4.5Premium23.7~103 tok/s
Kimi K3Open-sourceNot yet scored
Kimi K2.7 Code HighSpeedOpen-sourceNot yet scored
GLM-5.2 FastOpen-sourceNot yet scored
InklingOpen-sourceNot yet scored
Fugu UltraPremiumNot yet scored

Frequently asked questions

GLM-5.1 or DeepSeek V4 Flash?

DeepSeek V4 Flash scores higher on the Intelligence Index (40.3 vs 40.2) at $0.175 blended per million tokens against GLM-5.1's $2.15. Default to GLM-5.1 and switch up when a task keeps stalling.

GLM-5.1 or Qwen 3.7 Max?

Qwen 3.7 Max is about 13% cheaper blended ($1.875 vs $2.15 per million tokens), scoring 46 on the Intelligence Index. Use Qwen 3.7 Max for volume work and GLM-5.1 where its edge earns the difference.

How much does GLM-5.1 cost in Command Code?

$1.40 per million input tokens and $4.40 per million output tokens, with cache reads at $0.26. In an agent loop, cached context brings effective input to roughly $0.602 per million tokens.

What plan do I need for GLM-5.1?

GLM-5.1 is available on every plan, including Go at $1/mo.

How good is GLM-5.1 at coding?

GLM-5.1 scores 55.8 on the Coding Index — the Artificial Analysis sub-score most predictive of coding-agent performance — alongside 40.2 overall.

Does GLM-5.1 support image input and reasoning?

GLM-5.1 is text-only; paste code and logs rather than screenshots. It does not expose a reasoning mode.

Which Command Code model should I use?

Claude Fable 5 currently leads the lineup on the Intelligence Index (59.9). Grok 4.5 (53.8) leads the open-weights tier, available on every plan. For fast lookups, Step 3.7 Flash streams ~407 tok/s. There is no single right answer — switch per session with /model and let the task pick the model.

Can I mix GLM-5.1 with other models in a workflow?

Yes. Switch per session using /model. Common pattern: keep a default model and switch up for hard problems or down for quick lookups as the task calls for it.

Are open-source model prices fixed?

Open-source models are routed across multiple upstream providers for high availability. The price listed for each is the mean per-provider rate. Actual cost on a given request may vary slightly. The Usage page reflects the price charged.

GLM-5.1 or GLM-5.2?

Both are priced the same. 5.2 is newer with a 1M-token context window; 5.1 is the prior step tuned for autonomous coding agents.

Why no Intelligence Index for GLM-5.1?

Public aggregate benchmarks have not yet been published for GLM-5.1 in the current Intelligence Index format. GLM-5 (Intelligence Index 50) is the scored baseline in the line.

Is Command Code free to try?

The Go plan starts at $1/mo with $10 in LLM credits. It covers open-source models only. Pro at $15/mo unlocks premium models with $30 in LLM credits.

Does Command Code train on my code?

No. Command Code does not train on your code or store your code snippets. taste-1 data is stored locally in your project directory.

Where can I track my usage?

The Usage page in Studio shows per-request cost, token counts, and which model ran. Settings > Billing lets you change plans, buy credits, or enable auto top-up.

Does Command Code replace my editor?

No. Command Code is editor-agnostic — it runs as a CLI and works alongside any editor (Cursor, VS Code, Zed, JetBrains, Neovim, etc.).

Related reading

Ship code that matches your taste

Command Code is the AI coding agent that continuously learns your taste. Start for $1.