Switchboard: Seeing What My Models Actually See

I’ve been running more and more of my AI workload on local hardware over the last few months. Morning news briefings, network security analysis, household budget categorization, a chat interface, and a coding assistant in my editor all talk to models running on machines in my house instead of somebody else’s data center.

That setup works pretty well when everything is behaving. When it isn’t, figuring out why is a nightmare.

So I built a tool to fix that. It’s called Switchboard, it’s open source, and it solves two problems that kept biting me.

Problem One: What Is My Harness Actually Sending?

Every AI tool you use wraps your question in a whole lot of other stuff before it reaches the model. There’s a system prompt telling the model who it is and how to behave. There are tool definitions describing every function the model is allowed to call. There’s conversation history, retrieved documents, memory snippets, and whatever else the harness decided was relevant.

You almost never get to see any of it.

In theory you could just ask the model to tell you what its system prompt says. In reality that’s not going to end well. Models summarize instead of quoting, they leave things out, they get confused about which parts came from you and which came from the harness, and a lot of them are explicitly instructed not to disclose that information in the first place. Even when one does cooperate, you have no way of knowing whether what it told you is accurate.

And the thing I usually care about isn’t even the wording. It’s the size. A system prompt that eats half of the context window before the user has typed a single word is a problem no matter how well it’s written.

Here’s the thing, though: all of that text has to travel over the network to get to the model. If you put something in the middle of that connection, you can see every byte.

That’s the first half of what Switchboard does. It sits between my tools and my models, and when I turn on capture for a particular client, it saves the exact request that client sent, exactly what each model was sent after any translation, and the full response that came back. Then there’s a small web page that breaks each request down into its parts and shows how big each one is.

The first time I pointed it at my chat interface, I found out that 82% of the prompt was tool definitions. A request I had assumed was mostly a couple of documents and a question was 70,246 tokens, and 57,744 of those were descriptions of tools the model didn’t need for that question. A single task-manager integration accounted for about 18,000 tokens by itself, and roughly two thirds of that was the same block of schema definitions copied into each of its 59 tools.

No amount of asking the model would have told me that.

It also caught something I’d been blaming on the wrong culprit for days. Every time I attached a document in my chat interface there was a long pause before my main model even started working. I was convinced it was the web search feature, so I turned that off. All that accomplished was making the models start pulling web pages with cURL instead of using the search tool. (Not my finest hour.) The capture showed the real cause: the chat interface was quietly sending a separate request to a different, slower model on another machine to generate search queries for the attached file, and that request had to finish before mine could start. Once I could see the traffic, the fix took about thirty seconds.

The most recent version goes a step further and records the response, too. For every captured request I can see how many output tokens went to thinking versus answering versus tool calls, and for streamed answers, a timeline of when each part was produced. That turned up another one. A model was writing its tool calls as plain text, so the chat interface displayed them to me instead of running them. Switchboard now flags that automatically, because it turned out to be a sign that the model was trying to call a tool that wasn’t in its list.

Problem Two: Too Many Machines, Too Many Config Files

The second problem is more mundane, but it was costing me a lot more time.

I have several machines in the house that can run models. A server with a decent GPU does most of the heavy lifting. A Mac picks up the slack. A desktop sits under my desk with a gaming card that turns out to be shockingly fast with the right small model. And when all of those are down, I’m willing to pay a cloud provider a few cents to make sure my morning briefing still shows up.

The problem is that every tool I run had its own idea of which machine to talk to. Each one had a URL, an API key, and a model name hard-coded into its configuration. Want to try a new model? Update five config files and restart five containers. Taking the GPU server down for maintenance? Everything pointed at it just fails until I bring it back.

And I tinker with these machines constantly. That’s half the fun. But it meant that my tinkering kept breaking things that I actually depended on.

I suppose I could have fixed this by installing LiteLLM and configuring that properly, and that’s where I started. Two problems kept me from relying on it. First, configuration is a bit annoying and fiddly and the more I worked with it the more it felt like I was using a nuclear weapon to do a task that a fly swatter would have solved. And second, they are a great target for a supply chain attack and have been hacked in the past to allow malicious individuals to steal people’s credentials.

As the CISO for a tech company, I’ve seen colleagues in other companies have to work long hours to remediate those kind of issues. I really don’t want to clean that mess up at home as well.

Switchboard fixes that by giving every tool a single model name to ask for. Behind that name is an ordered list of real models, which Switchboard calls blocks. Switchboard tries the first block, and if it fails, it moves on to the next one. My current chain looks like this:

  1. Qwen on the GPU server
  2. A different model on the Mac
  3. Claude Haiku in the cloud, with a $5 per day spending cap

A refused connection, a server error, a timeout, a stream that stalls halfway through an answer — any of those moves the request to the next machine on the list. The tool that asked never knows the difference. Every response comes back with the same model name no matter which machine actually answered, and Switchboard translates between the OpenAI and Anthropic formats in both directions, so a tool that only speaks one of them can still use a model that only speaks the other.

The real payoff is how easy it makes changes. The configuration is one YAML file, and Switchboard picks up edits within five seconds without a restart.

Recently I loaded a new model on the GPU server and added it to the top of the chain. Every one of my tools started using it immediately. A few hours later I decided it wasn’t very good, deleted three lines, and everything went back to Qwen. I never touched a single tool’s configuration. That’s exactly how I wanted this to work.

Failing Over Cleanly

Before I trusted this with anything important, I wanted to know what actually happens when a model isn’t there. My worry was that a request for a model the server no longer had would come back as an error that stopped the chain cold, instead of moving on to the next machine.

So I tested it instead of guessing. My GPU server only keeps one model loaded at a time, and when you ask it for a different one it answers with a “not found” error in about 50 milliseconds. Switchboard treats that as a reason to move on, so the request goes straight to the next block. That means I can leave models in the chain that aren’t loaded right now, and whichever one is actually running picks up the work.

The one place Switchboard deliberately refuses to fail over is a request that’s genuinely broken, like a malformed tool definition. That request would fail on every machine in the chain, and the last machine in the chain charges money. Better to send the error straight back to the tool that made the mistake.

Keeping It Simple

The temptation with a project like this is to keep piling features on. I’ve already said no to concurrency limits, request rewriting, and sticky sessions. Every one of those would have solved a real edge case, and every one of them would have made Switchboard harder to reason about when something went wrong at 3 AM.

What’s there is pretty minimal. It’s a single Python container with a read-only filesystem, no provider SDKs, and five dependencies. Prompt capture is off by default and turned on per tool, captures are compressed and deleted after seven days, and the request log only ever records timing, routing, and token counts — never the contents of a conversation. The inspector page needs an admin key, and the only thing it can show you is what you’ve already chosen to capture.

Should You Use It?

If you only run one model on one machine and you’ve never wondered what your tools are sending it, you probably don’t need this.

But if you’re juggling more than one inference box, or you’ve ever stared at a model doing something baffling and wished you could see exactly what it was given, it’s worth an afternoon. The repository has a Docker Compose file, an example configuration, and a check command that validates your config and pings every model before you deploy.

The single most valuable thing it has done for me so far is answer a question I’d never thought to ask: how much of what I send my models is actually my question? For my chat interface, the answer was less than 2%.