feat(storage): add vector buckets support#1585
Merged
Merged
Conversation
Implement the Storage Vectors subsystem, reachable through supabase.storage.vectors. Adds vector bucket management, index management scoped via .from(bucket), and vector data operations (put, get, list, query, delete, parallel scan) scoped via .index(name). Closes all 14 storage.vector_buckets.* capabilities in the compliance matrix.
…es from name The Storage Vectors API is a public alpha, so annotate every public vector type and the storage.vectors entry point with @experimental. Drop the enum value fields in favour of a value getter derived from name, so DistanceMetric.dotProduct still serializes to 'dotproduct'.
The server returns creationTime as a unix timestamp in seconds; parse it into a UTC DateTime for VectorBucket and VectorIndex.
Exercise the vector bucket, index and data operations against a real Supabase stack. Enable [storage.vector] in the local config and bump the pinned Supabase CLI to 2.109.1, whose storage-api image (v1.62.5) serves the vector routes over the local pgvector backend. Also return null for empty success bodies in the storage fetch, since the vector mutation endpoints respond with an empty body.
Tr00d
approved these changes
Jul 13, 2026
Make the vector client constructors const, drop inferrable type arguments in vector metadata parsing and a pre-existing gotrue scopes cast, and rename shadowing closure parameters in the vector integration tests.
Replace the top-level _vectorDataTypeFromValue/_distanceMetricFromValue helpers with static VectorDataType.fromValue/DistanceMetric.fromValue methods on the enums themselves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements the Storage Vector Buckets subsystem in
storage_client, closing all 14storage.vector_buckets.*gaps in the compliance matrix.Reachable through
supabase.storage.vectors, mirroring the supabase-jsStorageVectorsClientstructure while staying idiomatic to the Dart storage client (operations return parsed data directly and throwStorageExceptionon failure instead of a{data, error}envelope).Capabilities
Bucket & index management (
SupabaseVectorsClient,StorageVectorBucketApi):.from(name)and to an index via.index(name)Vector data operations (
StorageVectorIndexApi):listVectors'segmentCount/segmentIndexIdiomatic Dart choices
dataTypeanddistanceMetricare enums (VectorDataType,DistanceMetric), parsed leniently (unknown values decode tonullfor forward compatibility).metadataConfigurationis flattened to anonFilterableMetadataKeysparameter.ArgumentError.Tests
Compliance matrix
storage.vector_buckets.*features set toimplementedwith every new public symbol registered. The symbol check and compliance-file validator both pass locally.Closes SDK-1307.