Typed, composable LLM routing with request/response translation and multi-backend orchestration
Actively maintained. Last release 7 days ago, commits in 22 of the last 26 weeks. A safe choice.
pip install nemo-switchyard
NVIDIA NeMo Switchyard
Switchyard is an open-source library that helps an AI agent choose which model handles each request. It combines efficient models with more capable models so you can balance task success, cost, and latency on your workload.
Use Switchyard through a gateway integration, try it with a local proxy, or embed it in your own harness. You choose the model pool. Switchyard supplies the routing decision. Your gateway or application owns the surrounding service.
How it works
- Configure the models your application can use and choose a routing algorithm.
- The algorithm examines the request or the agent's recent tool activity. Some algorithms call a model to judge the task.
- Your gateway or application sends the request to the selected model. Routing can change as the agent continues its work.
Evaluate the complete agent, model pool, and routing configuration against your single-model baseline. A cheaper model call does not guarantee a cheaper successfully completed task.
Embed the library in your harness
Refer to the embedding example.