Skip to content

feat(zai): expand static model registry with additional GLM models#17

Merged
kousw merged 4 commits into
mainfrom
feat/zai-additional-glm-models
Jun 20, 2026
Merged

feat(zai): expand static model registry with additional GLM models#17
kousw merged 4 commits into
mainfrom
feat/zai-additional-glm-models

Conversation

@kousw

@kousw kousw commented Jun 20, 2026

Copy link
Copy Markdown
Owner

Summary

Expands the Z.ai native provider to support additional GLM models beyond glm-5.2.

Changes

  • Static model registry: Add glm-5.1, glm-5, glm-5-turbo, and glm-4.7 with 200K context windows and 131,072 max output tokens
  • Conditional reasoning_effort: Only glm-5.2 receives reasoning_effort via ZAI_REASONING_EFFORT_MODELS set; older models keep thinking enabled but use provider defaults
  • Serializer: Expose prompt_tokens_details.cached_tokens as input_cached_tokens in usage normalization
  • Docs: Update zai-provider.md spec, AGENTS.md files, and README.md provider list

Test plan

  • bun test for affected test files (27 pass, 0 fail)
  • model-registry.test.ts — static fallback for new Z.ai models
  • model-list-static.test.ts — model.list returns all 5 Z.ai models
  • model-state-sync.test.tsmodel.set accepts glm-5.1
  • zai-chat.test.tsreasoning_effort omitted for non-5.2 models
  • zai-tools-serializer.test.tscached_tokens mapping

kousw added 4 commits June 20, 2026 15:15
Add glm-5.1, glm-5, glm-5-turbo, and glm-4.7 to the Z.ai static model
registry with 200K context windows. Make reasoning_effort conditional
(only glm-5.2 receives it) via ZAI_REASONING_EFFORT_MODELS set, and
expose prompt_tokens_details.cached_tokens as input_cached_tokens in
the serializer. Update docs, AGENTS.md, and tests accordingly.
Keep both Z.ai model tests and session-scope model override tests in
model-state-sync.test.ts. Update Anthropic section heading to Opus 4.8/4.7
while preserving Z.ai models section in AGENTS.md.
@kousw kousw merged commit 990fde8 into main Jun 20, 2026
10 checks passed
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.

1 participant