Extend the model picker to schedules

schedules.model_id (migration 0013) pins every fired run of a recurring spawn
to a registered model backend, exactly like a hand-spawned agent: the worker
copies it into each firing's spawn payload, the launched agent records the pin,
and resumes stay on the same backend. The Schedules form gets the same Model
dropdown as the spawn form (Claude subscription by default), with a badge in
the schedules table. Create/update routes fail fast on a missing or disabled
backend so a stale selection bounces immediately instead of every firing
failing asynchronously in Activity; a backend deleted later still fails each
firing visibly rather than silently falling back to the subscription.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DzDofD7gP63WpeLG8vEdZu
This commit is contained in:
Claude
2026-07-29 18:54:31 +00:00
parent 2d5c0e34d7
commit 44632ea771
40 changed files with 208 additions and 51 deletions
+2
View File
@@ -135,6 +135,8 @@ export interface Schedule {
role?: string | null;
worktree?: string | null;
subdir?: string | null;
/* Model backend every fired run spawns on (see ClaudeModel); null = subscription. */
model_id?: number | null;
interval_seconds: number;
enabled: boolean;
next_run_at: string;