-
Notifications
You must be signed in to change notification settings - Fork 26
🤖 feat: add support for Amazon Bedrock #765
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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".
d6c9a84 to
36e2ff5
Compare
36e2ff5 to
210552e
Compare
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
aac3d86 to
e1cfbcb
Compare
|
@codex review |
e1cfbcb to
09cd56f
Compare
09cd56f to
645fa7a
Compare
- 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_
645fa7a to
3d18d86
Compare
Add Amazon Bedrock as a supported AI provider using
@ai-sdk/amazon-bedrockwith flexible AWS authentication via@aws-sdk/credential-providers.Authentication Methods (in priority order)
accessKeyId+secretAccessKey)AWS_BEARER_TOKEN_BEDROCK- Bedrock API key (simplest auth)AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY)~/.aws/credentials)Configuration
Simplest setup with Bedrock 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:0bedrock:us.amazon.nova-pro-v1:0bedrock:meta.llama3-70b-instruct-v1:0Closes #764
Generated with
mux