-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Adding support for custom VPC endpoints when using AWS Bedrock models #3947
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
- Changed checkbox label to 'Use custom VPC endpoint' to match Cline - Fixed conditional rendering to show text field when checkbox is checked - Ensured placeholder text appears correctly - Maintained proper styling for consistency
- Added state variable to track checkbox selection - Fixed conditional rendering to show/hide text field based on checkbox state - Maintained proper styling and placeholder text
…ling - Fixed checkbox onChange handler to accept boolean directly instead of event object - Added unit tests to verify the behavior - Maintained proper styling and placeholder text
- Removed left margin from text field to align with checkbox - Maintained proper styling and placeholder text
- Added awsBedrockEndpointEnabled field to schema - Modified Bedrock provider to check both endpoint URL and enabled flag - Updated UI to preserve endpoint URL when checkbox is toggled - Maintained proper alignment with checkbox
… regenerate types
|
LGTM! Thank you! |
| setAwsEndpointSelected(isChecked) | ||
| setApiConfigurationField("awsBedrockEndpointEnabled", isChecked) | ||
| }}> | ||
| Use custom VPC endpoint |
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.
Can you internationalize this string please?
| style={{ width: "100%", marginTop: 3, marginBottom: 5 }} | ||
| type="url" | ||
| onInput={handleInputChange("awsBedrockEndpoint")} | ||
| placeholder="Enter VPC Endpoint URL (optional)" |
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.
This too
| data-testid="vpc-endpoint-input" | ||
| /> | ||
| <div className="text-sm text-vscode-descriptionForeground ml-6 mt-1 mb-3"> | ||
| Examples: |
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.
And this
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.
And this
Sorry Matt, bit of a noob contributor. Are you asking me or Daniel to internationalize the strings?
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.
@kcwhite I can handle this if you want, sorry for not noticing the missing translations, I'll be more careful
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.
Sounds good, thx
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.
@kcwhite I can handle this if you want, sorry for not noticing the missing translations, I'll be more careful
No problem, I'll see if I can configure Ellipsis to try to catch this as well.
|
Ok, I’m just fixing s failing UI test right now, will push soon
Get Outlook for iOS<https://aka.ms/o0ukef>
________________________________
From: Daniel ***@***.***>
Sent: Friday, May 30, 2025 6:42:23 PM
To: RooCodeInc/Roo-Code ***@***.***>
Cc: kcwhite ***@***.***>; Mention ***@***.***>
Subject: Re: [RooCodeInc/Roo-Code] Adding support for custom VPC endpoints when using AWS Bedrock models (PR #3947)
@daniel-lxs commented on this pull request.
________________________________
In webview-ui/src/components/settings/providers/Bedrock.tsx<#3947 (comment)>:
+ setApiConfigurationField("awsBedrockEndpointEnabled", isChecked)
+ }}>
+ Use custom VPC endpoint
+ </Checkbox>
+ {awsEndpointSelected && (
+ <>
+ <VSCodeTextField
+ value={apiConfiguration?.awsBedrockEndpoint || ""}
+ style={{ width: "100%", marginTop: 3, marginBottom: 5 }}
+ type="url"
+ onInput={handleInputChange("awsBedrockEndpoint")}
+ placeholder="Enter VPC Endpoint URL (optional)"
+ data-testid="vpc-endpoint-input"
+ />
+ <div className="text-sm text-vscode-descriptionForeground ml-6 mt-1 mb-3">
+ Examples:
@kcwhite<https://github.com/kcwhite> I can handle this if you want
—
Reply to this email directly, view it on GitHub<#3947 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AA5C3QOCGKIAQUSUVHV6G733BD3G7AVCNFSM6AAAAAB53EY77SVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDQOBSHE2TQOBQGM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
…webview-ui (RooCodeInc#3947) * Fix linter warnings in the webview (part 2) Replace protobus calls using object literals to use Message.create({...}) Fix incorrect property name detected after this change in webview-ui/src/components/settings/SettingsView.tsx Optimised imports in vscode. * formatting * feat(lint): Add custom ESLint rules for protobuf type checking Add two custom ESLint rules to enforce proper usage patterns when creating protobuf objects. Using .create() to build protobufs ensures that the protobuf is type checked when it is created. Protobufs created using object literals are not type checked, which can lead to subtle bugs and type mismatches. The linter rules detect when protobufs are created without using .create() or .fromPartial(). - no-protobuf-object-literals: Enforces the use of `.create()` or `.fromPartial()` methods instead of object literals when creating protobuf types. ``` /Users/sjf/cline/src/shared/proto-conversions/state/chat-settings-conversion.ts 9:9 warning Use ChatSettings.create() or ChatSettings.fromPartial() instead of object literal for protobuf type Found: return { mode: chatSettings.mode === "plan" ? PlanActMode.PLAN : PlanActMode.ACT, preferredLanguage: chatSettings.preferredLanguage, openAiReasoningEffort: chatSettings.openAIReasoningEffort, } Suggestion: ChatSettings.create({ mode: chatSettings.mode === "plan" ? PlanActMode.PLAN : PlanActMode.ACT, preferredLanguage: chatSettings.preferredLanguage, openAiReasoningEffort: chatSettings.openAIReasoningEffort, }) ``` - no-grpc-client-object-literals: Enforces proper protobuf creation for gRPC service client parameters. This needs a separate rule because the type signatures of the ServiceClients methods are too generic to be detected by the previous rule. ``` /Users/sjf/cline/webview-ui/src/components/mcp/configuration/tabs/add-server/AddRemoteServerForm.tsx 41:62 warning Use the appropriate protobuf .create() or .fromPartial() method instead of object literal for gRPC client parameters. Found: McpServiceClient.addRemoteMcpServer({ serverName: serverName.trim(), serverUrl: serverUrl.trim(), }) ``` These rules help maintain code quality by enforcing consistent patterns for working with protocol buffers throughout the codebase, reducing potential runtime errors from improper message construction. * Update test * Add custom eslint rules to new webview-ui config * Only include webview grpc ServiceClient check * Fix lint errors * formatting * Update package.json * Make the no-grpc-client-object-literals linter rule an error for the webview-ui Fix the last occurrence of this issue. * formatting
Related GitHub Issue
Closes: #3492
Description
This PR adds support for custom VPC endpoints when using AWS Bedrock models. This feature is particularly important for corporate customers who need to keep all LLM transactions secure inside their firewall.
Implementation details:
Test Procedure
Unit Tests: Added tests for the Bedrock provider with custom endpoints
Manual Testing:
Verification:
pnpm testType of Change
srcor test files.Pre-Submission Checklist
npm run lint).console.log) has been removed.npm test).mainbranch.npm run changesetif this PR includes user-facing changes or dependency updates.Screenshots / Videos
I have included 2 screenshots
Documentation Updates
Additional Notes
This feature has been requested by several enterprise customers who need to use Roo Code with their secure AWS environments. It enables them to comply with their internal security policies while still leveraging the power of AWS Bedrock models through Roo Code.
Get in Touch
Discord: chuck_33620
Important
Adds support for custom VPC endpoints in AWS Bedrock models with UI and backend changes, ensuring backward compatibility and comprehensive test coverage.
awsBedrockEndpointandawsBedrockEndpointEnabledinProviderSettings.AwsBedrockHandlerinbedrock.tsto use custom endpoint if enabled.Bedrock.tsx.awsBedrockEndpointEnabled.bedrock-vpc-endpoint.test.tsto validate endpoint configuration logic.Bedrock.test.tsxto verify checkbox and text field behavior.ProviderSettingsinroo-code.d.tsandtypes.tsto include new fields for VPC endpoint configuration.This description was created by
for 617e68e. You can customize this summary. It will automatically update as commits are pushed.