diff --git a/ui/litellm-dashboard/src/components/vector_store_management/CreateVectorStore.tsx b/ui/litellm-dashboard/src/components/vector_store_management/CreateVectorStore.tsx index ffacb2fa42d..97162aa132d 100644 --- a/ui/litellm-dashboard/src/components/vector_store_management/CreateVectorStore.tsx +++ b/ui/litellm-dashboard/src/components/vector_store_management/CreateVectorStore.tsx @@ -105,6 +105,18 @@ const CreateVectorStore: React.FC = ({ accessToken, onSu } } + // S3 Vectors specific validation + if (selectedProvider === "s3_vectors") { + if (providerParams.vector_bucket_name && providerParams.vector_bucket_name.length < 3) { + message.warning("Vector bucket name must be at least 3 characters"); + return; + } + if (providerParams.index_name && providerParams.index_name.length > 0 && providerParams.index_name.length < 3) { + message.warning("Index name must be at least 3 characters if provided"); + return; + } + } + if (!accessToken) { message.error("No access token available"); return; diff --git a/ui/litellm-dashboard/src/components/vector_store_management/S3VectorsConfig.tsx b/ui/litellm-dashboard/src/components/vector_store_management/S3VectorsConfig.tsx index 48685596211..e54d3a163c0 100644 --- a/ui/litellm-dashboard/src/components/vector_store_management/S3VectorsConfig.tsx +++ b/ui/litellm-dashboard/src/components/vector_store_management/S3VectorsConfig.tsx @@ -79,17 +79,27 @@ const S3VectorsConfig: React.FC = ({ label={ Vector Bucket Name{" "} - + } required + validateStatus={ + providerParams.vector_bucket_name && providerParams.vector_bucket_name.length < 3 + ? "error" + : undefined + } + help={ + providerParams.vector_bucket_name && providerParams.vector_bucket_name.length < 3 + ? "Bucket name must be at least 3 characters" + : undefined + } > handleFieldChange("vector_bucket_name", e.target.value)} - placeholder="my-vector-bucket" + placeholder="my-vector-bucket (min 3 chars)" size="large" className="rounded-md" /> @@ -100,16 +110,26 @@ const S3VectorsConfig: React.FC = ({ label={ Index Name{" "} - + } + validateStatus={ + providerParams.index_name && providerParams.index_name.length > 0 && providerParams.index_name.length < 3 + ? "error" + : undefined + } + help={ + providerParams.index_name && providerParams.index_name.length > 0 && providerParams.index_name.length < 3 + ? "Index name must be at least 3 characters if provided" + : undefined + } > handleFieldChange("index_name", e.target.value)} - placeholder="my-vector-index" + placeholder="my-vector-index (optional, min 3 chars)" size="large" className="rounded-md" />