Switchyard lets LLM applications route traffic across models and providers while preserving native OpenAI and Anthropic API compatibility - enabling flexible model selection, benchmarking, and cost/performance optimization.
Rust
fix(python): fix documentation links in the PyPI description (#1071)
David Gardner50aef9e372ca
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex d7a42839b..dd7825d12 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -213,6 +213,7 @@ public symbols from the owning crate or package rather than the top-level- **Code comments** — explain the *why*, not the *what*. One line max unless complex.- **Docstrings** — include for public APIs. Format: one-line summary, blank line, details, examples.- **README** — keep in sync with CLI surface (commands, flags, new subcommands).+- **[PyPI description](crates/switchyard-py/pypi.md)** — keep in sync with Python API, project, and documentation link changes.- **docs/** — architecture, design decisions, advanced usage.## Questions?diff --git a/crates/switchyard-py/pypi.md b/crates/switchyard-py/pypi.mdnew file mode 100644index 000000000..daf184d82--- /dev/null+++ b/crates/switchyard-py/pypi.md@@ -0,0 +1,58 @@+<p align="center">+ <img src="https://raw.githubusercontent.com/NVIDIA-NeMo/Switchyard/main/assets/logo.png" alt="Switchyard" width="800">+</p>++# NVIDIA NeMo Switchyard++<p align="center">+ <a href="https://github.com/NVIDIA-NeMo/Switchyard/blob/main/LICENSE"><img src="https://img.shields.io/github/license/NVIDIA-NeMo/Switchyard" alt="License: Apache-2.0"></a>+ <a href="https://github.com/NVIDIA-NeMo/Switchyard/releases"><img src="https://img.shields.io/github/v/release/NVIDIA-NeMo/Switchyard" alt="Latest GitHub release"></a>+ <a href="https://pypi.org/project/nemo-switchyard/"><img src="https://img.shields.io/pypi/v/nemo-switchyard" alt="PyPI: nemo-switchyard"></a>+ <a href="https://crates.io/crates/switchyard-libsy"><img src="https://img.shields.io/crates/v/switchyard-libsy?label=crates.io%20%28libsy%29" alt="crates.io: switchyard-libsy"></a>+ <a href="https://crates.io/crates/switchyard-server"><img src="https://img.shields.io/crates/v/switchyard-server?label=crates.io%20%28server%29" alt="crates.io: switchyard-server"></a>+ <a href="https://github.com/NVIDIA-NeMo/Switchyard/graphs/contributors"><img src="https://img.shields.io/github/contributors/NVIDIA-NeMo/Switchyard" alt="GitHub contributors"></a>+</p>++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++1. Configure the models your application can use and choose a routing algorithm.+2. The algorithm examines the request or the agent's recent tool activity. Some algorithms call a model to judge the task.+3. 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](https://github.com/NVIDIA-NeMo/Switchyard/blob/main/examples/libsy.py).++## Routing algorithms++Start with Auto. Choose Task, Execution, or Composite when you need more control. These names describe routing choices.++| Choice | How it chooses |+| --- | --- |+| **[Auto](https://nvidia-nemo.github.io/Switchyard/routing_algorithms/overview/#auto)** | Uses the current default: Execution (Stage), efficient-first, with a confidence threshold of 0.5 and no classifier call. |+| **[Task](https://nvidia-nemo.github.io/Switchyard/routing_algorithms/llm_classifier_routing/)** | A model judges whether the efficient model can handle the task. |+| **[Execution](https://nvidia-nemo.github.io/Switchyard/routing_algorithms/stage_router_routing/)** | Uses recent tool activity and outcome signals to choose a model as the agent runs. |+| **[Composite](https://nvidia-nemo.github.io/Switchyard/routing_algorithms/composite_routing/)** | Combines Task and Execution: a classifier sets the default model tier when execution signals are uncertain. |++The [routing overview](https://nvidia-nemo.github.io/Switchyard/routing_algorithms/overview/) retains the full catalogue, including [Plan/Execute](https://nvidia-nemo.github.io/Switchyard/routing_algorithms/plan_execute_routing/), [escalation](https://nvidia-nemo.github.io/Switchyard/routing_algorithms/escalation_router_routing/), [advisor](https://nvidia-nemo.github.io/Switchyard/routing_algorithms/advisor_gate_routing/), [sub-agent](https://nvidia-nemo.github.io/Switchyard/routing_algorithms/subagent_routing/), and [random](https://nvidia-nemo.github.io/Switchyard/routing_algorithms/random_routing/) strategies.++[Prefill routing](https://nvidia-nemo.github.io/Switchyard/routing_algorithms/prefill_routing/) is designed for fast, efficient model selection using a model's prefill activations and a classifier trained on your own evaluation data.++## Evaluation and reference++[Compare benchmark results and configs](https://nvidia-nemo.github.io/Switchyard/benchmarks/) for Terminal-Bench 2.1 and DeepSWE.+For latency and routing overhead testing, see [Soak Testing](https://nvidia-nemo.github.io/Switchyard/operations/soak_test/).++### Further reading++- [Benchmark setup and profiles](https://github.com/NVIDIA-NeMo/Switchyard/blob/main/benchmark/README.md): run your own baseline and routing comparisons.+- [Core concepts](https://nvidia-nemo.github.io/Switchyard/core_concepts/): clients, targets, routes, and model IDs.+- [TOML schema](https://nvidia-nemo.github.io/Switchyard/reference/toml_schema/): configuration fields and defaults.+- [Architecture](https://nvidia-nemo.github.io/Switchyard/architecture/): library and runtime components.+- [Installation](https://github.com/NVIDIA-NeMo/Switchyard/blob/main/INSTALLATION.md): package and platform requirements.diff --git a/pyproject.toml b/pyproject.tomlindex a6743de6f..45d7bc268 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -6,7 +6,7 @@ build-backend = "maturin"name = "nemo-switchyard"version = "0.3.0"description = "Typed, composable LLM routing with request/response translation and multi-backend orchestration"-readme = "README.md"+readme = "crates/switchyard-py/pypi.md"license = "Apache-2.0"requires-python = ">=3.10"authors = [{ name = "NVIDIA Corporation" }]@@ -62,6 +62,7 @@ managed = true[project.urls]Homepage = "https://github.com/NVIDIA-NeMo/Switchyard"+Documentation = "https://nvidia-nemo.github.io/Switchyard/"Repository = "https://github.com/NVIDIA-NeMo/Switchyard"Issues = "https://github.com/NVIDIA-NeMo/Switchyard/issues"