Switchyard
Switchyard lets LLM applications route traffic across models and providers while preserving native OpenAI and Anthropic API compatibility - enabling flexible model selection, benchmarking, and cost/performance optimization.
Switchyard, a Rust proxy for LLM traffic
Switchyard is a Rust proxy and library that routes LLM requests across providers while translating between OpenAI and Anthropic API formats.
What it does
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, according to the README. GitHub frames the same idea as letting LLM applications route traffic across models and providers while preserving native OpenAI and Anthropic API compatibility.
Why it exists
The README frames the reason: point a coding agent like Claude Code or Codex at an open source model, and Switchyard translates between the OpenAI Chat, Anthropic Messages, and OpenAI Responses formats. The agent keeps speaking its native API while the request is served by vLLM, NVIDIA NIM, Ollama, or any OpenAI compatible endpoint.
Routing strategies
Several strategies are listed: random routing for fixed traffic splits, an LLM as classifier that decides between weak and strong tiers, a signal driven stage router that reads tool results and errors already in the conversation, an escalation router, and a passthrough that registers one target under one model ID with no decision.
Maturity and the three paths
Switchyard is pre alpha and evolving rapidly, with APIs expected to change before v1.0. The quick start offers a launcher path to run Claude Code, Codex CLI, or OpenClaw through it, a server path for a standalone proxy, and a library path that embeds routing in a Rust application without owning an HTTP stack.
Editorial conclusion
Switchyard is explicitly pre alpha, with its API expected to change before v1.0. This review describes the project as its README does and avoids predicting how the code will hold up.
Community notes