fix: mask Bedrock API Key as secret and support GovCloud regions

- Add isSecret: true to BEDROCK_API_KEY template value
- Update region regex to support multi-segment regions (us-gov-west-1)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-02-16 05:48:03 +00:00
committed by Jason
parent c303cc8acf
commit 158a679b8b
2 changed files with 2 additions and 1 deletions
@@ -543,7 +543,7 @@ export function ProviderForm({
if (appId === "claude" && category === "cloud_provider") {
// 验证 Region 格式
const regionValue = templateValues.AWS_REGION?.editorValue?.trim() || "";
const regionPattern = /^[a-z]{2}-[a-z]+-\d+$/;
const regionPattern = /^[a-z]{2}(-[a-z]+)+-\d+$/;
if (!regionPattern.test(regionValue)) {
toast.error(
t("providerForm.invalidRegion", {
+1
View File
@@ -565,6 +565,7 @@ export const providerPresets: ProviderPreset[] = [
placeholder: "your-bedrock-api-key",
editorValue: "",
optional: true,
isSecret: true,
},
AWS_ACCESS_KEY_ID: {
label: "Access Key ID",