fix(schema): preserve custom agent overrides via catchall

AgentOverridesSchema silently strips custom agent keys during Zod
parsing because only 14 built-in names are explicitly defined. Add
.catchall(AgentOverrideConfigSchema.optional()) so user-defined agent
configs survive validation and reach downstream consumers like
resolveModelAndFallbackChain().

Fixes #3229.
This commit is contained in:
mrosnerr
2026-04-30 17:08:06 -04:00
parent f8b22e1f76
commit bcc554bb6e
2 changed files with 39 additions and 1 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ export const AgentOverridesSchema = z.object({
explore: AgentOverrideConfigSchema.optional(),
"multimodal-looker": AgentOverrideConfigSchema.optional(),
atlas: AgentOverrideConfigSchema.optional(),
})
}).catchall(AgentOverrideConfigSchema.optional())
export type AgentOverrideConfig = z.infer<typeof AgentOverrideConfigSchema>
export type AgentOverrides = z.infer<typeof AgentOverridesSchema>