/install lmstudio-model-switch
lmstudio-model-switch
Fast model switching between LM Studio local and Kimi API for OpenClaw.
Switch your agent's AI model on-the-fly between local (LM Studio) and cloud (Kimi API) providers with a single command.
Installation
# Clone to your OpenClaw skills directory
git clone https://github.com/yourusername/lmstudio-model-switch \
~/.openclaw/workspace/skills/lmstudio-model-switch
# Or manually copy
cp -r lmstudio-model-switch ~/.openclaw/workspace/skills/
Usage
Commands
| Command | Description |
|---|---|
/switch-model status |
Show current model and available providers |
/switch-model local |
Switch to LM Studio (Qwen 3.5 9B default) |
/switch-model local \x3Cmodel> |
Switch to specific local model |
/switch-model api |
Switch to Kimi K2.5 API |
/switch-model kimi |
Alias for /switch-model api |
Examples
# Check current status
/switch-model status
# Switch to local LM Studio
/switch-model local
# Switch to specific model
/switch-model local mistral-small-24b
# Switch to Kimi API
/switch-model api
Configuration
Add to your openclaw.json:
{
"skills": {
"lmstudio-model-switch": {
"enabled": true,
"config": {
"local": {
"baseUrl": "http://127.0.0.1:1234/v1",
"defaultModel": "qwen/qwen3.5-9b"
},
"api": {
"provider": "kimi-coding",
"model": "k2p5"
}
}
}
}
}
How It Works
- Backup: Creates timestamped backup of
openclaw.json - Edit: Modifies
"primary"model in agents.defaults - Verify: Validates JSON syntax
- Restart: Restarts OpenClaw gateway service
- Confirm: Reports new active model
Use Cases
Privacy-First Work
Use local when handling:
- Authentication tokens
- Passwords or credentials
- Sensitive personal data
- Proprietary code
Quality-First Work
Use API when needing:
- Maximum reasoning capability
- Very long contexts (>100k tokens)
- Best-in-class performance
- Cloud reliability
VRAM Management
Switch to API when:
- GPU memory is low (\x3C6GB free)
- Running other GPU-intensive tasks
- LM Studio is restarting
Requirements
- OpenClaw ≥ 2026.3.12
- LM Studio running on port 1234 (for local mode)
- Kimi API key configured (for API mode)
- systemd (for service restart)
Troubleshooting
"LM Studio not responding"
# Check if LM Studio is running
curl http://127.0.0.1:1234/api/v0/models
# Restart LM Studio if needed
killall lmstudio; sleep 2; lmstudio &
"Switch failed"
- Check JSON syntax:
python3 -m json.tool ~/.openclaw/openclaw.json - Restore from backup:
cp ~/.openclaw/openclaw.json.bak.* ~/.openclaw/openclaw.json
"Gateway won't restart"
# Check service status
systemctl --user status openclaw-gateway
# Manual restart
systemctl --user restart openclaw-gateway
Author
WarMech - OpenClaw Community
License
MIT
Changelog
2026-03-14 - v1.0.0
- Initial release
- Support for local/API switching
- Backup/restore functionality
- systemd integration
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install lmstudio-model-switch - 安装完成后,直接呼叫该 Skill 的名称或使用
/lmstudio-model-switch触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Lmstudio Model Switch 是什么?
Switch AI models on-the-fly between local LM Studio and cloud Kimi API in OpenClaw with simple commands and automatic gateway restart. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 295 次。
如何安装 Lmstudio Model Switch?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install lmstudio-model-switch」即可一键安装,无需额外配置。
Lmstudio Model Switch 是免费的吗?
是的,Lmstudio Model Switch 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Lmstudio Model Switch 支持哪些平台?
Lmstudio Model Switch 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Lmstudio Model Switch?
由 Endihunn(@endihunn)开发并维护,当前版本 v0.1.0。