Skip to content

fix(storage): accept primitive arrays in vector metadata - #1697

Closed
hsusul wants to merge 1 commit into
supabase:mainfrom
hsusul:fix/storage-vector-metadata-arrays
Closed

hsusul wants to merge 1 commit into
supabase:mainfrom
hsusul:fix/storage-vector-metadata-arrays

Conversation

@hsusul

@hsusul hsusul commented Oct 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #1696

Allow primitive arrays in VectorObject.metadata, matching the Storage PutVectors schema and the documented product-tag use case. Existing scalar validation is unchanged. Integer array elements remain integers, and nested objects/arrays and null array elements are not newly accepted.

The change is confined to the shared Storage model, so it fixes synchronous and asynchronous callers without duplicating implementation changes. The regression exercises both public clients through MockTransport and checks the JSON actually sent to PutVectors.

Validation

From src/storage, on Python 3.13.5:

  • uv run --package storage3 pytest -q tests/test_vector_metadata.py --tb=line: 2 failed on unchanged upstream; 2 passed with the fix.
  • uv run --package storage3 pytest -q tests/test_client.py tests/test_exceptions.py tests/test_utils.py tests/test_vector_metadata.py tests/_async/test_bucket.py tests/_sync/test_bucket.py: 68 passed.
  • make mypy: passed, 34 source files.
  • make tests: mypy passed, but integration startup failed with LegacyHealthCheckTimeoutError: supabase_storage_storage-py was unhealthy. Integration pytest did not start. The CLI stopped the containers it created; unrelated containers were untouched.

From the repository root:

  • uv run --package storage3 ruff check src/storage: passed.
  • uv run --package storage3 ruff format --check src/storage: passed.
  • uv build --package storage3: passed.
  • git diff --check: passed.

No other package, dependency, generated sync/async source, or documentation is changed. This restores an already documented input format.

@olirice @silentworks, please review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

storage3 VectorObject rejects supported array metadata

1 participant