feat: add per-cron-job model tier selection

Allow cron jobs to specify a `model_tier` field that controls which LLM
tier handles the job, without needing separate agent configs. Precedence:
cron job model_tier > agent config > global primary_tier > 'default'.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
William Valentin
2026-02-10 22:31:18 -08:00
parent 6761dca1c2
commit 60b214e7c4
6 changed files with 66 additions and 8 deletions
+3 -2
View File
@@ -121,6 +121,8 @@ const mcpSchema = z.object({
servers: z.array(mcpServerSchema).default([]),
}).default({ servers: [] });
const modelTierEnum = z.enum(['fast', 'default', 'complex', 'local']);
const cronJobSchema = z.object({
name: z.string().min(1, 'Cron job name is required'),
schedule: z.string().min(1, 'Cron schedule is required'),
@@ -131,6 +133,7 @@ const cronJobSchema = z.object({
}),
enabled: z.boolean().default(true),
timezone: z.string().optional(),
model_tier: modelTierEnum.optional(),
});
const webhookSchema = z.object({
@@ -349,8 +352,6 @@ const sandboxSchema = z.object({
// ── Agent config + routing schemas ────────────────────────────────────
const modelTierEnum = z.enum(['fast', 'default', 'complex', 'local']);
const agentConfigEntrySchema = z.object({
system_prompt: z.string().optional(),
model_tier: modelTierEnum.optional(),