Switchyard is a Rust proxy and library for routing traffic between LLM clients and model backends. It translates among OpenAI Chat, OpenAI Responses, and Anthropic Messages formats so agents can keep using their native APIs. Requests can be distributed across vLLM, NVIDIA NIM, Ollama, OpenRouter, and other compatible endpoints. Routing strategies include random splits, LLM classification, signal-driven stage routing, escalation, and custom algorithms. Prometheus metrics track requests, errors, latency, tokens, and routing overhead. Developers can run it as a standalone server, launch coding agents through it, or embed its routing logic in Rust applications. The project is currently pre-alpha and explicitly marked experimental rather than production-ready.
Features
- OpenAI and Anthropic protocol translation
- Multi-backend LLM traffic routing
- Random, classifier, stage, and escalation routing
- Prometheus operational metrics
- Standalone server and agent launcher
- Embeddable Rust routing library