measured 2026-10-25 · Node v24.22.1 · 1 gateway process

Fast enough to forget it is there.

+1.52 ms median overhead when the request goes to the model; cache hits answered in 1.08 ms instead of a model call. A model call itself usually takes hundreds of milliseconds to seconds.

+1.52 msmedian added latency on a model call · +2.17 ms on the production host under its normal load (2026-10-25)
+3.68 msp99 added latency on a model call
1.08 msmedian total time for a cache hit
641model calls / s through one process, 0 errors under load

Latency

Milliseconds, concurrency 1, 2,000 requests per scenario after 200 warm-up requests. "Added" is the gateway percentile minus the same percentile for calling the mock provider directly (direct: p50 0.58, p95 1.07, p99 3.56).

Scenariop50p95p99Added p50Added p95Added p99
Model call (cache miss)
temperature 0.7, so the cache is bypassed: cache-control formatting, routing advice, the upstream round trip, usage parsing, the ledger write and receipt signing
2.104.497.24+1.52+3.42+3.68
Exact cache hit
temperature 0, identical body: answered from the cache, no model call
1.081.954.89+0.50+0.88+1.33
Similarity cache hit
temperature 0, whitespace-varied body: exact miss, then a SimHash match (opt-in feature)
1.222.084.70+0.64+1.01+1.14
Streaming, first byte
stream: true; time until the first chunk reaches the client (direct: p50 1.14, p95 2.56, p99 4.36)
3.126.148.63+1.98+3.58+4.27
Streaming, complete
mock emits the first chunk at once, then one every 15 ms; a buffering proxy would add ~75 ms to first byte; usage is read off the final chunk and the receipt signed after the stream ends
80.083.494.8+2.46+3.01+12.7

Throughput, one process

Closed loop, 32 concurrent clients for 10 s against one gateway process. Production runs one process per core, and throughput grows with cores because ledger writes are batched; these single-process numbers are a floor, not a ceiling.

PathRequests / sErrors
Mock provider, called directly (the load generator's ceiling)3,5420
Through TokenZero, model call6410
Through TokenZero, exact cache hit1,6700

Method

A zero-latency mock provider and the gateway run as separate processes on the same machine, so the numbers isolate what TokenZero adds and leave out network distance to the provider. The request is ~1.4k input tokens, OpenAI chat, non-streaming, with the full engine path on: token counting, cache-control formatting, routing advice, usage parsing from the provider response, a ledger row and an Ed25519-signed receipt. Nothing is stubbed out of the gateway.

Machine: 8 vCPU Intel Core Processor (Haswell, no TSX), shared with other workloads (load average 6.0 / 5.5 / 6.1 during the run), so these are conservative. Reproduce it on your own hardware; it needs no keys and no network:

node --no-warnings scripts/bench/overhead.ts --n 2000 --seconds 10 --concurrency 32 --out results.json

Audit analyzer: golden corpus

13 committed files (7 with a known anti-pattern across Python and TypeScript, OpenAI, Anthropic, Gemini, LangChain and the Vercel AI SDK; 6 clean files that tempt a naive linter). Reproduce: node --no-warnings scripts/bench/audit-corpus.ts.

100%precision
100%recall
1.00F1
0%false positives on clean code
CaseKindExpectedFoundEst. wasteResult
app/triage.py
py-openai-classifier-uncached
anti-patternstatic-prompt, cascade, repeat-cachecascade, static-prompt, repeat-cache70%pass
src/assistant.ts
ts-anthropic-system-no-breakpoint
anti-patternstatic-promptstatic-prompt70%pass
jobs/enrich.py
py-loop-per-item
anti-patternlooploop15%pass
lib/extract.ts
ts-vercel-ai-json-extraction-frontier
anti-patterncascadecascade70%pass
svc/sentiment.py
py-gemini-static-prefix-sentiment
anti-patternstatic-prompt, repeat-cachestatic-prompt, repeat-cache12%pass
pipeline/translate.py
py-langchain-translate-frontier
anti-patterncascadecascade70%pass
svc/digest.py
py-retiring-model
anti-patternlifecyclelifecycle0%pass
src/agents/models/openai_chat.py
lib-sdk-wrapper
cleannonenone0%pass
src/cached.ts
ts-anthropic-already-cached
cleannonenone0%pass
app/tag.py
py-already-cheap-model
cleannonenone0%pass
docs/models.md
docs-model-names-in-prose
cleannonenone0%pass
jobs/batch_enrich.py
py-batched-loop
cleannonenone0%pass
src/summarize.ts
ts-openai-cache-options-set
cleannonenone0%pass

Each case lists the finding kinds it should produce; a kind reported but not expected is a false positive, an expected kind not reported a false negative. The clean-code false-positive rate counts clean files that received any medium or high finding (info/low advice does not count).

Head to head

Only rows marked measured carry numbers from this script on this machine. The rest are product facts or the vendor's own claims, labelled as such; we do not publish competitor latency we did not measure.

ProductOverhead per requestSigned receiptsPricing modelStatic waste analyzerRuntime dependencies
TokenZero+1.52 ms p50 / +3.42 ms p95 measuredEd25519-signed per request, public key published$0 on spend; 15% of verified savings above $500/mo routed (planned)local static audit (CLI, MCP, GitHub Action), 12/12 golden corpussingle Node process, SQLite; no Redis/Postgres
LiteLLM Proxy+16.3 ms p50 (17.0 vs 0.58 direct), p95 21.8 measured, litellm LiteLLM: Current Version = 1.106.4noneopen source; enterprise tiernonePython/FastAPI; Postgres and Redis for most features
Portkeyvendor claim: single-digit msnoneper-request plansnonehosted
Heliconevendor claim: ~ms (edge)noneper-request plansnonehosted
OpenRouternot measurednone5.5% on all spendnonehosted
RouteLLMlibrary, not a proxynoneopen sourcenonePython library, router models