Dynamically switch between AI models to optimize costs and performance.
Activate this skill when the user mentions:
eco mode, balanced mode, smart mode, max mode/modes status/modes setupThe skill manages 4 predefined modes, each mapped to a specific model:
Configuration is stored in ~/.openclaw/workspace/switch-modes.json.
When the user message contains any of these patterns:
eco mode or eco (standalone)balanced mode or balancedsmart mode or smartmax mode or max/modes status/modes setup/modes setup)If the configuration file doesn't exist or user requests setup:
AskUserQuestion to gather model preferences for each mode:anthropic/claude-3.5-haikuanthropic/claude-sonnet-4-5anthropic/claude-opus-4-5anthropic/claude-opus-4-6 or openai/o1-pro~/.openclaw/workspace/switch-modes.json with the structure:{
"eco": "model-id",
"balanced": "model-id",
"smart": "model-id",
"max": "model-id"
}
/modes status)~/.openclaw/openclaw.json to get current model~/.openclaw/workspace/switch-modes.json to get mode mappings✅ Currently in [MODE] mode using [MODEL_ID]When user requests a mode switch:
```bash
cat ~/.openclaw/workspace/switch-modes.json
```
If file doesn't exist, prompt user to run /modes setup first.
~/.openclaw/openclaw.jsonmodel field with the new model ID~/.openclaw/openclaw.json```
✅ [MODE] mode activated
Now using: [MODEL_ID]
```
User: eco mode
Agent: [reads switch-modes.json, gets model for "eco"]
Agent: [updates openclaw.json with new model]
Agent: ✅ ECO mode activated
Now using: anthropic/claude-3.5-haiku
User: /modes status
Agent: [reads openclaw.json for current model]
Agent: [reads switch-modes.json for mode mappings]
Agent: ✅ Currently in BALANCED mode using anthropic/claude-sonnet-4-5
User: /modes setup
Agent: [uses AskUserQuestion for each mode]
Agent: [creates ~/.openclaw/workspace/switch-modes.json]
Agent: ✅ Setup complete! You can now use:
- eco mode
- balanced mode
- smart mode
- max mode
~/.openclaw/workspace/switch-modes.json~/.openclaw/openclaw.jsonexample-config.json in skill directory/modes setupopenclaw.json when updating model~/.openclaw/... not relative pathsFor detailed troubleshooting, supported models list, and FAQ, see ./REFERENCE.md.
共 1 个版本