name: xpowers-routing-settings description: Interactive wizard to configure which AI model runs for each XPowers agent
Routing Settings Wizard
This is the primary settings-like UX for XPowers routing on OpenCode. It provides a plugin-owned settings workflow over the shared routing backend.
Step 1: Show current state
Call xpowers_agent_routing_config with action=get NOW. Render the result as a markdown table:
| Agent | Current Model | Group |
|----------------------------|-----------------------------|--------------|
| ralph | (from snapshot) | orchestrator |
| test-runner | (from snapshot) | workers |
| codebase-investigator | (from snapshot) | workers |
| internet-researcher | (from snapshot) | workers |
| autonomous-reviewer | (from snapshot) | reviewers |
| code-reviewer | (from snapshot) | reviewers |
| review-quality | (from snapshot) | reviewers |
| review-implementation | (from snapshot) | reviewers |
| review-testing | (from snapshot) | reviewers |
| review-simplification | (from snapshot) | reviewers |
| review-documentation | (from snapshot) | reviewers |
| test-effectiveness-analyst | (from snapshot) | reviewers |
Also show:
- Available models from the
availableModelsfield - Available presets: cost-optimized, quality-first
If the response includes a warning, show it explicitly.
If no routing config exists yet (configMissing: true), say this is a first-run and offer bootstrap.
After rendering, show workflow overrides from routing.workflowOverrides if any exist.
Step 2: Ask what to change
Use AskUserQuestion (or the equivalent structured question tool) to ask one question at a time:
First question — what action?
Options:
- Set a single agent — pick agent + model
- Set a group — pick group (orchestrator/planners/workers/researchers/guards/reviewers/all) + model
- Apply a preset — cost-optimized or quality-first
- Bootstrap recommended config — full setup with strong/fast/top-review models
- Set a workflow override — workflow + agent + model
- Done — exit without changes
Then ask follow-up questions for the chosen action:
Bootstrap flow
- Ask: which strong model? (show
availableModels) - Ask: which fast model? (optional, show
availableModels) - Ask: which top-review model? (optional, show
availableModels) - Call
action=bootstrapwith the chosen models
Set single agent flow
- Ask: which agent? (show the 16 agent names)
- Ask: which model? (show
availableModels) - Call
action=setwith agent + model
Set group flow
- Ask: which group? (orchestrator, planners, workers, researchers, guards, reviewers, all)
- Ask: which model? (show
availableModels) - Call
action=set-groupwith group + model
Apply preset flow
- Ask: which preset? (cost-optimized = fast workers + strong others, quality-first = strong everywhere)
- Call
action=apply-presetwith preset name
Workflow override flow
- Ask: which workflow? (show supported workflows from snapshot)
- Ask: which agent? (show the 16 agent names)
- Ask: which model? (show
availableModels) - Call
action=setwith workflow + agent + model
Step 3: Show result
After applying changes, call action=get again and re-render the table to confirm.
Rules
- Always use
xpowers_agent_routing_configfor reads and writes - Never edit
opencode.jsondirectly - If user decides not to change anything, report no update made
- Show
availableModelswhen asking for model selection - Use structured questions, not freeform chat