Skip to content

fix(vector-stores): filter S3 vector list results#5018

Open
haosenwang1018 wants to merge 1 commit intomem0ai:mainfrom
haosenwang1018:fix/s3-vectors-list-filters
Open

fix(vector-stores): filter S3 vector list results#5018
haosenwang1018 wants to merge 1 commit intomem0ai:mainfrom
haosenwang1018:fix/s3-vectors-list-filters

Conversation

@haosenwang1018
Copy link
Copy Markdown

What changed

  • Apply metadata filters client-side for S3 Vectors list() results.
  • Keep pagination intact, then apply top_k after filtering so matching rows are not pre-truncated.
  • Add a regression test for metadata filtering.

S3 Vectors list_vectors does not support server-side metadata filtering, so this preserves the existing API contract without changing the AWS request shape.

Fixes #3887.

Testing

  • uv run --with pytest --with pytest-mock --with ruff --with boto3 python -m pytest tests/vector_stores/test_s3_vectors.py -q
  • uv run --with ruff ruff check mem0/vector_stores/s3_vectors.py tests/vector_stores/test_s3_vectors.py

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.

get_all method does not filter when using S3 Vectors

1 participant