Hi Hadley, just ran into the issue that I couldn't natively request our internal Bedrock endpoints which rely on Bearer Token authentication (API key via Authorization: Bearer <key> header, no SigV4 signing). I built a workaround using httr2 as a proof of concept, but of course I'm losing all ellmer features like streaming, tool calling, etc. Is this something that could be resolved on the ellmer side? I believe it has quite some impact for enterprise users behind API gateways. Let me know in case you need any further info.
Problem
chat_aws_bedrock() requires IAM credentials via paws.common, which doesn't support the Bearer Token authentication that AWS Bedrock launched in July 2025. This prevents users who access Bedrock through enterprise API gateways (which issue API keys instead of IAM credentials) from using ellmer natively.
Reproduction
Sys.setenv(AWS_BEARER_TOKEN_BEDROCK = "my-api-key")
chat <- chat_aws_bedrock(
base_url = "https://my-company-gateway.example.com/bedrock",
model = "us.anthropic.claude-sonnet-4-5-20250929-v1:0"
)
# Error: No IAM credentials found.
Python's boto3 supports this via AWS_BEARER_TOKEN_BEDROCK — it skips SigV4 signing and sends Authorization: Bearer <key> instead.
Proposal
Add a credentials parameter (similar to chat_azure_openai()) that, when provided:
- Skips
paws.common IAM credential resolution
- Sends the key as
Authorization: Bearer <key> header
- Does not apply SigV4 signing
# Desired API
chat <- chat_aws_bedrock(
base_url = "https://my-company-gateway.example.com/bedrock",
model = "us.anthropic.claude-sonnet-4-5-20250929-v1:0",
credentials = "my-api-key"
)
Workaround
Currently requires calling the Bedrock Converse API directly via httr2, losing all ellmer features (streaming, tool calling, parallel_chat(), etc.).
Hi Hadley, just ran into the issue that I couldn't natively request our internal Bedrock endpoints which rely on Bearer Token authentication (API key via
Authorization: Bearer <key>header, no SigV4 signing). I built a workaround using httr2 as a proof of concept, but of course I'm losing all ellmer features like streaming, tool calling, etc. Is this something that could be resolved on the ellmer side? I believe it has quite some impact for enterprise users behind API gateways. Let me know in case you need any further info.Problem
chat_aws_bedrock()requires IAM credentials viapaws.common, which doesn't support the Bearer Token authentication that AWS Bedrock launched in July 2025. This prevents users who access Bedrock through enterprise API gateways (which issue API keys instead of IAM credentials) from usingellmernatively.Reproduction
Python's boto3 supports this via
AWS_BEARER_TOKEN_BEDROCK— it skips SigV4 signing and sendsAuthorization: Bearer <key>instead.Proposal
Add a
credentialsparameter (similar tochat_azure_openai()) that, when provided:paws.commonIAM credential resolutionAuthorization: Bearer <key>headerWorkaround
Currently requires calling the Bedrock Converse API directly via
httr2, losing allellmerfeatures (streaming, tool calling,parallel_chat(), etc.).