LiteLLM adds NVIDIA NeMo Switchyard to route coding agents by tool history
Builders can now steer agent sessions between efficient and capable models based on recent tool calls and failures without changing client code.
- 1. Pick SwitchyardSelect it alongside Heuristics, LLM, and Decisions Model
- 2. Choose modelsSet a capable model for hard stretches and an efficient model for routine work
- 3. Add a judge (optional)Use an LLM or decision model for turns with unclear tool signals
LiteLLM now includes NVIDIA NeMo Switchyard as an auto-router strategy in its dashboard and YAML configuration. Instead of inspecting user prompts, Switchyard evaluates a rolling window of recent tool results, weighting failures by severity and recognizing recovery after passing tests. When tool signals are inconclusive, the router can optionally defer to an LLM judge or a decision model.
A single router configuration works across Chat Completions, Anthropic Messages, and Responses APIs, allowing Claude Code, Codex, and SDK-based agents to use it without client modifications. LiteLLM scopes session state to the owning API key and records each routing decision and its evidence in spend logs. Teams can also configure custom tool vocabularies, including MCP tools, as observe, mutate, plan, or new.
Developer Tools
Switchyard forces an escalation to the capable model on repeated identical failures or context compaction, placing a hold on that model for following turns until the trajectory stabilizes and steps back down. Both the rolling window size and confidence threshold are configurable.
When an optional judge such as an LLM judge or a decision model like TypeSafe Jev is configured, Switchyard invokes it only for inconclusive turns so confident decisions add no latency or cost. Request translation across Chat Completions, Anthropic Messages, and Responses happens in the LiteLLM proxy, allowing clients like Claude Code to connect by pointing at the proxy and using the router name as their model.