{"repo":"agiwhitelist/tokdiet","free":true,"listed":false,"github":"https://github.com/agiwhitelist/tokdiet","clone":"git clone https://github.com/agiwhitelist/tokdiet.git","description":"Local streaming reverse proxy between AI coding agents (Claude Code, Cursor, Codex) and model APIs (Anthropic, OpenAI, Gemini, MiniMax). Meters every token + USD cost, compacts bloated context to cut pay-per-token API spend, and runs shadow-eval to prove quality held. ccusage-style metering + live local dashboard.","language":"TypeScript","stars":33,"topics":["anthropic","ccusage","claude-code","cli","context-compression","gemini","llm","openai","typescript","ai-gateway"],"license":"MIT","category":"ai-agents","readme_excerpt":"tokdiet Your AI agent is paying to send the same file dump five times. tokdiet is a local proxy that sits between your agent and the model API, meters every token, puts your bloated context on a diet — and proves the answer didn't get worse. ccusage that shrinks the bill — without losing quality. 🌐 Live demo (watch one request lose the weight): agiwhitelist.github.io/tokdiet 📝 Launch write-up + full benchmark methodology: I cut an AI agent's input tokens by 71% and quality held — here's the 66-task benchmark --- The proof (this is the whole point) Every \"context optimizer\" cuts tokens. The scary question is the one they can't answer: \"If I cut the context, does the model get dumber?\" So we measured it. A 66-task A/B benchmark across 6 categories on a real model (MiniMax‑M3), each task run twice — full context (baseline) vs through tokdiet (governed) — graded against the known answer , repeated ×3 and majority‑voted to cancel model noise: −71% tokens, quality on par with baseline. Real requests, real grading — not a mock. The 1–2 task gap is model nondeterminism plus the model declining to echo a secret — not context loss; the hardest \"needle buried in junk\" adversarial cases pass, because tokdiet doesn't delete blindly — it pages cold context out recoverably and protects anything on‑topic. Reproduce it yourself: node bench/run.mjs (needs an API key in env). How it compares shows your bill cuts the bill proves quality held ---------------------------------------------- :----","default_branch":null,"files":null,"tree":[],"storefront":"/r/agiwhitelist","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/agiwhitelist/tokdiet/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}