◆ Sovereign model orchestrator · single-file dashboard · MIT

Your AI keeps working when the API goes dark.

FallRouter is a sovereign kernel that routes every LLM request between your local Ollama models and frontier APIs (Claude · OpenAI · Gemini). When a provider hits rate limits, gets export-controlled, goes bankrupt, or has a three-week outage — your app doesn't. The local leg picks up automatically. Zero downtime. Zero dependency. Tamper-evident audit chain. TBAnth replaces per-token API bills.

Single Node file · one Docker command OpenAI-compatible endpoint SQLite audit chain MIT · you own it

The sales pitch

Three weeks. That's how long the frontier went dark for.

You know it. Your clients know it. When frontier API access disappears — export controls, rate limits, provider outages, price changes — everything downstream stops. Every business that built on hosted AI just watched its product go dark.

"Our AI didn't go down."

That's the sentence your clients want to be able to say. FallRouter makes it true. Every prompt has a local fallback. Every routing decision is audited. Every failure reroutes automatically. Users see slightly different model output — never a broken screen. This is what "sovereign AI" actually looks like at runtime, not in marketing decks.

Cost reduction

~90%

Local leg handles ~90% of tokens · frontier only for the hard 10%

Failover time

<3s

Health-check every 30s + retry with smallest local on any error

Vendor lock-in

Zero

MIT-licensed source · swap Ollama, Claude, OpenAI in one config line

Audit trail

Tamper-evident

SHA-256 prevHash chain in SQLite · one command verifies

How the routing works

Femto · Nano · Milli · Advisor.

Every request gets classified in <1ms by a deterministic sieve (length, code content, keywords). Then the right leg fires. No ML in the classifier. No vendor lock-in. Predictable behaviour.

Femto<50 chars · route/classify/yes-no

Fires the smallest local model (3B). Instant. Free. Handles the routing decisions themselves, plus quick user acks.

Nano50-500 chars · write/explain

Local 8B model. Fast. Sovereign. The workhorse for typical chat / drafting / explanation tasks. Runs on any modern GPU or capable CPU.

Milli>500 chars or code · deep reasoning

Routes to frontier if available (best-in-class reasoning). Falls back to local 70B if the API is unavailable. Zero drop-off.

Advisor"check"/"verify"/"audit" keywords · high-stakes

Fires the specific frontier model chosen as the advisor (usually Claude Opus). The 10% of calls that earn the spend. Auto-fallback on unavailability.

Auto-failover · what happens when the frontier goes dark

  1. Router pings each configured provider every 30s (cheap HEAD requests · <3s timeout)
  2. On any request, checks last availability snapshot before routing
  3. If preferred leg is dark → routes to next available (frontier → other frontier → local)
  4. If mid-request the preferred leg errors → retries once against smallest local (the "ALWAYS WORKS" fallback)
  5. Every reroute logged to the audit chain (tier, model, reason, latency, cost)
  6. Your app sees a valid response · never sees a 503

Access

Three tiers. Start free.

Sovereign tier is free forever · you download it, you run it, you own it. The paid tiers add convenience (managed configs, hosted dashboard, memory layer, priority support).

Sovereign

Everything. Free. Runs on your hardware.
TBA / forever
  • OpenAI-compatible router service
  • Femto/nano/milli/advisor classifier
  • Auto-failover to local
  • Single-HTML sovereign dashboard
  • SQLite tamper-evident audit chain
  • Cost tracker · routing log
  • Docker one-command deploy
  • MIT source · fork · modify · redistribute
Download & run

Client

Persistent memory layer. Multi-model orchestration. White-label.
TBA / month
  • Everything in Hybrid
  • Vector-DB persistent memory (episodic + semantic)
  • Multi-model routing (per-conversation persona)
  • White-label dashboard for your clients
  • Custom classifier tuning
  • Priority support · 24h response
  • Included setup call (60 min)
Talk to Simon

Quick start

Sovereign tier running in 5 minutes.

Two prerequisites: Node 20+ and Ollama installed with at least one model pulled.

1 · Get the source

