gitwtfhub

wtf is cachy-router?

jcfrags/cachy-router — explained in plain English

Analysis updated 2026-05-18

2PythonAudience · ops devopsComplexity · 4/5Setup · hard

TL;DR

A router that gives a cluster of self hosted llama.cpp AI model workers one OpenAI-compatible address, with an explicit prefix cache system to speed up repeated requests on a trusted local network.

Mindmap

mindmap
  root((Cachy Router))
    What it does
      Routes requests to llama.cpp workers
      OpenAI-compatible endpoint
      Durable prefix cache
    Tech stack
      Python
      llama.cpp
    Use cases
      Load balance local LLM cluster
      Reuse prefix cache across requests
      Enforce tenant isolation
    Audience
      Self-hosted AI ops teams

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Route OpenAI-compatible requests across multiple self hosted llama.cpp workers

REASON 2

Build and reuse a durable prefix cache to speed up repeated AI generation requests

REASON 3

Enforce per-tenant cache isolation so different users' cached data cannot leak between requests

REASON 4

Run offline acceptance and stress tests to validate router behavior before a live deployment

What's in the stack?

Pythonllama.cppOpenAI API

How it stacks up

jcfrags/cachy-router0-bingwu-0/live-interpreter010zx00x1/faresnipe
Stars222
LanguagePythonPythonPython
Setup difficultyhardmoderateeasy
Complexity4/52/52/5
Audienceops devopsgeneralgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · hard Time to first run · 1h+

Requires a multi-machine llama.cpp worker cluster and is explicitly limited to trusted LAN use, not the public internet.

License not stated in the available metadata.

Wtf does this do

Cachy Router is a traffic router for people running their own local AI models with llama.cpp, a popular tool for running large language models on your own hardware. If you have several machines each running a copy of a model, this router sits in front of them and presents one single address that behaves like the standard OpenAI API, so any tool built to talk to OpenAI can talk to your own setup instead. Beyond simple routing, the project's main feature is cache awareness. Language models can reuse previously processed text, called a prefix cache, to avoid redoing work and to respond faster on follow up requests. Cachy Router adds a way to explicitly build, use, and refresh this cache across a cluster of worker machines, storing it in a durable cache store the router itself manages, on top of whatever caching each individual worker already keeps locally. The project is explicit and detailed about what is finished versus still being tested. Using its own tracking system, it reports 168 total capability checks, with the large majority marked as done through offline automated tests, a handful still needing live testing on real hardware, and a few blocked on external dependencies outside the project's control. Features already working through automated checks include normal request routing and fallback if a worker goes down, per tenant access rules so different users' cached data cannot leak into each other's requests, and optional request queuing when workers are busy. Features still requiring further real world validation include certain advanced caching modes and long running stability tests over many hours. Installation for basic checks needs only Python's standard library with no extra packages. A full working deployment additionally needs Python 3 on every machine involved and a compatible llama.cpp server setup on the worker machines. The documentation is very clear that the default setup is meant only for a trusted local network and should never be exposed directly to the public internet, since it does not include the security hardening that would require. This is aimed at people already comfortable running their own AI infrastructure, not casual users, and the author describes it as an early public release of a working setup rather than finished production software.

Yoink these prompts

Prompt 1
Explain how Cachy Router's prefix cache differs from each worker's own local cache.
Prompt 2
Walk me through setting up a trusted-LAN deployment of Cachy Router across multiple llama.cpp workers.
Prompt 3
What do the acceptance metrics categories (done, live-gated, partial, blocked-by-upstream) mean in this project?
Prompt 4
Why does this project warn against exposing the router to the public internet?

Frequently asked questions

wtf is cachy-router?

A router that gives a cluster of self hosted llama.cpp AI model workers one OpenAI-compatible address, with an explicit prefix cache system to speed up repeated requests on a trusted local network.

What language is cachy-router written in?

Mainly Python. The stack also includes Python, llama.cpp, OpenAI API.

What license does cachy-router use?

License not stated in the available metadata.

How hard is cachy-router to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is cachy-router for?

Mainly ops devops.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.