# Model Selection & Display ## Summary Add model visibility and control to the AMC dashboard. Users can see which model each agent is running, pick a model when spawning, and switch models mid-session. ## Models | Label | Value sent to Claude Code | |-------|--------------------------| | Opus 4.6 | `opus` | | Opus 4.5 | `claude-opus-4-5-20251101` | | Sonnet 4.6 | `sonnet` | | Haiku | `haiku` | ## Step 1: Display Current Model Surface `context_usage.model` in `SessionCard.js`. - Data already extracted by `parsing.py` (line 202) from conversation JSONL - Already available via `/api/state` in `context_usage.model` - Add model name formatter: `claude-opus-4-5-20251101` -> `Opus 4.5` - Show in SessionCard (near agent badge or context usage area) - Shows `null` until first assistant message **Files**: `dashboard/components/SessionCard.js` ## Step 2: Model Picker at Spawn Add model dropdown to `SpawnModal.js`. Pass to spawn API, which appends `--model ` to the claude command. - Extend `/api/spawn` to accept optional `model` param - Validate against allowed model list - Prepend `--model {model}` to command in `AGENT_COMMANDS` - Default: no flag (uses Claude Code's default) **Files**: `dashboard/components/SpawnModal.js`, `amc_server/mixins/spawn.py` ## Step 3: Mid-Session Model Switch Dropdown on SessionCard to change model for running sessions via Zellij. - Send `/model ` to the agent's Zellij pane: ```bash zellij -s {session} action write-chars "/model {value}" --pane-id {pane} zellij -s {session} action write 10 --pane-id {pane} ``` - New endpoint: `POST /api/session/{id}/model` with `{"model": "opus"}` - Only works when agent is idle (waiting for input). If mid-turn, command queues and applies after. **Files**: `dashboard/components/SessionCard.js`, `amc_server/mixins/state.py` (or new mixin)