AI Summary

Overview

Switchyard is a powerful Rust proxy and library designed to streamline and enhance your Large Language Model (LLM) traffic. It intelligently routes requests across various LLM providers, seamlessly translates between popular API formats (OpenAI and Anthropic), meticulously records operational metrics, and offers flexible, typed, and composable routing algorithms. Switchyard empowers you to connect coding agents like Claude Code or Codex to open-source models, allowing them to communicate using their native APIs while Switchyard handles the underlying model interaction and translation.

Key Features

  • Universal API Translation: Effortlessly convert requests and responses between OpenAI Chat, Anthropic Messages, and OpenAI Responses formats.
  • Advanced Multi-Backend Routing: Choose from a variety of routing strategies, including random distribution, LLM-as-classifier, signal-driven stage routing, or implement your own custom algorithms.
  • Comprehensive Operational Metrics: Gain deep insights into your LLM traffic with Prometheus metrics covering requests, errors, latency, token usage, and routing overhead.
  • Flexible Deployment: Utilize Switchyard as a standalone proxy, embed its routing logic directly into your Rust applications, or leverage its command-line interface for launching agents.

Typical Use Cases

  • Connecting Agents to Diverse Models: Enable AI coding agents to interact with any OpenAI-compatible endpoint or leverage open-source models served by vLLM, NVIDIA NIM, or Ollama without code modifications.
  • A/B Testing and Benchmarking: Distribute traffic across multiple LLM models to conduct rigorous A/B tests, compare performance, and manage costs effectively.
  • Intelligent Traffic Steering: Implement sophisticated routing logic, such as signal-driven stage routers, to dynamically direct traffic based on conversation context, tool results, or error signals.
  • Building Custom LLM Gateways: Integrate Switchyard's routing and translation capabilities into your existing infrastructure to create a robust and adaptable LLM gateway.

Repository Trajectory

Trended #10 on monthly

September 10, 2026

Trended #12 on weekly

August 22, 2026

Trended #6 on weekly

August 21, 2026

Trended #6 on weekly

August 20, 2026

Trended #4 on weekly

August 16, 2026

⋮

4 more trending entries

First tracked on GitTrend

August 12, 2026

Loading README...

Contributors

Languages

Python

16%

Shell

3%

Rust

81%

About

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.

Related Blogs

Topics

Contributors

Languages

Python

16%

Shell

3%

Rust

81%