BitRouter

A deployable model gateway with inspectable routing policies.
Point an OpenAI-compatible agent at your local BitRouter instance and choose
bitrouter/auto after configuring an auto router and policy. See the
routing guide for setup.
- OPENAI_BASE_URL=https://api.openai.com/v1
+ OPENAI_BASE_URL=http://localhost:4356/v1
Then set the request model to:
bitrouter/auto
BitRouter runs locally and exposes an OpenAI-compatible API, so existing agents and tools can switch over with minimal changes.
You can also give your coding agent the /bitrouter skill to install, configure, migrate to, and troubleshoot BitRouter for you:
npx skills add bitrouter/bitrouter
Try BitRouter Cloud →: Use https://api.bitrouter.ai/v1 with a Cloud credential and a catalog model ID. Hosted routing presets use @<name>; the local bitrouter/auto selector requires a local router.
Core features
Minimal core. Lightweight & extensible.
One Rust router sits between your agents and every model provider. Extend it
with providers, routing policies and operator-configured server tools. Install
BRO separately for workspace tools, skills and local agent delegation.
Interpretable decisions. Under your control.
Routing policy lives in files you own. Routes are inspectable, changes are
diffable, and a live policy changes only when you explicitly publish it.
A customizable router. Adapt it to your workflow.
Start with bitrouter/auto and evaluate the selected model against your own outcomes.
An evaluator can submit evidence through the SDK. An authorized operator publishes
and activates a policy revision explicitly.
Integrates with your agent stack
- Model APIs — OpenAI Chat Completions and Responses, and Anthropic Messages, with cross-protocol routing. Metered Gemini uses Google's OpenAI-compatible Chat endpoint.
- Tools — configure upstream MCP servers through
bitrouter mcp. Server tools run only on routes configured to expose them.
- Local agents — install BRO to run a headless native task or prompt a supported external ACP adapter. BRO uses a gateway endpoint and a client credential. It owns workspace tool approvals and local thread history.
Benchmarks
On Terminal-Bench 2.1, BitRouter cut API cost by 40.9% while achieving nearly the same reward as using gpt-5.6-sol alone.
| Configuration | Reward | Cost / trial | Cost savings |
|---|
gpt-5.6-sol only | 81.56% | $0.830 | — |
| BitRouter | 81.25% | $0.490 | 40.9% |
| Random model mix | 76.50% | $0.553 | 33.4% |
BitRouter dynamically routed between GPT-5.6, Kimi K3, and DeepSeek V4 Flash, retaining nearly all of GPT-5.6’s task performance while substantially reducing model cost.
The random baseline used the same model mix, showing that the savings come from routing decisions—not simply using cheaper models.
Results use the strict 80-task common-valid set and frozen API prices. This is a research benchmark, not an official Terminal-Bench submission.
See the full study and limitations and the BitRouterAI/benchmarks dataset for reproducible results.
Install
The service package installs bitrouter. The optional local harness package
bitrouter-bro installs bro. From a checkout of this revision:
cargo install --locked --path apps/bitrouter
cargo install --locked --path apps/bro