5ms Router Slashes LLM Costs by 96%

Negaaaa7 · reddit · 2026-07-19

To cut LLM API costs, the author built a 0.57 MB router that decides between local and cloud models, boasting an inference time of roughly 5 ms without needing embedding models or vector databases.

The router simultaneously handles three tasks:

They share their test results, including an offline evaluation of 2,022 real prompts, jailbreak detection rates, false positive rates, and known failure modes (e.g., certain "act as..." role prompts easily trigger false positives).

It's currently available in three formats: a VS Code/Cursor extension, an npm SDK, and a hosted API. The author emphasizes that the extension is merely a frontend, while the actual local classifier runs within the SDK.

Related event: Tiny 0.57MB Router Slashes LLM Costs(2 posts)→

Original post →

More from coding & agent

coding & agent channel →