Skip to content

Bedrock providers ignore AWS_ENDPOINT_URL_BEDROCK_RUNTIME env var #415

Closed

Description

@cpsievert

Summary

ChatBedrockAnthropic/ChatAWSBedrock (chatlas/_provider_bedrock.py) and the Converse-based provider (chatlas/_provider_bedrock_converse.py) both compute base_url from the AWS region whenever no explicit base_url is passed:

# _provider_bedrock.py / _provider_bedrock_converse.py
resolved_base_url = base_url or bedrock_base_url("converse", aws_region)  # or "messages"/"responses"

This bypasses botocore's native support for AWS_ENDPOINT_URL_BEDROCK_RUNTIME (and the generic AWS_ENDPOINT_URL), which is the standard way to point AWS SDKs at a custom Bedrock runtime endpoint (e.g. VPC endpoints, proxies, local testing, FIPS endpoints, or region-specific overrides not covered by the built-in formula).

ellmer just added this: chat_aws_bedrock() now defaults base_url from AWS_ENDPOINT_URL_BEDROCK_RUNTIME (tidyverse/ellmer#1104). The corresponding Anthropic-direct case, ANTHROPIC_BASE_URL, is already handled for free in chatlas since the anthropic Python SDK reads that env var internally -- no action needed there.

Expected fix

In _provider_bedrock.py and _provider_bedrock_converse.py, when base_url is not explicitly passed, check os.environ.get("AWS_ENDPOINT_URL_BEDROCK_RUNTIME") before falling back to the computed bedrock_base_url(...) formula.

References

Activity

  1. added
    Priority: LowLow-impact bug, docs polish, papercut, or unclear low-severity request.
    ai-triage:doneMarks an issue whose AI triage workflow is complete.
    on Sep 3, 2026
  2. added a commit that references this issue on Sep 4, 2026
    b293a7b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: LowLow-impact bug, docs polish, papercut, or unclear low-severity request.ai-triage:doneMarks an issue whose AI triage workflow is complete.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions