mrkeyoor.com_
Wed 12 Aug 14:37 UTC
LLM Toolsevaluationupdated 12 Aug 2026

Switchyard

Switchyard is a Rust proxy and library that decides which language model should handle a request, then translates among OpenAI and Anthropic API formats. It lets coding agents such as Claude Code and Codex talk to OpenRouter, vLLM, NVIDIA NIM, Ollama, or other compatible backends without changing the agent's native protocol.

Verdict

Switchyard is an exciting test bench for routing coding-agent traffic across open and hosted models, especially if Rust and protocol translation are central requirements. The clean library boundary and explicit TOML model are better reasons to try it than the NVIDIA name. Do not put it in a critical production path yet: its maintainers say not to, the architecture just changed substantially, and translation edge cases are still surfacing.

Setup3/5Easy launcher trial, but custom routes and self-hosting take work
Docs4/5Clear paths, route concepts, examples, and known limitations
Community4/5Fast current issue and pull-request activity around a young project
Maturity2/5Pre-alpha, explicitly experimental, with recent architectural churn

Who it’s for

Developers testing Claude Code or Codex against open models and mixed providers.
Platform teams that want model routing, API translation, Prometheus metrics, and fallback in one Rust service.
Rust developers who want to embed typed routing algorithms without adopting somebody else's HTTP stack.
Teams running A/B tests or weak-versus-strong model tiers behind a stable client-facing model ID.

Who it’s NOT for

Production teams that require stable APIs or configuration: the README explicitly calls Switchyard pre-alpha, says major changes are expected before 1.0, and warns against production use.
Multimodal agent workflows that cannot tolerate translation loss: issue #380 reports image and document tool results becoming a text string when converted to OpenAI Chat.
Safety-sensitive gateways that need exact stop-reason preservation: issue #369 reports an OpenAI content filter result being translated to Anthropic as a normal end turn.
Python embedders that require managed streaming today: issue #374 requests a streaming passthrough API that is not currently present.
Teams wanting a stable upgrade from the earlier Python architecture: release 0.2.0 removed several workflows and deprecated the Python server, YAML route bundles, and profile APIs.

Setup reality

The launcher trial is fairly light if uv, Python 3.12, the coding agent, and a provider key are already present: install nemo-switchyard[cli] and run one launch command. The standalone route is more involved because Cargo compiles the Rust server, you must write a TOML deployment, map clients and targets, supply provider credentials, validate it, and point each client at the proxy. Self-hosted models remain a separate operational responsibility. Embedding the library is a development project, since the host must execute the model-call steps, own transport and credentials, and handle the resulting stream.

A traffic controller for mixed model stacks

Switchyard sits between an AI client and one or more language-model backends. The client keeps speaking OpenAI Chat Completions, OpenAI Responses, or Anthropic Messages. Switchyard selects a configured target, converts the request into that target's format, and translates the answer back. That sounds like an ordinary proxy until the client is Claude Code or Codex and the backend is an open model served by vLLM, NVIDIA NIM, Ollama, or another OpenAI-compatible endpoint. Then protocol translation is the difference between a quick experiment and rewriting the client.

Routing is the other half. A random strategy can split traffic for an A/B test. An LLM classifier can send ordinary prompts to a cheaper model and harder prompts to a stronger one. A stage router looks at tool results, errors, and conversation progress. Escalation first runs the weaker model, then asks a judge whether the answer deserves another attempt. These are useful primitives for teams trying to control model cost without pinning every application to one provider.

The proxy also exposes health checks, model discovery, Prometheus metrics, OpenTelemetry spans, aggregate statistics, optional routing logs, retries, and context-window recovery. Switchyard is therefore more than a format converter, but it is not a complete hosted control plane. You still choose, pay for, secure, and operate the upstream models.

Three entry points, with different commitments

The quickest path is the Python-distributed launcher. Install the nemo-switchyard command with uv, provide an OpenRouter key, and launch Claude Code, Codex, or OpenClaw against the packaged deployment. That is a sensible way to learn what routing changes in practice. It does require Python 3.12, uv, the chosen coding agent, and its normal prerequisites. The launcher starts a packaged native server binding; it does not install the standalone server binary.

Running Switchyard as infrastructure is a bigger step. Cargo builds switchyard-server, and an explicit TOML file defines upstream clients, credentials, targets, route IDs, and algorithms. The dry-run option catches configuration and environment mistakes before binding a port, which is a thoughtful operational detail. A real rollout still needs TLS decisions, secret management, metrics collection, provider limits, and tests for every protocol conversion your agents use. Pointing at local vLLM or Ollama also means operating those model servers separately.

The third path is the most distinctive. switchyard-libsy provides routing algorithms without owning an HTTP server or provider SDK. Algorithms yield model-call steps to the host, so an existing Rust gateway can keep its own transport, retry logic, and credentials. This boundary is attractive for infrastructure developers, but it is not plug-and-play. The host must execute those steps correctly and deal with streaming, errors, state, and concurrent calls.

Translation is both the feature and the risk

Normalizing three related APIs is harder than matching endpoint names. Tool definitions, tool calls, tool results, reasoning items, usage details, cached-token counts, stop reasons, streaming events, and error envelopes all carry slightly different meanings. Release 0.2.0 says Switchyard preserves many of these details and validates known request fields instead of silently discarding them. That is the right design goal for coding agents, whose multi-step tool conversations stress far more of an API than a basic chat box.

Current issues show why the project still warns users away from production. Issue #380 reports that image and document blocks inside tool results become a text string when translated to OpenAI Chat. Issue #369 reports that an OpenAI content-filter stop becomes an Anthropic end_turn, making a refusal look like an ordinary completion. A fix for a separate nested JSON-schema problem landed within about an hour on August 12, which demonstrates responsiveness, but fast fixes do not erase the need for compatibility tests.

The release notes list more known gaps. Work upstream may continue after a client disconnects and still cost money. Some routing decisions lack target attribution in metrics, a recovery counter can remain zero after a successful retry, and native session statistics omit a supplied session ID. None makes the project useless for a lab or benchmark. Together they make it difficult to treat observability as an audit record.

A young project moving very quickly

Version 0.2.0 arrived on August 10, 2026, after 193 commits since 0.1.0. It rebuilt the project around a native Rust server and the new library architecture. It also deprecated the Python server, YAML route bundles, and profile APIs, while removing several older routers and CLI workflows. That is healthy iteration for pre-alpha software and expensive churn for anyone who integrated the first design.

The repository was pushed on August 12, with issues and pull requests updated the same day. Its 81-item open count includes both, so it is not a count of confirmed defects. The activity is unusually high for a repository created in May, and reports are receiving code changes quickly. Community size and long-term maintenance habits, however, cannot be inferred from a few intense months.

Documentation is already strong. The README distinguishes launcher, server, and library paths; the getting-started guide explains a full TOML route; individual algorithm and crate guides cover deeper behavior. The blunt maturity warning is valuable too. Switchyard is worth trying for model-routing experiments and custom Rust infrastructure. For production agent traffic, wait for a stable contract and prove every translation path with your own recorded conversations before reconsidering.

Alternatives

ProjectWhat it isPick it when
LiteLLMA broad Python gateway that normalizes many model providers behind OpenAI-style APIs.pick this instead when provider breadth, budgets, and established gateway operations matter more than Rust-native routing algorithms.
Portkey AI GatewayAn open-source AI gateway focused on routing, fallbacks, observability, and policy controls.pick this instead when you want a more conventional production gateway and do not need Switchyard's embeddable algorithm library.
RouteLLMA research-led framework for routing prompts between cheaper and stronger language models.pick this instead when you are studying cost-quality routing policies rather than translating live agent protocols.

What people are saying

  1. [github-trending] NVIDIA-NeMo/Switchyard
  2. [hackernews] Nvidia Nemotron 3.5 Lightning and NeMo Switchyard

Sources

  1. Switchyard README
  2. Switchyard 0.2.0 release notes
  3. Getting started guide
  4. Issue 380: multimodal tool results lost in translation
  5. Issue 369: content filter stop reason mistranslated
  6. Issue 374: Python managed streaming request