oh-my-opencode-model-switcher
1
总安装量
1
周安装量
#42039
全站排名
安装命令
npx skills add https://github.com/atman-33/skills --skill oh-my-opencode-model-switcher
Agent 安装分布
replit
1
opencode
1
codex
1
claude-code
1
gemini-cli
1
Skill 文档
Model Switcher
This skill enables switching model configurations in oh-my-opencode.json between different modes:
- default: Original model settings
- economy: All models set to
opencode/glm-4.7-free
Additional modes can be easily added by editing the mapping configuration.
Usage
When the user requests to switch models or activate a specific mode, use this skill to update the configuration.
Workflow
Switch to a Mode
Execute the switch script with the desired mode:
python3 ~/.config/opencode/.claude/model-switcher/scripts/switch_models.py [mode_name]
Examples:
python3 ... switch_models.py economy– Switch to economy modepython3 ... switch_models.py default– Switch to default mode
List Available Modes
python3 ~/.config/opencode/.claude/model-switcher/scripts/switch_models.py --list
How It Works
- Mapping-based approach: Model assignments are defined in
config/model-mappings.yml - Partial updates: Only specified models are updated, preserving other settings
- Wildcard support: Use
"*"to apply a model to all agents/categories - Field preservation: Other fields like
variantare kept unchanged - Structure-resilient: New agents/categories in oh-my-opencode.json are preserved
Configuration
Edit config/model-mappings.yml to:
- Add new modes
- Modify existing mode mappings
- Define per-agent/category model assignments
Example mapping structure:
modes:
mode_name:
agents:
agent_name: model_name
# or use "*" for all agents
categories:
category_name: model_name