PageIndex/pageindex
mountain 2a69c76b7f fix: exact md page selection + restore CHATGPT_API_KEY alias
Address PR #272 review:

- get_md_page_content / retrieve._get_md_page_content returned every node
  whose line_num fell in [min(pages), max(pages)], so a non-contiguous spec
  like "5,100" over-fetched everything in between. Match the exact requested
  line numbers instead, mirroring the PDF path. (Same bug as #280.)
- Restore the CHATGPT_API_KEY -> OPENAI_API_KEY backward-compat alias dropped
  when pageindex/utils.py became a re-export shim; users with only
  CHATGPT_API_KEY set would otherwise fail auth after upgrading. It now runs
  in __init__.py right after load_dotenv.

Adds regression tests for both.

Claude-Session: https://claude.ai/code/session_01Kx5DgKbhK1N8autqXH8SmS
2026-07-08 17:33:41 +08:00
..
backend style(cloud): annotate best-effort response-close in query_stream cleanup 2026-07-07 16:02:33 +08:00
index fix: exact md page selection + restore CHATGPT_API_KEY alias 2026-07-08 17:33:41 +08:00
parser refactor(sdk): typed returns, protocol contract, parser layering 2026-07-07 12:15:34 +08:00
storage fix(sqlite): make concurrent indexing writes robust (no "database is locked") 2026-07-07 18:23:01 +08:00
__init__.py fix: exact md page selection + restore CHATGPT_API_KEY alias 2026-07-08 17:33:41 +08:00
agent.py fix(index): bound LLM concurrency at the leaf, not per gather call 2026-07-08 11:26:36 +08:00
client.py refactor(sdk): typed returns, protocol contract, parser layering 2026-07-07 12:15:34 +08:00
cloud_api.py fix(cloud_api): restore legacy is_retrieval_ready swallow-on-error contract 2026-07-07 15:48:49 +08:00
collection.py refactor(sdk): typed returns, protocol contract, parser layering 2026-07-07 12:15:34 +08:00
config.py fix(index): bound LLM concurrency at the leaf, not per gather call 2026-07-08 11:26:36 +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 fix: exact md page selection + restore CHATGPT_API_KEY alias 2026-07-08 17:33:41 +08:00
tokens.py refactor(sdk): typed returns, protocol contract, parser layering 2026-07-07 12:15:34 +08:00
types.py refactor(sdk): typed returns, protocol contract, parser layering 2026-07-07 12:15:34 +08:00
utils.py refactor(index): dedupe the copied indexing pipeline behind deprecation shims 2026-07-07 10:42:23 +08:00