China-region providers
GLM, MiniMax, Qwen/DashScope, Moonshot/Kimi, Qianfan, Doubao, Z.AI, and Bailian with region routing.
Revka has first-party support for the major China-based model vendors — Zhipu GLM, Z.AI, MiniMax, Alibaba Qwen/DashScope, Moonshot/Kimi, Baidu Qianfan, ByteDance Doubao, and Alibaba Bailian. Almost all of them ship two regional deployments: a CN endpoint (mainland data centers, typically lower latency from inside China) and a Global/International endpoint. Revka picks the right base URL automatically from the provider alias you choose, so switching regions is a one-word config change rather than a URL edit.
Use this page when you want to run any of these models, when you need to route a deployment to the CN versus the Global endpoint, or when you want to reuse a Qwen Code or MiniMax subscription token instead of an API key. For the full provider table see the provider catalog; for fallbacks and hint-based routing see routing, reliability & tuning.
Quick start
Section titled “Quick start”Every China provider follows the same three-step pattern: set the provider alias, set its API key (config or env var), pick a model.
-
Pick a provider alias. For example
qwen(CN) orqwen-intl(Global). -
Set the key. Either run onboarding non-interactively or set the provider’s env var:
Terminal window revka onboard --provider qwen --api-key "YOUR_DASHSCOPE_KEY"# orexport DASHSCOPE_API_KEY="YOUR_DASHSCOPE_KEY" -
Choose a model and chat.
~/.revka/config.toml default_provider = "qwen"default_model = "qwen-max"Terminal window echo "Hello" | revka agent
Zhipu GLM
Section titled “Zhipu GLM”The glm provider integrates Zhipu AI’s GLM models through an OpenAI-compatible surface. GLM API keys use Zhipu’s distinctive id.secret format (for example abc123.xyz789). The provider runs with the responses-API fallback disabled, so it always speaks /chat/completions and never probes /responses.
| CN | Global | |
|---|---|---|
| Base URL | https://open.bigmodel.cn/api/paas/v4 | https://api.z.ai/api/paas/v4 |
| Aliases | glm-cn, zhipu-cn, bigmodel | glm, zhipu, glm-global, zhipu-global |
| Auth | Bearer (id.secret) | Bearer (id.secret) |
| Env var | GLM_API_KEY | GLM_API_KEY |
# ~/.revka/config.toml — GLM Globaldefault_provider = "glm"default_model = "glm-4.7"api_key = "<id>.<secret>"# GLM China (open.bigmodel.cn)default_provider = "glm-cn"default_model = "glm-4.7"api_key = "<id>.<secret>"Z.AI exposes Zhipu’s coding-plan deployment on a separate path (/api/coding/paas/v4) from the standard GLM endpoint. Pick zai when you have a Z.AI coding plan subscription; pick glm for the standard GLM API.
| CN | Global | |
|---|---|---|
| Base URL | https://open.bigmodel.cn/api/coding/paas/v4 | https://api.z.ai/api/coding/paas/v4 |
| Aliases | zai-cn, z.ai-cn | zai, z.ai, zai-global, z.ai-global |
| Auth | Bearer (id.secret) | Bearer (id.secret) |
| Env var | ZAI_API_KEY | ZAI_API_KEY |
# ~/.revka/config.toml — Z.AI Globaldefault_provider = "zai"default_model = "glm-4.7"api_key = "<id>.<secret>"Z.AI / GLM provider setup
Section titled “Z.AI / GLM provider setup”Z.AI and GLM share the same id.secret key format but use different endpoints and env vars. Use this checklist to wire either one:
-
Get a key. Sign up at the Z.AI or Zhipu (bigmodel.cn) console and generate a key. The format is always
id.secret. -
Choose the right alias. Use
zai/zai-cnfor a Z.AI coding plan, orglm/glm-cnfor the standard GLM API. Append-cnfor the mainland endpoint. -
Set the matching env var.
ZAI_API_KEYfor Z.AI,GLM_API_KEYfor GLM. Each alias family only reads its own env var. -
Verify with curl before pointing Revka at it:
Terminal window curl -X POST "https://api.z.ai/api/coding/paas/v4/chat/completions" \-H "Authorization: Bearer YOUR_ZAI_API_KEY" \-H "Content-Type: application/json" \-d '{"model":"glm-4.7","messages":[{"role":"user","content":"Hello"}]}' -
Confirm Revka sees it:
Terminal window revka statusecho "Hello" | revka agent
MiniMax
Section titled “MiniMax”MiniMax offers both a Global and a CN deployment. Because some MiniMax models reject a role: system message, Revka merges the system prompt into the first user turn for every MiniMax alias. Keep this in mind for channel conversations whose system prompt carries delivery instructions — that guidance is folded into the user message rather than sent separately.
| CN | Global | |
|---|---|---|
| Base URL | https://api.minimaxi.com/v1 | https://api.minimax.io/v1 |
| Aliases | minimax-cn, minimaxi, minimax-oauth-cn, minimax-portal-cn | minimax, minimax-intl, minimax-io, minimax-global, minimax-portal |
| Auth | Bearer | Bearer |
| Env var | MINIMAX_OAUTH_TOKEN, then MINIMAX_API_KEY | MINIMAX_OAUTH_TOKEN, then MINIMAX_API_KEY |
# ~/.revka/config.toml — MiniMax Globaldefault_provider = "minimax"default_model = "MiniMax-Text-01"api_key = "YOUR_MINIMAX_API_KEY"MiniMax region routing
Section titled “MiniMax region routing”MiniMax aliases self-select their endpoint: any alias matched as international routes to api.minimax.io, and any alias matched as CN routes to api.minimaxi.com. Use minimax or minimax-intl for Global, and minimax-cn or minimaxi for China — no api_url needed.
MiniMax OAuth (subscription token)
Section titled “MiniMax OAuth (subscription token)”Setting api_key = "minimax-oauth" is a placeholder that triggers automatic OAuth token resolution instead of treating the literal string as a key. Revka then checks, in order: MINIMAX_OAUTH_TOKEN, MINIMAX_API_KEY, and finally the token-refresh endpoint using MINIMAX_OAUTH_REFRESH_TOKEN. Region for the refresh call is taken from the alias or from MINIMAX_OAUTH_REGION.
default_provider = "minimax-oauth"api_key = "minimax-oauth" # placeholder, not a literal keyexport MINIMAX_OAUTH_TOKEN="..." # preferred direct token# or, to auto-refresh:export MINIMAX_OAUTH_REFRESH_TOKEN="..."export MINIMAX_OAUTH_REGION="global" # or "cn"| Variable | Meaning |
|---|---|
MINIMAX_OAUTH_TOKEN | Direct OAuth access token (checked first) |
MINIMAX_API_KEY | Standard API key fallback |
MINIMAX_OAUTH_REFRESH_TOKEN | Enables automatic token refresh |
MINIMAX_OAUTH_REGION | global or cn — selects the refresh endpoint |
MINIMAX_OAUTH_CLIENT_ID | Override the default OAuth client ID |
The refresh endpoints are https://api.minimax.io/oauth/token (Global) and https://api.minimaxi.com/oauth/token (CN). See OAuth & subscription providers for the broader OAuth model.
Qwen / DashScope
Section titled “Qwen / DashScope”Alibaba’s Qwen models are served through DashScope’s OpenAI-compatible endpoint. There are three separate regional deployments — CN, International, and US — plus an OAuth variant for Qwen Code CLI subscribers. Vision (base64 images) is enabled for Qwen.
| Region | Base URL | Aliases |
|---|---|---|
| CN | https://dashscope.aliyuncs.com/compatible-mode/v1 | qwen, dashscope, qwen-cn, dashscope-cn |
| International | https://dashscope-intl.aliyuncs.com/compatible-mode/v1 | qwen-intl, dashscope-intl, qwen-international, dashscope-international |
| US | https://dashscope-us.aliyuncs.com/compatible-mode/v1 | qwen-us, dashscope-us |
All three direct-key variants authenticate with DASHSCOPE_API_KEY (Bearer).
# ~/.revka/config.toml — Qwen Internationaldefault_provider = "qwen-intl"default_model = "qwen-max"export DASHSCOPE_API_KEY="YOUR_DASHSCOPE_KEY"Qwen Code OAuth
Section titled “Qwen Code OAuth”The qwen-code (alias qwen-oauth) variant reuses a Qwen Code CLI subscription instead of a direct key, analogous to other subscription providers. Set the placeholder key and let Revka resolve the token:
default_provider = "qwen-code"api_key = "qwen-oauth" # placeholder| Variable | Meaning |
|---|---|
QWEN_OAUTH_TOKEN | Explicit OAuth access token |
QWEN_OAUTH_REFRESH_TOKEN | Enables automatic refresh when the cached token expires |
QWEN_OAUTH_RESOURCE_URL | Endpoint override returned by the OAuth session |
QWEN_OAUTH_CLIENT_ID | Override the default OAuth client ID |
Revka also auto-discovers credentials written by the Qwen Code CLI at ~/.qwen/oauth_creds.json. When no resource URL is supplied, the OAuth variant falls back to the CN base URL. See OAuth & subscription providers for the full flow.
Moonshot / Kimi
Section titled “Moonshot / Kimi”Moonshot’s Kimi models ship CN and International deployments. Note the alias mapping is asymmetric: the bare moonshot and kimi aliases point at the CN endpoint; use the -intl/-global aliases for the international endpoint.
| CN | International | |
|---|---|---|
| Base URL | https://api.moonshot.cn/v1 | https://api.moonshot.ai/v1 |
| Aliases | moonshot, kimi, moonshot-cn, kimi-cn | moonshot-intl, moonshot-global, kimi-intl, kimi-global |
| Auth | Bearer | Bearer |
| Env var | MOONSHOT_API_KEY | MOONSHOT_API_KEY |
# ~/.revka/config.toml — Kimi Internationaldefault_provider = "kimi-intl"default_model = "kimi-k2"api_key = "YOUR_MOONSHOT_API_KEY"Qianfan / Baidu
Section titled “Qianfan / Baidu”Baidu’s Qianfan platform (formerly Wenxin/ERNIE) is served from a single endpoint.
| Field | Value |
|---|---|
| Base URL | https://qianfan.baidubce.com/v2 |
| Aliases | qianfan, baidu |
| Auth | Bearer |
| Env var | QIANFAN_API_KEY |
default_provider = "qianfan"default_model = "ernie-4.5-turbo"api_key = "YOUR_QIANFAN_API_KEY"You can override the base URL with api_url if Baidu routes your account to a different host.
Doubao / Volcengine
Section titled “Doubao / Volcengine”ByteDance’s Doubao models run on the Volcengine Ark platform. The endpoint is mainland-hosted.
| Field | Value |
|---|---|
| Base URL | https://ark.cn-beijing.volces.com/api/v3 |
| Aliases | doubao, volcengine, ark, doubao-cn |
| Auth | Bearer |
| Env vars | ARK_API_KEY, then VOLCENGINE_API_KEY, then DOUBAO_API_KEY |
default_provider = "doubao"default_model = "doubao-pro-32k"api_key = "YOUR_ARK_API_KEY"Bailian
Section titled “Bailian”Alibaba Cloud Bailian (Model Studio) is served from a dedicated DashScope coding host. Vision is enabled for this provider.
| Field | Value |
|---|---|
| Base URL | https://coding.dashscope.aliyuncs.com/v1 |
| Aliases | bailian, aliyun-bailian, aliyun |
| Auth | Bearer |
| Env vars | BAILIAN_API_KEY, then DASHSCOPE_API_KEY |
default_provider = "bailian"default_model = "qwen-max"api_key = "YOUR_BAILIAN_API_KEY"Because Bailian falls back to DASHSCOPE_API_KEY, a single DashScope key can serve both the qwen and bailian aliases if your account is enabled for both.
CN vs Global aliases
Section titled “CN vs Global aliases”Every China provider’s region is selected purely by the alias you set as default_provider. This table is the authoritative map of which alias resolves to which endpoint.
| Provider | CN endpoint | CN aliases | Global / Intl endpoint | Global / Intl aliases |
|---|---|---|---|---|
| GLM | https://open.bigmodel.cn/api/paas/v4 | glm-cn, zhipu-cn, bigmodel | https://api.z.ai/api/paas/v4 | glm, zhipu, glm-global, zhipu-global |
| Z.AI | https://open.bigmodel.cn/api/coding/paas/v4 | zai-cn, z.ai-cn | https://api.z.ai/api/coding/paas/v4 | zai, z.ai, zai-global, z.ai-global |
| MiniMax | https://api.minimaxi.com/v1 | minimax-cn, minimaxi, minimax-oauth-cn, minimax-portal-cn | https://api.minimax.io/v1 | minimax, minimax-intl, minimax-io, minimax-global, minimax-portal |
| Qwen / DashScope | https://dashscope.aliyuncs.com/compatible-mode/v1 | qwen, dashscope, qwen-cn, dashscope-cn | Intl: https://dashscope-intl.aliyuncs.com/compatible-mode/v1 · US: https://dashscope-us.aliyuncs.com/compatible-mode/v1 | qwen-intl, dashscope-intl, qwen-international · qwen-us, dashscope-us |
| Moonshot / Kimi | https://api.moonshot.cn/v1 | moonshot, kimi, moonshot-cn, kimi-cn | https://api.moonshot.ai/v1 | moonshot-intl, moonshot-global, kimi-intl, kimi-global |
| Qianfan / Baidu | https://qianfan.baidubce.com/v2 | qianfan, baidu | (single endpoint) | — |
| Doubao / Volcengine | https://ark.cn-beijing.volces.com/api/v3 | doubao, volcengine, ark, doubao-cn | (single endpoint) | — |
| Bailian | https://coding.dashscope.aliyuncs.com/v1 | bailian, aliyun-bailian, aliyun | (single endpoint) | — |
Overriding the endpoint
Section titled “Overriding the endpoint”The region aliases cover the standard deployments, but you can always pin an explicit base URL with api_url. This is useful for a private gateway, a regional mirror, or a host Alibaba/Baidu routed your account to:
default_provider = "qianfan"api_url = "https://your-qianfan-mirror.example.com/v2"api_key = "YOUR_QIANFAN_API_KEY"If no named alias fits at all, fall back to the generic custom: prefix described in local, self-hosted & custom endpoints.