Skip to content

fix(bedrock): fix region inference when aws_profile is used#1149

Draft
Ashutosh0x wants to merge 2 commits intoanthropics:mainfrom
Ashutosh0x:fix/bedrock-region-inference
Draft

fix(bedrock): fix region inference when aws_profile is used#1149
Ashutosh0x wants to merge 2 commits intoanthropics:mainfrom
Ashutosh0x:fix/bedrock-region-inference

Conversation

@Ashutosh0x
Copy link

@Ashutosh0x Ashutosh0x commented Jan 22, 2026

Fixes #892.

This PR fixes a bug in region inference for the Bedrock client.

Changes

  • Pass aws_profile to _infer_region so that boto3.Session(profile_name=aws_profile) can correctly detect the region specified in the AWS config for that profile.
  • Added support for AWS_DEFAULT_REGION environment variable in _infer_region.

Verification

  • Verified that _infer_region now uses the provided profile and checks both AWS_REGION and AWS_DEFAULT_REGION.

@Ashutosh0x Ashutosh0x force-pushed the fix/bedrock-region-inference branch from 71a01e8 to 4dab499 Compare January 26, 2026 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bedrock client failing to detect AWS region correctly can cause cross-region inference to fail

1 participant