Skip to content
Conduit

mcp server

system-one-router

A fast System One decision model (Jev or local Laya) picks which LLM answers each prompt: OpenAI-compatible Go gateway + decision benchmark

mmornati/system-one-routercommunitylistedunreviewed

Set up

Runs on your computer. Pick your agent and operating system.

This project does not publish an install method we can turn into a config. Follow the README instead.

README

synced Oct 21, 2026

🧭 system-one-router

Fast thinking picks the model. Slow thinking answers.

An OpenAI- and Anthropic-compatible gateway where a tiny, cheap "System One" decision model picks the right "System Two" LLM for every prompt: the cheapest one that is good enough.

CI Benchmark Go License

Getting started · How it works · Claude Code & MCP · Benchmark · All docs


Send model: "auto". A decision model (Jev on OpenRouter, or Laya running locally) answers four typed questions about the prompt in one call: topic, complexity, risk, private data. Plain arithmetic over config.yaml then picks the cheapest model that clears the quality floor. No LLM-as-router prompt, no guesswork.

flowchart LR
    C([Your client<br/>model: auto]) --> P[🔒 Pre-check<br/>secrets · PII · size]
    P --> D[🧠 System One<br/>topic · complexity<br/>risk · private]
    D --> S[⚖️ Score<br/>cheapest model<br/>above the floor]
    S --> M[🤖 System Two<br/>Qwen · DeepSeek · GPT<br/>Sonnet · Opus · local]
    M --> K{✅ Good<br/>answer?}
    K -- yes --> R([Answer])
    K -- no --> E[⬆️ Escalate once] --> R

✨ Highlights

💸 Pays for what the prompt needs "hi" goes to a flash model, a multi-region failover design goes to Opus. Load penalties and daily budgets are part of the cost estimate.

🔌 Drop-in for your tools /v1/chat/completions and /v1/messages: OpenAI SDKs, OpenCode and Claude Code work unchanged. There is also an MCP server with route / delegate / feedback tools.

🔒 Private stays local Secrets and PII are caught before anything leaves the machine. With private: local_only, private requests only go to local models, or they are refused.

✅ Checks its own work Optional check-and-escalate: one yes/no call judges the answer and re-sends a weak one to a stronger model.

🔁 Learns from outcomes Every decision, check and rating is logged. cmd/refit re-fits model skills from that data, compared against peers at the same difficulty.

📊 See where the money goes A built-in, dependency-free dashboard: spend, savings, routing reasons, latency and escalations per model.

📏 By the numbers

80 labelled prompts, Jev 1.13 as the decision model (live report):

🎯 Topic accuracy🛣️ Same route as human labels💰 Model cost vs always-Opus⚡ Decision latency🪙 Decision cost
89%72%$1.37 vs $2.40 (−43%)268 ms p50$0.04 / 1k requests

🚀 Quickstart

cp .env.example .env    # put your OpenRouter key in it
go run ./cmd/gateway    # listens on 127.0.0.1:8787
curl -s localhost:8787/v1/chat/completions -D - \
  -d '{"model":"auto","messages":[{"role":"user","content":"Design a multi-region Postgres failover"}]}'
# X-Router-Model / -Reason / -Topic / -Complexity / -Risk: what was picked, and why

Then point your tools at it:

OPENAI_BASE_URL=http://127.0.0.1:8787/v1                              # any OpenAI client, model "auto"
ANTHROPIC_BASE_URL=http://127.0.0.1:8787 ANTHROPIC_AUTH_TOKEN=dummy \
ANTHROPIC_MODEL=auto ANTHROPIC_SMALL_FAST_MODEL=auto claude           # Claude Code

More in Getting started.

📊 Dashboard

📚 Documentation

🚀 Getting startedInstall, run, connect clients
🧠 How it worksPipeline, scoring, decision providers
⚙️ ConfigurationEvery config.yaml key
🔌 HTTP APIEndpoints, X-Router-* headers, feedback
🅰️ Anthropic Messages API/v1/messages details
🤖 Claude Code & MCPProvider mode and MCP server
✅ Check and escalateAnswer check and escalation
📊 Dashboard & event log/dashboard, decisions.jsonl
🔁 Re-fitting skillsLearn skills from outcomes
📏 BenchmarkJev vs Laya, Von, Kev, Clef-flash, VegaML: full results
🦙 Laya sidecarLocal decision model
🏗️ ArchitectureCode layout, make targets
🗺️ RoadmapDone and next

🙏 Credits & license

Successor of ai-dispatch.

Apache-2.0. Laya weights are Apache-2.0 (Convai Innovations); Jev is a hosted TypeSafe model used through OpenRouter.

↑↓ navigate openesc close