OpenClaw对接阿里云百炼api怎么设置?阿里云支持OpenClaw龙虾AI一键部署:https://t.aliyun.com/U/WxO5TJ 如下图:

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。
要将 OpenClaw 对接阿里云百炼 API,需完成以下关键配置,阿里云百炼官网:https://t.aliyun.com/U/fPVHqY
https://dashscope.aliyuncs.com/compatible-mode/v1https://dashscope-intl.aliyuncs.com/compatible-mode/v1https://dashscope-us.aliyuncs.com/compatible-mode/v1百炼API Key获取,阿里云官方文档有详细说明:https://help.aliyun.com/zh/model-studio/get-api-key
注意:Base URL、API Key 和模型必须属于同一地域。
openclaw dashboard
http://127.0.0.1:18789,进入 Config > RAW。"agents": {...} 前插入百炼配置,示例(以北京地域为例):"models": {
"mode": "merge",
"providers": {
"bailian": {
"baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
"apiKey": "YOUR_API_KEY",
"api": "openai-completions",
"models": [
{
"id": "qwen3.6-plus",
"name": "qwen3.6-plus",
"reasoning": false,
"input": ["text", "image"],
"contextWindow": 1000000,
"maxTokens": 65536
},
{
"id": "qwen3-coder-next",
"name": "qwen3-coder-next",
"reasoning": false,
"input": ["text"],
"contextWindow": 262144,
"maxTokens": 65536
}
]
}
}
}
将 YOUR_API_KEY 替换为实际的百炼 API Key。编辑 ~/.openclaw/openclaw.json,按上述结构添加配置。
"reasoning": false,否则回复内容为空。https://token-plan.cn-beijing.maas.aliyuncs.com/compatible-mode/v1https://coding.dashscope.aliyuncs.com/v1,且仅限在 AI 编程工具中使用。配置完成后重启 OpenClaw 即可生效。