Skip to content

Conversation

@ibetitsmike
Copy link
Contributor

@ibetitsmike ibetitsmike commented Nov 26, 2025

Add Amazon Bedrock as a supported AI provider using @ai-sdk/amazon-bedrock with flexible AWS authentication via @aws-sdk/credential-providers.

Authentication Methods (in priority order)

  1. Explicit credentials in providers.jsonc (accessKeyId + secretAccessKey)
  2. AWS_BEARER_TOKEN_BEDROCK - Bedrock API key (simplest auth)
  3. AWS credential provider chain:
    • Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
    • Shared credentials file (~/.aws/credentials)
    • EC2 instance profiles
    • ECS task roles
    • EKS service accounts (IRSA)
    • SSO credentials
    • And more...

Configuration

Note: Region is always required - either in config or via AWS_REGION environment variable.

Simplest setup with Bedrock API key:

export AWS_REGION=us-east-1
export AWS_BEARER_TOKEN_BEDROCK=your-api-key

Or explicit credentials in providers.jsonc:

{
  "bedrock": {
    "region": "us-east-1",
    "accessKeyId": "...",
    "secretAccessKey": "..."
  }
}

Or just region (uses credential chain automatically):

{
  "bedrock": {
    "region": "us-east-1"
  }
}

Supported Models

Model string format: bedrock:<model-id>

Examples:

  • bedrock:anthropic.claude-3-5-sonnet-20241022-v2:0
  • bedrock:us.amazon.nova-pro-v1:0
  • bedrock:meta.llama3-70b-instruct-v1:0

Closes #764


Generated with mux

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike ibetitsmike force-pushed the mux-issue-764 branch 4 times, most recently from d6c9a84 to 36e2ff5 Compare November 27, 2025 08:25
Add Amazon Bedrock as a supported AI provider using @ai-sdk/amazon-bedrock
with flexible AWS authentication via @aws-sdk/credential-providers.

## Authentication Methods (in priority order)

1. **Explicit credentials in providers.jsonc** (accessKeyId + secretAccessKey)
2. **AWS_BEARER_TOKEN_BEDROCK** - Bedrock API key (simplest auth)
3. **AWS credential provider chain**:
   - Environment variables (AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY)
   - Shared credentials file (~/.aws/credentials)
   - EC2 instance profiles
   - ECS task roles
   - EKS service accounts (IRSA)
   - SSO credentials
   - And more...

## Configuration

Region is always required (config or AWS_REGION env var).

Simplest setup with Bedrock API key:
```bash
export AWS_REGION=us-east-1
export AWS_BEARER_TOKEN_BEDROCK=your-api-key
```

Or explicit credentials in providers.jsonc:
```json
{
  "bedrock": {
    "region": "us-east-1",
    "accessKeyId": "...",
    "secretAccessKey": "..."
  }
}
```

## Supported Models

Model string format: bedrock:<model-id>
Example: bedrock:anthropic.claude-3-5-sonnet-20241022-v2:0

Closes #764
@ibetitsmike ibetitsmike force-pushed the mux-issue-764 branch 7 times, most recently from aac3d86 to e1cfbcb Compare November 27, 2025 11:19
@ibetitsmike
Copy link
Contributor Author

@codex review

@ibetitsmike ibetitsmike changed the title 🤖 feat: Add support for Amazon Bedrock 🤖 feat: add support for Amazon Bedrock Nov 27, 2025
- Add AWS icon for Bedrock models in chat (reusing existing aws.svg)
- Parse Bedrock model names (e.g., global.anthropic.claude-sonnet-4-5-20250929-v1:0 → Sonnet 4.5)
- Handle both old (claude-3-5-sonnet) and new (claude-sonnet-4-5) naming formats
- Show Bedrock-specific configuration help in Settings instead of API Key/Base URL fields
- Add /provider bedrock suggestions with region, bedrockApiKey, accessKeyId, secretAccessKey
- Support bedrockApiKey in providers.jsonc (maps to AWS_BEARER_TOKEN_BEDROCK)

_Generated with mux_
@coder coder deleted a comment from chatgpt-codex-connector bot Nov 27, 2025
@ibetitsmike ibetitsmike added this pull request to the merge queue Nov 27, 2025
Merged via the queue into main with commit 55f896b Nov 27, 2025
19 of 21 checks passed
@ibetitsmike ibetitsmike deleted the mux-issue-764 branch November 27, 2025 12:54
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.

Add support for Amazon Bedrock

2 participants