Expand description
Unified validation helpers.
Centralizes dimension range checks, collection name validation, and mismatch validation used across collection creation, CRUD, and search paths.
Constants§
- MAX_
COLLECTION_ NAME_ LENGTH - Maximum allowed length for a collection name.
- MAX_
DIMENSION - Maximum valid vector dimension (65,536 — covers all known embedding models).
- MIN_
DIMENSION - Minimum valid vector dimension.
Functions§
- validate_
collection_ name - Validates that a collection name is safe for use as a filesystem directory.
- validate_
dimension - Validates that a vector dimension is within the allowed range.
- validate_
dimension_ match - Validates that a vector’s actual dimension matches the expected dimension.