cd /news/artificial-intelligence/show-hn-prefex-bundles-15-viral-toke… Β· home β€Ί topics β€Ί artificial-intelligence β€Ί article
[ARTICLE Β· art-71350] src=github.com β†— pub= topic=artificial-intelligence verified=true sentiment=Β· neutral

Show HN: Prefex bundles 15 viral token saver repos into local no telemetry proxy

Promptforce.ai launched Prefex, a local-first proxy that bundles over a dozen LLM cost-optimization techniques into a single Go binary for Claude Code and OpenAI-compatible APIs, claiming to reduce spending beyond native prompt caching. The tool runs entirely on-device with no telemetry, offers an honest dashboard showing savings attributed per mechanism, and is free for 60 days during early access.

read6 min views1 publishedJul 24, 2026
Show HN: Prefex bundles 15 viral token saver repos into local no telemetry proxy
Image: source
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β•šβ–ˆβ–ˆβ–ˆβ•”β• 
β–ˆβ–ˆβ•”β•β•β•β• β–ˆβ–ˆβ•”β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•  β–ˆβ–ˆβ•”β•β•β•   β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— 
β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘     β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•”β• β–ˆβ–ˆβ•—
β•šβ•β•     β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•β•šβ•β•     β•šβ•β•β•β•β•β•β•β•šβ•β•  β•šβ•β•

|

Spend less on Claude, with receipts.

Prefex is a local-first proxy for Claude Code and the Anthropic / OpenAI APIs. The best ideas for cutting LLM cost go viral one at a time, scattered across the ecosystem as sidecars, plugins, and cloud services. Prefex distills a dozen of them, rebuilds each one natively in Go, and stacks them into a single self-contained binary that runs behind one base_url

change. No code changes, no data leaving your machine, and an honest dashboard that shows what Prefex actually saved you beyond the native prompt caching you already get for free.

Claude Code is the flagship, but Prefex is client-agnostic: it ships with prebuilt support for Codex and other OpenAI-compatible tools (via the OpenAI Chat and Responses APIs), currently in active benchmarking. Any client that lets you set a custom base URL works today.

Prefex is a Promptforce.ai product. Promptforce.ai is a Day Two AI company.

Prefex is in

Early Access: free for 60 days, no obligation. Get your install link at[promptforce.ai].

curl -fsSL https://promptforce.ai/install.sh -o install.sh
less install.sh
bash install.sh
iwr https://promptforce.ai/install.ps1 -OutFile install.ps1; .\install.ps1

We do not do curl | bash

. Download the script, read it, then decide. The installer starts Prefex on :8019

, connects Claude Code, and is reversible with prefex stop

or the uninstaller.

Then point your client at it:

// Claude Code: ~/.claude/settings.json
{ "env": { "ANTHROPIC_BASE_URL": "http://localhost:8019" } }

Dashboard: http://localhost:8019/dashboard

A dozen-plus optimizations across eight layers, in one binary:

Smart routing: an explainable rules router sends simple turns to a cheaper model and keeps the hard ones on the strong one. You set the threshold.Prompt-cache assist: prefix detection, a cache warmer, and prefix-stabilization keep your cached context hot, extending the native prompt cache further than it goes alone.Compression: lossless-first compaction of tool output, logs, and JSON. Cache-boundary-safe and recoverable. Never lossy on code.** Cross-session memory**: typed facts extracted from your sessions and re-injected by project, so a new session starts with what the last one learned.Spend guardrails: token traps, loop guards, think-caps, and lean reasoning catch runaway turns before they bill.** Receipts and coaching**: savings attributed per mechanism, in honest incremental terms, then surfaced inline as you work so the numbers actually change how you spend.Encoder routing(optional): an on-device ONNX encoder β€” a frozen ModernBERT trunk that runs fully offline β€” scores prompt complexity for sharper routing than rules alone. Opt-in, default-off.Spend watcher: a background sentinel reads the live request stream and flags the expensive stuff the moment it happens β€” big cold cache writes, prefix flapping, rate limits, spend spikes β€” to your status line and dashboard.

Every layer is independent and fail-open. If any component errors, the request passes straight through to the upstream API unchanged.

There is no honest fixed percentage. It depends entirely on your workload, so Prefex shows you two numbers and is clear about which is which:

