-
Notifications
You must be signed in to change notification settings - Fork 233
Description
Description
The VectorStoreFile.PollStatus method is calling the underlying Get method with parameters in the wrong order, causing API requests to fail with 400 Bad Request errors.
Current Behavior
When calling PollStatus, the internal Get call uses swapped parameters (fileID, vectorStoreID instead of vectorStoreID, fileID), which generates an incorrect URL path like /vector_stores/{fileID}/files/{vectorStoreID} instead of the correct /vector_stores/{vectorStoreID}/files/{fileID}.
Expected Behavior
The Get method should be called with parameters in the correct order to generate the proper API endpoint path.
Steps to Reproduce
- Call
VectorStoreFile.PollStatuswith a valid vector store ID and file ID - The method will fail with a 400 Bad Request error due to the malformed URL path
Impact
Any code using PollStatus(NewAndPoll and UploadAndPoll) will fail, as these methods cannot successfully poll the file status.
Fix
Swap the parameter order in the Get call within PollStatus from r.Get(ctx, fileID, vectorStoreID, opts...) to r.Get(ctx, vectorStoreID, fileID, opts...) as proposed in #537 that also includes a unit test