Skip to content

feat(providers): add Z.AI CN/Global with Coding Plan support#1167

Merged
hazeone merged 3 commits into
mainfrom
cursor/zai-provider-cn-global-0324
Jul 15, 2026
Merged

feat(providers): add Z.AI CN/Global with Coding Plan support#1167
hazeone merged 3 commits into
mainfrom
cursor/zai-provider-cn-global-0324

Conversation

@hazeone

@hazeone hazeone commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Z.AI (CN) and Z.AI (Global) as first-class AI providers in ClawX, aligned with the OpenClaw community zai provider.

OpenClaw cross-validation

Verified against:

Surface Base URL Default model
CN general API https://open.bigmodel.cn/api/paas/v4 glm-5.2
CN Coding Plan https://open.bigmodel.cn/api/coding/paas/v4 glm-5.2
Global general API https://api.z.ai/api/paas/v4 glm-5.2
Global Coding Plan https://api.z.ai/api/coding/paas/v4 glm-5.2
  • OpenClaw runtime key: always zai (ZAI_API_KEY)
  • UI vendors zai / zai-global are mutually exclusive (same pattern as MiniMax CN/Global)
  • Code Plan toggle generalized beyond Ark so Z.AI can switch between general API and Coding Plan endpoints
  • API protocol: openai-completions (Bearer auth)

Test plan

  • Unit tests for provider registry / keys / GLM context windows
  • E2E: Add Provider dialog shows Z.AI CN/Global + Code Plan endpoint toggle
  • Manual: add Z.AI CN with Coding Plan key, confirm zai/glm-5.2 is primary in OpenClaw
  • Manual: switch to Global / general API endpoint and re-validate
Open in Web Open in Cursor 

Add Z.AI (CN) and Z.AI (Global) vendors mapped to OpenClaw's built-in
`zai` runtime key (ZAI_API_KEY), defaulting to glm-5.2. Support both
general API and Coding Plan endpoints via the shared Code Plan preset
toggle. Cross-checked against OpenClaw docs and Z.AI/BigModel docs.

Co-authored-by: Haze <[email protected]>
@hazeone
hazeone marked this pull request as ready for review July 15, 2026 07:13
@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@hazeone
hazeone merged commit fc87e00 into main Jul 15, 2026
5 checks passed
@hazeone
hazeone deleted the cursor/zai-provider-cn-global-0324 branch July 15, 2026 08:28
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