fix: add missing region, profile, and title to YAML model schema#11970
Open
ewalsh wants to merge 1 commit intocontinuedev:mainfrom
Open
fix: add missing region, profile, and title to YAML model schema#11970ewalsh wants to merge 1 commit intocontinuedev:mainfrom
ewalsh wants to merge 1 commit intocontinuedev:mainfrom
Conversation
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 continuedev#9297
Contributor
|
I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
baseModelFieldsschema inpackages/config-yaml/src/schemas/models.tsis missingseveral fields that
BaseLLMreads in its constructor, includingregion,profile,and
title. Because Zod objects use strict validation (additionalProperties: false),these fields are silently stripped from
config.yamlmodel entries before reachingprovider constructors.
This causes the Bedrock provider to fail with
bedrock-runtime.undefined.amazonaws.comand
Credential should be scoped to a valid regionerrors.Fixes #9297
Description
Added
title,region, andprofileas optional string fields tobaseModelFieldsin
packages/config-yaml/src/schemas/models.ts. These fields are already read byBaseLLMincore/llm/BaseLLM.tsbut were not declared in the YAML schema.AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
Before fix: Bedrock model in
config.yamlwithregion: eu-west-2andprofile: claude:After fix: Fields pass through schema validation and Bedrock connects successfully.
Tests
No new tests added. Verified manually by configuring a Bedrock model in
config.yamlwith
regionandprofilefields — requests succeed after the change.Summary by cubic
Pass provider-specific fields through the YAML model schema by adding them to
baseModelFields. This stops strict validation from stripping config and fixes Bedrock region/profile errors; Azure and Vertex AI configs now work, andtitleis preserved.packages/config-yaml/src/schemas/models.ts, added optional fields tobaseModelFields:title,region,profile,accountId,deployment,deploymentId,apiVersion,apiType,projectId,accessKeyId,secretAccessKey.Written for commit 5a0de48. Summary will update on new commits.