Skip to content

feat: Add custom region support for AWS Bedrock provider #5924

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

richardwhiteii
Copy link

Summary

Fixes #5923

This PR adds custom region input support for the AWS Bedrock provider, allowing users to enter new AWS regions before they are officially added to the codebase.

Changes Made

  • Added "Custom region..." option to the BEDROCK_REGIONS dropdown list
  • Added conditional text input field that appears when "Custom region..." is selected
  • Implemented state management for switching between standard and custom regions
  • Added proper initialization logic to handle existing custom regions when component loads
  • Maintained sorting to keep custom option at the end of the region list

Technical Details

Files Modified

  • packages/types/src/providers/bedrock.ts - Added custom option to regions list
  • webview-ui/src/components/settings/providers/Bedrock.tsx - Added UI logic and state management

Implementation

  • Uses existing validation logic (no changes needed)
  • Maintains backward compatibility with existing configurations
  • Non-breaking change that enhances existing functionality

Use Case

When AWS launches new regions (e.g., us-west-3), users can immediately access Bedrock services in those regions by:

  1. Selecting "Custom region..." from the dropdown
  2. Entering the new region identifier in the text input
  3. Continuing with their Bedrock configuration

Testing

  • Dropdown shows all existing regions plus "Custom region..." at the end
  • Selecting "Custom region..." displays text input field
  • Custom region input accepts and saves values properly
  • Switching back to standard regions works correctly
  • Existing custom regions are preserved when component loads

Screenshots

<!-- Add screenshots showing the new custom region functionality -->

Alignment with Roadmap

  • Reliability First: Expands robust support for AI providers by enabling immediate access to new AWS regions
  • Enhanced User Experience: Removes friction points by eliminating waiting periods for new region support

Notes

This follows the same pattern as the existing Custom ARN functionality, providing a consistent user experience across custom input features.

Fixes RooCodeInc#5923

- Add "Custom region..." option to BEDROCK_REGIONS dropdown
- Add conditional text input for custom region entry when selected
- Handle state management for switching between standard and custom regions
- Preserve existing custom regions when component loads
- Keep custom option sorted at end of region list

This allows users to enter new AWS regions (e.g., us-west-3) before
they are officially added to the codebase, enabling immediate access
to newly launched regions without waiting for code updates.
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jul 18, 2025
The useEffect was conflicting with manual state changes, causing
users to need to click 'Custom region...' twice before the input
field would appear. Fixed by only running the initialization
effect on component mount rather than on every region change.
@daniel-lxs daniel-lxs moved this from Triage to PR [Draft / In Progress] in Roo Code Roadmap Jul 19, 2025
@hannesrudolph hannesrudolph added PR - Draft / In Progress and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jul 19, 2025
@daniel-lxs
Copy link
Collaborator

Closing, see #5923 (comment)

@daniel-lxs daniel-lxs closed this Jul 22, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jul 22, 2025
@github-project-automation github-project-automation bot moved this from PR [Draft / In Progress] to Done in Roo Code Roadmap Jul 22, 2025
@richardwhiteii
Copy link
Author

richardwhiteii commented Jul 23, 2025

how could I get this issue reopened?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add custom region input support for AWS Bedrock provider
3 participants