Tanuki Context cuts log prompts by 94% by turning text into images
0syna · reddit · 2026-07-27
Tanuki Context is an open-source tool that tries to cut LLM token costs by converting some context into images.
- The author says a log dump of 37,111 tokens can be compressed to 2,240 tokens, roughly a 94% reduction.
- The idea is that pricing for images is based on pixel size, while text is charged per token.
- The system includes a log distiller that collapses repeated lines but preserves errors, a columnar codec for JSON, and a cost model that decides when image encoding is not worth it.
- It argues against itself when retrieval or prompt caching is cheaper.
- The tool can run as an MCP server (npx -y tanuki-context) or as a proxy that rewrites requests in place.
- The author notes limits: it needs a vision-capable model, it does not reduce output tokens, and retrieval can still win for narrow queries.
Code, benchmarks, and npm/GitHub links are provided.
Related event: Tanuki Context Slashes LLM Token Costs by Converting Text to Images(2 posts)→
More from coding & agent
- "CI/CD is dead": Developer lays out the AI Software Factory replacing traditional pipelines — Pavan_Belagatti · 2026-12-02
- Codex lead confirms upgraded harness not shipped yet; current one 'will seem primitive in 2-3 months' — VraserX · 2026-12-02
- banger: open-source agent skill writes hit-style Suno songs hook-first — tetsuoai · 2026-12-02
- Agent skills cut AI music video generation to under 2 hours, Suno skill released — tetsuoai · 2026-12-02
- Redditor secretly undid Claude Code's work every 10s; agent honestly reported a "ghost" — 32minutos · 2026-12-02
- UNC's Wanda: agentic AI for neuroimaging validated on 123,000 brains — PTenigma · 2026-12-02