openclaw配置阿里云百炼api接入
配置openclaw
电脑系统环境:Linux系统
配置前确保电脑已经安装了openclaw
详细步骤
- 去阿里云百炼创建一个apikey
- 以root权限输入以下命令:openclaw onboard 进行配置
- 配置需注意以下选项:
I understand this is powerful... YES 确认风险提示
Onboarding mode QuickStart 快速配置模式
Model/auth provider Skip for now 稍后手动配置百炼
Filter models by provider All providers 显示所有模型
Default model 任意选择(后续会改) 临时默认
Select channel Skip for now 稍后配置飞书
Configure skills now? No 基础部署先跳过
How do you want to hatch? Exit 退出后用命令行配置
- 配置阿里云key和具体模型,更改下面的key和模型名
openclaw config set models.providers.bailian '{
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"apiKey": "YOUR_API_KEY",
"api": "openai-completions",
"models": [
{
"id": "qwen3.5-plus",
"name": "qwen3.5-plus",
"reasoning": true,
"input": ["text", "image"],
"contextWindow": 131072,
"maxTokens": 32768,
"cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }
}
]
}'
- 设置默认模型
openclaw config set agents.defaults.model.primary "bailian/qwen3.5-plus"
- 验证配置
openclaw config get agents.defaults.model.primary
# 应返回: bailian/qwen3.5-plus
至此配置完成,重新启动openclaw即可