Skip to content

Offer Z.ai (GLM Coding Plan) as a built-in provider - #45

Merged
noti0na1 merged 1 commit into
lampepfl:mainfrom
Linyxus:atc-more-providers
Dec 5, 2026
Merged

noti0na1 merged 1 commit into
lampepfl:mainfrom
Linyxus:atc-more-providers

Conversation

@Linyxus

@Linyxus Linyxus commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a zai preset, "Z.ai (GLM Coding Plan)", that goes through Z.ai's Anthropic-compatible endpoint (https://api.z.ai/api/anthropic, key ${ZAI_API_KEY}). The existing Anthropic adapter serves it without any code changes.

  • providers.json: the new preset, with a link to Z.ai's API key page
  • keys-template.properties: ZAI_API_KEY=
  • Tests: the config the preset writes and its first-run listing request (FirstRunSuite), and parsing Z.ai's real /v1/models response, which has no capabilities and uses camelCase paging fields (ProviderRequestSuite)
  • README and doc/development.md: the preset and its quirks

Endpoint behaviour (probed with a live key)

  • Works: model listing, streaming with thinking deltas and signatures, tool-call round trips, cache_control, count_tokens, and both web search tool versions
  • No context window: the model list reports none, so GLM models get no automatic trimming or compaction unless contextWindow is configured. A provider-level default is left for a follow-up.
  • Thinking can't be turned off: GLM ignores thinking: {"type": "disabled"}, so side calls such as input prediction still think
  • Effort is ignored: GLM ignores output_config.effort, so /effort has no effect

Testing

  • ./mill app.test: all suites pass
  • ./mill __.checkFormat: passes
  • Live, with a scratch home directory: first-run flow (choose Z.ai, list models, write config), /providers, /models (13 GLM models), a file-reading turn with tool calls on glm-5.4, and a web search turn with webSearch: true

🤖 Generated with Claude Code

The preset goes through Z.ai's Anthropic-compatible endpoint, so the
existing Anthropic adapter serves it unchanged: model listing, streaming,
thinking, tool calls, prompt caching and web search all work there.

Z.ai's model list carries no input limits or capabilities, so listed GLM
models have no context window unless one is configured. GLM also ignores
`thinking: disabled` and `output_config.effort`; the development guide
notes both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Linyxus
Linyxus force-pushed the atc-more-providers branch from 65c9b3d to a4d7c11 Compare December 5, 2026 13:06
@noti0na1
noti0na1 merged commit 7d3467d into lampepfl:main Dec 5, 2026
7 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.

2 participants