Repository navigation
fix(compaction): keep hosted search history as bounded reference notes in portable summaries (carry #6746) - #6799
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 22 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (6)
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 |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
✅ Deterministic PR hygiene checks passed. |
Summary
Maintainer carry of #6746 by @yuanyuanlove, so the full CI can run on an
originbranch.Portable compaction removes tool declarations before asking another model for a summary, but it left hosted
web_search_callitems in the input. An upstream can reject hosted history that has no tool declaration, so the summary failed. Responses Lite also requiresparallel_tool_calls=falseeven when the request declares no tools, and the summary body removed that field.After this change the portable summarizer (
buildRoutedCompactionBodyinsrc/adapters/openai-responses/passthrough.ts) renders each remaining hosted call, after bridge restoration, as a labeled reference note in its original position (src/adapters/openai-responses/compaction-search-history.ts). The note keeps an allowlist of string fields (status; action type, query, queries, URL, pattern; source type, URL, title) and drops opaque state, IDs and unknown fields. Lite summaries keepparallel_tool_calls: false. Ordinary turns, native compaction and stored history are unchanged.Maintainer changes on top of the contributor's two commits:
output_textreference message instead of a user message. The search was the assistant's own past action, and a user-role note would give web-sourced titles and URLs the user's authority.queriesandsourceskeep their first 20 entries without copying the rest, and one summary request carries at most 64 KiB of notes. Later hosted calls collapse into one omission note whose size is reserved inside that budget. Request body limits are off by default, so the projection carries its own bound.structure/transports/responses-failover.mddescribes the caps and stays at 600 lines.Co-authored-by: panyuanyuan panyuanyuan@hetao101.com
Co-authored-by: yuanyuanlove 6202754+yuanyuanlove@users.noreply.github.com
Verification
bun test tests/responses/responses-compaction-override.test.ts tests/web-search/web-search-bridge-replay.test.ts tests/responses/responses-compaction-routing.test.ts tests/responses/openai-responses-passthrough.test.ts: 395 pass, 0 fail. New cases: Lite with hosted history, field and list caps with an instruction-like query that stays inside the labeled note, and 60 large hosted calls that stay under 64 KiB with exactly one omission note.bun run typecheck,bun run structure:check,bun run privacy:scan: pass.devat fd20320.bun run testsuite was not run locally (lane constraint: minimal local tests, several worktrees running in parallel). Exact-head hosted CI is the full-suite evidence. The summary requests in tests use stubbed upstreams; the contributor's PR reports live smoke runs against real Lite and non-Lite summarizers before these amendments.Checklist