TL;DR: Slash is a frictionless token optimizer. It saved $477 in one day of live traffic. It took $47 — its 10% cut. The user kept $429. No upfront cost. No subscription. Slash earns when you save. From a solo dev to SpaceX — same math, same 10:1. v1.4.0 hardens the SDK so the routing pill you see is the routing decision the proxy actually makes.
v1.4.0 — Single Source of Truth
The SDK shipped with two preflight functions that looked interchangeable but weren't. Consumers reached for the analysis function and used it as if it were the routing function. The pill showed cross-provider routes like claude-opus → grok-4-1-fast. The proxy would never do that — routing is same-provider only.
- New
preflightRoute(content, model)— returns the exact decision the Slash proxy makes. Same-provider only. Claude stays Claude, OpenAI stays OpenAI. - New
PROVIDER_MODELSshared module — single source of truth for provider groups. No more drift between SDK and proxy. - Latent bug caught —
claude-opus-4.7was in the model registry but orphaned from the Anthropic provider group. The new test suite surfaced it. preflight()is unchanged — it's still cross-provider analysis. Use it to show alternatives, not as a routing decision.
Non-breaking. Pure additions plus one internal refactor. If you were using preflight().options[0] as your routing signal — switch to preflightRoute().
Opus 4.7, Same Day
v1.3 shipped the day Claude Opus 4.7 landed — with measured token calibration, not guesses.
- Calibration layer — Opus 4.7 tokenizes 1.16–1.51x higher than prior generations. We measured it across real workloads, not estimated.
- Gemini proxy URL fix — model correctly extracted from
/v1beta/models/:model:generateContent. The Gate now covers all 4 providers equally. - Benchmark harness — now supports custom proxies and auth headers. Benchmark Slash against any upstream.
- CI/CD — unit tests on Bun + Node 20/22 matrix, plus a health-gated integration suite against live mcpaas.live.
Same install. Sharper Gate. Same 10:1.
The Dashboard Went Dark
It started with a bug report: "The dashboard isn't updating."
Activity was flowing. Claude Code was running. But the stats panel was frozen. We traced it to a single line:
Pass-through calls — the kind Claude Code makes hundreds of times a day — were silently dropped from transaction records. The live feed showed ticks. The numbers didn't move.
We fixed it. Then we asked: what else is wrong?
The Audit
One bug turned into a full-day audit across all 4 providers:
- Gemini proxy had no Gate — duplicate detection, rapid fire, context overflow all bypassed
- Legacy model names fell through — gpt-4-turbo, o1-mini, gpt-3.5 got no pricing data
- xAI detection was fragile — relied solely on API key prefix
- 100KB model names rendered in full — adversarial input from our own test suite
- No purchase confirmation email — you buy credits, hear nothing
- Low-balance alerts fired once, forever — top up and drain again, silence
Every one fixed. Every one tested. Every one deployed.
The Ratio
After the fixes, we watched the dashboard all day. Real traffic. Real money.
One day. One user. One dashboard.
Slash takes 10% of what it saves you. That's it. No subscription. No minimum. No commitment. For every $10 Slash salvages, it keeps $1. The user never "pays" — Slash earns. fee = savings * 0.10. Same formula whether you're a solo dev or SpaceX.
The $5 User
We built the lifecycle for someone buying $5 top-ups:
$3.00 Email: balance running low
$2.00 Email: getting lower
$1.00 Email: last warning
$0.00 Email: routing paused
↓ calls still flow through (no routing, no fees)
$5.00 Stripe top-up + confirmation email
↓ alerts reset, cycle starts fresh
The $5 balance is just the fee pool — it depletes as Slash earns its 10%. At $0, your calls still flow through. You just stop saving until you top up.
195 Tests. Zero Failures.
v1.4.0 added 9 new tests — 7 TIER 1 BRAKE assertions locking in the same-provider invariant plus providerOf hygiene. The routing bug that shipped in v1.3.0 would not have shipped with these tests in place. TEST-NOTES.md now lives in the repo as a living doc so the next invariant doesn't slip.
Integration tests are self-contained — they register their own trial key, run against live mcpaas.live, and cost less than $0.01 per run. No secrets. No mocks. Real API, real money, real proof.
Try It
npm install slash-tokensOr one line — every API call optimized:
import 'slash-tokens/auto'Dashboard at mcpaas.live/slash/dashboard. Free $5 key at setup.
