fix(agents): persist agent type provider chain and failover #931
No reviewers
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!931
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/agent-type-provider-dispatch"
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?
Summary
Agent type Provider edits in the dashboard were not persisted:
putAgentConfigonly called identity, container, routing, and service-config endpoints, so provider chain / failover / token cap never reached SQLite.Changes
PUT /api/agent-types/:name/dispatch— persistprovider_chain_json,failover_json, andusage_threshold_tokensonagent_type_configwith validation viaparseProviderChain.putAgentConfigto call dispatch when dispatch fields differ; includeusage_threshold_tokensin composedfetchAgentConfigsnapshot.derived: merge DB dispatch over factory type config; tighten types for provider chain overlay.agent_type_configrevisions.0009: add dispatch columns viaaddProviderDispatchColumnsIfPresent(safe whenagent_type_configis missing — legacy stub DBs).Testing
just qa(pre-push hook passes).Code logic looks correct: schema/migration/resolver/endpoint/web client changes are consistent,
addProviderDispatchColumnsIfPresentis safe for legacy stubs, revision path foragent_type_configis wired up, query prefix invalidation fix is right.a00628a73cddf660c766scope='builtin'at runtime — defaults live in code, not DB #934