Switchboard

Laya router for Claude Code and Codex.

Keep task classification on your machine. Switchboard uses self-hosted Laya to assess your coding task, then your policy selects the model and reasoning effort for the conversation.

Local judgments.
Your routing policy.

Laya is an open-weights System One model from Convai Innovations. It returns structured decisions about text. In Switchboard, it answers questions about task type, required capability, available context and effort.

  1. Laya assesses the task. Switchboard sends the extracted task and routing questions to your Laya server.
  2. Switchboard applies your rules. Your local policy maps the answers to an allowed model and effort, with confidence gates and fallbacks.
  3. Your coding CLI does the work. The chosen pair stays pinned through follow-ups, tool calls and resume. Explicit native model choices bypass routing.

With Laya running on this machine, classification stays local. Coding requests still go to Anthropic or OpenAI with the conversation and tool context the native CLI normally sends. Read the privacy and data flow details.

Run Laya.
Connect Switchboard.

macOS or Linux · Python 3.10+ · Node.js 22.18+ · Claude Code or Codex installed and signed in.

1. Start the local classifier

This is the tested English setup. The first start downloads about 800 MB of model weights.

python3 -m venv ~/.local/share/laya/.venv
~/.local/share/laya/.venv/bin/python -m pip install "laya[serve]==0.3.20"
LAYA_HOST=127.0.0.1 LAYA_MODELS=english LAYA_PRELOAD=1 \
  ~/.local/share/laya/.venv/bin/laya-serve

Keep this terminal running. LAYA_HOST=127.0.0.1 binds the server to this machine. For GPU options, authentication or a remote server, use the full Laya setup guide.

2. Select Laya in Switchboard

In a second terminal, run these commands. During switchboard init, choose Self-hosted Laya. Keep the defaults: http://127.0.0.1:8000 and english. A local server needs no classifier API key unless you configured one.

npm install -g @ruban24/switchboard
switchboard init
switchboard doctor
switchboard claude   # or: switchboard codex

switchboard doctor checks local configuration; it does not make a classification request. Your first new routed conversation exercises Laya. Check the status line or Codex router notice to see the selected model and effort.

Jev or Laya?

Jev is the default classifier. Choose Laya if you want to run classification on your own hardware and are comfortable with an experimental integration. Both feed the same deterministic routing policy.

Classifier options in Switchboard
What changesHosted JevSelf-hosted Laya
Where classification runsYour chosen Jev providerYour machine or your own server
SetupA provider API keyA running Laya server
Classifier costProvider API chargesYour hardware and hosting; no hosted classifier API charge
Coding model accessYour existing Claude Code or Codex authentication and billing

These are deployment choices, not an accuracy or speed ranking. Switchboard has not yet evaluated Laya routing quality against Jev. Upstream Laya benchmarks do not measure this coding workflow.

What to expect today.

  • Short English tasks. The tested integration uses the English checkpoint. Switchboard sends at most 700 characters to Laya; longer tasks are marked as lacking context and use the uncertain fallback for a new conversation.
  • Conservative choices. Early synthetic checks produced confidence below the default 0.70 gates. That can raise a routine task to the balanced tier and keep effort at least at the model’s default. Lower thresholds are not evidence of better routing.
  • A fallback when Laya is unavailable. A server error or timeout uses your configured fallback for a new conversation, which defaults to the strong tier at high effort. Saved conversations keep their route.
  • Local classification, hosted coding. Laya does not make Claude Code or Codex an offline coding assistant. Your normal coding subscription limits or API charges still apply.
Connection details and troubleshooting