Skip to content

list_documents: pass through the API's recursive flag - #511

Open
rejojer wants to merge 1 commit into
mainfrom
feat/list-documents-recursive
Open

rejojer wants to merge 1 commit into
mainfrom
feat/list-documents-recursive

Conversation

@rejojer

@rejojer rejojer commented Sep 17, 2026

Copy link
Copy Markdown
Member

Problem

list_documents(folder_id=…) returned only that folder's direct
contents. There was no way to reach the documents in its sub-folders —
you had to walk the tree yourself, one call per folder.

The endpoint has taken recursive all along. The SDK just never sent
it.

Change

client.list_documents(folder_id="cmlkcmu…", recursive=True)

Verified against a real nested folder on production: 0 documents
without the flag (they all sit in a sub-folder), 19 with it.

Listed documents also carry path — the folder chain,
"Parent/Child" — served by the cloud
(VectifyAI/pageindex-compute#644), so this SDK stays a pass-through and
does not join /folders/ back in. path needs that PR deployed;
recursive itself works today.

Local mode accepts the flag and ignores it — there are no folders to
descend into — and reports the same keys a cloud listing has, path
among them, always None.

Tests

The flag reaches the query string only when asked for, so the default
request is unchanged; a local listing carries the same keys. 638 passed.

CI

The two red legs are test_live_*_citation_prompt*, which fail the same
way on a clean main: the cloud no longer serves the footnote format.
Unrelated to this branch, and already fixed on the branch that drops
that format from the SDK.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 17, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
🔒 Security Review Completed 2026-09-17T08:57:08.614817Z b00c403 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@rejojer
rejojer force-pushed the feat/list-documents-recursive branch from b00c403 to 31691cd Compare September 17, 2026 10:45
Listing a folder returned only its direct contents, with no way to
reach the documents in its sub-folders; the endpoint has taken
recursive all along, the SDK just never sent it. Listed documents also
carry a folder path, served by the cloud.

Local mode accepts the flag and ignores it — there are no folders to
descend into — and reports the same keys a cloud listing has, path
among them, always None.
@rejojer
rejojer force-pushed the feat/list-documents-recursive branch from 31691cd to 9cdab7b Compare September 17, 2026 10:49
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