Skip to content

fix(bedrock): honor generic AWS_ENDPOINT_URL env var - #423

Merged
cpsievert merged 1 commit into
mainfrom
fix-bedrock-endpoint-env-var
Sep 21, 2026
Merged

cpsievert merged 1 commit into
mainfrom
fix-bedrock-endpoint-env-var

Conversation

@cpsievert

Copy link
Copy Markdown
Collaborator

Closes #415.

Most of the issue was already addressed by #406, which defaults the Bedrock base_url from AWS_ENDPOINT_URL_BEDROCK_RUNTIME / AWS_ENDPOINT_URL_BEDROCK_MANTLE. This PR closes the remaining gap called out in the issue: the generic AWS_ENDPOINT_URL is now honored too, with botocore-style precedence — service-specific variable > generic AWS_ENDPOINT_URL > computed regional endpoint.

Adds unit tests covering the generic var for both converse and mantle, and service-specific-outranks-generic precedence.

The service-specific override (AWS_ENDPOINT_URL_BEDROCK_RUNTIME /
AWS_ENDPOINT_URL_BEDROCK_MANTLE) outranks the generic AWS_ENDPOINT_URL,
which outranks the regional endpoint computed from the region.

Closes #415

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟢 Approval recommended

The implementation and test coverage match the stated endpoint precedence behavior.

Review effort: Lite
Findings: None

What changed in this PR

Extends Bedrock endpoint resolution to honor the generic AWS_ENDPOINT_URL while preserving service-specific precedence.

Changes:

  • Adds generic endpoint fallback for Converse and Mantle APIs.
  • Adds tests for generic usage and precedence.
File Description
chatlas/​_provider_bedrock.py Implements endpoint precedence and updates documentation.
tests/​test_provider_bedrock_mantle.py Tests generic endpoint handling and precedence.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@cpsievert
cpsievert merged commit 6a1bcb6 into main Sep 21, 2026
8 checks 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 providers ignore AWS_ENDPOINT_URL_BEDROCK_RUNTIME env var

2 participants