Logo
Deploy Now

Stars

221

Forks

15

Watchers

1

Developer links

BitRouter

BitRouter is a context-aware LLM router that learns which model delivers the cheapest successful outcome per workflow step, cutting agent costs by up to 80% while maintaining 96% quality versus all-frontier baselines. Point any agent runtime at http://localhost:4356 with a one-line OPENAI_BASE_URL change and BitRouter routes to OpenAI, Anthropic, Google, Groq, DeepSeek, Mistral, Moonshot, MiniMax, Nvidia, and any OpenAI-compatible endpoint simultaneously, normalizing authentication, streaming, and cross-protocol translation between wire formats. The act-observe-evaluate-learn loop traces every hop with cost, tokens, and latency attribution, scores each decision against a versioned policy-lock.yaml, then tightens routes automatically with no LLM judge in the path. Native MCP gateway auto-discovers tools from connected servers and makes them routable and governed alongside model calls. Agent Client Protocol integration enables the TUI to manage Claude Code, Codex, OpenCode, OpenClaw, Gemini, and Copilot sessions in real time with inline tool-call approval and live streaming. Built-in guardrails inspect, redact, or block risky content before requests leave your network. Virtual keys scope API access per agent or user without exposing upstream credentials. Per-agent spend caps and loop guards contain runaway cost automatically. Multi-account failover reroutes mid-run so rate limits never re-pay completed work. Ships as a single Rust binary via npm or Cargo. Running on a dedicated VPS on RepoCloud with guaranteed CPU, RAM, and SSD, full root SSH access, and a browser serial console. Apache 2.0 licensed.

BitRouter

Benefits

  • Self-Tuning Cost Optimization
  • Closed-loop policy engine learns which cheaper model succeeds per workflow step, cutting run costs by up to 80% while maintaining 96% quality compared to all-frontier baselines.
  • Universal Agent Compatibility
  • Drop-in proxy for any runtime speaking OpenAI or Anthropic APIs with tested integrations for Claude Code, Codex, OpenCode, OpenClaw, Gemini, and Copilot via one env-var change.
  • Built-in Security Guardrails
  • Agent firewall inspects, redacts, or blocks risky content in-router before requests leave your network with virtual keys scoping access per agent and spend caps preventing runaway costs.
  • Protocol-Native Tool Routing
  • MCP gateway auto-discovers tools from connected servers and Agent Client Protocol manages sub-agents as routable primitives alongside model calls in a unified governance layer.

Features

  • Multi-Provider LLM Proxy
  • Routes to OpenAI, Anthropic, Google, Groq, DeepSeek, Mistral, MiniMax, Nvidia, and custom providers through a single OpenAI-compatible endpoint with cross-protocol translation.
  • Policy-Driven Routing
  • Versioned policy-lock.yaml declares model tiers, tool sets, and harness routing with deterministic decision tables that self-tune from production traces without LLM judges.
  • Real-Time TUI Dashboard
  • Ratatui-based terminal interface shows live agent sessions, streaming responses, per-run cost attribution, and inline tool-call permission prompts with keyboard navigation.
  • MCP and ACP Gateways
  • Model Context Protocol gateway governs tools as routable resources while Agent Client Protocol manages coding agent sessions with auto-discovery and JSON-RPC stdio transport.
  • Failover and Load Balancing
  • Multi-account failover reroutes mid-run on rate limits without replaying completed work while provider selection optimizes for cost, latency, or throughput per call.