Busbar
A local LLM multiplexer. One /v1 endpoint in front of 292 providers.
In electrical engineering, a busbar is the solid copper strip that collects power from multiple sources and feeds every circuit on one common rail. Busbar does the same for 292 LLM providers on localhost:20128/v1.
What Busbar is
Busbar is a local gateway that speaks the OpenAI, Anthropic, and Gemini APIs on port 20128. It connects 292 native providers behind one /v1 endpoint: OAuth subscriptions, API keys, free tiers, aggregators, local models, web search, web fetch, TTS, STT, image, video, and embeddings.
Point your tools at it, add accounts in the dashboard, and it handles format translation, model combos, multi-account fallback, token refresh, and usage tracking.
Busbar is a fork of 9Router. The data directory is ~/.busbar (%APPDATA%\busbar on Windows). Existing ~/.9router data is copied over automatically on first start, so databases, API keys, and connections keep loading.
Why Busbar exists
Why OmniRoute feels bloated
OmniRoute grew into a monolith: 193 SQLite migrations, 90+ CI ratchet scripts, embedded A2A/ACP agent servers, Qdrant vector memory, gamification, sponsor banners, chaos mode, streaming regex PII redaction that mutates payloads, and a 25-file heuristic router. It uses more RAM, starts slowly, and ships features a local gateway should not run.
Why stock 9Router was not enough
Stock 9Router is fast and lean, but:
- It ships about 144 providers.
- The dashboard has no provider/model search and no category or media filtering.
/v1/modelsblocks for 15 to 23 seconds waiting on slow upstream catalogs.- No native
web_searchandweb_fetchserver-tool redirects for non-Anthropic models. - It lacks multi-proxy failover and stealth-model reasoning fixes.
What Busbar adds
Busbar keeps 9Router's footprint and ports the useful parts of OmniRoute without the rest.
- 292 native providers and a filter bar. 150+ additional providers with config-driven connection testing. The dashboard has instant search by provider or model ID,
All | Configured | Compactviews, 13 category chips, and 7 media-kind filters. Includes nativefreepi(fp/*): FreePi's ad-supported free tier with GitHub device-code sign-in, a daily USD allowance, and 27 models (Claude Sonnet 5.5, Gemini 4 Argon, GPT-6.1 Sol, Kimi K3.1 Pro, DeepSeek V4). Also nativefreebuff(fb/*): Freebuff's ad-supported free tier with device-key signed requests (Ed25519), a live model catalog, 12 models, and Freebucks quota display. - Sub-second
/v1/models(23.4s to 1.0s). Catalogs refresh in the background and persist in the SQLitekvtable, so/v1/modelsnever waits on the Kiro, Qoder, Copilot, or Cursor resolvers. - Native
web_searchandweb_fetchredirect. Claude Code's web search and fetch tools work on Gemini, DeepSeek, GLM, Codex, or any OpenAI model, routed through Exa, Brave, Tavily, Serper, or SearXNG. Includes SSRF protection and domain filtering. - Claude Code auto-permission classifier compat. The optional
claudeClassifierCompatsetting lets non-Claude models answer Claude Code's security classifier without failing permission prompts. - Per-connection proxy pool rotation and local direct toggle. Rotate requests across Cloudflare workers, SOCKS5/HTTP proxies, and your own IP (
__local__), per connection or per retry. Timed-out relays are skipped without locking the upstream account. - Streaming empty-turn retry and thinking-signature recovery. The first 128 KB of every upstream SSE stream is cloned and checked, so empty or aborted turns retry before bytes reach the client. Claude 5/5.5
CAISprotobuf signatures are validated, VertexthoughtSignaturepoisoning is fixed, and invalid historical thinking signatures are recovered automatically. models.devauto-pricing. 4-rate pricing (input, output, cache read, cache write/reasoning) across 2,180+ model basenames, including custom Azure and OpenAI-compatible deployments.- RTK and Headroom protected-tools guard. Output from
Read,Edit,Write,Grep,NotebookEdit,MultiEdit,patch,apply_patch, andanchoris never compressed or summarized. Error results are preserved too. Line numbers and exact strings thatEditdepends on stay intact. - OpenCode
FreeTierErrorand abuse direct-egress replay. When OpenCode free models return aFreeTierErroror an IP-abuse block, the request replays once through the next proxy in the pool or your direct egress, instead of failing the turn.
Installation and quick start
Global install:
npm install -g busbar-ai
busbar
Or run with npx:
npx busbar-ai
The dashboard opens at http://localhost:20128/dashboard. The API is served at http://localhost:20128/v1.
The 9router command still works as an alias for busbar.
Changing the port
The default port is 20128. Port resolution order:
busbar --port <port>(or-p <port>); add--save-portto keep it as the new defaultPORT=<port>environment variable- Dashboard, Settings, Server Port (saved to
port.jsonin the data directory, applies on next restart) - 20128
Claude Code
export ANTHROPIC_BASE_URL=http://localhost:20128
export ANTHROPIC_AUTH_TOKEN=<your Busbar API key>
claude
Codex and the OpenAI SDK
export OPENAI_BASE_URL=http://localhost:20128/v1
export OPENAI_API_KEY=<your Busbar API key>
from openai import OpenAI
client = OpenAI(base_url="http://localhost:20128/v1", api_key="<your Busbar API key>")
r = client.chat.completions.create(
model="<provider/model or combo name>",
messages=[{"role": "user", "content": "hello"}],
)
Build from source
git clone https://github.com/TejasLamba2006/busbar.git
cd busbar
cp .env.example .env
npm install
npm run dev
Set INITIAL_PASSWORD, JWT_SECRET, and API_KEY_SECRET in .env before exposing the server beyond localhost.
Docs
Author and support
Made by Tejas Lamba (GitHub). Support the project via PayPal or GitHub Sponsors.
License
MIT
