Repository navigation
feat(context): add opt-in reversible context paging - #50
Conversation
Behind CONTEXT_PAGING_ENABLED (default off), a managed client that declares the multillm_context_retrieve capability can have complete older exchanges replaced by signed retrieval handles instead of being summarized or truncated. Pages keep the exact stored JSON, never split a tool call from its results, and are scoped to the principal, session and policy revision. Bodies go in the existing R2 bucket and metadata in D1 (migration 0024), with 64 KiB per page, 1 MiB per session and a one-hour TTL. Zero-content retention disables paging, and a request whose protected content still does not fit returns 413.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ❌ Deployment failed View logs |
multillm-proxy | 5940bdc | Oct 09 2026, 02:33 AM |
|
Merged the Wave 4 integration glue ( |
6150133
into
integrate/gateway-waves-1-4
Summary
Adds opt-in reversible context paging. With
CONTEXT_PAGING_ENABLEDunset (the default), history, storage and responses are unchanged.multillm_context_retrievecapability. When its history doesn't fit the candidate's input window, complete older exchanges are replaced by signed retrieval handles. Nothing is summarized or truncated.multillm_context_retrievetool or an authenticatedGET /v1/context/pages/<page_id>.context-pages/. Metadata goes in D1context_pages(migration0024).context_window_exceededwhen the protected content still doesn't fit.Details are in
docs/context-pages.md.Shared registrations
intelligence-migrations/0024_context_pages.sqland thecontext_pagesentry inworker/d1-schema.mjs.tests/test_context_pages_worker.mjsintest:worker, andCONTEXT_PAGING_ENABLEDin the Container env keys.app.route('/v1/context/pages/<page_id>', methods=['GET'])in the Flask route inventory. It is authenticated, returnsCache-Control: private, no-storeand dispatches to no provider.worker/context-pages-d1.mjsis in the edge module inventory.Left for the Wave 5 integration
register_context_page_routesinapp.py.PagingRequestin the unified path before lossy optimization./v1/managed-state/context-pagesoperation and WorkerhandleContextPageRequest.handleTurn.multillm_context_retrievethrough the gateway MCP server.capabilitiesfield when paging is on.Tests
tests/test_context_pages.pyandtests/test_context_pages_worker.mjscover:npm run test:worker: 1,475 passed.npm run test:integration: 7 passed.migrations:check(24 contiguous, additive migrations),test:deploy, free routes, client headers and thewrangler deploy --dry-runbundle all pass.Apply the migration before enabling the flag:
npx wrangler d1 migrations apply multillm-intelligence --remote.CI notes
python/nodejobs: the dependency-audit steps fail on every branch, including main. fix(deps): clear the CI dependency audit advisories #42 fixes that.AdmissionCoordinatorDurable Object migration, whichwrangler versions uploadcannot apply. This is expected untilwrangler deployruns on main.This is part of Wave 5. It is based on
integrate/gateway-waves-1-4, the Wave 4 integration branch. The README line comes with the Wave 5 integration PR.