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
docs: correct routing configuration guidance (#786)
ryan-lempka62494ea70d75
diff --git a/crates/switchyard-server/README.md b/crates/switchyard-server/README.mdindex bdf2f22fd..45176afb6 100644--- a/crates/switchyard-server/README.md+++ b/crates/switchyard-server/README.md@@ -79,7 +79,10 @@ upstream, and a route's `id` is the model clients send to select that algorithm.Each target references an entry under `llm_clients`. All configured clients use`TranslatingLlmClient`; supported formats are `openai_chat`, `openai_responses`, and`anthropic_messages`. Supported algorithms are `noop`, `random`, `passthrough`,-`llm_classifier`, and `stage_router`. The optional `prefill-router` feature also enables+`llm_classifier`, `stage_router`, [`auto`](../../docs/reference/toml_schema.md#auto),+[`composite`](../../docs/routing_algorithms/composite_routing.md), and+[`advisor`](../../docs/routing_algorithms/advisor_gate_routing.md).+The optional `prefill-router` feature also enablesthe experimental `prefill_router`. See its[artifact requirements](../../docs/reference/toml_schema.md#prefill_router).An `api_key_env` value names an environment variable. The TOML never contains thediff --git a/docs/reference/toml_schema.md b/docs/reference/toml_schema.mdindex d168a64df..4be77ed86 100644--- a/docs/reference/toml_schema.md+++ b/docs/reference/toml_schema.md@@ -342,9 +342,10 @@ configuration. Today a classifier sets the tier a stage router falls open to wheThe tier is retained per session. A deployment that sends no session ID needs`classifier.message_hash_fallback = true`, which keys on the first user message-instead. The stage table takes no `picker`: the classifier supplies that tier per turn. A turn the-classifier cannot reach falls open to the efficient tier. Leaving out-`classifier` is recommended: that judge runs ahead of the fall-open tier.+instead. The outer `[routes.<name>.classifier]` table is required. The nested+`[routes.<name>.stage]` table accepts neither `picker` nor a second `classifier`.+The outer classifier supplies the default tier. A turn the classifier cannot+reach falls open to the efficient tier.### `advisor`diff --git a/docs/routing_algorithms/composite_routing.md b/docs/routing_algorithms/composite_routing.mdindex aaa6c3e9b..e70e96c14 100644--- a/docs/routing_algorithms/composite_routing.md+++ b/docs/routing_algorithms/composite_routing.md@@ -41,12 +41,11 @@ plan = ["create_research_plan"]new = ["send_message"]```-`[routes.switchyard.classifier]` takes the `stage_router` classifier fields.+`[routes.switchyard.classifier]` is required and takes the `stage_router` classifier fields.`classify_trigger` sets how often the judge runs: `user_turn` re-picks the tierwhenever the user speaks, `new_session` picks once and holds it.-`[routes.switchyard.stage]` takes the `stage_router` fields except `picker`, whose-job the classifier does per turn. Leave `classifier` out as well: that judge runs-ahead of the fall-open tier, so it answers most of the turns this one decided.+`[routes.switchyard.stage]` takes the stage settings, but accepts neither `picker`+nor a second `classifier`. The outer classifier supplies the default tier.Custom `tool_semantics` remain stage-local and have the same additive behavior ason a standalone stage route.diff --git a/docs/routing_algorithms/overview.md b/docs/routing_algorithms/overview.mdindex fa26620c5..18941521e 100644--- a/docs/routing_algorithms/overview.md+++ b/docs/routing_algorithms/overview.md@@ -46,7 +46,7 @@ These options remain available when you need a different routing policy.| [Escalation](escalation_router_routing.md) | Start on the efficient model and escalate when an LLM judge detects trouble. | `llm_classifier` with `mode = "escalation"` || [Custom](llm_classifier_routing.md#custom-multi-target-routing) | Route among two or more models using your own classification schema and rules. | `llm_classifier` with `mode = "custom"` || [Advisor Gate](advisor_gate_routing.md) | Keep one executor model and have a stronger advisor review its plans and completion claims. | `advisor` |-| [Sub-Agent-Aware Routing](subagent_routing.md) | Delegated sub-agents should use a separate routing policy from the parent agent. | `passthrough` or `stage_router` with `subagents` |+| [Sub-Agent-Aware Routing](subagent_routing.md) | Delegated sub-agents should use a separate routing policy from the parent agent. | `passthrough`, `stage_router`, or `composite` with `subagents` || [Random Routing](random_routing.md) | You need a fixed traffic split for A/B tests, baselines, or cost experiments. | `random` || [Fixed Model](#direct-model-routes) | Send every request to one target without a routing decision. | `passthrough` |diff --git a/docs/routing_algorithms/subagent_routing.md b/docs/routing_algorithms/subagent_routing.mdindex c02af0de2..be6ce7ab8 100644--- a/docs/routing_algorithms/subagent_routing.md+++ b/docs/routing_algorithms/subagent_routing.md@@ -2,7 +2,8 @@Sub-agent-aware routing leaves parent-agent traffic with its configured routingalgorithm while routing delegated sub-agent work separately. It is available on-`passthrough` and `stage_router` routes through the optional `subagents` table.+`passthrough`, `stage_router`, and `composite` routes through the optional+`subagents` table.> Requires unreleased features. [Build from source](../getting_started.md#build-from-source) to run this example.