安装 OpenClaw 使用阿里百炼模型

安装 OpenClaw

安装 node

  • 下载地址:https://nodejs.org/en/download
  • 点击下方,选择windows,x64,然后 Windows Installer(.msi)下载
  • 下载完成后,双击运行,使用窗口安装

安装 OpenClaw

  • windows cmd 内运行如下命令安装 openclaw
1
npm install -g openclaw
  • 安装完成后,运行如下命令,初始化 openclaw
    • 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
      • 选择 Keep current
    • Select channel
      • QuickStart
    • 选择 Skip for now(稍后配置渠道) Configure skills now? (recommended)
      • 选择 No
    • Enable hooks?
      • 按空格键选中选项,按回车键进入下一步
    • How do you want to hatch your bot?
      • 选择 Do this later
1
openclaw onboard
  • 安装 openclaw gateway
    • 以管理员权限开启 cmd 窗口,执行命令
1
openclaw gateway install
  • 启动 openclaw gateway
1
openclaw gateway start
  • 开启 openclaw dashboard,拉起浏览器窗口
1
openclaw dashboard

openclaw 配置百炼模型

  • 开通百炼账号,生成 key(密钥)
    • 阿里云百炼平台地址:https://bailian.console.aliyun.com/
    • 应用 -> 密钥 -> 创建 api key
  • OpenClaw Dashboard 内配置百炼模型
    • 模型 -> 切换为 raw 模式,粘贴如下 josn(注意把 apiKey 对应的 value 改成刚刚生成的 key)
    • apply,然后保存
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
{
  meta: {
    lastTouchedVersion: '2026.3.2',
    lastTouchedAt: '2026-03-11T03:34:07.413Z',
  },
  wizard: {
    lastRunAt: '2026-03-11T02:14:41.770Z',
    lastRunVersion: '2026.3.2',
    lastRunCommand: 'onboard',
    lastRunMode: 'local',
  },
  models: {
    mode: 'merge',
    providers: {
      bailian: {
        baseUrl: 'https://dashscope.aliyuncs.com/compatible-mode/v1',
        apiKey: '__OPENCLAW_REDACTED__',
        api: 'openai-completions',
        models: [
          {
            id: 'qwen3.5-plus',
            name: 'qwen3.5-plus',
            api: 'openai-completions',
            reasoning: false,
            input: [
              'text',
              'image',
            ],
            cost: {
              input: 0,
              output: 0,
              cacheRead: 0,
              cacheWrite: 0,
            },
            contextWindow: 1000000,
            maxTokens: 65536,
          },
          {
            id: 'qwen3-coder-next',
            name: 'qwen3-coder-next',
            api: 'openai-completions',
            reasoning: false,
            input: [
              'text',
            ],
            cost: {
              input: 0,
              output: 0,
              cacheRead: 0,
              cacheWrite: 0,
            },
            contextWindow: 262144,
            maxTokens: 65536,
          },
        ],
      },
    },
  },
  agents: {
    defaults: {
      model: {
        primary: 'bailian/qwen3.5-plus',
      },
      models: {
        'bailian/qwen3.5-plus': {},
        'bailian/qwen3-coder-next': {},
      },
    },
  },
  tools: {
    profile: 'full',
    sessions: {
      visibility: 'all',
    },
  },
  commands: {
    native: 'auto',
    nativeSkills: 'auto',
    restart: true,
    ownerDisplay: 'raw',
  },
  session: {
    dmScope: 'per-channel-peer',
  },
  gateway: {
    port: 18789,
    mode: 'local',
    bind: 'loopback',
    auth: {
      mode: 'token',
      token: '__OPENCLAW_REDACTED__',
    },
    tailscale: {
      mode: 'off',
      resetOnExit: false,
    },
    nodes: {
      denyCommands: [
        'camera.snap',
        'camera.clip',
        'screen.record',
        'contacts.add',
        'calendar.add',
        'reminders.add',
        'sms.send',
      ],
    },
  },
}

安装 skill

  • skill 市场:https://clawhub.ai/skills?sort=downloads&nonSuspicious=true
  • 下载要安装的 skill 至家目录下的 .openclaw\skills 下,解压
  • 重启 openclaw gateway,使 skill 生效
1
openclaw gateway restart

问题及处理

openClaw 安装后仅能聊天,没办法操作文件,调用 skill

  • 参考:https://www.cnblogs.com/zion0707/p/19688672
  • 解决办法:
    • 编辑 ~/.openclaw/openclaw.json ,在合适的位置加入下段代码
1
2
3
4
5
6
7
8
{
  "tools": {
    "profile": "full",
    "sessions": {
      "visibility": "all"
    }
  }
}