Skip to content

fix: add glm-5.1 to model catalog#92

Open
bluzername wants to merge 1 commit into
MadAppGang:mainfrom
bluzername:fix/add-glm-5.1-to-catalog
Open

fix: add glm-5.1 to model catalog#92
bluzername wants to merge 1 commit into
MadAppGang:mainfrom
bluzername:fix/add-glm-5.1-to-catalog

Conversation

@bluzername
Copy link
Copy Markdown

Problem

When using glm-5.1 model via claudish, the status line shows wrong context usage (always 100%) because glm-5.1 is not in the model catalog. It falls through to the generic glm- fallback which has 131k context window - probably not matching the real context window of the model.

The claudish-bot comment on #90 already identified this: "glm-5.1 isn't in the model catalog yet — only glm-5 and glm-4.7 are listed."

Fix

Added glm-5.1 entry to the model catalog in model-catalog.ts:

{ pattern: "glm-5.1", contextWindow: 128_000, supportsVision: true },

Placed before glm-5-turbo and glm-5 entries (catalog is ordered by specificity, first match wins) so glm-5.1 matches exactly instead of falling through to the shorter glm-5 pattern.

Set supportsVision: true same as glm-5 since the 5.x series supports vision.

Also added a test case in e2e-model-catalog.test.ts verifying the new entry returns correct context window and vision support.

Note

This addresses only part of #90 (the model catalog gap). The other parts (model name display from token file, and usage tracking for Z.AI provider) are separate issues that need investigation with --debug logs as the bot suggested.

Ref #90

@kenan-xin
Copy link
Copy Markdown

kenan-xin commented Mar 30, 2026

@bluzername , the context window for glm5.1 is 204800

image

source: https://docs.z.ai/devpack/using5.1

@builderpepc
Copy link
Copy Markdown
Contributor

I think you meant to tag @bluzername

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants