diff --git a/apps/web/src/components/organizations/byok/BYOKKeysManager.tsx b/apps/web/src/components/organizations/byok/BYOKKeysManager.tsx
index ed96468d5a..a2b417c6a5 100644
--- a/apps/web/src/components/organizations/byok/BYOKKeysManager.tsx
+++ b/apps/web/src/components/organizations/byok/BYOKKeysManager.tsx
@@ -43,7 +43,7 @@ import {
DirectUserByokInferenceProviderIdSchema,
UserByokProviderIdSchema,
VercelUserByokInferenceProviderIdSchema,
- AwsCredentialsSchema,
+ BedrockCredentialsSchema,
VertexCredentialsSchema,
type VercelUserByokInferenceProviderId,
} from '@/lib/ai-gateway/providers/openrouter/inference-provider-id';
@@ -280,7 +280,7 @@ export function BYOKKeysManager({ organizationId }: BYOKKeysManagerProps) {
if (!value) return null;
const schema =
providerId === VercelUserByokInferenceProviderIdSchema.enum.bedrock
- ? AwsCredentialsSchema
+ ? BedrockCredentialsSchema
: providerId === VercelUserByokInferenceProviderIdSchema.enum.vertex
? VertexCredentialsSchema
: null;
@@ -293,11 +293,10 @@ export function BYOKKeysManager({ organizationId }: BYOKKeysManagerProps) {
}
const result = schema.safeParse(parsed);
if (!result.success) {
- const providerName =
- providerId === VercelUserByokInferenceProviderIdSchema.enum.bedrock
- ? 'AWS'
- : 'Google Vertex';
- return `Invalid ${providerName} credentials:\n${z.prettifyError(result.error)}`;
+ if (providerId === VercelUserByokInferenceProviderIdSchema.enum.bedrock) {
+ return 'Enter JSON with apiKey and region, or accessKeyId, secretAccessKey, and region. Use only one authentication method.';
+ }
+ return `Invalid Google Vertex credentials:\n${z.prettifyError(result.error)}`;
}
return null;
};
@@ -581,7 +580,7 @@ export function BYOKKeysManager({ organizationId }: BYOKKeysManagerProps) {