Switchyard
Switchyard is a Rust proxy and library for LLM traffic. It routes requests across providers, translates between OpenAI and Anthropic APIs, records operational metrics, and provides typed, composable routing algorithms. Why Switchyard? Point a coding agent such as Claude Code or Codex at an open-source model. Switchyard translates between the OpenAI Chat, Anthropic Messages, and OpenAI Responses formats, so the agent keeps speaking its native API while the request is served by vLLM, NVIDIA NIM, Ollama, or any OpenAI-compatible endpoint. The same proxy can spread traffic across several models for A/B benchmarking, apply signal-driven stage routing, or run a custom algorithm you write yourself. Protocol Translation: convert between OpenAI Chat, Anthropic Messages, and OpenAI Responses formats Multi-Backend Routing: random routing, LLM-as-classifier routing, signal-driven stage-router, or your own algorithm Operational Metrics: Prometheus metrics cover requests, errors, latency, tokens, and routing overhead Switchyard is pre-alpha software that is evolving rapidly. The API and algorithms are expected to change significantly before we reach v1.0.
View Switchyard on GitHub
Switchyard is a Rust proxy and library for LLM traffic. It routes requests across providers, translates between OpenAI and Anthropic APIs, records operational metrics, and provides typed, composable routing algorithms.
Why Switchyard? Point a coding agent such as Claude Code or Codex at an open-source model. Switchyard translates between the OpenAI Chat, Anthropic Messages, and OpenAI Responses formats, so the agent keeps speaking its native API while the request is served by vLLM, NVIDIA NIM, Ollama, or any OpenAI-compatible endpoint. The same proxy can spread traffic across several models for A/B benchmarking, apply signal-driven stage routing, or run a custom algorithm you write yourself. Protocol Translation: convert between OpenAI Chat, Anthropic Messages, and OpenAI Responses formats Multi-Backend Routing: random routing, LLM-as-classifier routing, signal-driven stage-router, or your own algorithm Operational Metrics: Prometheus metrics cover requests, errors, latency, tokens, and routing overhead
Switchyard is pre-alpha software that is evolving rapidly. The API and algorithms are expected to change significantly before we reach v1.0.
Switchyard at a glance
| Stars | 3.2k |
|---|---|
| Forks | 315 |
| Language | Rust |
| License | Apache-2.0 |
| Last update | 2026-09-28 |
| Contributors | 57 |
How to install Switchyard
bash curl -LsSf https://astral.sh/uv/install.sh | sh
Navid.me is reader-supported. When you buy through links on this site, I may earn an affiliate commission. Learn more.
More repo topics
More free tools
Related MCP servers & CLIs
The most actionable AI newsletter for founders
Every week, get proven AI strategies, curated tools, and step-by-step systems to grow your audience, create better content, and build a profitable creator business.
No fluff, no filler, no BS. Just five minutes each week that might level up your online business and life.
P.S. Sign up now to get free access to my ultimate AI tools guide for creators.



























