Zhipu (GLM)
TL;DR
ONGRID_ZHIPU_API_KEY=...
ONGRID_ZHIPU_MODEL=glm-4.7 # default
ONGRID_ZHIPU_BASE_URL= # optional; defaults to open.bigmodel.cnProvider id: zhipu. SDK adapter: OpenAI-compatible Chat Completions against Zhipu's bigmodel.cn endpoint.
Zhipu's GLM family is the most-used Chinese-region provider for Ongrid installs. The bigmodel.cn endpoint is OpenAI-compatible at the wire level, so the same eino-openai adapter handles it.
Env vars
| Var | Default | Notes |
|---|---|---|
ONGRID_ZHIPU_API_KEY | — | Empty = provider dropped |
ONGRID_ZHIPU_MODEL | glm-4.7 | Default model |
ONGRID_ZHIPU_BASE_URL | https://open.bigmodel.cn/api/paas/v4 | Override for self-hosted or VPC endpoints |
ONGRID_ZHIPU_MODELS | glm-5.1,glm-5,glm-4.7,glm-4.7-flash | Catalog list |
Default catalog
The out-of-box picker shows:
glm-5.1— frontier; use for the hardest RCA passes.glm-5— general default for the GLM family.glm-4.7— the catalog default; balanced cost/quality.glm-4.7-flash— cheap; recommended for Pass-2 extraction.
The default model glm-4.7 is the conservative pick — GLM-4.7 has been battle-tested against the investigator persona; 5.x is still being benchmarked for the tool-use loop.
BaseURL — China-based marker
Zhipu is China-based: the default https://open.bigmodel.cn/api/paas/v4 endpoint resolves only from networks that can reach mainland CN infrastructure. Most non-CN clouds need either a VPC peering or a relay.
The Settings UI tags the BaseURL field as "China-based" so admins outside CN know they need a relay. The same tag exists for Kimi (Moonshot) — see Kimi.
For self-hosted variants of GLM (glm-zero open-weights), use the Custom provider slot instead — Zhipu's slot is wired for bigmodel.cn's API shape specifically.
Making Zhipu the default
ONGRID_LLM_DEFAULT_PROVIDER=zhipuThe LLM-resolver-bug memo: when default_provider is unset but multiple providers are configured, the resolver picks the first-sorted provider id and uses ITS default model. A subtle mismatch follows: if you set ONGRID_OPENAI_MODEL=glm-4.7 thinking the model wins, the router still routes to openai and sends glm-4.7 to OpenAI's endpoint. Fix: set default_provider explicitly.
Quirks
- OpenAI-compatible at the wire — tool calls, streaming, system messages all use OpenAI's shapes. No special adapter.
- Prompt sensitivity — GLM follows user-message constraints more strictly than system-message ones. The investigator persona's 10-tool-call budget is in the user message specifically because of this; system-message budgets were ignored in v0.7.51 - v0.7.55.
- Locale — GLM defaults to Chinese responses unless the prompt explicitly says otherwise. The
LANGUAGE: ...directive Ongrid appends to the investigator prompt was originally introduced for GLM. See [feedback_ai_output_locale].
See also
- Models overview.
- Routing —
WithProvider("zhipu"). - RCA — why the budget directive lives in the user message and how the locale flag works.