From 9f70054456c3469357bc32f84622e50898d38aed Mon Sep 17 00:00:00 2001 From: Maxwell Calkin Date: Sun, 8 Mar 2026 12:53:27 -0400 Subject: [PATCH] fix: preserve region and profile from YAML model config The Zod model schema in config-yaml stripped `region` and `profile` fields set at the model level in config.yaml because they were not defined in `baseModelFields`. This caused AWS providers (SageMaker, Bedrock) to silently fall back to their default region (us-west-2 / us-east-1) regardless of the user's configured region. The `env` nested object path still works and takes precedence when both are set, maintaining backward compatibility. Fixes #10879 Co-Authored-By: Claude Opus 4.6 --- packages/config-yaml/src/schemas/models.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/config-yaml/src/schemas/models.ts b/packages/config-yaml/src/schemas/models.ts index 89856e35c95..71571eb6e20 100644 --- a/packages/config-yaml/src/schemas/models.ts +++ b/packages/config-yaml/src/schemas/models.ts @@ -180,6 +180,8 @@ const baseModelFields = { apiKey: z.string().optional(), apiBase: z.string().optional(), maxStopWords: z.number().optional(), + region: z.string().optional(), + profile: z.string().optional(), roles: modelRolesSchema.array().optional(), capabilities: modelCapabilitySchema.array().optional(), defaultCompletionOptions: completionOptionsSchema.optional(),