PageIndex/pageindex
mountain fe36e25773 fix: six P2 correctness/robustness cleanups from the SDK review
- legacy call_llm: open AsyncOpenAI via `async with` so the client (and
  its HTTP connection pool) is closed instead of leaked.
- LocalBackend.add_document: fail fast with CollectionNotFoundError when
  the collection doesn't exist, before the expensive parse + LLM index
  (previously the missing FK only tripped at save time, after paying for
  the LLM work). Also raise builtin FileNotFoundError for a missing path
  instead of FileTypeError (which now means only "unsupported extension").
- Collection.query(doc_ids=None): the empty-collection guard now always
  runs — previously it was skipped once PAGEINDEX_EXPERIMENTAL_MULTIDOC
  was set. A single list_documents call serves both the guard and the
  multi-doc warning (no separate call just to decide whether to warn).
- CloudBackend.query_stream: on early consumer break / GeneratorExit,
  signal the background SSE thread to stop and force-close the response,
  so it no longer drains the whole stream in the background.

Adds regression tests for each (client closed, fail-fast on unknown
collection, FileNotFoundError, empty-check under the multidoc env flag,
single list call, early-break thread stop).

Claude-Session: https://claude.ai/code/session_01Kx5DgKbhK1N8autqXH8SmS
2026-07-07 11:34:13 +08:00
..
backend fix: six P2 correctness/robustness cleanups from the SDK review 2026-07-07 11:34:13 +08:00
index fix: six P2 correctness/robustness cleanups from the SDK review 2026-07-07 11:34:13 +08:00
parser fix: resolve five P1 defects from the SDK review 2026-07-07 10:12:51 +08:00
storage fix: resolve five P1 defects from the SDK review 2026-07-07 10:12:51 +08:00
__init__.py refactor(index): dedupe the copied indexing pipeline behind deprecation shims 2026-07-07 10:42:23 +08:00
agent.py fix: resolve five P1 defects from the SDK review 2026-07-07 10:12:51 +08:00
client.py feat(collection): doc_ids accepts str|list, design cleanups 2026-05-15 17:03:17 +08:00
cloud_api.py fix: resolve five P1 defects from the SDK review 2026-07-07 10:12:51 +08:00
collection.py fix: six P2 correctness/robustness cleanups from the SDK review 2026-07-07 11:34:13 +08:00
config.py fix(llm): configurable per-call litellm params instead of mutating the global 2026-06-25 17:09:43 +08:00
errors.py fix(cloud): align cloud/local backend contracts and harden the HTTP layer 2026-07-07 09:40:09 +08:00
events.py feat: add PageIndex SDK with local/cloud dual-mode support (#207) 2026-04-08 20:21:58 +08:00
page_index.py refactor(index): dedupe the copied indexing pipeline behind deprecation shims 2026-07-07 10:42:23 +08:00
page_index_md.py refactor(index): dedupe the copied indexing pipeline behind deprecation shims 2026-07-07 10:42:23 +08:00
retrieve.py refactor(index): dedupe the copied indexing pipeline behind deprecation shims 2026-07-07 10:42:23 +08:00
utils.py refactor(index): dedupe the copied indexing pipeline behind deprecation shims 2026-07-07 10:42:23 +08:00