← Back to Skills Marketplace
endihunn

Lmstudio Model Switch

by Endihunn · GitHub ↗ · v0.1.0 · MIT-0
cross-platform ⚠ suspicious
295
Downloads
2
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install lmstudio-model-switch
Description
Switch AI models on-the-fly between local LM Studio and cloud Kimi API in OpenClaw with simple commands and automatic gateway restart.
README (SKILL.md)

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

  1. Backup: Creates timestamped backup of openclaw.json
  2. Edit: Modifies "primary" model in agents.defaults
  3. Verify: Validates JSON syntax
  4. Restart: Restarts OpenClaw gateway service
  5. 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
Usage Guidance
This skill is instruction-only and will ask you (or the agent) to edit your OpenClaw config and restart services. Before using it: 1) Do not run the placeholder git clone URL — verify the repository and author. 2) Inspect any code or scripts before executing them. 3) Back up ~/.openclaw/openclaw.json (the README already suggests this) and confirm where your Kimi API key is stored; the skill doesn't declare how it expects the key to be provided. 4) Be prepared that it will restart the openclaw gateway and may kill/restart local LM Studio processes — test in a safe environment first. 5) If you lack sysuser/systemctl access or are unsure what modifying agents.defaults.primary does, get an admin to review the change. If the author/publishing repo cannot be verified, avoid installing or performing the commands as-is.
Capability Analysis
Type: OpenClaw Skill Name: lmstudio-model-switch Version: 0.1.0 The provided files consist of metadata and documentation (SKILL.md) for a utility designed to switch OpenClaw's backend between local LM Studio and Kimi API. The instructions describe legitimate administrative tasks such as backing up configuration files, modifying JSON settings, and restarting a user-level systemd service (openclaw-gateway). No executable code was provided, and the instructions in SKILL.md are transparent and align strictly with the stated purpose without any signs of malicious intent, data exfiltration, or prompt injection.
Capability Assessment
Purpose & Capability
The skill's name and description match the instructions: it edits OpenClaw config and restarts the gateway to switch models between a local LM Studio and a Kimi cloud API. However, the README mentions a required Kimi API key but the skill metadata declares no required credentials; the install/clone URL in the README is a placeholder (https://github.com/yourusername/...), and the skill source/homepage are unknown, which reduces provenance and trust.
Instruction Scope
The SKILL.md directs the operator/agent to modify ~/.openclaw/openclaw.json (backup+edit), validate JSON, and restart the OpenClaw gateway (systemctl --user restart openclaw-gateway). It also suggests killing/restarting lmstudio (killall lmstudio; lmstudio &). These are powerful system actions that affect agent configuration and running processes. While they are coherent with the stated purpose, they grant the skill scope to change global agent behavior and stop/restart local services — worth caution.
Install Mechanism
There is no install spec and no code files (instruction-only), so nothing will automatically be downloaded or written by the platform. The README suggests cloning a GitHub repo, but the provided URL is a placeholder and not authoritative; this weak provenance is a risk if a user follows it blindly to fetch code from an unknown source.
Credentials
The documentation states 'Kimi API key configured (for API mode)' but the skill metadata lists no required environment variables or primary credential. It's unclear where/how that API key is expected to be stored (openclaw.json, env var, credential store). Additionally, modifying openclaw.json could expose or change other skills' configuration or credentials if present in that file. The requested scope (editing agent config and restarting services) is proportionate to switching models but the missing explicit credential handling is an inconsistency.
Persistence & Privilege
The skill does not request always: true and will not be force-included. It instructs changing the agent's main config file (~/.openclaw/openclaw.json) and restarting the gateway service; that is a privileged action relative to ordinary read-only skills but is functionally required to change the active model. Users should be aware this permanently alters agent configuration unless they restore from backup.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install lmstudio-model-switch
  3. After installation, invoke the skill by name or use /lmstudio-model-switch
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.1.0
lmstudio-model-switch v0.1.0 - Initial release. - Fast switching between LM Studio (local) and Kimi API models for OpenClaw. - Provides simple commands to change provider or model on-the-fly. - Automatically backs up and updates openclaw.json configuration. - Integrates with systemd to restart gateway as needed. - Useful for balancing privacy, quality, and GPU usage.
Metadata
Slug lmstudio-model-switch
Version 0.1.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is 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. It is an AI Agent Skill for Claude Code / OpenClaw, with 295 downloads so far.

How do I install Lmstudio Model Switch?

Run "/install lmstudio-model-switch" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Lmstudio Model Switch free?

Yes, Lmstudio Model Switch is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Lmstudio Model Switch support?

Lmstudio Model Switch is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Lmstudio Model Switch?

It is built and maintained by Endihunn (@endihunn); the current version is v0.1.0.

💬 Comments