OpenClaw 接入阿里百炼 Coding Plan 配置教程

本文介绍如何在 OpenClaw 中配置阿里百炼 Coding Plan,使用通义千问、Kimi、GLM 等模型。

环境要求

  • Node.js 22+
  • 阿里百炼 Coding Plan 订阅(¥200/月)
  • Coding Plan 专属 API Key(格式 sk-sp-xxxxx

一、获取 API Key

  1. 订阅 Coding Plan Pro 套餐
  2. 进入 Coding Plan 控制台
  3. 创建并复制专属 API Key(sk-sp-xxxxx

二、安装 OpenClaw

# macOS / Linux
curl -fsSL https://openclaw.ai/install.sh | bash

# Windows PowerShell
iwr -useb https://openclaw.ai/install.ps1 | iex

# 或手动安装
npm install -g openclaw@latest

三、初始化配置

openclaw onboard --install-daemon

配置流程:

  • Continue? → Yes
  • Onboarding mode → Quick Start
  • Model/auth provider → Custom

四、配置百炼 Provider

在初始化流程中选择 Custom 后,填写以下信息:

配置项
Base URL https://coding.dashscope.aliyuncs.com/v1
API Key sk-sp-你的专属Key
API 格式 openai-completions

推荐模型:qwen3.7-plusqwen3.6-pluskimi-k2.5glm-5MiniMax-M2.5

五、手动配置(可选)

如果 onboard 流程中没有百炼选项,可直接编辑配置文件。

编辑 ~/.openclaw/openclaw.json

{
  "models": {
    "mode": "merge",
    "providers": {
      "qwen": {
        "baseUrl": "https://coding.dashscope.aliyuncs.com/v1",
        "api": "openai-completions",
        "apiKey": "sk-sp-你的专属APIKey",
        "models": [
          {
            "id": "qwen3.7-plus",
            "name": "qwen3.7-plus",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 1000000,
            "maxTokens": 65536
          },
          {
            "id": "qwen3.6-plus",
            "name": "qwen3.6-plus",
            "reasoning": true,
            "input": ["text", "image"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 1000000,
            "maxTokens": 65536
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": {
        "primary": "qwen/qwen3.7-plus",
        "fallbacks": ["qwen/qwen3.6-plus"]
      },
      "models": {
        "qwen/qwen3.7-plus": {},
        "qwen/qwen3.6-plus": {}
      }
    }
  }
}

修改后重启网关:

openclaw gateway restart

六、验证

openclaw doctor    # 检查配置
openclaw status    # 查看网关状态
openclaw dashboard # 打开 Dashboard

七、Coding Plan 支持的完整模型列表

模型 图片理解
qwen3.7-plus
qwen3.6-plus
kimi-k2.5
glm-5
MiniMax-M2.5
qwen3.5-plus
qwen3-max-2026-01-23
qwen3-coder-next
qwen3-coder-plus
glm-4.7

八、常见问题

Q: 为什么还在扣费?
A: 检查是否混用了普通 API Key(sk-xxxxx)和普通 Base URL(dashscope.aliyuncs.com)。必须使用 Coding Plan 专属 Key(sk-sp-xxxxx)和专属 URL(coding.dashscope.aliyuncs.com)。

Q: 模型名报错?
A: Coding Plan 要求精确匹配模型名,如 qwen3.7-plus 不能简写。

Q: 额度怎么算?
A: 每 5 小时 6000 次请求(滚动恢复),每周 45000 次,每月 90000 次。

参考链接

Logo

中国智能体开发者社区,聚焦智能体与大模型开发,提供前沿资讯、实用工具链、开源项目及行业案例。通过技术沙龙、开发者大赛等活动,促进经验交流与协作,助力开发者快速构建创新智能应用。

更多推荐