-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: Global Inference for Bedrock models (#8750) #8940
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
base: main
Are you sure you want to change the base?
Conversation
Code Review SummaryI've reviewed the changes in this PR and found no new issues. Issues Found
|
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.
Pull Request Overview
This PR adds support for AWS Bedrock Global Inference profile routing, which enables automatic selection of optimal AWS regions for supported models. The feature is mutually exclusive with cross-region inference.
Key changes:
- Added new configuration option
awsUseGlobalInferencefor enabling Global Inference profiles - Introduced
BEDROCK_GLOBAL_INFERENCE_MODEL_IDSconstant listing supported models (Claude Sonnet 4, 4.5, and Haiku 4.5) - Implemented UI checkbox that appears conditionally for supported models and enforces mutual exclusivity with cross-region inference
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| webview-ui/src/i18n/locales/en/settings.json | Added translation key for Global Inference checkbox label |
| webview-ui/src/components/settings/providers/Bedrock.tsx | Added conditional UI checkbox for Global Inference with one-way mutual exclusion logic |
| src/api/providers/bedrock.ts | Implemented Global Inference prefix (global.) application logic with precedence over cross-region inference |
| packages/types/src/providers/bedrock.ts | Defined list of models supporting Global Inference |
| packages/types/src/provider-settings.ts | Added awsUseGlobalInference boolean field to Bedrock schema |
Comments suppressed due to low confidence (1)
webview-ui/src/components/settings/providers/Bedrock.tsx:167
- The cross-region inference checkbox lacks reciprocal mutual exclusion logic. When enabling cross-region inference, it should also disable Global Inference (similar to how enabling Global Inference disables cross-region inference on lines 157-158). Update the onChange handler to:
onChange={(checked: boolean) => { setApiConfigurationField('awsUseCrossRegionInference', checked); if (checked) setApiConfigurationField('awsUseGlobalInference', false); }}
<Checkbox
checked={apiConfiguration?.awsUseCrossRegionInference || false}
onChange={handleInputChange("awsUseCrossRegionInference", noTransform)}>
{t("settings:providers.awsCrossRegion")}
</Checkbox>
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…erence (disable global inference)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
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.
The mutual exclusion issue has been resolved. However, there is still one open issue regarding the Hindi translation that needs to be addressed before approval.
Related GitHub Issue
Closes: #8750
Roo Code Task Context (Optional)
No Roo Code task context for this PR
Description
Implements Global Inference support for Amazon Bedrock models that currently support it (Claude Sonnet 4, Claude Sonnet 4.5, Claude Haiku 4.5). Adds:
Test Procedure
Pre-Submission Checklist
Screenshots / Videos
No UI layout changes; adds one checkbox when applicable.
Documentation Updates
Additional Notes
Get in Touch
@your-discord
Important
Adds global inference support for specific Amazon Bedrock models, updates UI and settings to enable and manage this feature.
bedrock.ts.awsUseGlobalInferenceflag inprovider-settings.tsto enable global inference.AwsBedrockHandlerto prioritize global inference over cross-region inference.Bedrock.tsx, disabling cross-region when enabled.settings.json) to include global inference descriptions.bedrock.ts.This description was created by
for f87e1b9. You can customize this summary. It will automatically update as commits are pushed.