Repository navigation
v0.212.0
protoAgent v0.212.0
This release controls the cost of long threads. Compaction now fires on large-window models, image-heavy chats keep their prompt cache, and anthropic-oauth agents can optionally stop resending old reasoning. It also fixes anthropic-oauth agents with a reasoning effort set, which failed every call on Opus 5.5.
Upgrading from v0.211.x
- Compaction now fires by default on long threads with large-window models. Compaction now fires at min(0.8 × context window, 200,000 tokens). Before,
compaction.trigger: fraction:0.8alone applied, so on a 1M-window model it meant 800k tokens and in practice never fired. The new setting iscompaction.max_tokens(default200000). Threads that never compacted before will start compacting once they pass about 200k prompt tokens. To keep the old behaviour, setcompaction.max_tokens: 0. - The compaction trigger now follows the model the chat tab actually runs on. Models the gateway doesn't report a window for now get one: the model's own profile, a conservative 272k for the
openai-codexlane, or a family default. - Compaction strips thinking from the turns it keeps. Both
/compactand automatic compaction keep recent turns verbatim, and those turns now drop their thinking blocks. The blocks were produced with the full history in front of them, and Anthropic rejects them once that history has been summarized on accounts that enforce preserved thinking. - anthropic-oauth with a reasoning effort works on Opus 5.5 again. On Claude 4.6 and newer,
/effortandmodel.thinking: enablednow send adaptive thinking (thinking: {type: "adaptive"}) with the effort inoutput_config.effort. Thinking summaries stay visible. Models before 4.6 (Haiku/Sonnet/Opus 4.5 and older) still usebudget_tokens. On Opus 5.5 thinking is always on, somodel.thinking: disabledsends no thinking field and effort is the only control. No config change is needed.
Added
- Opt-in: drop completed earlier turns' thinking from Claude requests (#4417). Set
model.strip_prior_turn_thinking: trueon anthropic-oauth agents (default off). Each request is then sent without the thinking blocks of turns that already finished. Without it, Claude Opus/Sonnet 5.5 replay every earlier turn's reasoning and bill it as input, which was about 40% of the prompt on one long production thread. The current turn keeps its reasoning, and earlier turns keep their text and tool calls. The removal stays within what Anthropic's preserved-thinking check accepts.
Fixed
- Compaction fires on long threads with large-window models (#4416). It uses the new
compaction.max_tokensceiling described above. Tool-result pruning now measures context pressure from the input tokens the provider reports, not a text-only estimate. - Image-heavy chats keep their prompt cache (#4412). Over
model.max_images_per_request, the oldest images used to be omitted one at a time. Each new screenshot changed a block deep in the history and invalidated the cache. Old images are now omitted in batches of half the cap, so the history prefix stays byte-stable and cached between batches. - anthropic-oauth sends the thinking shape each Claude model accepts (#4418). Before, a reasoning effort or
model.thinking: enabledsentbudget_tokens, which Opus 5.5, the rest of the 5.x family and Opus 4.7/4.8 reject, so every call failed. Now Claude 4.6+ gets adaptive thinking plusoutput_config.effort. Older models keepbudget_tokens, now clamped belowmax_tokens. An unknown effort value is dropped instead of being sent.
Full changelog: v0.211.2...v0.212.0
What's Changed
- fix(images): omit old images in batches so the prompt cache survives by @mabry1985 in #4412
- fix(compaction): absolute token ceiling, a window for every model, measured pruning pressure by @mabry1985 in #4416
- feat(anthropic-oauth): opt-in drop of completed prior turns' thinking blocks by @mabry1985 in #4417
- fix(anthropic-oauth): adaptive thinking + output_config.effort on Claude 4.6+, budget_tokens only before 4.6 (#4418) by @mabry1985 in #4419
Full Changelog: v0.211.2...v0.212.0