Open Source · Apache 2.0

Every OpenRouter model.
One terminal.

Query GPT-4o, Claude 3.5, Mistral, Llama, Gemini, and 200+ more — with streaming markdown responses, live model switching, and per-message cost tracking.

$ pip install switchboard-tui
View on GitHub →
Switchboard claude-3-5-sonnet · 128K ctx
Model
Claude 3.5 Sonnet
anthropic
ctx: 128K
in $3.00/M out $15.00/M

Shortcuts
^K Model Search
^N New Chat
^C Copy Response
^S System Prompt
^Q Quit
Write a Python function to debounce async calls
Here's a clean async debounce implementation:

asyncio.create_task cancels the previous task on each call, so only the last invocation within the delay window actually runs.

```python
import asyncio
from typing import Callable, Any

def debounce(delay: float):
    task = None
    async def wrapper(fn, *args):
        nonlocal task
        if task: task.cancel()
        ...
Ask anything...
Send
in: 18 tok   out: 143 tok   cost: $0.002295   model: anthropic/claude-3-5-sonnet
Features
01

Model browser

Ctrl+K opens a searchable list of every OpenRouter model with provider, context length, and pricing. Filter by name or provider in real time.

02

Streaming markdown

Responses stream token by token and render as markdown — code blocks, lists, and formatting update live as they arrive.

03

Switch mid-conversation

Change models at any point without losing history. Compare how different models handle the same context.

04

Cost tracking

Every message shows tokens in, tokens out, and the estimated USD cost. See exactly what each exchange costs across models.

05

System prompt editor

Ctrl+S opens a full editor for the system prompt. Change persona, context, or constraints without restarting the session.

06

Free models highlighted

OpenRouter's free-tier models are clearly marked in the browser. Start experimenting at zero cost before switching to paid models.

Sample models
Model Provider Context In $/M Out $/M
claude-3-5-sonnet anthropic 128K 3.00 15.00
gpt-4o openai 128K 5.00 15.00
gemini-flash-1.5 google 1M 0.075 0.30
mistral-7b-instruct:free mistralai 32K FREE
llama-3.1-8b-instruct:free meta-llama 128K FREE
deepseek-chat deepseek 64K 0.14 0.28

200+ models available via openrouter.ai/models. Free-tier models need no credits.

Quickstart
01

Install

pip install switchboard-tui
02

Get an API key

Sign up at openrouter.ai — free accounts get access to free-tier models immediately.

export OPENROUTER_API_KEY=sk-or-...
03

Launch

# Start with the default model
switchboard

# Or specify a model directly
switchboard --model openai/gpt-4o
04

Optional config

# ~/.config/switchboard/config.toml
api_key = "sk-or-..."

[chat]
default_model = "anthropic/claude-3-5-haiku"
temperature = 0.7

Suryanand Sunil

@Suryanandx · suryanand.com