v1.0.0 — Windows, macOS, Linux
TokenShrinker is a local proxy that catches runaway loops before they reach a provider, compresses the
dynamic context that prompt caching cannot touch, and scans for secrets on the way out. It runs on
127.0.0.1 — your
prompts never reach us.
Local models via Ollama work offline, free, with no subscription.
Every figure below is measurable on your own prompts inside the app.
A retry loop can burn a month of budget in ten minutes. Near-identical calls are detected locally and blocked before they reach a provider. Blocks expire on their own, so a false positive never strands you.
Costs nothing when it is wrong
JSON, logs and stack traces are the context that prompt caching cannot help with, because it changes every request. Measured on real payloads: 69% on JSON row dumps, 88% on log streams, 61% on stack traces.
JSON verified by round trip
Prompts are scanned locally for API keys, private keys, database URLs and card numbers before anything leaves your machine. You choose: redact, send anyway, or cancel. Detection is pattern-based and says so.
Warns, never silently scrubs
Measure what compression would save while your original prompts are forwarded untouched. Zero risk, real numbers, on your own traffic. Turn it off when the diffs convince you.
Prove it before you trust it
Providers discount cached input by 50–90%, and dynamic tool ordering silently destroys those hits. Tool arrays are sorted deterministically and cache breakpoints placed automatically.
No SDK changes
A proxy bound to 127.0.0.1 that refuses non-loopback callers. Your prompts are processed in memory and never reach us. We could not read them if we wanted to.
Not a cloud gateway
Point your SDK, agent framework or editor at the local proxy. Everything else stays as it is — your keys, your models, your code. Anything the proxy does not handle is forwarded untouched.
x-tokenshrink: off # Point any OpenAI-compatible client here
OPENAI_BASE_URL="http://127.0.0.1:1337/v1"
# Anthropic SDKs append /v1 themselves
ANTHROPIC_BASE_URL="http://127.0.0.1:1337" Version 1.0.0. Free to try with local Ollama models.
Before you install
These builds are not yet code-signed. Windows SmartScreen will warn on first run — choose More info → Run anyway. macOS will ask you to right-click the app and choose Open the first time. We are working through signing for both platforms.