gitwtfhub

wtf is switchyard?

nvidia-nemo/switchyard — explained in plain English

Analysis updated 2026-08-13

1,044RustAudience · developerComplexity · 3/5LicenseSetup · moderate

TL;DR

A Rust proxy that translates AI coding agent requests between OpenAI and Anthropic formats and routes them across different language model providers.

Mindmap

mindmap
  root((Switchyard))
    What it does
      Routes LLM traffic
      Translates API formats
      Records metrics
    Tech stack
      Rust
      OpenAI API
      Anthropic API
      Prometheus
    Use cases
      Run local models
      AB test models
      Track latency
    Audience
      Developers
      Agent builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Point Claude Code or Codex at a self-hosted or open source model instead of a paid API.

REASON 2

Run A/B tests comparing different models by splitting traffic between them.

REASON 3

Track request latency, errors, and token usage with Prometheus metrics.

REASON 4

Embed custom routing logic inside an existing Rust proxy or gateway.

What's in the stack?

RustOpenAI APIAnthropic APIPrometheus

How it stacks up

nvidia-nemo/switchyardlitellm-labs/litellm-agent-control-planeryancodrai/turbovec
Stars1,0441,0691,015
LanguageRustRustRust
Last pushed2026-06-20
MaintenanceMaintained
Setup difficultymoderatemoderateeasy
Complexity3/54/53/5
Audiencedeveloperpm founderdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Needs an OpenRouter API key or a self-hosted model backend such as vLLM or Ollama.

Apache 2.0: free to use, modify, and distribute, including commercially, as long as you keep copyright and license notices.

Wtf does this do

Switchyard is a proxy and library, built in Rust, that manages traffic between AI coding agents and the language models answering them. If you point a tool like Claude Code or Codex at an open source model, Switchyard sits in between and translates the request into whatever format that model's server expects, whether that is the OpenAI Chat format, the OpenAI Responses format, or the Anthropic Messages format. The agent keeps talking in its own native language while Switchyard handles the translation to servers such as vLLM, NVIDIA NIM, or Ollama. Beyond translation, Switchyard can route traffic across several different models at once. This makes it possible to run A/B tests comparing model performance, or to write custom rules that send different kinds of requests to different models based on signals already present in the conversation. It also collects operational metrics such as request counts, errors, latency, and token usage, and exposes them in Prometheus format so they can be tracked over time. There are three ways to use it. The launcher path installs a command line tool that runs Claude Code, Codex, or OpenClaw through Switchyard with one command. The server path runs Switchyard as a standalone proxy that any OpenAI or Anthropic compatible client can connect to. The library path lets Rust developers embed the routing logic directly inside their own application, handing model calls back to their own code rather than owning the network connection itself. The project is described by its own maintainers as pre-alpha, meaning it is still changing quickly and is not meant for production use yet. It is licensed under Apache 2.0.

Yoink these prompts

Prompt 1
Show me how to install Switchyard and launch Claude Code through it using an OpenRouter API key.
Prompt 2
Write a routes.toml config for Switchyard that splits traffic between two models for an A/B test.
Prompt 3
Explain the difference between Switchyard's launcher path, server path, and library path.
Prompt 4
Help me embed switchyard-libsy in my own Rust application to route model calls myself.

Frequently asked questions

wtf is switchyard?

A Rust proxy that translates AI coding agent requests between OpenAI and Anthropic formats and routes them across different language model providers.

What language is switchyard written in?

Mainly Rust. The stack also includes Rust, OpenAI API, Anthropic API.

What license does switchyard use?

Apache 2.0: free to use, modify, and distribute, including commercially, as long as you keep copyright and license notices.

How hard is switchyard to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is switchyard for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.