Install
openclaw skills install @peter-zx/openclaw-tokenapi-qiehuan-skills提供基于WebUI的快速AI模型切换工具,支持保存配置、一键切换、批量导入及API Key本地存储管理。
openclaw skills install @peter-zx/openclaw-tokenapi-qiehuan-skills一个基于 WebUI 的 OpenClaw 模型切换工具,支持快速切换 AI 模型提供商。
当用户提到以下内容时激活此技能:
用户说「打开模型切换」后:
用户说「切换到 deepseek 模型」后,直接调用 OpenClaw 配置接口修改 openclaw.json。
后端:Python FastAPI (端口 9131)
前端:Vue 3 + Element Plus (已构建为静态文件)
配置:~/.openclaw/openclaw.json
| 接口 | 方法 | 说明 |
|---|---|---|
GET /api/config | GET | 获取当前配置和模型列表 |
POST /api/save | POST | 保存模型到通讯录(不重启) |
POST /api/switch | POST | 切换模型并重启服务 |
POST /api/gateway/control | POST | 控制 Gateway(stop/start/restart) |
POST /api/delete | POST | 删除模型或提供商 |
GET /api/providers | GET | 获取所有提供商 |
~/.openclaw/agents/main/agent/auth-profiles.json 供 OpenClaw 使用openclaw-model-switcher/
├── SKILL.md
├── scripts/
│ ├── start.ps1 # Windows 启动脚本
│ └── switch_model.py # 命令行快速切换
└── assets/
└── frontend/ # 已构建的前端静态文件
├── index.html
└── assets/
无需启动 WebUI,直接用 Python 脚本切换模型:
# 切换模型
python switch_model.py --provider deepseek --model deepseek-chat
# 查看当前模型
python switch_model.py --status
# 重启 Gateway
python switch_model.py --restart