OpenClaw + One-API Proxy 完美工作配置存档
记录一套经过验证可以正常工作的OpenClaw配置方案,搭配One-API Proxy使用多个模型。
📁 OpenClaw 配置文件 (openclaw.json)
json
{
"meta": {
"lastTouchedVersion": "2026.3.12",
"lastTouchedAt": "2026-03-15T14:35:57.144Z"
},
"wizard": {
"lastRunAt": "2026-03-14T05:17:50.467Z",
"lastRunVersion": "2026.3.12",
"lastRunCommand": "onboard",
"lastRunMode": "local"
},
"auth": {
"profiles": {
"one-api:default": {
"provider": "one-api",
"mode": "api_key"
}
}
},
"models": {
"providers": {
"one-api": {
"baseUrl": "http://100.99.4.120:3000/v1",
"apiKey": "one-api-token",
"api": "openai-completions",
"models": [
{
"id": "z-ai/glm4.7",
"name": "glm4.7"
},
{
"id": "minimaxai/minimax-m2.5",
"name": "minimax2.5"
},
{
"id": "Llama-3.3-70B-Versatile",
"name": "llama3.3-70b"
},
{
"id": "stepfun/step-3.5-flash:free",
"name": "Step-Free"
},
{
"id": "arcee-ai/trinity-mini:free",
"name": "Trinity-Free"
}
]
}
}
},
"agents": {
"defaults": {
"model": {
"primary": "one-api/z-ai/glm4.7",
"fallbacks": [
"one-api/stepfun/step-3.5-flash:free",
"one-api/arcee-ai/trinity-mini:free"
]
},
"workspace": "/root/.openclaw/workspace",
"compaction": {
"mode": "safeguard"
}
},
"list": [
{
"id": "main",
"name": "main",
"workspace": "/root/.openclaw/workspace",
"agentDir": "/root/.openclaw/agents/main/agent",
"model": "one-api/z-ai/glm4.7"
},
{
"id": "coder",
"name": "coder",
"workspace": "/root/.openclaw/workspace-coder",
"agentDir": "/root/.openclaw/agents/coder/agent"
},
{
"id": "designer",
"name": "designer",
"workspace": "/root/.openclaw/workspace-designer",
"agentDir": "/root/.openclaw/agents/designer/agent"
}
]
},
"tools": {
"profile": "full",
"web": {
"search": {
"enabled": true
},
"fetch": {
"enabled": true
}
},
"sessions": {
"visibility": "all"
},
"agentToAgent": {
"enabled": true,
"allow": [
"main",
"coder",
"designer"
]
}
},
"commands": {
"native": "auto",
"nativeSkills": "auto",
"restart": true,
"ownerDisplay": "raw"
},
"session": {
"dmScope": "per-channel-peer"
},
"channels": {
"telegram": {
"enabled": true,
"dmPolicy": "pairing",
"botToken": "8740728635:AAEiG_m1UAeFh-m9qFvSO_-DEQjX67tdoMQ",
"groupPolicy": "allowlist",
"streaming": "partial"
}
},
"gateway": {
"port": 18789,
"mode": "local",
"bind": "loopback",
"controlUi": {
"enabled": true,
"allowedOrigins": [
"https://x162-43-92-249.tail9c4209.ts.net",
"http://x162-43-92-249.tail9c4209.ts.net"
],
"dangerouslyDisableDeviceAuth": false
},
"auth": {
"mode": "token",
"token": "a4448bc07a7c7d193d39d4ab83ce66ef27336618e4cbfc21"
},
"trustedProxies": [
"127.0.1",
"100.64.0.0/10"
],
"tailscale": {
"mode": "serve",
"resetOnExit": false
}
},
"plugins": {
"entries": {
"telegram": {
"enabled": true
}
}
}
}
📁 One-API 渠道配置
text
更新渠道信息
类型: OpenAI 兼容
名称: Nvidia-2-glm4.7-1
分组:
Base URL: https://integrate.api.nvidia.com/v1
模型: 输入自定义模型名称
模型重定向: {
"glm4.7": "z-ai/glm4.7"
}
✅ 配置要点说明:
- OpenClaw通过One-API Proxy统一管理多个模型
- One-API配置了NVIDIA渠道,并将glm4.7模型重定向到z-ai/glm4.7
- 支持多Agent分工(main/coder/designer)
- Telegram Bot已启用,支持群组和私聊
- WebUI控制面板可通过Tailscale网络访问
📝 使用场景:
- 主Agent使用glm4.7模型
- 备选模型:Step-Free、Trinity-Free
- 支持联网搜索、网页获取等工具
- Agent间可相互协作
💡 提示:
- One-API地址:http://100.99.4.120:3000
- OpenClaw WebUI:http://localhost:18789
- Tailscale网络:x162-43-92-249.tail9c4209.ts.net
