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
- theo builds his own visualizer for today's agent models, showing how cheap Luna really is — ivan_bezdomny · 2026-09-23
- Vite+ Hits RC: One Rust-Powered CLI to Replace Your Entire Web Toolchain — cnakazawa · 2026-09-23
- Tesla's in-car Grok agent books trips across Gmail, Calendar and Notion in one command — xiaohu · 2026-09-23
- Tesla's In-Car Grok Assistant Now Executes Cross-App Tasks in One Sentence — xiaohu · 2026-09-23
- Garry Tan says Capy lets him ship PRs much faster than Codex or Claude Code — garrytan · 2026-09-23
- DeskPilot: open-source native Python desktop client for local LLMs with MCP and sandboxed tools — poofph · 2026-09-23