Skip to content

GLM 模型

GLM 是一个模型系列(非公司名),通过 Z.AI 平台提供服务。在 OpenClaw 中,GLM 模型通过 zai 提供商访问,模型 ID 格式为 zai/glm-5

CLI 配置

bash
# Coding Plan 全球版,推荐 Coding Plan 用户使用
openclaw onboard --auth-choice zai-coding-global

# Coding Plan 国内版,推荐国内 Coding Plan 用户使用
openclaw onboard --auth-choice zai-coding-cn

# 通用 API(全球)
openclaw onboard --auth-choice zai-global

# 通用 API(国内)
openclaw onboard --auth-choice zai-cn

配置片段

json5
{
  env: { ZAI_API_KEY: "sk-..." },
  agents: { defaults: { model: { primary: "zai/glm-5" } } },
}

注意事项

  • GLM 版本和可用性可能随时变化,请查阅 Z.AI 官方文档获取最新信息。
  • 常见模型 ID 示例:glm-5glm-4.7glm-4.6
  • 如果你在国内养龙虾,推荐优先选择 zai-coding-cnzai-cn 端点,延迟更低。
  • 提供商详情参见 /openclaw/providers/zai