Skip to content

Conversation

@KevinZhao
Copy link
Contributor

@KevinZhao KevinZhao commented Jun 21, 2025

Related GitHub Issue

Closes: # <2704>
#2704

Description

Test Procedure

Type of Change

  • [x ] 🐛 Bug Fix: Non-breaking change that fixes an issue.
  • New Feature: Non-breaking change that adds functionality.
  • 💥 Breaking Change: Fix or feature that would cause existing functionality to not work as expected.
  • ♻️ Refactor: Code change that neither fixes a bug nor adds a feature.
  • 💅 Style: Changes that do not affect the meaning of the code (white-space, formatting, etc.).
  • 📚 Documentation: Updates to documentation files.
  • ⚙️ Build/CI: Changes to the build process or CI configuration.
  • 🧹 Chore: Other changes that don't modify src or test files.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue (see "Related GitHub Issue" above).
  • Scope: My changes are focused on the linked issue (one major feature/fix per PR).
  • Self-Review: I have performed a thorough self-review of my code.
  • Code Quality:
    • My code adheres to the project's style guidelines.
    • There are no new linting errors or warnings (npm run lint).
    • All debug code (e.g., console.log) has been removed.
  • Testing:
    • New and/or updated tests have been added to cover my changes.
    • All tests pass locally (npm test).
    • The application builds successfully with my changes.
  • Branch Hygiene: My branch is up-to-date (rebased) with the main branch.
  • Documentation Impact: I have considered if my changes require documentation updates (see "Documentation Updates" section below).
  • Changeset: A changeset has been created using npm run changeset if this PR includes user-facing changes or dependency updates.
  • Contribution Guidelines: I have read and agree to the Contributor Guidelines.

Screenshots / Videos

Documentation Updates

Additional Notes

Get in Touch


Important

Updates AWS Bedrock cross-region inference profile mapping to use AWS's recommended inference profiles, addressing issue #2704.

  • Behavior:
    • Updates getPrefixForRegion() in bedrock.ts to use AWS recommended inference profiles for cross-region inference.
    • Adds AWS_INFERENCE_PROFILE_MAPPING in bedrock.ts for mapping regions to inference profiles.
  • Classes:
    • Updates AwsBedrockHandler in bedrock.ts to apply cross-region inference prefixes using AWS_INFERENCE_PROFILE_MAPPING.
  • Misc:

This description was created by Ellipsis for 5be82b9. You can customize this summary. It will automatically update as commits are pushed.

- Add AWS_INFERENCE_PROFILE_MAPPING with official inference profile prefixes
- Update getPrefixForRegion to use AWS recommended inference profiles
- Improve region-to-profile mapping based on AWS documentation
- Prioritize more specific region patterns (e.g., us-gov- before us-)
- Add support for apac., ca., sa., and ug. inference profiles
@KevinZhao KevinZhao requested review from cte, jr and mrubens as code owners June 21, 2025 07:35
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. bug Something isn't working labels Jun 21, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Jun 21, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Prelim Review] in Roo Code Roadmap Jun 21, 2025
@hannesrudolph hannesrudolph added PR - Needs Preliminary Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Jun 21, 2025
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

Hey @KevinZhao, thank you for your PR!

This looks like a solid implementation, I left some suggestions to hopefully get this ready and merged.

Let me know what you think!

@KevinZhao
Copy link
Contributor Author

Yes, I checked BEDROCK_REGION_INFO, this should be incorrect from previous version, hence I removed it and testing in my local enviroment, will update by EOD.

- Add AWS_INFERENCE_PROFILE_MAPPING with priority-based region selection
- Update BEDROCK_REGIONS constant for UI components
- Enhance getPrefixForRegion function for cross-region inference
- Add comprehensive test coverage for new inference profiles system
- Support 24 AWS regions including government cloud regions

Fixes: AWS Bedrock region mapping and cross-region inference functionality
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:M This PR changes 30-99 lines, ignoring generated files. labels Jun 25, 2025
@KevinZhao
Copy link
Contributor Author

I removed logic of BEDROCK_REGION_INFO, as it mislead the model id configuration, and I instead create a simple BEDROCK_REGIONS for UI to display regions. I also adding test cases for current implementations.

@daniel-lxs daniel-lxs moved this from PR [Changes Requested] to PR [Needs Prelim Review] in Roo Code Roadmap Jun 25, 2025
Copy link
Member

@daniel-lxs daniel-lxs left a comment

Choose a reason for hiding this comment

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

Thank you @KevinZhao for your contribution!

LGTM

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jun 26, 2025
@daniel-lxs daniel-lxs moved this from PR [Needs Prelim Review] to PR [Needs Review] in Roo Code Roadmap Jun 26, 2025
@mrubens mrubens merged commit 000a9e5 into RooCodeInc:main Jun 30, 2025
23 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Jun 30, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Jun 30, 2025
utarn pushed a commit to modelharbor/ModelHarbor-Agent that referenced this pull request Jul 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer PR - Needs Review size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants