You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5e135e3
Browse filesBrowse the repository at this point in the historyBrowse files
fix(compaction): record omitted images instead of dropping them silently (#131977)
* fix(compaction): record omitted images instead of dropping them silently
Record bounded image and non-text omission markers in text-only summarization input, including image-only user messages and tool results. Reuse the history-pruning image vocabulary without changing token estimates, retention, original transcript rows, or private reasoning handling.
* test(compaction): enforce exact omission marker bounds
Prove that image and non-text markers add exactly 103 characters without changing visible text or tool-result truncation. Exercise misleading metadata, long unknown type names, and non-text-only messages interspersed with empty messages to protect per-message omission tracking.
* test(compaction): use synthetic model naming in image fixtures
* fix(compaction): bound and account for summary omission records
Cap omission details across each summarizer request and preserve one aggregate overflow fact. Count the records in token estimates while preserving image pressure, and describe omission without claiming prior model processing. Repair findings 1 and 3 for PR #131977.
Copy file name to clipboardExpand all lines: docs/concepts/compaction.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,8 @@ The built-in summarizer accounts for Chinese, Japanese, and Korean (CJK) charact
20
20
21
21
The full conversation history stays on disk. Compaction only changes what the model sees on the next turn.
22
22
23
+
Built-in summarization receives text, not image pixels. Omitted images and other non-text input receive markers such as `[image data omitted from summary input]`, without claiming that a model processed the data. The first eight affected messages receive at most two fixed markers each; further omissions receive one aggregate statement. These additions, including newly retained role labels and separators, total at most 847 UTF-8 bytes per summarizer request and count toward token estimates. Existing text is not capped by this omission budget. Custom compaction providers still receive the original message content.
24
+
23
25
<Note>
24
26
New configs default `agents.defaults.compaction.mode` to `"safeguard"` (stricter guardrails, summary quality audits). Set `mode: "default"` explicitly to opt out.
0 commit comments