You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CloudBackend.add_document polled tree_resp["retrieval_ready"] as the ready signal, but empirically that flag isn't reliable — docs can reach status == "completed" without retrieval_ready flipping, causing col.add() to wait out the full 10 min timeout on otherwise-successful uploads.
Switch the poll to check status == "completed", which is the cloud API's canonical ready signal.
Test plan
Upload a PDF via col.add() in cloud mode and confirm it returns within the actual indexing time (~30s for a 4-page PDF) instead of timing out.
Verify downstream calls (get_document, get_page_content) work immediately after col.add() returns.
The cloud backend previously polled tree_resp["retrieval_ready"]
as the ready signal. Empirically this flag is not a reliable
indicator — docs can reach status=="completed" without
retrieval_ready flipping, causing col.add() to wait until the 10
min timeout before giving up on otherwise-successful uploads.
The cloud API's canonical ready signal is status=="completed";
switch the poll to check that instead.
The reason will be displayed to describe this comment to others. Learn more.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Picks up the cloud add_document poll fix from VectifyAI/PageIndex#226,
which switches the readiness signal from retrieval_ready to
status == "completed".
Picks up the cloud add_document poll fix from VectifyAI/PageIndex#226,
which switches the readiness signal from retrieval_ready to
status == "completed".
The cloud backend previously polled tree_resp["retrieval_ready"]
as the ready signal. Empirically this flag is not a reliable
indicator — docs can reach status=="completed" without
retrieval_ready flipping, causing col.add() to wait until the 10
min timeout before giving up on otherwise-successful uploads.
The cloud API's canonical ready signal is status=="completed";
switch the poll to check that instead.
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
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.
Summary
CloudBackend.add_documentpolledtree_resp["retrieval_ready"]as the ready signal, but empirically that flag isn't reliable — docs can reachstatus == "completed"withoutretrieval_readyflipping, causingcol.add()to wait out the full 10 min timeout on otherwise-successful uploads.status == "completed", which is the cloud API's canonical ready signal.Test plan
col.add()in cloud mode and confirm it returns within the actual indexing time (~30s for a 4-page PDF) instead of timing out.get_document,get_page_content) work immediately aftercol.add()returns.