docs(providers): add GLM (Z.ai) provider guide - #481
Open
Rubyglask wants to merge 2 commits into
Open
Conversation
Added configuration details for GLM models by Z.ai, including setup instructions for OpenRouter and Z.ai general API options.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a provider guide for using GLM (Z.ai) models with CAI, matching the existing
docs/providers/style (Ollama).GLM speaks an OpenAI-compatible API, so CAI reaches it through two tool-agnostic paths:
CAI_MODEL=openrouter/z-ai/glm-4.6) — CAI has native OpenRouter support; recommended.zai/provider, or the genericopenai/+OPENAI_API_BASEroute for models not yet in LiteLLM's registry.It also flags the common footgun: Z.ai's Coding Plan subscription endpoints (
/api/anthropic,/api/coding/paas/v4) are limited to a set of officially supported coding tools and aren't a supported path for CAI — so users don't wire a subscription key into CAI and hit throttling. It notes theOPENAI_API_KEYmust-be-non-empty requirement (#27) and the parallel-tool_callsinterop caveat (#469).Changes
docs/providers/glm.md— new provider guide.mkdocs.yml— registers the page under Model Providers in the nav.Model IDs, endpoints, the
zai/prefix and the OpenRouter slugs were checked against the current Z.ai / OpenRouter / LiteLLM docs (Aug 2026); the model lists link out since they change often.