openclaw

关注公众号 jb51net

关闭
AI > openclaw >

OpenClaw国内五个主流大模型配置与接入指南:MiniMax、GLM、Kimi、Doubao、Qwen

脚本之家

前言

OpenClaw(原名Moltbot、Clawdbot)是2026年初爆火的开源个人AI助手项目,支持本地部署,兼容多种消息平台(微信、钉钉、飞书等)。

国内开发者在配置过程中常遇到两个核心问题:

本文基于最新官方文档,提供五个主流国内大模型的完整配置方案。

OpenClaw大模型配置与接入

更新日志

一、MiniMax配置详解

1.1 API密钥获取

访问MiniMax开放平台注册账号并创建API Key。

1.2 配置命令

# 配置MiniMax国内版
openclaw config set 'models.providers.minimax' --json '{
    "baseUrl": "https://api.minimaxi.com/v1",
    "apiKey": "你的MiniMax_API_Key",
    "api": "openai-completions",
    "models": [
        {
            "id": "MiniMax-M2.5",
            "name": "MiniMax M2.5"
        },
        {
            "id": "MiniMax-M2.5-highspeed",
            "name": "MiniMax M2.5 Highspeed"
        },
        {
            "id": "MiniMax-M2.1",
            "name": "MiniMax M2.1"
        },
        {
            "id": "MiniMax-M2.1-highspeed",
            "name": "MiniMax M2.1 Highspeed"
        },
        {
            "id": "MiniMax-M2",
            "name": "MiniMax M2"
        }
    ]
}'
# 设置默认模型
openclaw models set minimax/MiniMax-M2.5

1.3 模型选择

二、GLM(智谱)配置详解

2.1 API密钥获取

访问智谱AI开放平台注册并获取API Key。

2.2 配置命令

# 配置GLM国内版
openclaw config set 'models.providers.glm' --json '{
  "baseUrl": "https://open.bigmodel.cn/api/paas/v4",
  "apiKey": "你的GLM_API_Key",
  "api": "openai-completions",
  "models": [
    {
      "id": "GLM-5",
      "name": "GLM 5"
    },
    {
      "id": "GLM-4.7",
      "name": "GLM 4.7"
    },
    {
      "id": "GLM-4.7-FlashX",
      "name": "GLM 4.7 FlashX"
    },
    {
      "id": "GLM-4.6",
      "name": "GLM 4.6"
    },
    {
      "id": "GLM-4.5-air",
      "name": "GLM 4.5 air"
    }
  ]
}'
# 设置默认模型
openclaw models set glm/GLM-5

2.3 模型选择

三、Kimi(月之暗面)配置详解

3.1 API密钥获取

访问月之暗面开放平台注册并申请API访问权限。

3.2 配置命令

# 配置Kimi国内版
openclaw config set 'models.providers.moonshot' --json '{
  "baseUrl": "https://api.moonshot.cn/v1",
  "apiKey": "你的Kimi_API_Key",
  "api": "openai-completions",
  "models": [
    {
      "id": "kimi-k2.5",
      "name": "Kimi k2.5"
    },
    {
      "id": "kimi-k2-0905-preview",
      "name": "Kimi K2"
    }
  ]
}'

# 设置默认模型
openclaw models set moonshot/kimi-k2.5

3.3 模型选择

四、Doubao(豆包)配置详解

4.1 API密钥获取

访问火山引擎平台注册并申请API访问权限。

4.2 配置命令

# 配置Doubao国内版
openclaw config set 'models.providers.volcengine' --json '{
  "baseUrl": "https://ark.cn-beijing.volces.com/api/coding/v3",
  "apiKey": "你的方舟API_Key",
  "api": "openai-completions",
  "models": [
    {
      "id": "doubao-seed-2-0-code-preview-260215",
      "name": "DoubaoSeed 2.0 Code"
    },
    {
      "id": "doubao-seed-2-0-pro-260215",
      "name": "DoubaoSeed 2.0 Pro"
    },
    {
      "id": "doubao-seed-2-0-lite-260215",
      "name": "DoubaoSeed 2.0 Lite"
    },
    {
      "id": "doubao-seed-2-0-mini-260215",
      "name": "DoubaoSeed 2.0 Mini"
    },
    {
      "id": "doubao-seed-1-8-251228",
      "name": "DoubaoSeed 1.8"
    },
    {
      "id": "doubao-seed-code-preview-251028",
      "name": "DoubaoSeed Code"
    }
  ]
}'
# 设置默认模型
openclaw models set volcengine/doubao-seed-2-0-code-preview-260215

