GLM 5.1 as a coding agent in your terminal
GLM 5.1 by Z.ai, one of 250+ models you can use in Darce, the open source AI coding agent you can undo.
| Model | GLM 5.1 |
|---|---|
| Vendor | Z.ai |
| Model id | z-ai/glm-5.1 |
| Context window | 205k tokens |
| Price per 1M tokens | $0.97 input · $3.04 output (OpenRouter) |
| Can do | tool calling · reasoning |
| Category | Open weights and budget |
Strengths
GLM 5.1, an open-weight Z.ai model used widely for coding agents.
OpenRouter's description:
GLM-5.1 delivers a major leap in coding capability, with particularly significant gains in handling long-horizon tasks. Unlike previous models built around minute-level interactions, GLM-5.1 can work independently and continuously on...
Use GLM 5.1 as a coding agent in your terminal
Start Darce in your project with GLM 5.1:
npm install -g darce-cli
darce --model z-ai/glm-5.1Already in a session? Type /model z-ai/glm-5.1, or open the picker with Ctrl+P. Darce then reads your code, edits files and runs commands with GLM 5.1; risky commands ask first, and /undo reverses any change, including what shell commands did. No account yet? npx darce-cli lets you try it free. Which plan includes which models is on the pricing page.
Make it your default or a gear
In ~/.darcerc, set it as the starting model or add it to the gears you move between with Shift+↑ / Shift+↓ (see configuration):
{
"router": { "default": "z-ai/glm-5.1" },
"gears": ["qwen/qwen3-coder", "z-ai/glm-5.1"]
}Compare it on your own code
Benchmarks rarely match your repository. Race GLM 5.1 against two other models on a real task and keep the best diff:
/derby --models z-ai/glm-5.1,z-ai/glm-5.3,z-ai/glm-5.3-flash fix the failing testRead more about /derby and /swarm.
Related models
- GLM 5.3 (Z.ai): 1.05M tokens, $0.039 / $4.80 per 1M tokens
- GLM 5.3 Flash (Z.ai): 1.05M tokens, $0.15 / $0.50 per 1M tokens
- gpt-oss-120b (OpenAI): 131k tokens, $0.037 / $0.17 per 1M tokens
- Gemma 4 31B (Google): 262k tokens, $0.090 / $0.34 per 1M tokens
- Qwen3 Coder 30B A3B Instruct (Qwen (Alibaba)): 262k tokens, $0.070 / $0.28 per 1M tokens
- DeepSeek V3.2 (DeepSeek): 164k tokens, $0.26 / $0.80 per 1M tokens
All models · Getting started · Claude Code alternative
Model data from OpenRouter, refreshed daily. Prices are OpenRouter's list rates and show relative cost; your Darce allowance is used in proportion to them.