Skip to content

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: close RC1 reference gaps for [targets] and switchyard-server options (#295)

eric-liu-nvidiae687455a93f6
diff --git a/docs/cli_reference.md b/docs/cli_reference.md
index c2f40ed81..dd2c6aae0 100644
--- a/docs/cli_reference.md
+++ b/docs/cli_reference.md
@@ -69,7 +69,9 @@ When built from the repository, invoke it as
| `--host HOST` | `0.0.0.0` | Address on which the server listens. |
| `-p, --port PORT` | `4000` | Port on which the server listens. |
| `--backlog BACKLOG` | `65535` | TCP listen backlog configured before accepting traffic. |
+| `--shutdown-timeout SHUTDOWN_TIMEOUT` | `30s` | Maximum time active requests may drain during shutdown. |
| `--dry-run` | Off | Validate the deployment without binding a socket. |
+| `--routing-log-file PATH` | None | Append durable per-request routing records to this JSONL file. |
| `--tls-cert PATH` | None | PEM certificate path; requires `--tls-key`. |
| `--tls-key PATH` | None | PEM private-key path; requires `--tls-cert`. |
| `-h, --help` | — | Print command help. |
diff --git a/docs/reference/toml_schema.md b/docs/reference/toml_schema.md
index 6b54932cb..0246c69f2 100644
--- a/docs/reference/toml_schema.md
+++ b/docs/reference/toml_schema.md
@@ -33,6 +33,11 @@ target = "strong"
`schema_version` must be `1`. Table names under `llm_clients`, `targets`, and
`routes` are local references; clients send the route's `id` as the model name.
+`schema_version`, `[targets]`, and `[routes]` must all be present, even when a
+route reaches no upstream. A file without a `[targets]` table is rejected with
+`missing field targets`; an empty `[targets]` table satisfies it.
+`[llm_clients]` defaults to empty and may be omitted.
+
## `[llm_clients.<name>]`
| Key | Required | Default | Meaning |
@@ -70,6 +75,19 @@ Every route takes the common keys below, plus the keys for its type.
Returns a buffered assistant response containing `OK` without calling an
upstream model. Use it for local smoke tests.
+A noop-only deployment reaches no upstream but still needs the `[targets]`
+table, which can be empty:
+
+```toml
+schema_version = 1
+
+[targets]
+
+[routes.smoke]
+id = "noop-route"
+type = "noop"
+```
+
### `passthrough`
Sends every request to one target.