
Caveman 5.1 trims tool outputs, cuts costs 42.9%
Caveman 5.0 and 5.1 evolve the Apache 2.0 coding-agent plugin into a local proxy powered by trim-2, a 3.6 MB pure-Go model that prunes tool outputs per query while keeping originals recoverable on disk. In a 32-task Claude Code benchmark on Sonnet 5.5, it cuts provider cache-write tokens 57.2% and passes every task with zero cache busts, alongside new Auto model routing and reusable Blocks scripts.
Caveman started as a meme about forcing LLMs to talk like cavemen, but v5 quietly turns it into serious context-engineering infrastructure. Moving the savings from terse reply dialects to deterministic, cache-safe tool-output pruning directly answers critics who dismissed the original prompt trick as a roleplay tax.
- –Why 16.3% fewer input tokens cuts bills 42.9%: prompt caches keep system prompts and tool schemas cheap at 0.1× read rates, while fresh tool outputs pay 1.25× cache-write pricing; shrinking tool payloads 85.7% on the wire slashes cache writes 57.2% without invalidating the prefix.
- –Built for code edits, not just logs: trim-2 (a two-stage gradient-boosted tree ensemble paired with an exact O(N) Viterbi token-budget optimizer) never rewrites lines—its default smart_max profile keeps contiguous code headers and edit anchors verbatim while aggressively folding noisy logs and prose, and v5.1 adds deterministic omission summaries so agents skip unnecessary caveman_retrieve round trips.
- –Cache determinism across harnesses: evaluating bit-for-bit identically in pure Go with session-scoped PrefixCache keeps multi-turn histories cache-warm across Anthropic, OpenAI/Codex (including WebSocket Responses), Gemini, Bedrock, and Vertex via typed adapters for 10+ coding agents.
- –Ground the benchmark caveats: the 42.9% result is an n=1 32-task Sonnet 5.5 suite where noisy logs and large docs drive most gains—full-file reviews fail closed with 2.5% overhead, and Auto routing (0.46× Opus 5.5 xhigh cost in interim tests) requires a free Caveman account with its ±7-point quality margin still unresolved.
DISCOVERED
27m ago
2026-12-01
PUBLISHED
30m ago
2026-12-01
RELEVANCE
AUTHOR
AICodeKing