fix(ai): resolve Bedrock regions without implicit defaults - #45398
Closed
rekram1-node wants to merge 1 commit into
Closed
rekram1-node wants to merge 1 commit into
rekram1-node wants to merge 1 commit into
Conversation
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.
Summary
region, existingcredentials.region, thenAWS_REGION; trim values and remove the silentus-east-1fallbackAIError(InvalidRequest, parameterregion) when region is missing or blankbaseURLplus bearerapiKey; SigV4 and generated AWS endpoints still require region${AWS_REGION}in catalog URLs, including legacyendpointaliases and directly selected native packagesAIErrors through ModelResolver and generation rather than replacing them with misleading unsupported-package errorsScope
This is the focused native region/configuration fix. AWS profile/config-file discovery, credential chains and refresh, bearer-token environment resolution, and changes to the legacy AI SDK hooks are not included. No new public error schema or Server/Protocol API changes. Existing callers that relied on the native default region must now pass
regionor setAWS_REGION.Also corrects one stale package-alias assertion left by #45394: Mantle defaults to Responses, not Chat.
Verification
AWS_REGIONunsetbun typecheckpassed inpackages/aiandpackages/coregit diff --checkpassedFull-Suite Baseline
Full AI suite: 754 passed, 25 skipped, 14 failed. Clean
v2at767115cd69: 748 passed, 25 skipped, 15 failed. No new failures; the Mantle alias assertion is fixed. The other failures are existing WebSocket executor expectations, Anthropic fixtures/package expectations, and OpenRouter fixtures/reasoning expectations. The full Core suite was not run.