Switchboard

Route every task to the model it needs.

Switchboard is an open-source model router for Claude Code and Codex. It picks the model and reasoning effort for each new conversation, then locks the route so your prompt cache stays useful.

npm install -g @ruban24/switchboardswitchboard init

macOS or Linux · Node 22.18+ · Claude Code or Codex · Jev key or self-hosted Laya

Route panel: choose an example task and a coding agent to see which tier, model and effort Switchboard would set.
Pick a taskExample
Route setGPT-6 SOL · LOWLocked
One Jev API call
Capability
Balanced
0.90
Effort
low
0.84
Your policy
Min conf.
0.70
pass
Model
GPT-6 Sol
  1. P1FastGPT-6 Luna$0.50$0.10 in
  2. P2BalancedGPT-6 Sol$10$2 in
  3. P3StrongGPT-6 Sol$10$2 in
  4. P4HighestGPT-6 Astra$50$10 in

Locked for this conversation. Follow-ups, tool calls and resume keep the same model and effort, so Switchboard preserves your prompt cache when possible.

Illustrative route

Implement reverseList(head) with tests

Example [Router] gpt-6-sol / low — current tier mapping.

GPT-6 SOL · LOWLocked

Output-token list prices span 10× for Claude and 100× for Codex.

If every task goes to the strongest model at maximum effort, a one-line rename is billed at the top rate. Higher effort costs more too, because reasoning tokens are billed as output.

On a Claude or ChatGPT plan you pay in usage limits instead of dollars. Switchboard itself is free; it adds one hosted Jev call per classified user turn, billed by your Jev provider. Experimental self-hosted Laya uses your own server.

Claude Code10× top tier vs bottom, output
Claude Code: list price per million tokens by tier
PlatformModelOutput price on a shared scaleOutputInput
P1 FastHaiku 4.5Fast$5$1
P2 BalancedSonnet 5Balanced$10$2
P3 StrongOpus 5.5Strong$20$4
P4 HighestFable 5.1Highest$50$10
Codex100× top tier vs bottom, output
Codex: list price per million tokens by tier
PlatformModelOutput price on a shared scaleOutputInput
P1 FastGPT-6 LunaFast$0.50$0.10
P2 BalancedGPT-6 SolBalanced$10$2
P3 StrongGPT-6 SolStrong$10$2
P4 HighestGPT-6 AstraHighest$50$10

Two decisions, made once per conversation.

Switchboard’s reasoning-based routing makes two decisions: which model has enough capability, and how much effort that model needs. A strong model at low effort and a small model at maximum effort are two different routes, and Switchboard picks between them.

  1. Jev assesses the task

    The local proxy sends the task to Jev, a System One model, in one request. Jev returns structured judgments, each with a confidence from 0 to 1. Prompt length alone never decides. Experimental self-hosted Laya can assess the task instead.

    1. Step 1
      Capability neededBalanced 0.91GPT-6 Sol
    2. Step 2
      Effort for GPT-6 SolMedium 0.86
  2. Your policy makes the final choice

    Local rules map the tier to a model you allow, check confidence, then set the effort.

    • Excluded modelsnever selected
    • Capability below 0.70balanced minimum
    • Effort below 0.70profile default
    • Effort caps and mappingsapplied last
    • Jev unavailablefallback: strong, high
  3. The route stays locked

    The pair is saved on your machine and reused for the rest of the conversation. A new conversation gets a fresh decision.

    ConversationGPT-6 SOL · MEDIUM

Prefer a local classifier? Use Laya.

Switchboard’s experimental Laya integration lets you classify coding tasks on your own machine. Laya supplies the judgments; your policy selects the model and effort for Claude Code or Codex.

You run the classifier, with no hosted classifier API charge. Coding requests still use your existing Anthropic or OpenAI connection. The current integration is tested with short English tasks and keeps conservative fallbacks when Laya is uncertain or unavailable.

Explore Laya routing and setup

One route per conversation keeps the cache useful.

Coding agents resend the same context every turn: instructions, tool definitions, history and code. Prompt caching reuses that work, but only on the same model, so switching to a cheaper model halfway through can make the whole run cost more. Switchboard keeps the model and effort fixed from the first task to the last follow-up, so it preserves the cache when possible.

You can always see the route.

Claude Code shows the selected model and effort in a status line beneath your own. Codex prints a routing notice in the conversation. switchboard explain shows the full decision for any saved conversation.

RecordedEarlier model lineup: the recording shows GPT-5.6 Terra / low.

Your policy sets the rules.

