fix(s3_vectors): list() wraps results in an extra list, breaking callers#5333
Open
devteamaegis wants to merge 1 commit into
Open
fix(s3_vectors): list() wraps results in an extra list, breaking callers#5333devteamaegis wants to merge 1 commit into
devteamaegis wants to merge 1 commit into
Conversation
biswajeetdev
reviewed
Jun 2, 2026
biswajeetdev
left a comment
There was a problem hiding this comment.
One-line fix, clearly correct. _parse_output returns a list, so wrapping it in [...] was producing a list-of-a-list — callers iterating over the result of list() would get a single element (the inner list) rather than the individual vectors.
Two small follow-up suggestions:
-
Test coverage — this is a silent data shape bug that is easy to reintroduce. A unit test asserting that
list()returns a flat list of vector objects (not a nested list) would lock in the fix. -
Parallel issue in other stores — worth a quick grep across the other vector store implementations (
pinecone.py,chroma.py, etc.) to check if any have the same[self._parse_output(...)]pattern in theirlist()methods.
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's broken
S3VectorStore.list()returnsList[List[OutputData]]instead ofList[OutputData]:Any caller that iterates over the result gets a single inner list as the first element, not the actual records.
Why it happens
The return statement wraps
_parse_output()in an extra list literal:Every other vector store returns the list directly:
Fix
Remove the outer
[...].