Skip to content

Commit c0ce260

Browse files
authored
feat(models): add GLM-5.1 to the Z.ai GLM Coding Plan (#1650)
## Summary - Adds GLM-5.1 as a new model in the Z.ai Coding Plan (`zai-coding` provider), placed above GLM-5 with the `recommended` flag, `context_length: 204800`, and `max_completion_tokens: 131072` (matching GLM-5 specs per the [Z.ai docs](https://docs.z.ai/devpack/using5.1)). - Registers `z-ai/glm-5.1` in `preferredModels`, `KILOCODE_CATALOG_IDS` (for older OpenClaw builds), `forbidden-free-models`, and the legacy `modelstats` route. ## Verification - Reviewed all changed files manually; all new entries follow the exact same TypeScript shapes as existing GLM-5 entries. - `pnpm typecheck` could not run due to missing environment dependencies (`tsgo` not found), which is a pre-existing environment issue unrelated to this change. ## Visual Changes N/A ## Reviewer Notes GLM-5.1 has identical context/token limits to GLM-5 (204800 / 131072). The description is derived from GLM-5's description updated to reference 5.1 as the latest iteration, per the instructions to copy GLM-5. The `modelstats` cost figures are copied from GLM-5 as a placeholder since no separate pricing data is available for 5.1 yet (this route serves legacy clients with mock data).
2 parents e0b211d + 3aa48b7 commit c0ce260

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/lib/providers/coding-plans/coding-plan-definitions.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ export default [
9898
context_length: 202752,
9999
max_completion_tokens: 131072,
100100
},
101+
{
102+
id: 'glm-5.1',
103+
name: 'GLM-5.1',
104+
description:
105+
"GLM-5.1 is Z.ai's latest iteration of the flagship open-source foundation model engineered for complex systems design and long-horizon agent workflows. Built for expert developers, it delivers production-grade performance on large-scale programming tasks, rivaling leading closed-source models. With advanced agentic planning, deep backend reasoning, and iterative self-correction, GLM-5.1 moves beyond code generation to full-system construction and autonomous execution.",
106+
flags: ['recommended'],
107+
context_length: 204800,
108+
max_completion_tokens: 131072,
109+
},
101110
{
102111
id: 'glm-5',
103112
name: 'GLM-5',

0 commit comments

Comments
 (0)