Skip to content

docs(provider): update glm and zai cli setup docs#41919

Closed
tomsun28 wants to merge 15 commits intoopenclaw:mainfrom
tomsun28:zai-update-doc
Closed

docs(provider): update glm and zai cli setup docs#41919
tomsun28 wants to merge 15 commits intoopenclaw:mainfrom
tomsun28:zai-update-doc

Conversation

@tomsun28
Copy link
Copy Markdown
Contributor

Summary

  • update glm and zai cli setup docs

Change Type (select all)

  • Bug fix
  • Feature
  • Refactor
  • Docs
  • Security hardening
  • Chore/infra

Scope (select all touched areas)

  • Gateway / orchestration
  • Skills / tool execution
  • Auth / tokens
  • Memory / storage
  • Integrations
  • API / contracts
  • UI / DX
  • CI/CD / infra

Linked Issue/PR

  • Closes #
  • Related #

User-visible / Behavior Changes

List user-visible changes (including defaults/config).
If none, write None.

Security Impact (required)

  • New permissions/capabilities? (Yes/No)
  • Secrets/tokens handling changed? (Yes/No)
  • New/changed network calls? (Yes/No)
  • Command/tool execution surface changed? (Yes/No)
  • Data access scope changed? (Yes/No)
  • If any Yes, explain risk + mitigation:

Repro + Verification

Environment

  • OS:
  • Runtime/container:
  • Model/provider:
  • Integration/channel (if any):
  • Relevant config (redacted):

Steps

Expected

Actual

Evidence

Attach at least one:

  • Failing test/log before + passing after
  • Trace/log snippets
  • Screenshot/recording
  • Perf numbers (if relevant)

Human Verification (required)

What you personally verified (not just CI), and how:

  • Verified scenarios:
  • Edge cases checked:
  • What you did not verify:

Review Conversations

  • I replied to or resolved every bot review conversation I addressed in this PR.
  • I left unresolved only the conversations that still need reviewer or maintainer judgment.

If a bot review conversation is addressed by this PR, resolve that conversation yourself. Do not leave bot review conversation cleanup for maintainers.

Compatibility / Migration

  • Backward compatible? (Yes/No)
  • Config/env changes? (Yes/No)
  • Migration needed? (Yes/No)
  • If yes, exact upgrade steps:

Failure Recovery (if this breaks)

  • How to disable/revert this change quickly:
  • Files/config to restore:
  • Known bad symptoms reviewers should watch for:

Risks and Mitigations

List only real risks for this PR. Add/remove entries as needed. If none, write None.

  • Risk:
    • Mitigation:

@openclaw-barnacle openclaw-barnacle bot added docs Improvements or additions to documentation size: XS labels Mar 10, 2026
@tomsun28 tomsun28 marked this pull request as ready for review March 10, 2026 08:05
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 10, 2026

Greptile Summary

This PR updates the CLI setup documentation for the GLM and Z.AI providers (in both English and Chinese) to replace the single generic --auth-choice zai-api-key command with four granular auth choices (zai-global, zai-coding-global, zai-coding-cn, zai-cn), which match the current implementation in src/commands/auth-choice-options.ts. It also adds glm-5 to the list of example model IDs in the GLM notes.

Key observations:

  • All four new --auth-choice values are valid and confirmed in src/commands/auth-choice-options.ts (line 114).
  • The non-interactive --zai-api-key "$ZAI_API_KEY" example was removed from docs/providers/zai.md; the underlying --zai-api-key <key> flag is still present in the code but is no longer documented — this is a minor documentation regression for users who rely on non-interactive/scripted setup.
  • The Chinese translations (docs/zh-CN/providers/glm.md and docs/zh-CN/providers/zai.md) have the CLI section correctly updated, but their config snippets and example model IDs still reference zai/glm-4.7 instead of zai/glm-5, inconsistent with the English source. This affects the intro sentence of zh-CN/providers/glm.md (line 18), the config snippet in both zh-CN files (line 41 each), and the Notes example in zh-CN/providers/zai.md (line 47).