The shipped policy already maps all four tiers for both CLIs. Override only what you need in~/.config/switchboard/policy.json; objects merge with the defaults, and package updates keep your file.

  • Exclude models your plan can’t use, or tiers you’d rather not pay for.
  • Map any tier to a different model.
  • Remap reasoning effort, or cap how high it can go.
  • Tune confidence thresholds and fallback behavior.

Customize your policy

~/.config/switchboard/policy.json
{
  "excludedModels": {
    "claude": ["claude-fable-5-1"],
    "codex": ["gpt-6-astra"]
  }
}
$ switchboard config check   # validate
$ switchboard config show    # merged policy

Your code never passes through a Switchboard server.

Switchboard runs as a local proxy on your machine. This is everything that leaves it, where it goes, and who can see it.

What leaves your machine when you use Switchboard
WhatWhere it goesWho can see it
The task text you type, including any code or secrets in itYour Jev provider (TypeSafe, Vercel AI Gateway or OpenRouter), or your experimental self-hosted Laya serverThat provider under its terms, or you if Laya runs locally
Coding requestsAnthropic or OpenAI, exactly as without SwitchboardYour coding provider, as today
Your policy, route history and classifier key, if usedStays on your machine. History has no raw prompts by default, and the key file is readable only by your userYou
Usage data or telemetryNot collected. Switchboard has no server, account or telemetryNo one

Read the full data flow before using it with sensitive work

Install in three commands.

Switchboard uses your agent’s existing login and doesn’t install the agent for you. Setup makes no AI calls; your first routed task tests the connection.

Runs on
macOS or Linux, Node.js 22.18+
Agents
Claude Code or Codex, installed and signed in
Classifier
A Jev API key from TypeSafe, Vercel AI Gateway or OpenRouter, or an experimental self-hosted Laya server
Not yet
Windows, desktop apps, remote or background sessions
  1. $ npm install -g @ruban24/switchboard

    Or brew install ruban-24/tap/switchboard, or run it once with npx.

  2. $ switchboard init

    Detects your agents, configures your Jev key or self-hosted Laya connection, and can add a config path to your shell profile. switchboard doctor checks it all.

  3. $ switchboard claude   # or: switchboard codex

    Launches your agent with routing on. The first task sets the first route.

More agents and classifiers are planned.

The routing policy doesn’t depend on one classifier or one agent. These are planned, without dates. Each classifier needs an adapter for its judgments and confidence format, which makes adapters a good first big contribution.

Coding agents
  1. Claude Code (in service)
  2. Codex (in service)
  3. Pi (planned)
  4. OpenCode (planned)
System One models
  1. Jev (in service)
  2. Kev (planned)
  3. Cua-S1 (planned)
In service
Claude Code, Codex and Jev
Experimental
Self-hosted Laya
Planned agents
Pi, OpenCode
Planned System One models
Kev, Cua-S1

Questions

Something not covered? Ask on GitHub.

Does Switchboard cost anything?

No. It is free and Apache-2.0 licensed, with no Switchboard account or subscription. Hosted Jev calls are billed by your Jev provider; experimental self-hosted Laya has no classifier API charge. You still pay your coding provider as you do today.

How is Switchboard different from Claude Code Router?

Claude Code Router sends Claude Code requests to other providers, such as DeepSeek or Gemini. Switchboard keeps your own Claude or OpenAI login and picks which model, and how much reasoning effort, each conversation gets.

What is Jev?

Jev is TypeSafe’s System One model. It returns typed judgments with confidence scores instead of text, in one fast request. Switchboard uses it to judge each task.

Does it see my code?

Switchboard has no server. The task text you type, including any code or secrets in it, goes to your chosen Jev provider or experimental self-hosted Laya server. Coding requests go to Anthropic or OpenAI as usual. Raw prompts are not logged locally unless you turn that on.

Can I override a route?

Yes. Choosing a model explicitly in Claude Code or Codex bypasses automatic routing, and your policy can exclude, remap or cap any model and effort.

What happens if Jev is down or unsure?

The new conversation uses your configured fallback, which defaults to the strong tier at high effort (Opus 5.5 or GPT-6 Sol). Low confidence on capability applies a balanced minimum instead of guessing low.

Will it make answers better or cheaper?

It matches the model and effort to the task’s reasoning demands under your rules. It cannot guarantee a correct answer or a cache hit, so review results as you normally would.

Windows, the desktop apps, background sessions?

Not currently. Switchboard supports local interactive CLI sessions of Claude Code and Codex on macOS and Linux.

Try it on your next task.

Free and open source. Three commands to install, and it runs on your machine.

npm install -g @ruban24/switchboardswitchboard init