This is an early release preview. You may encounter bugs.
Switchyard logo
Unclaimed

Tool inference

Switchyard

Switchyard lets LLM applications route traffic across models and providers while preserving native OpenAI and Anthropic API compatibility -

Built by NVIDIA

A 86/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
Discussion

01 / Summary

About Switchyard.

NVIDIA NeMo Switchyard is a library that decides which model handles each request an AI agent makes. It pairs efficient models with more capable ones so you can trade off task success, cost, and latency on your own workload. You choose the model pool, Switchyard supplies the routing decision, and your gateway or application owns the surrounding service.

A routing algorithm examines the request or the agent's recent tool activity, and some algorithms call a model to judge the task. The gateway or application then sends the request to the selected model, and routing can change as the agent continues its work. Evaluate the whole agent, model pool, and routing configuration against a single-model baseline, since a cheaper model call does not guarantee a cheaper completed task.

You use Switchyard through a gateway (hosted on OpenRouter, or as plugins for LiteLLM and NeMo Relay), through a standalone OpenAI- and Anthropic-compatible proxy for demos and evaluation, or embedded as a library in a Rust or Python harness. Guides cover the Pi and Oh My Pi agents. The software is pre-1.0, and APIs, configuration, and routing behavior can change between releases.

Routing choice How it chooses
Auto The default preset: Execution routing, efficient-first, with a confidence threshold and no classifier call
Task A model judges whether the efficient model can handle the task
Execution Uses recent tool activity and outcome signals to choose a model as the agent runs
Composite A classifier sets the default model tier when execution signals are uncertain
  • Per-request routing: picks a model from your pool for each agent request, balancing task success, cost, and latency
  • Routing algorithms: Auto, Task, Execution, and Composite, plus plan/execute, escalation, advisor, sub-agent, and random strategies
  • Gateway integrations: hosted on OpenRouter, with plugins for LiteLLM (experimental) and NeMo Relay
  • Local proxy: a demo server compatible with the OpenAI and Anthropic APIs, including a local Codex service
  • Embeddable library: routing inside your own Rust application or Python harness, where you own model calls, credentials, and retries
  • Agent guides: integration guides for Pi and Oh My Pi
  • Benchmarking: tooling to run your own baseline and routing comparisons, plus soak tests for latency and routing overhead

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with Switchyard.

Browse the catalog for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get Switchyard →

Browse the catalog