Skip to content

fix(storage)!: make upload and vector options keyword-only - #2199

Merged
spydon merged 3 commits into
mainfrom
lukasklingsbo/sdk-3377-storage-make-upload-options-keyword
Dec 4, 2026
Merged

spydon merged 3 commits into
mainfrom
lukasklingsbo/sdk-3377-storage-make-upload-options-keyword

Conversation

@spydon

@spydon spydon commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Positional options could swap silently: upload(path, file, "image/png") sent Cache-Control: image/png.

  • upload, update and upload_to_signed_url take their options keyword-only, like resumable_upload.
  • Vector list_buckets, list_indexes, list and the query options after topK are keyword-only too. list_buckets and list_indexes took the same options in opposite orders.
  • MIGRATION.md covers the change.

SDK-3377

@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Summary

Summary by CodeRabbit

  • API Changes

    • Optional settings for storage uploads and updates must now be passed by keyword.
    • Optional settings for vector bucket and index listing, and vector queries, must now be passed by keyword. Query vectors and result limits can still be positional.
    • Update existing calls that pass these settings positionally to use named arguments.
  • Documentation

    • Added migration guidance with examples of the updated calls.

Storage upload options and optional parameters for vector listing and query methods are now keyword-only. The query_vector and topK parameters remain positional-capable. The migration guide shows updated calls, and tests check that positional option arguments raise TypeError.

Possibly related PRs

  • supabase/supabase-py#1997: This PR also changes the public upload() and update() parameter contracts in the v3 Storage API.

Change: Bug fix

Merge Risk: Minimal · up to 5339c

This breaking change makes storage upload options and vector list and query options keyword-only. Callers that pass those options positionally will get a TypeError, and the migration guide documents the replacements. No merge-blocking risk remains.

- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: cbf1997f-02b5-4b80-bb92-938217a648fa
Commits

Reviewing files that changed from the base of the PR and between 69db287 and 5339c1f.

Files selected for processing: 5

  • MIGRATION.md
  • src/storage/src/storage3/file_api.py
  • src/storage/src/storage3/vectors.py
  • src/storage/tests/test_file_api.py
  • src/storage/tests/test_vector_index.py

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 0 remain after this review.

@spydon spydon changed the title fix(storage)!: make upload and vector listing options keyword-only fix(storage)!: make upload and vector options keyword-only Dec 4, 2026
@spydon
spydon merged commit 5a72704 into main Dec 4, 2026
30 checks passed
@spydon
spydon deleted the lukasklingsbo/sdk-3377-storage-make-upload-options-keyword branch December 4, 2026 14:20
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.

1 participant