Skip to content

Add AWS Bedrock region selection support#11639

Open
keyuchen21 wants to merge 1 commit into
warpdotdev:masterfrom
keyuchen21:kc4020/aws-bedrock-region-support
Open

Add AWS Bedrock region selection support#11639
keyuchen21 wants to merge 1 commit into
warpdotdev:masterfrom
keyuchen21:kc4020/aws-bedrock-region-support

Conversation

@keyuchen21
Copy link
Copy Markdown

@keyuchen21 keyuchen21 commented May 24, 2026

Summary

Closes #8506

Adds first-class AWS Bedrock region selection support. Users can now configure their preferred AWS region (e.g. us-east-1, eu-west-1) directly in Warp's AI settings, enabling Bedrock inference in any supported region.

Changes

  • crates/ai/src/aws_credentials.rs — Added region field to AwsCredentials struct, fixed proto conversion (was hardcoding empty string), enhanced status card to display active region
  • crates/ai/src/aws_credentials_tests.rs — New test file: 9 unit tests covering region storage, proto conversion, and UI display
  • crates/ai/src/api_keys_tests.rs — Added tests for AWS credentials in API key request flow
  • app/src/settings/ai.rs — Added aws_bedrock_region setting with TOML persistence and cloud sync
  • app/src/ai/aws_credentials.rs — Updated load_aws_credentials_from_sdk() to accept region override, resolves from SDK when not set, subscribes to region setting changes
  • app/src/settings_view/ai_page.rs — Added "AWS Region" text input to the Bedrock settings widget

How to use

  1. Open Settings → AI (or press Cmd+,)
  2. Scroll down to AWS Bedrock section (or search "bedrock")
  3. Enable the "Use AWS Bedrock credentials" toggle
  4. Set your AWS Profile (optional, leave blank for default)
  5. Set your AWS Region (e.g. us-east-1, us-west-2, eu-west-1) — if left blank, the region is automatically resolved from your ~/.aws/config or AWS_REGION environment variable
  6. Configure a Login Command (e.g. aws sso login) for credential refresh
  7. Click Refresh to load credentials

Once loaded, the status card shows: "Credentials loaded · Region: us-east-1"

Region resolution priority:

  1. Explicit value in the "AWS Region" field (highest priority)
  2. AWS_REGION or AWS_DEFAULT_REGION environment variable
  3. Region from ~/.aws/config for the configured profile
image

Test plan

  • Unit tests pass: cargo nextest run -p ai (37 tests)
  • Clippy clean on affected crates
  • Manual: AWS Bedrock section renders with new Region input field
  • Manual: Region field disabled when Bedrock toggle is off, enabled when on
  • Manual: Set region, verify credentials load with correct region shown in status
  • Manual: Leave region blank, verify SDK resolves from ~/.aws/config

CHANGELOG-NEW-FEATURE: Added AWS region selection to Bedrock settings for choosing inference region

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 24, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: kc4020.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 24, 2026

@keyuchen21

This PR is not linked to an issue that is marked with ready-to-implement.

Issue-state enforcement details:

Readiness check:

To continue, link this PR to a same-repo issue such as Closes #123 in the PR description, and make sure that issue has ready-to-implement.

Powered by Oz

@github-actions github-actions Bot added the external-contributor Indicates that a PR has been opened by someone outside the Warp team. label May 24, 2026
Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

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

@keyuchen21

This PR is not linked to an issue that is marked with ready-to-implement.

Issue-state enforcement details:

  • Associated same-repo issues checked: #8506

  • Required readiness label: ready-to-implement

Readiness check:

  • #8506: missing ready-to-implement; readiness labels present: none

To continue, link this PR to a same-repo issue such as Closes #123 in the PR description, and make sure that issue has ready-to-implement.

Powered by Oz

@keyuchen21 keyuchen21 force-pushed the kc4020/aws-bedrock-region-support branch from 8506fec to f5fc944 Compare May 24, 2026 20:13
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 24, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @keyuchen21 on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@keyuchen21
Copy link
Copy Markdown
Author

recheck

@keyuchen21
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 24, 2026

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @keyuchen21 on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment @cla-bot check to trigger another check.

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 24, 2026

The cla-bot has been summoned, and re-checked this pull request!

@keyuchen21
Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed label May 24, 2026
@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented May 24, 2026

The cla-bot has been summoned, and re-checked this pull request!

@keyuchen21
Copy link
Copy Markdown
Author

keyuchen21 commented May 24, 2026

Screenshot

Here is the AWS Bedrock settings section with the new AWS Region field:

image

Note: Fields are disabled because the 'Use AWS Bedrock credentials' toggle is off (requires workspace admin enablement). When enabled, all fields become interactive.

@woodcockjosh
Copy link
Copy Markdown

Watching

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 5, 2026

Hi @keyuchen21 — a reviewer requested changes on this PR and it hasn't had activity from you in 11 days. When you get a chance, please push updates or reply to the review so a reviewer can take another look. Without activity, this PR will be automatically closed after 30 days of inactivity.

Adds a configurable AWS region setting so users can specify which
region to use for Bedrock API requests (e.g. us-east-1, us-west-2).
Previously the region field was hardcoded to an empty string.

Changes:
- Add `aws_bedrock_region` setting to AISettings
- Store resolved region in AwsCredentials struct
- Capture region from AWS SDK during credential loading
- Pass region through to the server API request
- Add region input field to Settings > AI > AWS Bedrock UI
- Refresh credentials when region setting changes
- Display loaded region in credential status card
@keyuchen21 keyuchen21 force-pushed the kc4020/aws-bedrock-region-support branch from f5fc944 to 75aa6f9 Compare June 7, 2026 16:19
@keyuchen21
Copy link
Copy Markdown
Author

"the ready-to-implement label on issue #8506" — that requires a Warp maintainer to add.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed external-contributor Indicates that a PR has been opened by someone outside the Warp team.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support AWS Bedrock (Claude) as a first-class AI provider

2 participants