跳轉到主要內容

Documentation Index

Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt

Use this file to discover all available pages before exploring further.

GLM 模型

GLM 是透過 Z.AI 平台提供的模型系列(不是公司)。在 OpenClaw 中,GLM 模型會透過 zai 提供者和像 zai/glm-5 這樣的模型 ID 存取。

開始使用

1

選擇驗證路徑並執行入門設定

選擇符合你的 Z.AI 方案與地區的入門設定選項:
驗證選項最適合
zai-api-key通用 API 金鑰設定,並自動偵測端點
zai-coding-globalCoding Plan 使用者(全球)
zai-coding-cnCoding Plan 使用者(中國地區)
zai-global一般 API(全球)
zai-cn一般 API(中國地區)
# Example: generic auto-detect
openclaw onboard --auth-choice zai-api-key

# Example: Coding Plan global
openclaw onboard --auth-choice zai-coding-global
2

將 GLM 設為預設模型

openclaw config set agents.defaults.model.primary "zai/glm-5.1"
3

確認模型可用

openclaw models list --provider zai

設定範例

{
  env: { ZAI_API_KEY: "sk-..." },
  agents: { defaults: { model: { primary: "zai/glm-5.1" } } },
}
zai-api-key 會讓 OpenClaw 從金鑰偵測對應的 Z.AI 端點,並 自動套用正確的基底 URL。當你想強制使用特定 Coding Plan 或一般 API 介面時, 請使用明確的地區選項。

內建目錄

OpenClaw 目前會為 bundled zai 提供者植入這些 GLM 參照:
模型模型
glm-5.1glm-4.7
glm-5glm-4.7-flash
glm-5-turboglm-4.7-flashx
glm-5v-turboglm-4.6
glm-4.5glm-4.6v
glm-4.5-air
glm-4.5-flash
glm-4.5v
預設的 bundled 模型參照是 zai/glm-5.1。GLM 版本與可用性 可能會變更;請查看 Z.AI 文件以取得最新資訊。

進階設定

當你使用 zai-api-key 驗證選項時,OpenClaw 會檢查金鑰格式, 以判斷正確的 Z.AI 基底 URL。明確的地區選項 (zai-coding-global, zai-coding-cn, zai-global, zai-cn) 會覆寫 自動偵測,並直接固定端點。
GLM 模型由 zai 執行階段提供者提供服務。如需完整的提供者 設定、地區端點和其他功能,請參閱 Z.AI 提供者文件

相關

Z.AI 提供者

完整的 Z.AI 提供者設定與地區端點。

模型選擇

選擇提供者、模型參照和容錯移轉行為。