mrkeyoor.com_
Sat 26 Sept 18:46 UTC
LLM Toolsevaluationupdated 26 Aug 2026

Switchyard review

Switchyard is a Rust proxy and library that routes language-model requests across providers while translating OpenAI and Anthropic API formats. It lets an application keep one client protocol while choosing backends through random splits, classifiers, conversation signals, or custom Rust code.

+43stars / 7d
Verdict

Our Switchyard run built in 10 seconds, but pytest ended with 86 passes, 10 failures, and 2 collection/setup errors, so commit 053a61e is research-grade rather than a clean production dependency. Try libsy when model routing itself is the work and your team can follow rapid API changes. Use a more established gateway when the proxy must be boring, stable infrastructure.

We ran it

Lab card: what happened when we ran SwitchyardScreenshot of Switchyard (github.com/NVIDIA-NeMo/Switchyard)
Install✓ · 296s34 packages · 36 MB
Build✓ · 10s
Tests✗ · 23s86 passed · 10 failed · 2 errors of 98 (pytest)
Known vulns0(pip-audit)
Repo304 files~63,644 lines of source · 5 MB · 8 CI workflows · Dockerfile · tests dir

Answers from our run

Does Switchyard build from source?

Dependencies installed in 296 seconds (34 packages), and the build succeeded in 10 seconds. We cloned commit 053a61e into a clean Debian container with 3 CPUs and no project-specific setup.

Do Switchyard's tests pass?

Not all of them: 86 of 98 passed and 10 failed when we ran the project's own test command (pytest), with 2 collection errors. Some failures need services or credentials a bare container does not have.

Does Switchyard have known vulnerabilities in its dependencies?

pip-audit found none in the dependency tree at the time of our run.

Who should not use Switchyard?

Production teams that require stable APIs: the README calls Switchyard pre-alpha and labels its standalone server a demo.

What are the alternatives to Switchyard?

LiteLLM, Portkey AI Gateway, RouteLLM. Our Switchyard run built in 10 seconds, but pytest ended with 86 passes, 10 failures, and 2 collection/setup errors, so commit 053a61e is research-grade rather than a clean production dependency.

Setup2/5Install and build pass, but the supplied test run does not
Docs4/5Clear routes and maturity labels, with honest known issues
Community4/52,491 stars with active issues and pull requests in August
Maturity2/5The maintainers call the project pre-alpha and server a demo

Who it’s for

Infrastructure teams comparing several model backends behind one OpenAI or Anthropic interface.
Coding-agent operators who want Claude Code or Codex to reach vLLM, NVIDIA NIM, Ollama, or another compatible endpoint.
Rust developers who want routing algorithms without adopting somebody else's HTTP stack.
Evaluation teams that need fixed traffic splits and routing statistics for model experiments.

Who it’s NOT for

Production teams that require stable APIs: the README calls Switchyard pre-alpha and labels its standalone server a demo.
Operators who need client disconnects to cancel every upstream cost: v0.2.0 lists continued buffered work after disconnect as a known issue.
Users who expect every upstream header to survive proxying: issue 480 says the current client discards those response headers.
Teams wanting a finished Codex stage router today: pull request 560 says Codex tool signals were not registering before its proposed fix.

Setup reality

Our sandbox installed 34 Python packages in 296 seconds and used 36 MB on disk. The build succeeded in 10 seconds. Tests failed after 23 seconds: 86 passed, 10 failed, and 2 collection/setup errors were reported across 98 tests. Pip-audit found 0 known vulnerabilities.

A useful proxy needs at least one configured upstream, its API key or local endpoint, and a TOML routes file. Classifier and escalation routes may call extra models; Prometheus and OpenTelemetry integrations need their own collection setup.

The current primary server is Rust, although Python 3.12 bindings and launchers remain. The README calls the project pre-alpha, libsy beta, the LLM client and runner alpha, and the server a demo that should not run production traffic.

Switchyard translates three APIs and chooses the backend

Switchyard accepts OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages. A configured route selects an upstream, sends the request in that provider's format, then translates the response back into the client's expected shape. This is especially useful for coding agents: Claude Code can keep speaking the Anthropic protocol while a request goes to an OpenAI-compatible local server. Codex can use the same proxy without forcing every backend to implement the Responses API.

Routing is more than a round-robin switch. The built-in options include a fixed random split, an LLM classifier, signal-based stage routing, escalation after a judge examines a weaker model's answer, and a composite route. The switchyard-libsy crate separates those decisions from HTTP and provider SDKs. An existing gateway can ask libsy what to call, execute the model request itself, and return the result to the algorithm. That boundary is Switchyard's best reason to exist.

The server is explicitly a demo before version 1.0

The README gives unusually direct maturity labels. Libsy is beta and ready for trial integration. The LLM client and runner are alpha. The standalone server is a demo and is not recommended for production. Switchyard as a whole is pre-alpha, with significant API and algorithm changes expected before 1.0. Buyers should take those labels more seriously than the NVIDIA name or the 2,491 GitHub stars.

Release v0.2.0, published August 10, 2026, was a large redesign around a native Rust server and separated crates. It also deprecated the older Python server, YAML route bundles, profile APIs, and several previous routing components. That clean break may improve the architecture, but it proves the compatibility warning is active. Pin the release and its TOML schema during an evaluation; tracking main would invite unnecessary churn.

What happened when we ran it

Our sandbox installed 34 Python packages in 296 seconds and occupied 36 MB. The build passed in 10 seconds. Pytest then exited with code 1 after 23 seconds, reporting 86 passed, 10 failed, 1 warning, and 2 errors across 98 tests. Pip-audit found 0 known vulnerabilities in the installed packages. We tested commit 053a61e with Python 3.12 on 3 CPUs and 8 GB of RAM.

The log tail names one concrete failure: an async test in test_libsy_minimal_bindings.py could not run because async functions are not natively supported, and pytest printed a list of suitable framework plugins. It also recorded collection or setup errors for tests/e2e/test_closed_book_proxy_integration.py and tests/test_prepare_harbor_dataset.py. The tail does not show the other failure details, so it would be wrong to assign them one shared cause.

The checkout had 304 files, about 63,644 source lines, and measured 5 MB before dependencies. It included 8 CI workflow files, a Dockerfile, and a tests directory. Those signals and 86 passing tests show real engineering work. The failed full run still matters because a new contributor following the available environment did not reach green without additional investigation.

Routing can add model calls as well as save them

A random route adds little decision overhead and is useful for controlled comparisons. Classifier routing asks a model to choose a tier before the main request. Escalation first runs the weaker target, then has a judge decide whether the same prompt should go to the stronger one. Stage routing instead reads conversation signals such as tool results and errors, which can avoid a classifier call when those signals are dependable. Each policy changes cost, delay, and failure behavior differently.

Pull request 560 exposes a sharp current example. It says stage routing could not de-escalate Codex sessions because Responses arguments arrived as encoded JSON, exec_command was unknown, and its cmd field was not read. The proposed change was measured against 39 recorded calls, where none classified as an edit or write beforehand. Until that fix is in the version you deploy, verify routing with your agent's actual wire traffic rather than a synthetic chat request.

Observability has known gaps in version 0.2.0

The native server exposes Prometheus metrics, OpenTelemetry spans, aggregate statistics, optional session statistics, and durable JSONL routing logs. Metrics cover requests, errors, latency, tokens, and routing overhead. These are the right surfaces for determining whether a router saves money or only moves it between providers. A /health endpoint and config dry run also make the basic server path easy to inspect.

Version 0.2.0 documents limits that affect those numbers. Some fallback and escalation decisions lack target attribution in metrics and stats. The retry recovery counter can stay at zero after a successful retry, and session IDs are absent from native session statistics. Buffered upstream work may continue after a client disconnect and incur provider cost. Issue 480 also says upstream response headers are discarded before they can reach the downstream client.

Use libsy before betting on the whole proxy

Teams with an existing Rust gateway should start with switchyard-libsy. Its algorithm contract lets the host retain transport, authentication, retries, and provider clients. That limits exposure to the youngest server code while preserving the typed routing model. A standalone trial can use cargo install --locked switchyard-server, a small routes file, and one low-risk upstream.

Run a replay of real Claude Code or Codex sessions and record which target served every turn. Include tool calls, context-window errors, streaming, client cancellation, and a provider failure. Our 10 failed tests make that exercise mandatory, not ceremonial. Switchyard is interesting because the routing layer is composable. It is not yet the sensible default for an organization that only needs one dependable model proxy.

Alternatives

ProjectWhat it isPick it when
LiteLLM gh↗A Python proxy and SDK that normalizes calls across a large provider catalog.pick this instead when provider breadth and an established proxy matter more than embeddable Rust routing algorithms.
Portkey AI GatewayAn AI gateway focused on provider routing, retries, policy, and observability.pick this instead when gateway controls are the main requirement and Switchyard's research routers are unnecessary.
RouteLLMA research framework for routing prompts between stronger and weaker language models.pick this instead when reproducing routing research matters more than running a protocol-translating server.

What people are saying

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

Sources

  1. Switchyard repository and README
  2. Switchyard v0.2.0 release notes
  3. Issue 480: upstream response headers
  4. Pull request 560: Codex tool-signal routing fix

More llm tools reviews

llm-wiki-compiler · claude-skills · Humanizer-zh · agent-beacon · MiMo-Code · pi-claude-bridge · the whole board →