When 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.
When the user says things like:
switch to gptswitch to claudeuse qianwenchange to minimaxswitch to qwen3.5-flashThe agent should:
models.providers from the current OpenClaw configurationskills/openclaw-session-model-switcher/model-aliases.json for provider-level alias resolution/model in the current session after resolving a unique targetRecommended execution path:
scripts/switch-model.sh to resolve the target model/model ... as plain advice when direct execution is possibleWhen the user says things like:
restore default modelreset model switchuse the default model againThe agent should directly execute:
/model defaultWhen the user says things like:
what model am I using nowshow current modelmodel statusThe agent should directly query the current session model state instead of only explaining how to check it.
When the user says things like:
what models are availablelist current modelsshow configured modelswhat qwen models do I haveThe 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.
models.providersmodel-aliases.json limited to provider aliases and default semanticsopenclaw.jsonscripts/switch-model.sh : resolve user input and return JSONscripts/list-models.sh [provider]: list all configured models or only one providerscripts/model-status.sh: output /model statusWhen the user asks to switch models, the upper layer should:
scripts/switch-model.sh statusstatus: okcommandstatus: ambiguousoptions into a readable candidate liststatus: errorWhen the user asks for available models or models from a specific provider:
scripts/list-models.sh [provider]When the user asks which model is currently active:
scripts/model-status.shSwitched the current session to . Switched the current session to ; this affects only the current session. You can switch to these models:1. 2. Reply with the model name or a number.If the user specified a provider:
You can switch to these models: No configured model matches "". I can list the models currently available in your configuration.These models are currently available in the active configuration:Only if the current environment truly cannot execute native session commands should the agent fall back to replying with:
That fallback is a degraded path, not the default path.
共 1 个版本