diff --git a/.changeset/bedrock-vpc-endpoint.md b/.changeset/bedrock-vpc-endpoint.md new file mode 100644 index 0000000000..8249015bb2 --- /dev/null +++ b/.changeset/bedrock-vpc-endpoint.md @@ -0,0 +1,5 @@ +--- +"roo-cline": patch +--- + +Add AWS Bedrock VPC endpoint support, allowing users to connect to Bedrock through private VPC endpoints. This includes UI configuration options, updated types, and comprehensive test coverage. diff --git a/packages/types/src/provider-settings.ts b/packages/types/src/provider-settings.ts index 7076361ea5..08a328379d 100644 --- a/packages/types/src/provider-settings.ts +++ b/packages/types/src/provider-settings.ts @@ -100,6 +100,8 @@ const bedrockSchema = apiModelIdProviderModelSchema.extend({ awsProfile: z.string().optional(), awsUseProfile: z.boolean().optional(), awsCustomArn: z.string().optional(), + awsBedrockEndpointEnabled: z.boolean().optional(), + awsBedrockEndpoint: z.string().optional(), }) const vertexSchema = apiModelIdProviderModelSchema.extend({ @@ -283,6 +285,8 @@ export const PROVIDER_SETTINGS_KEYS = keysOf()([ "awsProfile", "awsUseProfile", "awsCustomArn", + "awsBedrockEndpointEnabled", + "awsBedrockEndpoint", // Google Vertex "vertexKeyFile", "vertexJsonCredentials", diff --git a/src/api/providers/__tests__/bedrock-vpc-endpoint.test.ts b/src/api/providers/__tests__/bedrock-vpc-endpoint.test.ts new file mode 100644 index 0000000000..e347620ce7 --- /dev/null +++ b/src/api/providers/__tests__/bedrock-vpc-endpoint.test.ts @@ -0,0 +1,178 @@ +// Mock AWS SDK credential providers +jest.mock("@aws-sdk/credential-providers", () => { + const mockFromIni = jest.fn().mockReturnValue({ + accessKeyId: "profile-access-key", + secretAccessKey: "profile-secret-key", + }) + return { fromIni: mockFromIni } +}) + +// Mock BedrockRuntimeClient and ConverseStreamCommand +const mockBedrockRuntimeClient = jest.fn() +const mockSend = jest.fn().mockResolvedValue({ + stream: [], +}) + +jest.mock("@aws-sdk/client-bedrock-runtime", () => ({ + BedrockRuntimeClient: mockBedrockRuntimeClient.mockImplementation(() => ({ + send: mockSend, + })), + ConverseStreamCommand: jest.fn(), + ConverseCommand: jest.fn(), +})) + +import { AwsBedrockHandler } from "../bedrock" + +describe("AWS Bedrock VPC Endpoint Functionality", () => { + beforeEach(() => { + // Clear all mocks before each test + jest.clearAllMocks() + }) + + // Test Scenario 1: Input Validation Test + describe("VPC Endpoint URL Validation", () => { + it("should configure client with endpoint URL when both URL and enabled flag are provided", () => { + // Create handler with endpoint URL and enabled flag + new AwsBedrockHandler({ + apiModelId: "anthropic.claude-3-5-sonnet-20241022-v2:0", + awsAccessKey: "test-access-key", + awsSecretKey: "test-secret-key", + awsRegion: "us-east-1", + awsBedrockEndpoint: "https://bedrock-vpc.example.com", + awsBedrockEndpointEnabled: true, + }) + + // Verify the client was created with the correct endpoint + expect(mockBedrockRuntimeClient).toHaveBeenCalledWith( + expect.objectContaining({ + region: "us-east-1", + endpoint: "https://bedrock-vpc.example.com", + }), + ) + }) + + it("should not configure client with endpoint URL when URL is provided but enabled flag is false", () => { + // Create handler with endpoint URL but disabled flag + new AwsBedrockHandler({ + apiModelId: "anthropic.claude-3-5-sonnet-20241022-v2:0", + awsAccessKey: "test-access-key", + awsSecretKey: "test-secret-key", + awsRegion: "us-east-1", + awsBedrockEndpoint: "https://bedrock-vpc.example.com", + awsBedrockEndpointEnabled: false, + }) + + // Verify the client was created without the endpoint + expect(mockBedrockRuntimeClient).toHaveBeenCalledWith( + expect.objectContaining({ + region: "us-east-1", + }), + ) + + // Verify the endpoint property is not present + const clientConfig = mockBedrockRuntimeClient.mock.calls[0][0] + expect(clientConfig).not.toHaveProperty("endpoint") + }) + }) + + // Test Scenario 2: Edge Case Tests + describe("Edge Cases", () => { + it("should handle empty endpoint URL gracefully", () => { + // Create handler with empty endpoint URL but enabled flag + new AwsBedrockHandler({ + apiModelId: "anthropic.claude-3-5-sonnet-20241022-v2:0", + awsAccessKey: "test-access-key", + awsSecretKey: "test-secret-key", + awsRegion: "us-east-1", + awsBedrockEndpoint: "", + awsBedrockEndpointEnabled: true, + }) + + // Verify the client was created without the endpoint (since it's empty) + expect(mockBedrockRuntimeClient).toHaveBeenCalledWith( + expect.objectContaining({ + region: "us-east-1", + }), + ) + + // Verify the endpoint property is not present + const clientConfig = mockBedrockRuntimeClient.mock.calls[0][0] + expect(clientConfig).not.toHaveProperty("endpoint") + }) + + it("should handle undefined endpoint URL gracefully", () => { + // Create handler with undefined endpoint URL but enabled flag + new AwsBedrockHandler({ + apiModelId: "anthropic.claude-3-5-sonnet-20241022-v2:0", + awsAccessKey: "test-access-key", + awsSecretKey: "test-secret-key", + awsRegion: "us-east-1", + awsBedrockEndpoint: undefined, + awsBedrockEndpointEnabled: true, + }) + + // Verify the client was created without the endpoint + expect(mockBedrockRuntimeClient).toHaveBeenCalledWith( + expect.objectContaining({ + region: "us-east-1", + }), + ) + + // Verify the endpoint property is not present + const clientConfig = mockBedrockRuntimeClient.mock.calls[0][0] + expect(clientConfig).not.toHaveProperty("endpoint") + }) + }) + + // Test Scenario 4: Error Handling Tests + describe("Error Handling", () => { + it("should handle invalid endpoint URLs by passing them directly to AWS SDK", () => { + // Create handler with an invalid URL format + new AwsBedrockHandler({ + apiModelId: "anthropic.claude-3-5-sonnet-20241022-v2:0", + awsAccessKey: "test-access-key", + awsSecretKey: "test-secret-key", + awsRegion: "us-east-1", + awsBedrockEndpoint: "invalid-url-format", + awsBedrockEndpointEnabled: true, + }) + + // Verify the client was created with the invalid endpoint + // (AWS SDK will handle the validation/errors) + expect(mockBedrockRuntimeClient).toHaveBeenCalledWith( + expect.objectContaining({ + region: "us-east-1", + endpoint: "invalid-url-format", + }), + ) + }) + }) + + // Test Scenario 5: Persistence Tests + describe("Persistence", () => { + it("should maintain consistent behavior across multiple requests", async () => { + // Create handler with endpoint URL and enabled flag + const handler = new AwsBedrockHandler({ + apiModelId: "anthropic.claude-3-5-sonnet-20241022-v2:0", + awsAccessKey: "test-access-key", + awsSecretKey: "test-secret-key", + awsRegion: "us-east-1", + awsBedrockEndpoint: "https://bedrock-vpc.example.com", + awsBedrockEndpointEnabled: true, + }) + + // Reset mock to clear the constructor call + mockBedrockRuntimeClient.mockClear() + + // Make a request + try { + await handler.completePrompt("Test prompt") + } catch (error) { + // Ignore errors, we're just testing the client configuration + } + + // Verify the client was configured with the endpoint + expect(mockSend).toHaveBeenCalled() + }) + }) +}) diff --git a/src/api/providers/bedrock.ts b/src/api/providers/bedrock.ts index 670371c02e..2ca387644b 100644 --- a/src/api/providers/bedrock.ts +++ b/src/api/providers/bedrock.ts @@ -169,6 +169,9 @@ export class AwsBedrockHandler extends BaseProvider implements SingleCompletionH const clientConfig: BedrockRuntimeClientConfig = { region: this.options.awsRegion, + // Add the endpoint configuration when specified and enabled + ...(this.options.awsBedrockEndpoint && + this.options.awsBedrockEndpointEnabled && { endpoint: this.options.awsBedrockEndpoint }), } if (this.options.awsUseProfile && this.options.awsProfile) { diff --git a/src/core/config/__tests__/importExport.test.ts b/src/core/config/__tests__/importExport.test.ts index 89ac7dfef6..0e96ecaae5 100644 --- a/src/core/config/__tests__/importExport.test.ts +++ b/src/core/config/__tests__/importExport.test.ts @@ -231,10 +231,8 @@ describe("importExport", () => { customModesManager: mockCustomModesManager, }) - expect(result).toEqual({ - success: false, - error: "Expected property name or '}' in JSON at position 2", - }) + expect(result.success).toBe(false) + expect(result.error).toMatch(/^Expected property name or '}' in JSON at position 2/) expect(fs.readFile).toHaveBeenCalledWith("/mock/path/settings.json", "utf-8") expect(mockProviderSettingsManager.import).not.toHaveBeenCalled() expect(mockContextProxy.setValues).not.toHaveBeenCalled() diff --git a/webview-ui/src/components/settings/providers/Bedrock.tsx b/webview-ui/src/components/settings/providers/Bedrock.tsx index eb4000dcac..eb8ca94258 100644 --- a/webview-ui/src/components/settings/providers/Bedrock.tsx +++ b/webview-ui/src/components/settings/providers/Bedrock.tsx @@ -1,4 +1,4 @@ -import { useCallback } from "react" +import { useCallback, useState, useEffect } from "react" import { Checkbox } from "vscrui" import { VSCodeTextField, VSCodeRadio, VSCodeRadioGroup } from "@vscode/webview-ui-toolkit/react" @@ -17,6 +17,12 @@ type BedrockProps = { export const Bedrock = ({ apiConfiguration, setApiConfigurationField, selectedModelInfo }: BedrockProps) => { const { t } = useAppTranslation() + const [awsEndpointSelected, setAwsEndpointSelected] = useState(!!apiConfiguration?.awsBedrockEndpointEnabled) + + // Update the endpoint enabled state when the configuration changes + useEffect(() => { + setAwsEndpointSelected(!!apiConfiguration?.awsBedrockEndpointEnabled) + }, [apiConfiguration?.awsBedrockEndpointEnabled]) const handleInputChange = useCallback( ( @@ -120,6 +126,31 @@ export const Bedrock = ({ apiConfiguration, setApiConfigurationField, selectedMo {t("settings:providers.cacheUsageNote")} + { + setAwsEndpointSelected(isChecked) + setApiConfigurationField("awsBedrockEndpointEnabled", isChecked) + }}> + {t("settings:providers.awsBedrockVpc.useCustomVpcEndpoint")} + + {awsEndpointSelected && ( + <> + +
+ {t("settings:providers.awsBedrockVpc.examples")} +
• https://vpce-xxx.bedrock.region.vpce.amazonaws.com/
+
• https://gateway.my-company.com/route/app/bedrock
+
+ + )} ) } diff --git a/webview-ui/src/components/settings/providers/__tests__/Bedrock.test.tsx b/webview-ui/src/components/settings/providers/__tests__/Bedrock.test.tsx new file mode 100644 index 0000000000..c1f177ac7b --- /dev/null +++ b/webview-ui/src/components/settings/providers/__tests__/Bedrock.test.tsx @@ -0,0 +1,420 @@ +import React from "react" +import { render, screen, fireEvent } from "@testing-library/react" +import { Bedrock } from "../Bedrock" +import { ProviderSettings } from "@roo-code/types" + +// Mock the vscrui Checkbox component +jest.mock("vscrui", () => ({ + Checkbox: ({ children, checked, onChange }: any) => ( + + ), +})) + +// Mock the VSCodeTextField component +jest.mock("@vscode/webview-ui-toolkit/react", () => ({ + VSCodeTextField: ({ + children, + value, + onInput, + placeholder, + className, + style, + "data-testid": dataTestId, + ...rest + }: any) => { + // For all text fields - apply data-testid directly to input if provided + return ( +
+ {children} + onInput && onInput(e)} + placeholder={placeholder} + data-testid={dataTestId} + {...rest} + /> +
+ ) + }, + VSCodeRadio: () =>
Radio
, + VSCodeRadioGroup: ({ children }: any) =>
{children}
, +})) + +// Mock the translation hook +jest.mock("@src/i18n/TranslationContext", () => ({ + useAppTranslation: () => ({ + t: (key: string) => key, + }), +})) + +// Mock the UI components +jest.mock("@src/components/ui", () => ({ + Select: ({ children }: any) =>
{children}
, + SelectContent: ({ children }: any) =>
{children}
, + SelectItem: () =>
Item
, + SelectTrigger: ({ children }: any) =>
{children}
, + SelectValue: () =>
Value
, +})) + +// Mock the constants +jest.mock("../../constants", () => ({ + AWS_REGIONS: [{ value: "us-east-1", label: "US East (N. Virginia)" }], +})) + +describe("Bedrock Component", () => { + const mockSetApiConfigurationField = jest.fn() + + beforeEach(() => { + jest.clearAllMocks() + }) + + it("should show text field when VPC endpoint checkbox is checked", () => { + // Initial render with checkbox unchecked + const apiConfiguration: Partial = { + awsBedrockEndpoint: "", + awsUseProfile: true, // Use profile to avoid rendering other text fields + } + + render( + , + ) + + // Text field should not be visible initially + expect(screen.queryByTestId("vpc-endpoint-input")).not.toBeInTheDocument() + + // Click the checkbox + fireEvent.click(screen.getByTestId("checkbox-input-settings:providers.awsbedrockvpc.usecustomvpcendpoint")) + + // Text field should now be visible + expect(screen.getByTestId("vpc-endpoint-input")).toBeInTheDocument() + }) + + it("should hide text field when VPC endpoint checkbox is unchecked", () => { + // Initial render with checkbox checked + const apiConfiguration: Partial = { + awsBedrockEndpoint: "https://example.com", + awsBedrockEndpointEnabled: true, // Need to explicitly set this to true + awsUseProfile: true, // Use profile to avoid rendering other text fields + } + + render( + , + ) + + // Text field should be visible initially + expect(screen.getByTestId("vpc-endpoint-input")).toBeInTheDocument() + + // Click the checkbox to uncheck it + fireEvent.click(screen.getByTestId("checkbox-input-settings:providers.awsbedrockvpc.usecustomvpcendpoint")) + + // Text field should now be hidden + expect(screen.queryByTestId("vpc-endpoint-input")).not.toBeInTheDocument() + + // Should call setApiConfigurationField to update the enabled flag + expect(mockSetApiConfigurationField).toHaveBeenCalledWith("awsBedrockEndpointEnabled", false) + }) + + // Test Scenario 1: Input Validation Test + describe("Input Validation", () => { + it("should accept valid URL formats", () => { + const apiConfiguration: Partial = { + awsBedrockEndpoint: "", + awsBedrockEndpointEnabled: true, + awsUseProfile: true, + } + + render( + , + ) + + // Find the input field + const inputField = screen.getByTestId("vpc-endpoint-input") + expect(inputField).toBeInTheDocument() + + // Test with a valid URL + fireEvent.change(inputField, { target: { value: "https://bedrock.us-east-1.amazonaws.com" } }) + + // Verify the configuration field was updated with the valid URL + expect(mockSetApiConfigurationField).toHaveBeenCalledWith( + "awsBedrockEndpoint", + "https://bedrock.us-east-1.amazonaws.com", + ) + }) + + it("should handle empty URL input", () => { + const apiConfiguration: Partial = { + awsBedrockEndpoint: "https://example.com", + awsBedrockEndpointEnabled: true, + awsUseProfile: true, + } + + render( + , + ) + + // Find the input field + const inputField = screen.getByTestId("vpc-endpoint-input") + + // Clear the field + fireEvent.change(inputField, { target: { value: "" } }) + + // Verify the configuration field was updated with empty string + expect(mockSetApiConfigurationField).toHaveBeenCalledWith("awsBedrockEndpoint", "") + }) + }) + + // Test Scenario 2: Edge Case Tests + describe("Edge Cases", () => { + it("should preserve endpoint URL when toggling checkbox multiple times", () => { + const apiConfiguration: Partial = { + awsBedrockEndpoint: "https://bedrock-vpc.example.com", + awsBedrockEndpointEnabled: true, + awsUseProfile: true, + } + + render( + , + ) + + // Initial state: checkbox checked, URL visible + expect(screen.getByTestId("vpc-endpoint-input")).toBeInTheDocument() + expect(screen.getByTestId("vpc-endpoint-input")).toHaveValue("https://bedrock-vpc.example.com") + + // Uncheck the checkbox + fireEvent.click(screen.getByTestId("checkbox-input-settings:providers.awsbedrockvpc.usecustomvpcendpoint")) + + // Verify endpoint enabled was set to false + expect(mockSetApiConfigurationField).toHaveBeenCalledWith("awsBedrockEndpointEnabled", false) + + // Check the checkbox again + fireEvent.click(screen.getByTestId("checkbox-input-settings:providers.awsbedrockvpc.usecustomvpcendpoint")) + + // Verify endpoint enabled was set to true + expect(mockSetApiConfigurationField).toHaveBeenCalledWith("awsBedrockEndpointEnabled", true) + + // Verify the URL field is visible again + expect(screen.getByTestId("vpc-endpoint-input")).toBeInTheDocument() + }) + + it("should handle very long endpoint URLs", () => { + const veryLongUrl = + "https://bedrock-vpc-endpoint-with-a-very-long-name-that-might-cause-issues-in-some-ui-components.region-1.amazonaws.com/api/v1/endpoint" + + const apiConfiguration: Partial = { + awsBedrockEndpoint: veryLongUrl, + awsBedrockEndpointEnabled: true, + awsUseProfile: true, + } + + render( + , + ) + + // Verify the long URL is displayed correctly + expect(screen.getByTestId("vpc-endpoint-input")).toHaveValue(veryLongUrl) + + // Change the URL to something else + fireEvent.change(screen.getByTestId("vpc-endpoint-input"), { + target: { value: "https://shorter-url.com" }, + }) + + // Verify the configuration was updated + expect(mockSetApiConfigurationField).toHaveBeenCalledWith("awsBedrockEndpoint", "https://shorter-url.com") + }) + }) + + // Test Scenario 3: UI Elements Tests + describe("UI Elements", () => { + it("should display example URLs when VPC endpoint checkbox is checked", () => { + const apiConfiguration: Partial = { + awsBedrockEndpoint: "https://example.com", + awsBedrockEndpointEnabled: true, + awsUseProfile: true, + } + + render( + , + ) + + // Check that the VPC endpoint input is visible + expect(screen.getByTestId("vpc-endpoint-input")).toBeInTheDocument() + + // Check for the example URLs section + // Since we don't have a specific testid for the examples section, + // we'll check for the text content + expect(screen.getByText("settings:providers.awsBedrockVpc.examples")).toBeInTheDocument() + expect(screen.getByText("• https://vpce-xxx.bedrock.region.vpce.amazonaws.com/")).toBeInTheDocument() + expect(screen.getByText("• https://gateway.my-company.com/route/app/bedrock")).toBeInTheDocument() + }) + + it("should hide example URLs when VPC endpoint checkbox is unchecked", () => { + const apiConfiguration: Partial = { + awsBedrockEndpoint: "https://example.com", + awsBedrockEndpointEnabled: true, + awsUseProfile: true, + } + + render( + , + ) + + // Initially the examples should be visible + expect(screen.getByText("settings:providers.awsBedrockVpc.examples")).toBeInTheDocument() + + // Uncheck the VPC endpoint checkbox + fireEvent.click(screen.getByTestId("checkbox-input-settings:providers.awsbedrockvpc.usecustomvpcendpoint")) + + // Now the examples should be hidden + expect(screen.queryByText("settings:providers.awsBedrockVpc.examples")).not.toBeInTheDocument() + expect(screen.queryByText("• https://vpce-xxx.bedrock.region.vpce.amazonaws.com/")).not.toBeInTheDocument() + expect(screen.queryByText("• https://gateway.my-company.com/route/app/bedrock")).not.toBeInTheDocument() + }) + }) + + // Test Scenario 4: Error Handling Tests + describe("Error Handling", () => { + it("should handle invalid endpoint URLs gracefully", () => { + const apiConfiguration: Partial = { + awsBedrockEndpoint: "", + awsBedrockEndpointEnabled: true, + awsUseProfile: true, + } + + render( + , + ) + + // Find the input field + const inputField = screen.getByTestId("vpc-endpoint-input") + + // Enter an invalid URL (missing protocol) + fireEvent.change(inputField, { target: { value: "invalid-url" } }) + + // The component should still update the configuration + // (URL validation would typically happen at a higher level or when used) + expect(mockSetApiConfigurationField).toHaveBeenCalledWith("awsBedrockEndpoint", "invalid-url") + }) + }) + + // Test Scenario 5: Persistence Tests + describe("Persistence", () => { + it("should initialize with the correct state from apiConfiguration", () => { + // Test with endpoint enabled + const apiConfigurationEnabled: Partial = { + awsBedrockEndpoint: "https://custom-endpoint.aws.com", + awsBedrockEndpointEnabled: true, + awsUseProfile: true, + } + + const { unmount } = render( + , + ) + + // Verify checkbox is checked and endpoint is visible + expect(screen.getByTestId("checkbox-input-settings:providers.awsbedrockvpc.usecustomvpcendpoint")).toBeChecked() + expect(screen.getByTestId("vpc-endpoint-input")).toBeInTheDocument() + expect(screen.getByTestId("vpc-endpoint-input")).toHaveValue("https://custom-endpoint.aws.com") + + unmount() + + // Test with endpoint disabled + const apiConfigurationDisabled: Partial = { + awsBedrockEndpoint: "https://custom-endpoint.aws.com", + awsBedrockEndpointEnabled: false, + awsUseProfile: true, + } + + render( + , + ) + + // Verify checkbox is unchecked and endpoint is not visible + expect(screen.getByTestId("checkbox-input-settings:providers.awsbedrockvpc.usecustomvpcendpoint")).not.toBeChecked() + expect(screen.queryByTestId("vpc-endpoint-input")).not.toBeInTheDocument() + }) + + it("should update state when apiConfiguration changes", () => { + // Initial render with endpoint disabled + const apiConfigurationInitial: Partial = { + awsBedrockEndpoint: "https://initial-endpoint.aws.com", + awsBedrockEndpointEnabled: false, + awsUseProfile: true, + } + + const { rerender } = render( + , + ) + + // Verify initial state + expect(screen.getByTestId("checkbox-input-settings:providers.awsbedrockvpc.usecustomvpcendpoint")).not.toBeChecked() + expect(screen.queryByTestId("vpc-endpoint-input")).not.toBeInTheDocument() + + // Update with new configuration + const apiConfigurationUpdated: Partial = { + awsBedrockEndpoint: "https://updated-endpoint.aws.com", + awsBedrockEndpointEnabled: true, + awsUseProfile: true, + } + + rerender( + , + ) + + // Verify updated state + expect(screen.getByTestId("checkbox-input-settings:providers.awsbedrockvpc.usecustomvpcendpoint")).toBeChecked() + expect(screen.getByTestId("vpc-endpoint-input")).toBeInTheDocument() + expect(screen.getByTestId("vpc-endpoint-input")).toHaveValue("https://updated-endpoint.aws.com") + }) + }) +}) diff --git a/webview-ui/src/i18n/locales/ca/settings.json b/webview-ui/src/i18n/locales/ca/settings.json index 2f50fb2453..e2a9bdc022 100644 --- a/webview-ui/src/i18n/locales/ca/settings.json +++ b/webview-ui/src/i18n/locales/ca/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "Token de sessió d'AWS", "awsRegion": "Regió d'AWS", "awsCrossRegion": "Utilitzar inferència entre regions", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Utilitzar punt final VPC personalitzat", + "vpcEndpointUrlPlaceholder": "Introduïu l'URL del punt final VPC (opcional)", + "examples": "Exemples:" + }, "enablePromptCaching": "Habilitar emmagatzematge en caché de prompts", "enablePromptCachingTitle": "Habilitar l'emmagatzematge en caché de prompts per millorar el rendiment i reduir els costos per als models compatibles.", "cacheUsageNote": "Nota: Si no veieu l'ús de la caché, proveu de seleccionar un model diferent i després tornar a seleccionar el model desitjat.", diff --git a/webview-ui/src/i18n/locales/de/settings.json b/webview-ui/src/i18n/locales/de/settings.json index 9a7be581d8..929d6d529c 100644 --- a/webview-ui/src/i18n/locales/de/settings.json +++ b/webview-ui/src/i18n/locales/de/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "AWS Sitzungstoken", "awsRegion": "AWS Region", "awsCrossRegion": "Regionsübergreifende Inferenz verwenden", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Benutzerdefinierten VPC-Endpunkt verwenden", + "vpcEndpointUrlPlaceholder": "VPC-Endpunkt-URL eingeben (optional)", + "examples": "Beispiele:" + }, "enablePromptCaching": "Prompt-Caching aktivieren", "enablePromptCachingTitle": "Prompt-Caching aktivieren, um die Leistung zu verbessern und Kosten für unterstützte Modelle zu reduzieren.", "cacheUsageNote": "Hinweis: Wenn Sie keine Cache-Nutzung sehen, versuchen Sie ein anderes Modell auszuwählen und dann Ihr gewünschtes Modell erneut auszuwählen.", diff --git a/webview-ui/src/i18n/locales/en/settings.json b/webview-ui/src/i18n/locales/en/settings.json index 26a6025491..a9df145884 100644 --- a/webview-ui/src/i18n/locales/en/settings.json +++ b/webview-ui/src/i18n/locales/en/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "AWS Session Token", "awsRegion": "AWS Region", "awsCrossRegion": "Use cross-region inference", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Use custom VPC endpoint", + "vpcEndpointUrlPlaceholder": "Enter VPC Endpoint URL (optional)", + "examples": "Examples:" + }, "enablePromptCaching": "Enable prompt caching", "enablePromptCachingTitle": "Enable prompt caching to improve performance and reduce costs for supported models.", "cacheUsageNote": "Note: If you don't see cache usage, try selecting a different model and then selecting your desired model again.", diff --git a/webview-ui/src/i18n/locales/es/settings.json b/webview-ui/src/i18n/locales/es/settings.json index 940ca2360b..992c5a5d8e 100644 --- a/webview-ui/src/i18n/locales/es/settings.json +++ b/webview-ui/src/i18n/locales/es/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "Token de sesión de AWS", "awsRegion": "Región de AWS", "awsCrossRegion": "Usar inferencia entre regiones", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Usar punto de conexión VPC personalizado", + "vpcEndpointUrlPlaceholder": "Ingrese URL del punto de conexión VPC (opcional)", + "examples": "Ejemplos:" + }, "enablePromptCaching": "Habilitar caché de prompts", "enablePromptCachingTitle": "Habilitar el caché de prompts para mejorar el rendimiento y reducir costos para modelos compatibles.", "cacheUsageNote": "Nota: Si no ve el uso del caché, intente seleccionar un modelo diferente y luego seleccionar nuevamente su modelo deseado.", diff --git a/webview-ui/src/i18n/locales/fr/settings.json b/webview-ui/src/i18n/locales/fr/settings.json index 0a277e2719..08119d4dd3 100644 --- a/webview-ui/src/i18n/locales/fr/settings.json +++ b/webview-ui/src/i18n/locales/fr/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "Jeton de session AWS", "awsRegion": "Région AWS", "awsCrossRegion": "Utiliser l'inférence inter-régions", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Utiliser un point de terminaison VPC personnalisé", + "vpcEndpointUrlPlaceholder": "Entrer l'URL du point de terminaison VPC (optionnel)", + "examples": "Exemples :" + }, "enablePromptCaching": "Activer la mise en cache des prompts", "enablePromptCachingTitle": "Activer la mise en cache des prompts pour améliorer les performances et réduire les coûts pour les modèles pris en charge.", "cacheUsageNote": "Remarque : Si vous ne voyez pas l'utilisation du cache, essayez de sélectionner un modèle différent puis de sélectionner à nouveau votre modèle souhaité.", diff --git a/webview-ui/src/i18n/locales/hi/settings.json b/webview-ui/src/i18n/locales/hi/settings.json index 1a17b04bb4..d42244ce54 100644 --- a/webview-ui/src/i18n/locales/hi/settings.json +++ b/webview-ui/src/i18n/locales/hi/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "AWS सत्र टोकन", "awsRegion": "AWS क्षेत्र", "awsCrossRegion": "क्रॉस-क्षेत्र अनुमान का उपयोग करें", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "कस्टम VPC एंडपॉइंट का उपयोग करें", + "vpcEndpointUrlPlaceholder": "VPC एंडपॉइंट URL दर्ज करें (वैकल्पिक)", + "examples": "उदाहरण:" + }, "enablePromptCaching": "प्रॉम्प्ट कैशिंग सक्षम करें", "enablePromptCachingTitle": "समर्थित मॉडल के लिए प्रदर्शन में सुधार और लागत को कम करने के लिए प्रॉम्प्ट कैशिंग सक्षम करें।", "cacheUsageNote": "नोट: यदि आप कैश उपयोग नहीं देखते हैं, तो एक अलग मॉडल चुनने का प्रयास करें और फिर अपने वांछित मॉडल को पुनः चुनें।", diff --git a/webview-ui/src/i18n/locales/it/settings.json b/webview-ui/src/i18n/locales/it/settings.json index 14d54706af..9a80775ed2 100644 --- a/webview-ui/src/i18n/locales/it/settings.json +++ b/webview-ui/src/i18n/locales/it/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "Token di sessione AWS", "awsRegion": "Regione AWS", "awsCrossRegion": "Usa inferenza cross-regione", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Usa endpoint VPC personalizzato", + "vpcEndpointUrlPlaceholder": "Inserisci URL endpoint VPC (opzionale)", + "examples": "Esempi:" + }, "enablePromptCaching": "Abilita cache dei prompt", "enablePromptCachingTitle": "Abilita la cache dei prompt per migliorare le prestazioni e ridurre i costi per i modelli supportati.", "cacheUsageNote": "Nota: Se non vedi l'utilizzo della cache, prova a selezionare un modello diverso e poi seleziona nuovamente il modello desiderato.", diff --git a/webview-ui/src/i18n/locales/ja/settings.json b/webview-ui/src/i18n/locales/ja/settings.json index d2b72f821f..d28aced9e5 100644 --- a/webview-ui/src/i18n/locales/ja/settings.json +++ b/webview-ui/src/i18n/locales/ja/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "AWSセッショントークン", "awsRegion": "AWSリージョン", "awsCrossRegion": "クロスリージョン推論を使用", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "カスタムVPCエンドポイントを使用", + "vpcEndpointUrlPlaceholder": "VPCエンドポイントURLを入力(任意)", + "examples": "例:" + }, "enablePromptCaching": "プロンプトキャッシュを有効化", "enablePromptCachingTitle": "サポートされているモデルのパフォーマンスを向上させ、コストを削減するためにプロンプトキャッシュを有効化します。", "cacheUsageNote": "注意:キャッシュの使用が表示されない場合は、別のモデルを選択してから希望のモデルを再度選択してみてください。", diff --git a/webview-ui/src/i18n/locales/ko/settings.json b/webview-ui/src/i18n/locales/ko/settings.json index f3eebcca0f..750cdad3f9 100644 --- a/webview-ui/src/i18n/locales/ko/settings.json +++ b/webview-ui/src/i18n/locales/ko/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "AWS 세션 토큰", "awsRegion": "AWS 리전", "awsCrossRegion": "교차 리전 추론 사용", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "사용자 지정 VPC 엔드포인트 사용", + "vpcEndpointUrlPlaceholder": "VPC 엔드포인트 URL 입력 (선택사항)", + "examples": "예시:" + }, "enablePromptCaching": "프롬프트 캐시 활성화", "enablePromptCachingTitle": "지원되는 모델의 성능을 향상시키고 비용을 절감하기 위해 프롬프트 캐시를 활성화합니다.", "cacheUsageNote": "참고: 캐시 사용이 표시되지 않는 경우, 다른 모델을 선택한 다음 원하는 모델을 다시 선택해 보세요.", diff --git a/webview-ui/src/i18n/locales/nl/settings.json b/webview-ui/src/i18n/locales/nl/settings.json index ed2d18fa5a..df4491e49d 100644 --- a/webview-ui/src/i18n/locales/nl/settings.json +++ b/webview-ui/src/i18n/locales/nl/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "AWS-sessietoken", "awsRegion": "AWS-regio", "awsCrossRegion": "Gebruik cross-region inference", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Aangepast VPC-eindpunt gebruiken", + "vpcEndpointUrlPlaceholder": "Voer VPC-eindpunt URL in (optioneel)", + "examples": "Voorbeelden:" + }, "enablePromptCaching": "Prompt caching inschakelen", "enablePromptCachingTitle": "Schakel prompt caching in om de prestaties te verbeteren en de kosten te verlagen voor ondersteunde modellen.", "cacheUsageNote": "Let op: als je geen cachegebruik ziet, probeer dan een ander model te selecteren en vervolgens weer je gewenste model.", diff --git a/webview-ui/src/i18n/locales/pl/settings.json b/webview-ui/src/i18n/locales/pl/settings.json index f28ffe3a33..860756b46c 100644 --- a/webview-ui/src/i18n/locales/pl/settings.json +++ b/webview-ui/src/i18n/locales/pl/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "Token sesji AWS", "awsRegion": "Region AWS", "awsCrossRegion": "Użyj wnioskowania międzyregionalnego", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Użyj niestandardowego punktu końcowego VPC", + "vpcEndpointUrlPlaceholder": "Wprowadź URL punktu końcowego VPC (opcjonalnie)", + "examples": "Przykłady:" + }, "enablePromptCaching": "Włącz buforowanie podpowiedzi", "enablePromptCachingTitle": "Włącz buforowanie podpowiedzi, aby poprawić wydajność i zmniejszyć koszty dla obsługiwanych modeli.", "cacheUsageNote": "Uwaga: Jeśli nie widzisz użycia bufora, spróbuj wybrać inny model, a następnie ponownie wybrać żądany model.", diff --git a/webview-ui/src/i18n/locales/pt-BR/settings.json b/webview-ui/src/i18n/locales/pt-BR/settings.json index a03b567d25..22c2768506 100644 --- a/webview-ui/src/i18n/locales/pt-BR/settings.json +++ b/webview-ui/src/i18n/locales/pt-BR/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "Token de Sessão AWS", "awsRegion": "Região AWS", "awsCrossRegion": "Usar inferência entre regiões", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Usar endpoint VPC personalizado", + "vpcEndpointUrlPlaceholder": "Digite a URL do endpoint VPC (opcional)", + "examples": "Exemplos:" + }, "enablePromptCaching": "Ativar cache de prompts", "enablePromptCachingTitle": "Ativar cache de prompts para melhorar o desempenho e reduzir custos para modelos suportados.", "cacheUsageNote": "Nota: Se você não vir o uso do cache, tente selecionar um modelo diferente e depois selecionar novamente o modelo desejado.", diff --git a/webview-ui/src/i18n/locales/ru/settings.json b/webview-ui/src/i18n/locales/ru/settings.json index a3caf6f36f..0c6db3ab82 100644 --- a/webview-ui/src/i18n/locales/ru/settings.json +++ b/webview-ui/src/i18n/locales/ru/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "AWS Session Token", "awsRegion": "Регион AWS", "awsCrossRegion": "Использовать кросс-региональный вывод", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Использовать пользовательскую конечную точку VPC", + "vpcEndpointUrlPlaceholder": "Введите URL конечной точки VPC (опционально)", + "examples": "Примеры:" + }, "enablePromptCaching": "Включить кэширование подсказок", "enablePromptCachingTitle": "Включить кэширование подсказок для повышения производительности и снижения затрат для поддерживаемых моделей.", "cacheUsageNote": "Примечание: если вы не видите использование кэша, попробуйте выбрать другую модель, а затем вернуться к нужной.", diff --git a/webview-ui/src/i18n/locales/tr/settings.json b/webview-ui/src/i18n/locales/tr/settings.json index d6d4279580..9d912ed645 100644 --- a/webview-ui/src/i18n/locales/tr/settings.json +++ b/webview-ui/src/i18n/locales/tr/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "AWS Oturum Belirteci", "awsRegion": "AWS Bölgesi", "awsCrossRegion": "Bölgeler arası çıkarım kullan", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Özel VPC uç noktası kullan", + "vpcEndpointUrlPlaceholder": "VPC uç noktası URL'sini girin (isteğe bağlı)", + "examples": "Örnekler:" + }, "enablePromptCaching": "İstem önbelleğini etkinleştir", "enablePromptCachingTitle": "Desteklenen modeller için performansı artırmak ve maliyetleri azaltmak için istem önbelleğini etkinleştir.", "cacheUsageNote": "Not: Önbellek kullanımını görmüyorsanız, farklı bir model seçip ardından istediğiniz modeli tekrar seçmeyi deneyin.", diff --git a/webview-ui/src/i18n/locales/vi/settings.json b/webview-ui/src/i18n/locales/vi/settings.json index befec2559c..e7284ab3fc 100644 --- a/webview-ui/src/i18n/locales/vi/settings.json +++ b/webview-ui/src/i18n/locales/vi/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "Token phiên AWS", "awsRegion": "Vùng AWS", "awsCrossRegion": "Sử dụng suy luận liên vùng", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "Sử dụng điểm cuối VPC tùy chỉnh", + "vpcEndpointUrlPlaceholder": "Nhập URL điểm cuối VPC (tùy chọn)", + "examples": "Ví dụ:" + }, "enablePromptCaching": "Bật bộ nhớ đệm lời nhắc", "enablePromptCachingTitle": "Bật bộ nhớ đệm lời nhắc để cải thiện hiệu suất và giảm chi phí cho các mô hình được hỗ trợ.", "cacheUsageNote": "Lưu ý: Nếu bạn không thấy việc sử dụng bộ nhớ đệm, hãy thử chọn một mô hình khác và sau đó chọn lại mô hình mong muốn của bạn.", diff --git a/webview-ui/src/i18n/locales/zh-CN/settings.json b/webview-ui/src/i18n/locales/zh-CN/settings.json index 0f35dec4c4..f8b8008a8a 100644 --- a/webview-ui/src/i18n/locales/zh-CN/settings.json +++ b/webview-ui/src/i18n/locales/zh-CN/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "AWS 会话Token", "awsRegion": "AWS 区域", "awsCrossRegion": "使用跨区域推理", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "使用自定义 VPC 端点", + "vpcEndpointUrlPlaceholder": "输入 VPC 端点 URL(可选)", + "examples": "示例:" + }, "enablePromptCaching": "启用提示缓存", "enablePromptCachingTitle": "开启提示缓存可提升性能并节省成本", "cacheUsageNote": "提示:若未显示缓存使用情况,请切换模型后重新选择", diff --git a/webview-ui/src/i18n/locales/zh-TW/settings.json b/webview-ui/src/i18n/locales/zh-TW/settings.json index 6731320b5b..1a4df2d06c 100644 --- a/webview-ui/src/i18n/locales/zh-TW/settings.json +++ b/webview-ui/src/i18n/locales/zh-TW/settings.json @@ -189,6 +189,11 @@ "awsSessionToken": "AWS 工作階段權杖", "awsRegion": "AWS 區域", "awsCrossRegion": "使用跨區域推論", + "awsBedrockVpc": { + "useCustomVpcEndpoint": "使用自訂 VPC 端點", + "vpcEndpointUrlPlaceholder": "輸入 VPC 端點 URL(選填)", + "examples": "範例:" + }, "enablePromptCaching": "啟用提示快取", "enablePromptCachingTitle": "啟用提示快取以提升支援的模型效能並降低成本。", "cacheUsageNote": "注意:如果您沒有看到快取使用情況,請嘗試選擇其他模型,然後重新選擇您想要的模型。",