源码: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 |
api | anthropic-messages |
apiKey | LLMoxy 令牌 |
| 模型 ID | claude-opus-4-6 |

启动
openclaw gateway
浏览器打开 http://localhost:18789。
常见问题
安装失败、找不到包
仓库改过名。安装和插件请用 openclaw,不要再用 clawdbot。
走 OpenAI 兼容而不是 Anthropic
把 api 改成 openai-completions,baseUrl 改成 https://llmoxy.com/v1。
