文章目录
- 访问MiniMax开放平台注册账号并创建API Key。
- # 配置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
- MiniMax-M2.5:推荐使用!Minimax目前最新模型!顶尖性能与极致性价比 MiniMax-M2.5-highspeed:与 M2.5 效果不变,速度大幅提升,价格也会更贵 MiniMax-M2.1:强大多语言编程能力,全面升级代码工程体验 MiniMax-M2.1-highspeed:与 M2.1 效果不变,速度大幅提升,价格也会更贵 MiniMax-M2:专为高效编码与Agent工作流而生
- 访问智谱AI开放平台注册并获取API Key。
- # 配置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
- GLM-5:GLM(智谱)目前最新模型!擅长复杂系统工程与长程 Agent 任务 GLM-4.7:强化编码能力、长程任务规划与工具协同,通用能力提升,回复更简洁自然,写作更具沉浸感。 GLM-4.7-FlashX:GLM-4.7的轻量高速版本 GLM-4.6:超强性能,高级编码能力、强大推理以及工具调用能力 GLM-4.5-Air:高性价比,在推理、编码和智能体任务上表现强劲
- 访问月之暗面开放平台注册并申请API访问权限。
- # 配置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
- kimi-k2.5:Kimi 目前最新模型!在 Agent、代码、视觉理解及一系列通用智能任务上取得开源 SoTA 表现 kimi-k2-0905-preview:增强了 Agentic Coding 能力、前端代码美观度和实用性、以及上下文理解能力
- 访问火山引擎平台注册并申请API访问权限。
- # 配置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
- doubao-seed-2-0-code-preview-260215:Doubao 目前最新模型Code版!在 Seed 2.0 优秀的 Agent、VLM 能力基础上,特别增强了代码能力,适合接入各种 AI 编程工具使用 doubao-seed-2-0-pro-260215:Doubao 目前最新模型Pro版!目前旗舰级全能通用模型,面向 Agent 时代的复杂推理与长链路任务执行场景。强调多模态理解、长上下文推理、结构化生成与工具增强执行 doubao-seed-2-0-lite-260215:Doubao 目前最新模型Lite版!面向高频企业场景兼顾性能与成本的均衡型模型 doubao-seed-2-0-mini-260215:Doubao 目前最新模型Mini版!面向低时延、高并发与成本敏感场景 doubao-seed-code-preview-251028:面向Agentic编程任务进行了深度优化 doubao-seed-1-8-251228:面向多模态 Agent 场景定向优化
- 访问阿里云通义千问开通服务并获取API Key。
- # 配置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
- qwen3-max:千问系列效果最好的模型,适合复杂、多步骤的任务 qwen-plus:能力均衡,推理效果、成本和速度介于千问Max和千问Flash之间,适合中等复杂任务 qwen-flash:千问系列速度最快、成本极低的模型,适合简单任务 qwen3-coder-plus:具有强大的Coding Agent能力,擅长工具调用和环境交互
- # 通用配置脚本 openclaw config set ‘models.providers.自定义名称’ –json ‘{ “baseUrl”: “根据对应官网说明填写调用地址”, “apiKey”: “调用模型API_KEY”, “api”: “openai-completions”, “models”: [ { “id”: “模型ID(大小写也要准确)”, “name”: “自定义模型名称” } …… ] }’ # 设置默认模型 openclaw models set 自定义名称/模型ID
- # 通用配置脚本 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
- 配置完成后,建议使用以下命令进行验证: # 检查所有模型状态 openclaw models status # 进行连通性测试 openclaw models status –probe # 查看网关运行状态 openclaw gateway status
- 问题1:命令找不到openclaw 解决方案: # 检查Node.js版本 node –version # 需要>=22 # 重新安装 npm install -g openclaw@latest 问题2:配置完成后出现no output 原因:输出在其他已配置的环境中(如Web界面、Telegram Bot等) 解决方案:检查其他已配置的频道输出位置 问题3:国内API连接失败 解决方案: 确认baseUrl使用国内版地址 检查API Key权限 验证网络连接 问题4:模型切换不生效 解决方案: # 重新加载配置 openclaw config reload # 重启网关服务 openclaw gateway restart
- 环境隔离:开发、测试、生产环境使用不同API Key 监控配置:定期检查模型使用情况和费用消耗 备份配置:重要配置修改前备份~/.openclaw/openclaw.json 版本管理:关注OpenClaw和模型API的版本更新
目录
- 前言
- 一、MiniMax配置详解
- 1.1 API密钥获取
- 1.2 配置命令
- 1.3 模型选择
- 二、GLM(智谱)配置详解
- 2.1 API密钥获取
- 2.2 配置命令
- 2.3 模型选择
- 三、Kimi(月之暗面)配置详解
- 3.1 API密钥获取
- 3.2 配置命令
- 3.3 模型选择
- 四、Doubao(豆包)配置详解
- 4.1 API密钥获取
- 4.2 配置命令
- 4.3 模型选择
- 五、Qwen(通义千问)配置详解
- 5.1 API密钥获取
- 5.2 配置命令
- 5.3 模型选择
- 六、通用配置脚本
- 6.1 配置指令
- 6.2 方舟CodingPlan举例
- 七、配置文件修改演示
- 7.1 配置文件修改方法
- 7.2 配置要点
- 八、多模型切换与管理
- 8.1 查看可用模型
- 8.2 快速切换模型
- 九、配置验证与常见问题
- 9.1 配置验证方法
- 9.2 常见问题排查
- 9.3 最佳实践建议
- 总结
OpenClaw(原名Moltbot、Clawdbot)是2026年初爆火的开源个人AI助手项目,支持本地部署,兼容多种消息平台(微信、钉钉、飞书等)。
国内开发者在配置过程中常遇到两个核心问题:
- 命令行配置与URL修正;
- 国内外版本区分。
本文基于最新官方文档,提供四个主流国内大模型的完整配置方案。

