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.

ModelGLM 5.1
VendorZ.ai
Model idz-ai/glm-5.1
Context window205k tokens
Price per 1M tokens$0.97 input · $3.04 output (OpenRouter)
Can dotool calling · reasoning
CategoryOpen 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.1

Already 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 test

Read more about /derby and /swarm.

Related models

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.