Model Switcher for Openclaw

A dynamic session management tool that allows users to swap between AI models like GPT, Claude, and Qwen instantly without modifying global configurations.

dpbs-715
v0.1.3
Mar 15, 2026
1
967
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install openclaw-session-model-switcher

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install openclaw-session-model-switcher using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Model Switcher?

The Model Switcher is a specialized utility designed for the OpenClaw ecosystem that enables seamless transitions between different Large Language Models within a single active session. Instead of relying on hardcoded values, this skill dynamically resolves model targets from the active OpenClaw configuration, ensuring that users can toggle between providers like OpenAI, Anthropic, and Alibaba Cloud with simple natural language commands.

By leveraging the Openclaw Skills architecture, this tool prioritizes direct execution over passive advice. It intelligently handles provider-level aliases and resolves ambiguous model names by cross-referencing the local models.providers configuration, providing a robust and flexible developer experience for multi-model workflows.

Model Switcher Use Cases

  • Rapidly testing the same prompt across different LLMs like GPT-4, Claude 3.5, and Qwen.
  • Switching to a more cost-effective or faster model for simple tasks within a long-running session.
  • Checking which model is currently active in a complex multi-agent environment.
  • Listing all configured providers and models to verify local setup and availability.

How Model Switcher Works

  1. The user issues a natural language command such as "switch to claude" or "use qwen".
  2. The skill triggers a resolution script that reads the models.providers section of the current OpenClaw configuration.
  3. It consults model-aliases.json to map simple names to specific provider/model paths.
  4. If a unique match is found, the skill directly executes the /model <provider/model> command in the active session.
  5. In cases of ambiguity (e.g., multiple GPT models), the skill presents a list of candidates for the user to select from.
  6. The session is updated immediately without restarting the Gateway or affecting other personas.

Model Switcher Setup

To integrate this into your environment, ensure the skill files are placed in your Openclaw Skills directory and the helper scripts are executable:

# Navigate to your skills directory
cd skills/openclaw-session-model-switcher

# Ensure scripts have execution permissions
chmod +x scripts/switch-model.sh scripts/list-models.sh scripts/model-status.sh

No manual editing of openclaw.json is required as the skill reads your existing configuration dynamically.

Model Switcher Data Schema & Taxonomy

The Model Switcher organizes data by interfacing with the active OpenClaw config and a local alias map.

Component Description Format
models.providers The source of truth for all available models defined in the main OpenClaw config. JSON
model-aliases.json Maps short-hand names (e.g., "gpt") to specific providers. JSON
switch-model.sh Logic for resolving user input against the provider list. Shell Script
status output Returns ok, ambiguous, or error to the upper-layer agent. JSON

Model Switcher Advanced Features

  • Dynamic Model Resolution: Automatically detects new models added to your configuration without requiring skill updates.
  • Session Isolation: Changes apply strictly to the current persona, preventing accidental global configuration shifts.
  • Intelligent Alias Support: Map custom short-names to complex provider strings for faster switching.
  • Multi-Candidate Handling: Built-in logic to handle ambiguous requests by providing interactive selection menus.
  • Zero-Restart Workflow: Updates the session model on-the-fly without needing to restart the OpenClaw Gateway.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*