Skip to content

v0.212.0

Choose a tag to compare

@github-actions github-actions released this 20 Oct 11:36
· 80 commits to main since this release
34f0e27

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.8 alone applied, so on a 1M-window model it meant 800k tokens and in practice never fired. The new setting is compaction.max_tokens (default 200000). Threads that never compacted before will start compacting once they pass about 200k prompt tokens. To keep the old behaviour, set compaction.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-codex lane, or a family default.
  • Compaction strips thinking from the turns it keeps. Both /compact and 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, /effort and model.thinking: enabled now send adaptive thinking (thinking: {type: "adaptive"}) with the effort in output_config.effort. Thinking summaries stay visible. Models before 4.6 (Haiku/Sonnet/Opus 4.5 and older) still use budget_tokens. On Opus 5.5 thinking is always on, so model.thinking: disabled sends 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: true on 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_tokens ceiling 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: enabled sent budget_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 plus output_config.effort. Older models keep budget_tokens, now clamped below max_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