Skip to content

fix: honor aws_profile when inferring Bedrock region - #1758

Open
nightcityblade wants to merge 2 commits into
anthropics:mainfrom
nightcityblade:fix/issue-892
Open

fix: honor aws_profile when inferring Bedrock region#1758
nightcityblade wants to merge 2 commits into
anthropics:mainfrom
nightcityblade:fix/issue-892

Conversation

@nightcityblade

Copy link
Copy Markdown

Fixes #892

Thread the constructor aws_profile through _infer_region() so Bedrock region inference consults the same profile the client will actually use instead of always probing the default profile.

Local verification:

  • PYTHONPATH=/tmp/anthropic-sdk-python/src python3.9 -m pytest tests/lib/test_bedrock.py -k "region_infer_from_specified_profile or region_infer_from_constructor_profile" -q -o addopts=

@nightcityblade
nightcityblade requested a review from a team as a code owner July 13, 2026 15:14
@nightcityblade

Copy link
Copy Markdown
Author

Updated the branch with current upstream main and resolved the test-file conflict while preserving both the new upstream Bedrock coverage and this PR's constructor-profile regression test. Targeted verification passes: 3 tests passed.

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