OpenClaw 接入阿里云百炼 Coding Plan 指南

在 OpenClaw 中使用千问及第三方模型(qwen3.5-plus、qwen3-max、MiniMax、GLM、Kimi 等)


📋 前置条件

  1. 已订阅 Coding Plan 套餐

    • Lite 基础套餐:¥40/月(18,000 次请求/月)
    • Pro 高级套餐:¥200/月(90,000 次请求/月)
    • 新用户限时优惠:Lite 首月 ¥7.9,Pro 首月 ¥39.9
  2. 获取 Coding Plan 专属凭证

    • API Key:格式 sk-sp-xxxxx(勿与通用 Key sk-xxxxx 混用)
    • Base URLhttps://coding.dashscope.aliyuncs.com/v1
    • 获取地址:Coding Plan 控制台

🚀 快速接入

步骤 1:安装 OpenClaw

macOS

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

Windows PowerShell

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

步骤 2:初始化配置

安装完成后按提示配置:

配置项 推荐选择
I understand this is powerful and inherently risky. Continue? Yes
Onboarding mode QuickStart
Model/auth provider Skip for now(后续配置)
Filter models by provider All providers
Default model 使用默认配置
Select channel (QuickStart) Skip for now(后续配置)
Configure skills now? (recommended) No(后续配置)
Enable hooks? 按空格键选中,回车继续
How do you want to hatch your bot? Hatch in TUI

步骤 3:配置 Coding Plan

方式一:Web UI 配置(推荐)
  1. 打开 Web UI

    openclaw dashboard
    
  2. 在左侧菜单选择 配置/Config

  3. 添加/修改 models 配置:

    "models": {
      "mode": "merge",
      "providers": {
        "bailian": {
          "baseUrl": "https://coding.dashscope.aliyuncs.com/v1",
          "apiKey": "YOUR_API_KEY",
          "api": "openai-completions",
          "models": [
            {
              "id": "qwen3.5-plus",
              "name": "qwen3.5-plus",
              "reasoning": true,
              "input": ["text", "image"],
              "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
              "contextWindow": 1000000,
              "maxTokens": 65536
            },
            {
              "id": "qwen3-max-2026-01-23",
              "name": "qwen3-max-2026-01-23",
              "reasoning": true,
              "input": ["text"],
              "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
              "contextWindow": 262144,
              "maxTokens": 65536
            },
            {
              "id": "qwen3-coder-next",
              "name": "qwen3-coder-next",
              "reasoning": true,
              "input": ["text"],
              "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
              "contextWindow": 262144,
              "maxTokens": 65536
            },
            {
              "id": "qwen3-coder-plus",
              "name": "qwen3-coder-plus",
              "reasoning": true,
              "input": ["text"],
              "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
              "contextWindow": 1000000,
              "maxTokens": 65536
            },
            {
              "id": "MiniMax-M2.5",
              "name": "MiniMax-M2.5",
              "reasoning": true,
              "input": ["text"],
              "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
              "contextWindow": 1000000,
              "maxTokens": 65536
            },
            {
              "id": "glm-5",
              "name": "glm-5",
              "reasoning": true,
              "input": ["text"],
              "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
              "contextWindow": 202752,
              "maxTokens": 16384
            },
            {
              "id": "glm-4.7",
              "name": "glm-4.7",
              "reasoning": true,
              "input": ["text"],
              "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
              "contextWindow": 202752,
              "maxTokens": 16384
            },
            {
              "id": "kimi-k2.5",
              "name": "kimi-k2.5",
              "reasoning": true,
              "input": ["text", "image"],
              "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
              "contextWindow": 262144,
              "maxTokens": 32768
            }
          ]
        }
      }
    }
    
  4. 修改 agents.defaults 配置:

    "agents": {
      "defaults": {
        "model": {
          "primary": "bailian/qwen3.5-plus"
        },
        "models": {
          "bailian/qwen3.5-plus": {},
          "bailian/qwen3-max-2026-01-23": {},
          "bailian/qwen3-coder-next": {},
          "bailian/qwen3-coder-plus": {},
          "bailian/MiniMax-M2.5": {},
          "bailian/glm-5": {},
          "bailian/glm-4.7": {},
          "bailian/kimi-k2.5": {}
        }
      }
    }
    
  5. 保存并应用配置

    • Web UI:点击右上角 SaveUpdate
    • 终端:保存文件后执行 openclaw gateway restart

