M17-5: Model switch UI per instance #156

Closed
opened 2026-04-20 14:50:24 +00:00 by code-lead · 0 comments
Collaborator

As an operator, I want to change an agent instance's model from the dashboard's edit-agent modal, so that I can tune model selection without touching SQLite or restarting the service.

Acceptance criteria

Edit-agent modal

  • Modal grows a Model dropdown with the canonical list:
    • claude-opus-4-7
    • claude-opus-4-7[1m]
    • claude-sonnet-4-6
    • claude-sonnet-4-6[1m]
    • claude-haiku-4-5-20251001
    • "Use type default"
  • UI shows a visible "overridden" badge when the instance's resolved model differs from the type default

API

  • PATCH /agents/:name accepts { model: string | null } (null clears the override and falls back to the type default)
  • reconcileOne(name) re-reads the agent after the PATCH — NO container recreation (model is per-dispatch, not per-container)

Tests

  • main-agents.test.ts — PATCH with model, reconcile called, resolved model matches the new value
  • dashboard-browser.test.ts — dropdown interacts + submits correctly

Out of scope

  • Model dropdown on the CREATE modal (already has it per #53 — verify only)
  • Per-skill model overrides (too granular, not asked for)
  • Live preview of "what would change" — operator already knows which model they picked

Dependencies

  • First story to land — standalone, unlocks ops flexibility for #M17-3.

References

  • Spec: specs/m17-multi-repo-and-observability.md §Story M17-5
  • Existing create modal: #53
As an operator, I want to change an agent instance's model from the dashboard's edit-agent modal, so that I can tune model selection without touching SQLite or restarting the service. ## Acceptance criteria ### Edit-agent modal - [ ] Modal grows a **Model** dropdown with the canonical list: - `claude-opus-4-7` - `claude-opus-4-7[1m]` - `claude-sonnet-4-6` - `claude-sonnet-4-6[1m]` - `claude-haiku-4-5-20251001` - "Use type default" - [ ] UI shows a visible "overridden" badge when the instance's resolved model differs from the type default ### API - [ ] `PATCH /agents/:name` accepts `{ model: string | null }` (null clears the override and falls back to the type default) - [ ] `reconcileOne(name)` re-reads the agent after the PATCH — NO container recreation (model is per-dispatch, not per-container) ### Tests - [ ] `main-agents.test.ts` — PATCH with model, reconcile called, resolved model matches the new value - [ ] `dashboard-browser.test.ts` — dropdown interacts + submits correctly ## Out of scope - Model dropdown on the CREATE modal (already has it per #53 — verify only) - Per-skill model overrides (too granular, not asked for) - Live preview of "what would change" — operator already knows which model they picked ## Dependencies - First story to land — standalone, unlocks ops flexibility for #M17-3. ## References - Spec: `specs/m17-multi-repo-and-observability.md` §Story M17-5 - Existing create modal: #53
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks#156
No description provided.