From 5a0de488bde3b0ce8e142b4357897bef526df6d0 Mon Sep 17 00:00:00 2001 From: Edmund Walsh Date: Mon, 30 Mar 2026 10:14:24 +0000 Subject: [PATCH] fix: add missing region, profile, and title to YAML model schema The baseModelFields in the config-yaml schema does not include region, profile, or title as allowed properties. Combined with Zod's strict object validation, these fields are silently stripped before reaching provider constructors. This breaks Bedrock (region/profile), Azure (deployment/apiVersion), Vertex AI (projectId), and all providers (title). Adds the missing optional fields to baseModelFields in packages/config-yaml/src/schemas/models.ts. Fixes #9297 --- packages/config-yaml/src/schemas/models.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/packages/config-yaml/src/schemas/models.ts b/packages/config-yaml/src/schemas/models.ts index ee20d5a0540..bae74eff76b 100644 --- a/packages/config-yaml/src/schemas/models.ts +++ b/packages/config-yaml/src/schemas/models.ts @@ -178,8 +178,19 @@ export type PromptTemplates = z.infer; const baseModelFields = { name: z.string(), model: z.string(), + title: z.string().optional(), apiKey: z.string().optional(), apiBase: z.string().optional(), + region: z.string().optional(), + profile: z.string().optional(), + accountId: z.string().optional(), + deployment: z.string().optional(), + deploymentId: z.string().optional(), + apiVersion: z.string().optional(), + apiType: z.string().optional(), + projectId: z.string().optional(), + accessKeyId: z.string().optional(), + secretAccessKey: z.string().optional(), contextLength: z.number().optional(), maxStopWords: z.number().optional(), roles: modelRolesSchema.array().optional(),