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
Summary
ChatBedrockAnthropic/ChatAWSBedrock(chatlas/_provider_bedrock.py) and the Converse-based provider (chatlas/_provider_bedrock_converse.py) both computebase_urlfrom the AWS region whenever no explicitbase_urlis passed:This bypasses botocore's native support for
AWS_ENDPOINT_URL_BEDROCK_RUNTIME(and the genericAWS_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 defaultsbase_urlfromAWS_ENDPOINT_URL_BEDROCK_RUNTIME(tidyverse/ellmer#1104). The corresponding Anthropic-direct case,ANTHROPIC_BASE_URL, is already handled for free in chatlas since theanthropicPython SDK reads that env var internally -- no action needed there.Expected fix
In
_provider_bedrock.pyand_provider_bedrock_converse.py, whenbase_urlis not explicitly passed, checkos.environ.get("AWS_ENDPOINT_URL_BEDROCK_RUNTIME")before falling back to the computedbedrock_base_url(...)formula.References
ANTHROPIC_BASE_URLandAWS_ENDPOINT_URL_BEDROCK_RUNTIMEtidyverse/ellmer#1104chatlas/_provider_bedrock.py,chatlas/_provider_bedrock_converse.py(resolved_base_url = base_url or bedrock_base_url(...))