Skip to main content

Zhipu

Use this when your team already runs on Zhipu and you want that vendor family to stay explicit in Loong config instead of disappearing behind a generic compatibility route.

At A Glance

FieldValue
Built-in kindzhipu
Provider groupDirect Hosted Providers
Protocol familyopenai_chat_completions
Feature familyopenai_compatible
Auth schemebearer
Credential envsZHIPUAI_API_KEY, ZHIPU_API_KEY
Aliaseszhipu_compatible, glm, bigmodel
Default base URLhttps://open.bigmodel.cn
Request endpointhttps://open.bigmodel.cn/api/paas/v4/chat/completions
Models endpointhttps://open.bigmodel.cn/api/paas/v4/models

Minimal Config

active_provider = "zhipu"

[providers.zhipu]
kind = "zhipu"
api_key = { env = "ZHIPUAI_API_KEY" }
model = "auto"

Verify It

loong doctor
loong list-models
loong ask --message "Say hello and name the active provider."
If list-models is unreliable for this account or region, pin an explicit provider.model or add preferred_models instead of leaving recovery implicit.

Auth And Routing Contract

ContractValue
Auth optionalno
Model probe auth optionalno
Default API key envZHIPUAI_API_KEY
OAuth envnone
Primary request routehttps://open.bigmodel.cn/api/paas/v4/chat/completions
Primary model-catalog routehttps://open.bigmodel.cn/api/paas/v4/models

Region Endpoints

VariantBase URL
CNhttps://open.bigmodel.cn
Globalhttps://api.z.ai
Z.ai / BigModel region endpoint: CN default (https://open.bigmodel.cn); switch provider.base_url to https://api.z.ai for Global accounts