How compression + routing cut spend 60–90%
"60–90%" sounds like marketing until you do the arithmetic. So let's do the arithmetic. Two techniques carry almost all of the savings, and they multiply together.
Lever one: compression
Agent prompts are padded with things the model doesn't need in full: verbose install logs, entire file trees, stack traces, and prior turns repeated verbatim. Cohesor runs the full message array — and any tool output — through Headroom compressors before forwarding upstream.
The compressors are lossy in bytes but faithful in meaning: a 180-line npm log becomes "install failed, missing peer dep X"; a repeated file tree collapses to the paths that matter. In practice this removes roughly half of prompt tokens. Because input tokens dominate agent workloads, halving them is already a large win — and it happens with zero configuration.
Lever two: routing
Now the bigger lever. Most agent requests are simple. Cohesor scores each one with a local, key-free complexity heuristic — looking for code blocks, multi-part questions, and keywords like refactor, debug or algorithm — producing a score from 0 to 1. Compare it to your sensitivity threshold and the request routes to an economy model or a flagship.
The price gap is enormous. A representative split:
- Flagship: $3.00 / 1M input, $15.00 / 1M output
- Economy: $0.20 / 1M input, $0.60 / 1M output
That's up to 15× cheaper on the requests that route down. And because the heuristic runs locally, there's no extra model call and no added latency.
Putting the math together
Take a team doing 200,000 requests a month, averaging 12,000 input and 1,500 output tokens, where 70% of requests are simple.
Baseline (everything on flagship, no compression):
200,000 × (12,000/1M × $3 + 1,500/1M × $15) ≈ $11,700 / mo on input+output for that profile — and real fleets with larger contexts land far higher.
With Cohesor, compress input by ~50%, then route 70% of requests to the economy tier. The blended cost falls by roughly 80%. The exact figure depends on your prompt sizes and simple-request share — which is why we ship an interactive calculator rather than a single hero number.
Compression shrinks every bill line. Routing changes which price list you're billed against. Together they compound.
Why the gateway is the right place to do this
Both techniques need to see the full request and sit on the response path. The one place that already does is the gateway between your agent and the model. Do it there and it applies to every agent, every SDK, every teammate — with one environment variable and no code changes.
That's the whole idea behind Cohesor: put the savings where the traffic already is.