更新日志
- 2026-02-27 (最新)
- 新增 MiniMax-M2.5、GLM-5 模型配置命令;
- 新增 Doubao(豆包)模型配置命令;
- 优化文档结构说明和配置步骤描述;
访问MiniMax开放平台注册账号并创建API Key。
# 配置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
- MiniMax-M2.5:推荐使用!Minimax目前最新模型!顶尖性能与极致性价比
- MiniMax-M2.5-highspeed:与 M2.5 效果不变,速度大幅提升,价格也会更贵
- MiniMax-M2.1:强大多语言编程能力,全面升级代码工程体验
- MiniMax-M2.1-highspeed:与 M2.1 效果不变,速度大幅提升,价格也会更贵
- MiniMax-M2:专为高效编码与Agent工作流而生
访问智谱AI开放平台注册并获取API Key。
# 配置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
- GLM-5:GLM(智谱)目前最新模型!擅长复杂系统工程与长程 Agent 任务
- GLM-4.7:强化编码能力、长程任务规划与工具协同,通用能力提升,回复更简洁自然,写作更具沉浸感。
- GLM-4.7-FlashX:GLM-4.7的轻量高速版本
- GLM-4.6:超强性能,高级编码能力、强大推理以及工具调用能力
- GLM-4.5-Air:高性价比,在推理、编码和智能体任务上表现强劲
访问月之暗面开放平台注册并申请API访问权限。
# 配置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
- kimi-k2.5:Kimi 目前最新模型!在 Agent、代码、视觉理解及一系列通用智能任务上取得开源 SoTA 表现
- kimi-k2-0905-preview:增强了 Agentic Coding 能力、前端代码美观度和实用性、以及上下文理解能力
访问火山引擎平台注册并申请API访问权限。
# 配置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
- doubao-seed-2-0-code-preview-260215:Doubao 目前最新模型Code版!在 Seed 2.0 优秀的 Agent、VLM 能力基础上,特别增强了代码能力,适合接入各种 AI 编程工具使用
- doubao-seed-2-0-pro-260215:Doubao 目前最新模型Pro版!目前旗舰级全能通用模型,面向 Agent 时代的复杂推理与长链路任务执行场景。强调多模态理解、长上下文推理、结构化生成与工具增强执行
- doubao-seed-2-0-lite-260215:Doubao 目前最新模型Lite版!面向高频企业场景兼顾性能与成本的均衡型模型
- doubao-seed-2-0-mini-260215:Doubao 目前最新模型Mini版!面向低时延、高并发与成本敏感场景
- doubao-seed-code-preview-251028:面向Agentic编程任务进行了深度优化
- doubao-seed-1-8-251228:面向多模态 Agent 场景定向优化
访问阿里云通义千问开通服务并获取API Key。
# 配置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
- qwen3-max:千问系列效果最好的模型,适合复杂、多步骤的任务
- qwen-plus:能力均衡,推理效果、成本和速度介于千问Max和千问Flash之间,适合中等复杂任务
- qwen-flash:千问系列速度最快、成本极低的模型,适合简单任务
- qwen3-coder-plus:具有强大的Coding Agent能力,擅长工具调用和环境交互
如果你是调用的其他模型,或者是订阅的类似GLM Coding、Minimax Coding Plan和方舟Coding Plan这类编程计划就可以基于通用配置脚本来使用。
# 通用配置脚本
openclaw config set 'models.providers.自定义名称' --json '{
"baseUrl": "根据对应官网说明填写调用地址",
"apiKey": "调用模型API_KEY",
"api": "openai-completions",
"models": [
{
"id": "模型ID(大小写也要准确)",
"name": "自定义模型名称"
}
......
]
}'
# 设置默认模型
openclaw models set 自定义名称/模型ID
# 通用配置脚本
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
# 查看当前配置文件
cat ~/.openclaw/openclaw.json
在打开文件中找到models/providers/位置,可以进行参数的调整。
- 专用BaseUrl:配置各模型厂家提供的调用地址
- 模型名称:支持特定的Model Name,如文档所列,不支持"Auto"
- 服务重启:修改配置文件后必须重启gateway服务
# 列出所有已配置模型
openclaw models list
# 查看模型详细信息
openclaw models status
# 在TUI界面中切换
openclaw tui
# 然后输入: /model minimax/MiniMax-M2.1
# 通过命令行切换
openclaw models set glm/GLM-4.7
配置完成后,建议使用以下命令进行验证:
# 检查所有模型状态 openclaw models status # 进行连通性测试 openclaw models status --probe # 查看网关运行状态 openclaw gateway status
问题1:命令找不到openclaw
解决方案:
# 检查Node.js版本 node --version # 需要>=22 # 重新安装 npm install -g openclaw@latest
问题2:配置完成后出现no output
原因:输出在其他已配置的环境中(如Web界面、Telegram Bot等)
解决方案:检查其他已配置的频道输出位置
问题3:国内API连接失败
解决方案:
- 确认baseUrl使用国内版地址
- 检查API Key权限
- 验证网络连接
问题4:模型切换不生效
解决方案:
# 重新加载配置 openclaw config reload # 重启网关服务 openclaw gateway restart
- 环境隔离:开发、测试、生产环境使用不同API Key
- 监控配置:定期检查模型使用情况和费用消耗
- 备份配置:重要配置修改前备份
~/.openclaw/openclaw.json
- 版本管理:关注OpenClaw和模型API的版本更新
~/.openclaw/openclaw.json
本文全面介绍了OpenClaw配置国内五大主流大模型(MiniMax、GLM、Kimi、Doubao、Qwen)的方法,提供了可直接复制的配置命令模板和配置文件操作方式。
随着国内大模型技术的快速发展,建议开发者定期关注各平台官方文档的更新,获取最新的定价和功能信息。OpenClaw作为开源AI助手框架,为开发者提供了灵活的多模型集成方案,合理配置不同模型的组合,可以最大化发挥AI助手的工作效率。
以上就是OpenClaw国内四个主流大模型配置与接入指南:MiniMax、GLM、Kimi、Doubao、Qwen的详细内容,更多关于OpenClaw大模型配置与接入的资料请关注风君子博客其它相关文章!