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:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user