
准备工作
参照官方文档安装 OpenClaw(旧名 Moltbot/Clawdbot)。支持macOS, Windows (WSL2), Linux。 文档全英文太难理解?使用 Liao 接入沉浸式翻译 各模型价格比例请参考 模型与价格找到 OpenClaw 配置文件
macOS / Linux / WSL2:~/.openclaw/openclaw.json 或 ~/.moltbot/moltbot.json 或 ~/.clawdbot/clawdbot.json
修改配置文件中的 models 清单
参考以下json可以完成 liao 提供的 claude 模型、GPT-CodeX 系列模型、Gemini 系列模型、其他模型的配置:复制
"models": {
"mode": "merge",
"providers": {
"liao-claude": {
"baseUrl": "https://ai.liaobots.work",
"apiKey": "您的登录码",
"api": "anthropic-messages",
"models": [
{
"id": "claude-sonnet-4-6",
"name": "Claude Sonnet 4.6",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 64000
},
{
"id": "claude-opus-4-6",
"name": "Claude Opus 4.6",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 64000
}
]
},
"liao-codex": {
"baseUrl": "https://ai.liaobots.work/v1",
"apiKey": "您的登录码",
"api": "openai-completions",
"models": [
{
"id": "gpt-5.3-codex",
"name": "GPT 5.3 Codex",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 200000,
"maxTokens": 64000
}
]
},
"liao": {
"baseUrl": "https://ai.liaobots.work/",
"apiKey": "您的登录码",
"api": "anthropic-messages",
"models": [
{
"id": "minimax-m2.5",
"name": "MiniMax M2.5",
"reasoning": true,
"input": [
"text"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 204800,
"maxTokens": 131072
},
{
"id": "kimi-k2.5",
"name": "Kimi K2.5",
"reasoning": true,
"input": [
"text",
"image"
],
"cost": {
"input": 0,
"output": 0,
"cacheRead": 0,
"cacheWrite": 0
},
"contextWindow": 204800,
"maxTokens": 131072
}
]
}
}
},
在 OpenClaw 中切换当前使用模型
在上一步配置完成后,可使用以下命令格式切换模型(命令仅供参考,您只需要运行您需要的模型):复制
openclaw models set liao-claude/claude-sonnet-4-6
openclaw models set liao/minimax-m2.5
openclaw models set liao/kimi-k2.5
openclaw models set liao-codex/gpt-5.3-codex