Clone the repo (or download the release tarball). Everything is in-tree — router service, dashboard, SDK adapter, Docker stack, docs.

2 · Start Ollama + pull models

The router expects the classifier model, the standard model, and (optionally) the deep model. Small enough to run on any modern GPU or capable CPU.

3 · Run the router service

Set the master key in .env. Add any frontier API keys you want the auto-failover to consider. Then npm start.

4 · Open the dashboard

The single-HTML dashboard connects to the router service. Enter the URL + master key in Settings (stored in your browser's IndexedDB · nothing leaves this device).

5 · Send a test request

Send anything from the Test tab. Watch the routing log fill in real-time. Kill your internet — watch the auto-fallback kick in.

# clone git clone https://github.com/sjgant80-hub/fallrouter.git cd fallrouter # ollama models (pick a small one to start) ollama pull llama3.2:3b ollama pull llama3.1:8b # router service cd service cp .env.example .env # edit .env · set FR_MASTER_KEY to random hex npm install npm start → FallRouter · listening on http://127.0.0.1:4100 # dashboard · from another terminal cd ../dashboard python -m http.server 8080 → open http://localhost:8080 # or use the hosted dashboard (points at your local router) open https://sjgant80-hub.github.io/fallrouter/dashboard/ # test a request curl http://localhost:4100/v1/chat/completions \ -H "Authorization: Bearer $FR_MASTER_KEY" \ -H "Content-Type: application/json" \ -d '{"messages":[{"role":"user","content":"Hello"}]}'

FAQ

The questions people actually ask.

Why not just use LiteLLM?
LiteLLM is great · it's an API-to-API proxy. FallRouter adds three things LiteLLM doesn't: (1) local Ollama as a first-class routing target, (2) automatic tier-classification so the small model handles simple tasks and the big model handles hard ones, (3) tamper-evident audit chain. If you only ever talk to hosted APIs, LiteLLM is enough. If you want sovereignty, FallRouter is the delta.
Do I need a GPU?
For the femto (3B) model — no, modern CPUs handle it. For the nano (8B) — a modest GPU (~TBA for a 16GB card) or a beefy Mac / Apple Silicon works. For the milli (70B) — proper GPU or you offload that tier to the frontier. FallRouter's design lets you skip the milli-local entirely if you don't have hardware for it.
What's the "advisor" pattern?
Anthropic literally documents this: faster, lower-cost worker models can call a frontier model mid-task to check plans and evaluate outputs. FallRouter automates it. 90% of tokens stay local (free). The 10% that hit frontier are the ones where frontier quality actually matters — verifying, auditing, high-stakes client-facing checks. Result: ~90% cost reduction with minimal quality drop.
Does it work with my existing OpenAI SDK code?
Yes — the router is OpenAI-compatible at the `/v1/chat/completions` endpoint. Point your existing OpenAI SDK at http://localhost:4100/v1 with your master key. Zero code changes. The router transparently picks whether the actual call goes to Ollama, Anthropic, or OpenAI based on the classifier.
How does the audit chain work?
Every routing decision writes a row to SQLite with a SHA-256 hash of {entry, previous hash}. Verifying the chain means walking the rows forward and confirming each row's `prev_hash` matches the previous row's `hash`. Any tamper (edit, delete, insert) breaks the chain visibly. The dashboard has a one-click "Verify chain" button.
Can I run this in Docker for a client?
Yes — `docker/docker-compose.yml` starts the router + Ollama + (optionally) a vector store. One `docker compose up -d` on the client's machine and they have sovereign AI infrastructure. This is exactly what the TBA-TBA0 Fiverr "sovereign AI setup" gigs sell.
How does this fit with FallEnterprise?
FallEnterprise is the productised transformation service (TBA engagements). FallRouter is the software runtime clients keep using after the engagement ends. FallEnterprise's Sovereign tier includes FallRouter as the routing kernel · they compose. FallRouter is also a standalone product for people who don't need consulting, just the router.
Where's the code?
github.com/sjgant80-hub/fallrouter · MIT · single-author. Fork it, modify it, run it, redistribute it. If you build something interesting on top, ping sjgant80@gmail.com — always happy to link out.