From 0857a5e4238541583b03e96bb3ed11e1382553f6 Mon Sep 17 00:00:00 2001 From: KraFourZee Date: Thu, 29 Jan 2026 00:09:13 -0500 Subject: [PATCH] zod-schema changes for tools and updating types.agents.ts to match my agents-default changes --- src/config/types.agents.ts | 2 ++ src/config/zod-schema.agent-runtime.ts | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/config/types.agents.ts b/src/config/types.agents.ts index f083c1897..33b6214d0 100644 --- a/src/config/types.agents.ts +++ b/src/config/types.agents.ts @@ -36,6 +36,8 @@ export type AgentConfig = { allowAgents?: string[]; /** Per-agent default model for spawned sub-agents (string or {primary,fallbacks}). */ model?: string | { primary?: string; fallbacks?: string[] }; + /** Per-agent default thinking level for spawned sub-agents. */ + thinking?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh"; }; sandbox?: { mode?: "off" | "non-main" | "all"; diff --git a/src/config/zod-schema.agent-runtime.ts b/src/config/zod-schema.agent-runtime.ts index 7a63e307d..3b684d554 100644 --- a/src/config/zod-schema.agent-runtime.ts +++ b/src/config/zod-schema.agent-runtime.ts @@ -524,6 +524,27 @@ export const ToolsSchema = z subagents: z .object({ tools: ToolPolicySchema, + model: z + .union([ + z.string(), + z + .object({ + primary: z.string().optional(), + fallbacks: z.array(z.string()).optional(), + }) + .strict(), + ]) + .optional(), + thinking: z + .union([ + z.literal("off"), + z.literal("minimal"), + z.literal("low"), + z.literal("medium"), + z.literal("high"), + z.literal("xhigh"), + ]) + .optional(), }) .strict() .optional(),