{"skill":{"slug":"openclaw-session-model-switcher","displayName":"OpenClaw Session Model Switcher","summary":"Instantly switch the current OpenClaw session model; supports gpt, claude, qianwen, minimax, current model status, configured model listing, and restoring th...","description":"---\nname: model-switcher\ndescription: Instantly switch the current OpenClaw session model; supports gpt, claude, qianwen, minimax, current model status, configured model listing, and restoring the default session model.\n---\n\n# Model Switcher Skill\n\n## Core Rule\nWhen the user asks to switch the current session model, resolve the target dynamically from the active OpenClaw configuration first, then switch the current session directly. Do not hardcode `provider/model` values inside the skill.\n\n## Required Behavior\n\n### Switch current session immediately\nWhen the user says things like:\n- `switch to gpt`\n- `switch to claude`\n- `use qianwen`\n- `change to minimax`\n- `switch to qwen3.5-flash`\n\nThe agent should:\n- read `models.providers` from the current OpenClaw configuration\n- use `skills/openclaw-session-model-switcher/model-aliases.json` for provider-level alias resolution\n- dynamically match against configured models when the user provides a concrete model name or fragment\n- directly execute `/model <provider/model>` in the current session after resolving a unique target\n\nRecommended execution path:\n- prefer `scripts/switch-model.sh <selection>` to resolve the target model\n- once the script returns a unique model, execute the returned command in the current session\n- if the environment supports a direct session-level model override tool, prefer that\n- do not merely print `/model ...` as plain advice when direct execution is possible\n\n### Restore default\nWhen the user says things like:\n- `restore default model`\n- `reset model switch`\n- `use the default model again`\n\nThe agent should directly execute:\n- `/model default`\n\n### Show current session model\nWhen the user says things like:\n- `what model am I using now`\n- `show current model`\n- `model status`\n\nThe agent should directly query the current session model state instead of only explaining how to check it.\n\n### List configured models\nWhen the user says things like:\n- `what models are available`\n- `list current models`\n- `show configured models`\n- `what qwen models do I have`\n\nThe agent should read `models.providers` from the current OpenClaw configuration and list switchable models. If the user specifies a provider, only list models for that provider.\n\n## Resolution Rules\n- trust only the current OpenClaw configuration in `models.providers`\n- keep `model-aliases.json` limited to provider aliases and default semantics\n- if a provider has only one configured model, use it directly\n- if a provider has multiple models, prefer model-name matching from the user input\n- if multiple candidates still remain, list the candidates and ask the user to choose\n- if nothing matches, clearly say that no configured model matches the request\n\n## Multi-Agent Rule\n- this skill affects only the current persona in the current session\n- do not modify global configuration\n- do not affect other personas or sessions\n- do not restart the Gateway\n\n## Do\n- switch the current session directly\n- tell the user the current session model was switched\n- mention that the change affects only the current session when helpful\n- return candidate lists for ambiguous matches\n- list current available models when the user is unsure\n- consume script output at the upper layer instead of exposing raw stderr or internal errors\n\n## Do Not\n- do not edit `openclaw.json`\n- do not restart the Gateway\n- do not hardcode model IDs inside the skill\n- do not maintain a static model list separate from the active configuration\n- do not accidentally implement this as a global default model switch\n- do not guess in multi-candidate cases\n- do not dump raw JSON, stderr, or internal tool errors to normal users\n\n## Suggested Script Interface\n- `scripts/switch-model.sh <selection>`: resolve user input and return JSON\n- `scripts/list-models.sh [provider]`: list all configured models or only one provider\n- `scripts/model-status.sh`: output `/model status`\n\n## Upper-Layer Interaction Flow\n\n### For switch requests\nWhen the user asks to switch models, the upper layer should:\n1. call `scripts/switch-model.sh <selection>`\n2. parse the JSON output\n3. branch on `status`\n\n- `status: ok`\n  - execute the returned `command`\n  - confirm which model was selected\n  - mention that it only affects the current session when useful\n\n- `status: ambiguous`\n  - do not surface raw script output\n  - convert `options` into a readable candidate list\n  - ask the user to reply with a model name or number\n  - do not guess\n\n- `status: error`\n  - explain naturally that no configured model matched\n  - suggest listing available models when appropriate\n\n### For list requests\nWhen the user asks for available models or models from a specific provider:\n1. call `scripts/list-models.sh [provider]`\n2. present the result as a readable provider-grouped list\n3. do not mix in models that are not present in the active configuration\n\n### For status requests\nWhen the user asks which model is currently active:\n1. call `scripts/model-status.sh`\n2. execute the session-level status query\n3. present the result in natural language instead of only teaching the command\n\n## Standard Reply Templates\n\n### Switch success\n- `Switched the current session to <provider/model>.`\n- `Switched the current session to <provider/model>; this affects only the current session.`\n\n### Ambiguous match\n- `You can switch to these models:`\n- `1. <provider/model-a>`\n- `2. <provider/model-b>`\n- `Reply with the model name or a number.`\n\nIf the user specified a provider:\n- `You can switch to these <provider> models:`\n\n### No match\n- `No configured model matches \"<selection>\".`\n- `I can list the models currently available in your configuration.`\n\n### List models\n- `These models are currently available in the active configuration:`\n- list them grouped by provider\n\n## Fallback Rule\nOnly if the current environment truly cannot execute native session commands should the agent fall back to replying with:\n- the exact command to run\n- why it cannot execute it directly in the current environment\n\nThat fallback is a degraded path, not the default path.\n","tags":{"latest":"0.1.3","models":"0.1.3","openclaw":"0.1.3","session":"0.1.3","utility":"0.1.3"},"stats":{"comments":0,"downloads":607,"installsAllTime":0,"installsCurrent":0,"stars":1,"versions":4},"createdAt":1773553431124,"updatedAt":1778491917527},"latestVersion":{"version":"0.1.3","createdAt":1773554077265,"changelog":"Polish update: translate handler output to English while preserving multilingual input matching and session-level model switching behavior.","license":"MIT-0"},"metadata":null,"owner":{"handle":"dpbs-715","userId":"s176k3y23vw9hc4dv9earp672x856xnp","displayName":"dpbs","image":"https://avatars.githubusercontent.com/u/67679795?v=4"},"moderation":null}