Confidence Score: 4/5

  • Safe to merge; docs-only change with no runtime impact, but the Chinese translations have minor model-ID inconsistencies worth cleaning up.
  • All new auth choice values are verified against the live implementation. The only issues are cosmetic inconsistencies in the Chinese translations (stale glm-4.7 references in config snippets and example text where glm-5 is now the preferred default), and the undocumented removal of the non-interactive --zai-api-key example. Neither affects correctness or runtime behaviour.
  • docs/zh-CN/providers/glm.md and docs/zh-CN/providers/zai.md — config snippets and example model IDs are out of sync with the English sources.

Comments Outside Diff (1)

  1. docs/zh-CN/providers/glm.md, line 18 (link)

    Config snippet and intro out of sync with English source

    The config snippet (line 41) and the intro sentence (line 18) in the Chinese translation still reference zai/glm-4.7 as the default model, while the English docs/providers/glm.md was already updated to use zai/glm-5. This inconsistency means Chinese readers are being pointed to an older default model.

    Affected locations in this file:

    • Line 18: 模型 ID 格式如 \zai/glm-4.7`→ should bezai/glm-5`
    • Line 41: "primary": "zai/glm-4.7" in the config snippet → should be zai/glm-5

    The same inconsistency exists in docs/zh-CN/providers/zai.md — the config snippet at line 41 and the Notes example at line 47 both still reference zai/glm-4.7 instead of zai/glm-5.

Last reviewed commit: 33925f4

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 33925f4542

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b9db01567e

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a955666ad

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@obviyus obviyus self-assigned this Mar 13, 2026
@obviyus
Copy link
Copy Markdown
Contributor

obviyus commented Mar 13, 2026

I think the Z.AI endpoint choices are getting conflated here:

  • zai-global is the explicit general API endpoint, not the Coding Plan endpoint.
  • zai-api-key is the current default smart path in OpenClaw: it auto-detects the working endpoint for the key and prefers general glm-5 when available.
  • If the goal of this doc update is "use your existing monthly Coding Plan instead of pay-as-you-go API billing", the explicit command should be zai-coding-global, not zai-global.

So I think we should either keep zai-api-key as the primary example, or explicitly recommend zai-coding-global for Coding Plan users.

@tomsun28
Copy link
Copy Markdown
Contributor Author

hi @obviyus thanks for your suggestion. Since the endpoint returned by zai-api-key can be uncertain, users cannot clearly know which actual endpoint their requests are being routed to. Therefore, I have removed it from the documentation. I’ll update the doc to recommend zai-coding-global for Coding Plan users.

@tomsun28
Copy link
Copy Markdown
Contributor Author

@obviyus PTAL thanks.
Btw, I will submit a new model pr tomorrow that has been optimized for our openclaw. Could you help take a review if have time? I would really appreciate it.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b723046417

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db39b8fd55

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e395c7d3ab

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 6230533f42

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

```bash
openclaw onboard --auth-choice zai-api-key
# 编程套餐(全球), 推荐编程套餐用户使用
openclaw onboard --auth-choice zai-coding-global
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Revert manual edits in generated zh-CN docs

This commit directly modifies docs/zh-CN/**, but AGENTS.md explicitly says those files are generated and should not be edited unless the user asked for it; committing manual changes here is a maintainability regression because these edits can be overwritten or drift from the translation pipeline (scripts/docs-i18n and glossary/TM flow). Please keep the source update in English docs and regenerate zh-CN output through the documented i18n process.

Useful? React with 👍 / 👎.

@obviyus
Copy link
Copy Markdown
Contributor

obviyus commented Mar 14, 2026

Opened #45969 to supersede this one.

That follow-up carries the same docs update, but also fixes the runtime path so explicit zai-coding-* onboarding choices still detect and set a working default model (glm-5 when available on the chosen endpoint, otherwise glm-4.7).

@tomsun28
Copy link
Copy Markdown
Contributor Author

Opened #45969 to supersede this one.

That follow-up carries the same docs update, but also fixes the runtime path so explicit zai-coding-* onboarding choices still detect and set a working default model (glm-5 when available on the chosen endpoint, otherwise glm-4.7).

git it, thanks

@tomsun28 tomsun28 closed this Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants