M26-2: agent-type wizard step 3 — provider chain editor #549
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks#549
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
As an operator, I want to configure an agent type's provider chain through the
/agentspage wizard instead of hand-editingconfig/agents.json, so that I can add or reorder providers without restarting the service or worrying about JSON syntax.Background
M26-1 lands the
provider_chainschema + per-instance failover. Today the only way to set it is to hand-editconfig/agents.jsonand POST it to/config/agents. The existing wizard at/agents(Add type / Edit type) covers basics + container + plugins but has no provider section.Acceptance criteria
Wizard step
GET /agents/models?provider=<id>).[ + Add tier ]button — disabled at 3 rows.[ × ]per row — disabled when only 1 row exists.[ ↑ ] [ ↓ ]reorder via dnd-kit. Reordering renumberstierfield on save (UI never persists tier gaps).cooldown_minnumeric input (1–1440),pause_if_all_failcheckbox,triggerscheckbox group (4 entries: auth_error, quota_error, rate_limit, persistent_5xx — token_budget greyed out with tooltip "pending M26-4").GET /agents/models?provider=<id>returning fallback flag.Validation (client-side, before PUT)
anthropicif the type is host-mode (matches loader gate).Wire-up
/agents/models?provider=<id>already exists from M26-1 hookup — wizard hits it on focus, caches response per session./config/agentsround-trips the new shape; legacy single-providertypes render as a 1-tier chain in the wizard.Tests
dev, add a deepseek tier 2, save, GET/config/agentsreturns the new chain.Out of scope
provider_chainis type-level only).References
apps/web/src/routes/agents.tsx(Add type / Edit type drawers).GET /agents/models?provider=<id>(handler atapps/server/src/main.ts::handleAgentsModels).apps/web/src/features/flows/FlowCanvasalready uses dnd-kit — reuse the same primitives.Shipped via PR #552 + #553 + #554. Final shape:
Providersection tab in the type editor (now an accordion<details>block per #554's redesign), shows up alongside Identity / Prompt / Routing / Skills / Thresholds / Container.GET /agents/models?provider=<id>(live in #553) with free-text fallback.+ Add tier(max 3),×remove (min 1),↑/↓reorder. Tiers renumber to contiguous 1..N on save.cooldown_min,pause_if_all_fail, trigger checkboxes (4 enabled +token_budgetenabled per M26-5 follow-up).usage_threshold_tokens.Deviations from original spec:
↑/↓buttons rather than dnd-kit (simpler, equivalent UX for max 3 rows).Tests: 10 ProviderSection cases (legacy 1-tier render, add/remove/reorder, failover gate on chain length, validation banner, token_budget visibility, combobox
listwiring).