Commit Graph

1 Commits

Author SHA1 Message Date
Teknium
54a95b679c fix(compression): send compacted turns to the summarizer in their real roles
A flattened [USER]: transcript lets tool output that prints a fake user
turn pass for the user, so the summary carries a forged approval forward
as the user's (arXiv:2610.29869, #146750). Lean mode now sends real user
turns as role=user, assistant tool calls as tool_calls and tool output as
role=tool messages (pairing repaired, no tools param), with the
instructions in the system slot and a final user pointer.

The summary-input sampler moves to context_compressor_sampling.py
(unchanged) to keep context_compressor.py under its line ratchet; it
now also reports which record runs it kept so the typed builder sends
exactly the sampled records.
2026-11-14 12:24:25 +01:00