Saved by Prefex(the headline): what routing, trimming, and guardrails addedbeyondthe native prompt caching Claude Code already gives you for free.vs no optimization at all(a labeled counterfactual): every token repriced at full strong-model rate with no caching discount. The bigger number, shown only for context.

Costs are read from the provider's own billing fields, not computed by Prefex. Don't trust a headline number, including ours; check your own dashboard, request by request.

Anything that lets you set a custom API base URL works out of the box.

Tool How to connect
Claude Code ANTHROPIC_BASE_URL in ~/.claude/settings.json (auto-configured by the installer)
Cursor ANTHROPIC_BASE_URL env var in your shell
Continue.dev apiBase per model in ~/.continue/config.json
Aider --api-base http://localhost:8019
Codex CLI prefex wrap codex (routes this session only)
Python / Node SDK base_url="http://localhost:8019"

Fail open. Internal errors never block a request. On bad input, a missing dependency, or a slow path, Prefex logs and forwards upstream unchanged.Binary, not source. One CGO-free Go binary. No runtime fan-out of processes, no sidecar to supervise. Trained weights are the one exception, behind an opt-in, default-off seam (see Attribution).Your keys stay home. Everything runs on localhost. No telemetry, no analytics, no external logging. The dashboard has no auth because nothing can reach it but you.

Verify it yourself:

sudo tcpdump -i any -n 'dst port 443' 2>/dev/null | grep -v api.anthropic.com

Prefex is a distillery: we study the best ideas in AI tooling and re-author the algorithm natively in Go, inside our own principles. Copyright protects code, not ideas, so for the projects below no source code is copied into Prefex: these are courtesy credits, not license obligations. We name them because the ideas are theirs and the credit should be too.

Source The idea we learned from License

NVIDIA SwitchyardLLMLingua / LLMLingua-2caveman-compressionRTKheadroomMem0MemGPT / LettaOpenHandsGraphRAGvLLM/OllamaReadyBase (also known as code-drift), the co-change and blast-radius graph that gates code compaction, is a sister Promptforce project.

The one place Prefex distributes or runs third-party code and weights is the optional, default-off Kompress text-compaction sidecar (the "headroom" model track). It runs out of process; the Go binary stays model-free and fails open if the sidecar is absent. These obligations apply only if you opt into the sidecar (compression.kompress: true

). See NOTICE and

deploy/kompress-sidecar/

.| Component | Role | License | |---|---|---| | The keep/drop model + ONNX inference our sidecar runs (headroom's algorithms are reimplemented in Go and credited above; this entry is the model) | Apache-2.0 | chopratejas/kompress-v2-base |

ModernBERTONNX RuntimeHugging Face TransformersBundled Go libraries. The Prefex binary itself links three third-party Go modules: go-redis (BSD-2-Clause), yaml.v3 (MIT and Apache-2.0), and modernc.org/sqlite (BSD-3-Clause). The full set of 22 bundled modules (direct and transitive) is in THIRD_PARTY_LICENSES.md; see also

.

NOTICE

If we have miscredited or mislabeled anything, please open an issue and we will correct it.

Prefex is distributed as a binary, in Beta, provided as-is with no warranty. Source code is not included in this repository (binary releases only). Early Access is free for 60 days; Pro and Team plans are available on request at contact@daytwoai.com.

Third-party components bundled or invoked by the optional sidecar retain their own licenses, recorded in NOTICE.

Day Two AI is an Anthropic partner. Prefex is built independently, with no Anthropic participation, funding, or endorsement. It is not an Anthropic product and is not affiliated with Anthropic. "Claude" and "Anthropic" are trademarks of Anthropic; they are used here only to describe interoperability. Prefex sits in front of the Anthropic API as a local proxy and never sends your prompts or keys anywhere but the provider you are already calling.

── more in #artificial-intelligence 4 stories Β· sorted by recency
── more on @promptforce.ai 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain β€” perfect for shipping the agent you just read about.

$git push zahid main
β†’ Live at https://your-agent.zahid.host βœ“
Get free account β†’ Pricing
from €0/mo Β· no card required
LIVE [news/show-hn-prefex-bundl…] indexed:0 read:6min 2026-07-24 Β· β€”