方式二:终端直接编辑
  1. 打开配置文件

    nano ~/.openclaw/openclaw.json
    
  2. 按上述配置内容编辑

  3. 保存退出(Ctrl+O → Enter → Ctrl+X)

  4. 重启 Gateway

    openclaw gateway restart
    

步骤 4:开始使用

Web UI 方式

openclaw dashboard

TUI 方式

openclaw tui

🔄 切换模型

当前会话切换

/model qwen3-coder-next

永久默认模型

修改配置文件中 agents.defaults.model.primary 字段:

"model": {
  "primary": "bailian/qwen3.5-plus"
}

📦 支持的模型

模型 ID 说明 上下文窗口 最大输出
qwen3.5-plus 千问最新一代,支持文本 + 图像 1,000,000 65,536
qwen3-max-2026-01-23 千问 3 旗舰模型 262,144 65,536
qwen3-coder-next 代码专用模型 262,144 65,536
qwen3-coder-plus 代码专用模型(推荐) 1,000,000 65,536
MiniMax-M2.5 MiniMax 模型 1,000,000 65,536
glm-5 智谱 GLM-5 202,752 16,384
glm-4.7 智谱 GLM-4.7 202,752 16,384
kimi-k2.5 月之暗面 Kimi,支持图像 262,144 32,768

⚠️ 重要注意事项

订阅限制

  • 仅支持阿里云主账号订阅,不支持 RAM 用户
  • 每个账号同时只能订阅一个 Coding Plan(不区分 Lite/Pro)
  • 服务一经购买不支持退订与退款

使用限制

  • 套餐额度仅限编程工具中使用(如 OpenClaw、Claude Code 等)
  • 禁止用于 API 调用、自动化脚本、自定义应用程序后端
  • 违规使用可能导致订阅暂停或 API Key 被封禁

数据授权

  • 使用期间,模型输入及生成内容将用于服务改进与模型优化
  • 停止使用可终止后续数据授权

🐛 常见问题

401 invalid access token or token expired

  • 检查 API Key 是否为 Coding Plan 专属(sk-sp-xxxxx 格式)
  • 确认复制完整且无空格
  • 确认订阅状态有效

model ‘xxx’ is not supported

  • 模型名称必须与支持的模型 ID 完全一致
  • 区分大小写,前后无空格

403 invalid api-key

  • 检查 Base URL 是否正确
  • 正确https://coding.dashscope.aliyuncs.com/v1
  • 错误https://dashscope.aliyuncs.com/...

hour/week/month allocated quota exceeded

  • 对应周期额度已用完
  • 等待额度重置或升级至 Pro 套餐

开启思考模式后无输出

  • 更新 OpenClaw 至最新版本

📊 额度说明

任务类型 估算消耗
简单问答或代码生成 5-10 次调用
代码重构或复杂任务 10-30+ 次调用

额度重置时间

  • 每 5 小时:滚动刷新,消耗后 5 小时自动恢复
  • 每周:周一 00:00:00 (UTC+8) 重置
  • 每月:订阅日对应日 00:00:00 (UTC+8) 重置

查看用量:Coding Plan 控制台


🔗 相关链接


最后更新:2026-02-25

Logo

小龙虾开发者社区是 CSDN 旗下专注 OpenClaw 生态的官方阵地,聚焦技能开发、插件实践与部署教程,为开发者提供可直接落地的方案、工具与交流平台,助力高效构建与落地 AI 应用

更多推荐