logo

OpenClaw 配置指南

Trang này chưa được dịch sang ngôn ngữ đã chọn, nên đang hiển thị bản gốc tiếng Trung giản thể.

网址:https://openclaw.ai

源码:GitHub openclaw/openclaw · 国内镜像:Gitee OpenClaw-CN

OpenClaw(由 Clawdbot 改名)用本地 openclaw.json 配模型。插件或 SDK 安装失败时,把包名改成 OpenClaw 再试。

开始前准备一把 LLMoxy 令牌,建议用 auto 分组。

安装

npm i -g openclaw

配置文件位置:

系统路径
Windows%USERPROFILE%\.openclaw\openclaw.json
macOS / Linux~/.openclaw/openclaw.json

也可直接下载完整模板,替换密钥后覆盖上述文件:

接入 LLMoxy

把下面两段合并进现有 openclaw.json。Anthropic 兼容地址 不带 /v1

{
  "models": {
    "providers": {
      "claude": {
        "baseUrl": "https://llmoxy.com",
        "apiKey": "你的LLMoxy API Key",
        "api": "anthropic-messages",
        "models": [
          {
            "id": "claude-opus-4-6",
            "name": "claude-opus-4-6",
            "reasoning": false,
            "input": ["text"],
            "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 },
            "contextWindow": 200000,
            "maxTokens": 8192
          }
        ]
      }
    }
  },
  "agents": {
    "defaults": {
      "model": { "primary": "claude/claude-opus-4-6" },
      "models": {
        "claude/claude-opus-4-6": { "alias": "claude-opus-4-6" }
      }
    }
  }
}

界面里走「自定义服务器 / 自定义模型」时,填同一组值:

字段
baseUrl / API 端点https://llmoxy.com
apianthropic-messages
apiKeyLLMoxy 令牌
模型 IDclaude-opus-4-6

自定义模型

启动

openclaw gateway

浏览器打开 http://localhost:18789

常见问题

安装失败、找不到包 仓库改过名。安装和插件请用 openclaw,不要再用 clawdbot

走 OpenAI 兼容而不是 Anthropicapi 改成 openai-completionsbaseUrl 改成 https://llmoxy.com/v1