4.3 模型选择

五、Qwen(通义千问)配置详解

5.1 API密钥获取

访问阿里云通义千问开通服务并获取API Key。

5.2 配置命令

# 配置Qwen国内版
openclaw config set 'models.providers.qwen' --json '{
  "baseUrl": "https://dashscope.aliyun.com/compatible-mode/v1",
  "apiKey": "你的Qwen_API_Key",
  "api": "openai-completions",
  "models": [
    {
      "id": "qwen3-max",
      "name": "Qwen3 Max"
    },
    {
      "id": "qwen3.5-plus",
      "name": "Qwen3.5 Plus"
    },
    {
      "id": "qwen3.5-flash",
      "name": "Qwen3.5 Flash"
    },
    {
      "id": "qwen3-coder-plus",
      "name": "Qwen3 Coder Plus"
    }
  ]
}'

# 设置默认模型
openclaw models set qwen/qwen3-max

5.3 模型选择

六、通用配置脚本

如果你是调用的其他模型,或者是订阅的类似GLM CodingMinimax Coding Plan方舟Coding Plan这类编程计划就可以基于通用配置脚本来使用。

6.1 配置指令

# 通用配置脚本
openclaw config set 'models.providers.自定义名称' --json '{
  "baseUrl": "根据对应官网说明填写调用地址",
  "apiKey": "调用模型API_KEY",
  "api": "openai-completions",
  "models": [
    {
      "id": "模型ID(大小写也要准确)",
      "name": "自定义模型名称"
    }
    ......
  ]
}'
# 设置默认模型
openclaw models set 自定义名称/模型ID

6.2 方舟CodingPlan举例

# 通用配置脚本
openclaw config set 'models.providers.volcenginePlan' --json '{
  "baseUrl": "https://ark.cn-beijing.volces.com/api/coding/v3",
  "apiKey": "你的方舟API_Key",
  "api": "openai-completions",
  "models": [
    { "id": "doubao-seed-code",     "name": "DouBao Seed Code" },
    { "id": "glm-4.7", "name": "GLM 4.7" },
    { "id": "deepseek-v3.2", "name": "DeepSeek V3.2" },
    { "id": "kimi-k2-thinking", "name": "Kimi K2 Thinking" },
    { "id": "kimi-k2.5", "name": "Kimi K2.5" }
  ]
}'

# 设置默认模型
openclaw models set volcenginePlan/doubao-seed-code

七、配置文件修改演示

7.1 配置文件修改方法

# 查看当前配置文件
cat ~/.openclaw/openclaw.json

在打开文件中找到models/providers/位置,可以进行参数的调整。

7.2 配置要点

八、多模型切换与管理

8.1 查看可用模型

# 列出所有已配置模型
openclaw models list

# 查看模型详细信息
openclaw models status

8.2 快速切换模型

# 在TUI界面中切换
openclaw tui
# 然后输入: /model minimax/MiniMax-M2.1

# 通过命令行切换
openclaw models set glm/GLM-4.7

九、配置验证与常见问题

9.1 配置验证方法

配置完成后,建议使用以下命令进行验证:

# 检查所有模型状态
openclaw models status

# 进行连通性测试
openclaw models status --probe

# 查看网关运行状态
openclaw gateway status

9.2 常见问题排查

问题1:命令找不到openclaw

解决方案

# 检查Node.js版本
node --version  # 需要>=22

# 重新安装
npm install -g openclaw@latest

问题2:配置完成后出现no output

原因:输出在其他已配置的环境中(如Web界面、Telegram Bot等)

解决方案:检查其他已配置的频道输出位置

问题3:国内API连接失败

解决方案

问题4:模型切换不生效

解决方案

# 重新加载配置
openclaw config reload

# 重启网关服务
openclaw gateway restart

9.3 最佳实践建议

总结

本文全面介绍了OpenClaw配置国内五大主流大模型(MiniMax、GLM、Kimi、Doubao、Qwen)的方法,提供了可直接复制的配置命令模板和配置文件操作方式。

随着国内大模型技术的快速发展,建议开发者定期关注各平台官方文档的更新,获取最新的定价和功能信息。OpenClaw作为开源AI助手框架,为开发者提供了灵活的多模型集成方案,合理配置不同模型的组合,可以最大化发挥AI助手的工作效率。

以上就是OpenClaw国内五个主流大模型配置与接入指南:MiniMax、GLM、Kimi、Doubao、Qwen的详细内容,更多关于OpenClaw大模型配置与接入的资料请关注脚本之家其它相关文章!