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: minimal working readme (#214)

Ayush Agarwalcdb893b1875b
diff --git a/.github/workflows/readme.yml b/.github/workflows/readme.yml
index b0bb4a7f6..458428c86 100644
--- a/.github/workflows/readme.yml
+++ b/.github/workflows/readme.yml
@@ -2,17 +2,16 @@ name: README
# Executable coverage for README.md.
#
-# Fails when the README drifts from the product — a broken Python snippet, a
-# renamed YAML route type or key, or a renamed CLI subcommand / flag. The
+# Fails when the Rust server configuration in the README is malformed. The
# exercise lives in tests/readme/ so it reproduces locally with
-# `uv run pytest tests/readme`.
+# `uv run pytest tests/readme -v`.
on:
pull_request:
paths:
- "README.md"
- - "switchyard/**"
- - "switchyard_rust/**"
+ - "Cargo.toml"
+ - "crates/switchyard-server/**"
- "tests/readme/**"
- "pyproject.toml"
- "uv.lock"
@@ -21,8 +20,8 @@ on:
branches: [main]
paths:
- "README.md"
- - "switchyard/**"
- - "switchyard_rust/**"
+ - "Cargo.toml"
+ - "crates/switchyard-server/**"
- "tests/readme/**"
- "pyproject.toml"
- "uv.lock"
@@ -49,15 +48,10 @@ jobs:
- name: Install
run: uv sync --locked
- name: Exercise the README
- # Single invocation: pytest picks up tests/readme/ (YAML schema + CLI
- # checks) AND --markdown-docs execs the Python snippet from the README.
- # The local mock-upstream fixture lives in tests/readme/conftest.py so
- # it only loads when collecting from that subtree.
- run: uv run pytest tests/readme --markdown-docs README.md -v
- env:
- # The YAML examples reference ${NVIDIA_API_KEY} etc.; stub so the
- # bundle loader's env-var resolution doesn't fail on a clean runner.
- # No value is ever sent upstream (schema validation only).
- OPENAI_API_KEY: sk-test
- NVIDIA_API_KEY: nvapi-test
- ANTHROPIC_API_KEY: sk-ant-test
+ run: uv run pytest tests/readme -v
+ # Legacy Python README execution:
+ # run: uv run pytest tests/readme --markdown-docs README.md -v
+ # env:
+ # OPENAI_API_KEY: sk-test
+ # NVIDIA_API_KEY: nvapi-test
+ # ANTHROPIC_API_KEY: sk-ant-test
diff --git a/README.md b/README.md
index 46ae31bbf..5069749f1 100644
--- a/README.md
+++ b/README.md
@@ -4,169 +4,129 @@
# Switchyard
-Switchyard is a Python proxy for LLM traffic. It routes requests across
-providers, translates between the OpenAI and Anthropic APIs, collects usage
-statistics, and lets you build typed, profile-backed routing flows with little
-boilerplate.
+Switchyard is a Rust proxy and library for LLM traffic. It routes requests
+across providers, translates between OpenAI and Anthropic APIs, records
+operational metrics, and provides typed, composable routing algorithms.
**Why Switchyard?** Point a coding agent such as Claude Code or Codex at an
open-source model. Switchyard translates between the OpenAI Chat, Anthropic
Messages, and OpenAI Responses formats, so the agent keeps speaking its native
API while the request is served by vLLM, NVIDIA NIM, Ollama, or any
OpenAI-compatible endpoint. The same proxy can spread traffic across several
-models for A/B benchmarking, signal-driven stage-router escalation, or a router you
-write yourself.
-
-**Launcher routing is explicit.** By default, launchers use the built-in
-LLM-classifier router, which you tune with `--weak-model`, `--classifier-model`,
-`--profile`, and `--classifier-min-confidence`. Use `--model X` for
-single-model passthrough or `--routing-profiles FILE` for a YAML route bundle.
+models for A/B benchmarking, apply signal-driven stage routing, or run a custom
+algorithm you write yourself.
## Features
- **Protocol Translation**: convert between OpenAI Chat, Anthropic Messages, and OpenAI Responses formats
- **Multi-Backend Routing**: random routing, LLM-as-classifier routing, signal-driven stage-router, or custom routers
-- **Strong Types**: typed request/response containers for OpenAI, Anthropic, and Responses APIs
-- **Profile-Owned Routing**: typed profiles own routing, backend calls, stats, and translation wiring
-- **One-Command Launchers**: `switchyard launch claude`, `switchyard launch codex`, and `switchyard launch openclaw` spin up a local proxy and drop you into the target CLI
-- **Request Statistics**: collect per-request latency, token, and cost data
+- **Strong Types**: provider-neutral request, response, and streaming types
+- **Explicit Configuration**: TOML defines LLM clients, targets, and algorithm routes
+- **Operational Metrics**: Prometheus metrics cover requests, errors, latency, tokens, and routing overhead
## Quick Start
-### Install from PyPI
+### Install prerequisites
+
+You need Git, a native build toolchain, and Rust with Cargo. On Ubuntu or WSL:
```bash
-pip install "nemo-switchyard[cli,server]"
+sudo apt-get update
+sudo apt-get install -y build-essential curl git
+curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
+source "$HOME/.cargo/env"
```
-### Install from source for local use (requires uv)
+The Rust installer includes `rustc`, Cargo, and `rustup`. On macOS or native
+Windows, follow the [official Rust installation instructions](https://rust-lang.org/tools/install/).
+
+Install `uv` for the repository's Python-based tooling and CI checks. It is not
+required to build or run the Rust server:
```bash
-git clone [email protected]:NVIDIA-NeMo/Switchyard.git
-cd Switchyard
-uv tool install --editable '.[server,cli]'
+curl -LsSf https://astral.sh/uv/install.sh | sh
```
-### Install from source for contributors (requires uv)
+If either installer updates your shell configuration, restart the shell before
+continuing. Verify that the tools are available:
```bash
-git clone [email protected]:NVIDIA-NeMo/Switchyard.git
-cd Switchyard
-uv sync
-uv run switchyard ...
+git --version
+rustc --version
+cargo --version
+uv --version
```
-### 1. Launch Claude Code, Codex, or OpenClaw through Switchyard
-
-Create an OpenRouter account at [openrouter.ai](https://openrouter.ai/) and
-generate an API key from the [OpenRouter keys page](https://openrouter.ai/keys),
-then export it:
+### Build the Rust server from source
```bash
-export OPENROUTER_API_KEY="your-openrouter-key" # pragma: allowlist secret
-export OPENROUTER_BASE_URL="https://openrouter.ai/api/v1"
-switchyard launch claude --model openai/gpt-4o-mini --api-key "$OPENROUTER_API_KEY" --base-url "$OPENROUTER_BASE_URL"
-switchyard launch codex --model openai/gpt-4o-mini --api-key "$OPENROUTER_API_KEY" --base-url "$OPENROUTER_BASE_URL"
-switchyard launch openclaw --model openai/gpt-4o-mini --api-key "$OPENROUTER_API_KEY" --base-url "$OPENROUTER_BASE_URL"
+git clone https://github.com/NVIDIA-NeMo/Switchyard.git
+cd Switchyard
+cargo build --locked --release -p switchyard-server
+./target/release/switchyard-server --help
```
-Each launcher starts a local proxy, points the agent at it, and shuts the proxy
-down when the agent exits. Use `--model` for single-model passthrough or
-`--routing-profiles` for a route bundle:
+The repository pins Rust `1.96.1` in `rust-toolchain.toml`; `rustup` selects and
+installs it automatically when you run Cargo from the repository. Prebuilt Rust
+binaries are not published yet.
-```bash
-switchyard launch claude --model openai/gpt-4o-mini --base-url https://openrouter.ai/api/v1 # single-model passthrough
-switchyard --routing-profiles routes.yaml -- launch claude # route bundle
-```
+### Run the server
-> **Bedrock-backed profile caveat (Claude Code + MCP):** Bedrock enforces a 64-character `toolSpec.name` cap. Claude Code's MCP bridge can auto-inject longer tool names, producing `BedrockException` 400s on tool-bearing requests. If you use a Bedrock-backed route and hit this, swap to an OpenAI-compatible model with `--model openai/gpt-4o` or a routing-profile YAML.
+The `switchyard-server` binary reads an explicit TOML configuration for LLM
+clients, targets, and routes. Create `routes.toml` with an LLM-classifier route:
-See [Agent Launchers](docs/guides/agent_launchers.md) for supported harness
-versions, model requirements, troubleshooting, and Claude Code `/model` picker
-aliasing.
+```toml
+schema_version = 1
-### 2. Run a standalone Python server
+[llm_clients.openrouter]
+format = "openai_chat"
+base_url = "https://openrouter.ai/api/v1"
+api_key_env = "OPENROUTER_API_KEY"
-Define one or more client-facing routes in YAML. A complete OpenRouter-backed
-random-routing bundle looks like this:
+[targets.weak]
+id = "openai/gpt-4o-mini"
+llm_client = "openrouter"
-```yaml
-defaults:
- api_key: ${OPENROUTER_API_KEY}
- base_url: https://openrouter.ai/api/v1
- format: openai
+[targets.strong]
+id = "openai/gpt-4o"
+llm_client = "openrouter"
-routes:
- smart:
- type: random_routing
- strong:
- model: openai/gpt-4o
- weak:
- model: openai/gpt-4o-mini
- strong_probability: 0.3
- fallback_target_on_evict: strong
+[routes.smart]
+id = "switchyard"
+type = "llm_classifier"
+classifier_target = "weak"
+strong_target = "strong"
+weak_target = "weak"
+base_threshold = 0.5
```
-Serve it as a proxy. The route name is exposed as a model ID, and clients
-select it through the request's `model` field:
+The weak model classifies each request, then serves requests above the threshold
+itself and sends the rest to the strong model.
-```bash
-switchyard --routing-profiles routes.yaml -- serve --port 4000
-curl http://localhost:4000/v1/models
-curl http://localhost:4000/v1/chat/completions \
- -H "Content-Type: application/json" \
- -d '{"model": "smart", "messages": [{"role": "user", "content": "hi"}]}'
-```
+Export the provider credential, validate the configuration without binding a
+socket, then start the server:
```bash
-switchyard --routing-profiles routes.yaml -- launch claude
-switchyard --routing-profiles routes.yaml -- configure --target provider \
- --provider openrouter --api-key "$OPENROUTER_API_KEY" \
- --base-url https://openrouter.ai/api/v1 --no-tui --no-model-discovery
+export OPENROUTER_API_KEY="your-openrouter-key" # pragma: allowlist secret
+./target/release/switchyard-server --config routes.toml --dry-run
+./target/release/switchyard-server --config routes.toml --host 127.0.0.1 --port 4000
```
-Non-interactive `configure` does not read provider credentials from the routing
-bundle; pass `--api-key` explicitly when persisting the bundle for CI.
-
-The Rust `switchyard-server` binary has a separate explicit TOML schema for
-LLM clients, targets, and libsy algorithms. See
-[`crates/switchyard-server/README.md`](crates/switchyard-server/README.md).
-
-For profile selection and full configuration examples, start with
-[Routing Overview](docs/routing_algorithms/overview.md), then open the
-strategy-specific page:
-
-- [Random Routing](docs/routing_algorithms/random_routing.md)
-- [LLM Classifier Routing](docs/routing_algorithms/llm_classifier_routing.md)
-- [Stage-Router Routing](docs/routing_algorithms/stage_router_routing.md)
-
-For multi-turn classifier sessions, see
-[Session Affinity (Sticky Routing)](docs/routing_algorithms/sticky_routing.md).
+The route `id` is the model name clients use. In another terminal:
-### 3. Use as a Python library
-
-```python
-import asyncio
-
-from switchyard import ChatRequest, PassthroughProfileConfig, ProfileSwitchyard
-
-switchyard = ProfileSwitchyard(PassthroughProfileConfig(
- api_key="sk-...",
- base_url="https://api.openai.com/v1",
-).build())
-
-async def main():
- request = ChatRequest.openai_chat({
- "model": "gpt-4o",
- "messages": [{"role": "user", "content": "What is 2+2?"}],
- })
- response = await switchyard.call(request)
- # call() returns a JSON-compatible dict in the OpenAI Chat Completions shape.
- print(response["choices"][0]["message"]["content"])
-
-asyncio.run(main())
+```bash
+curl http://localhost:4000/health
+curl http://localhost:4000/v1/models
+curl http://localhost:4000/v1/chat/completions \
+ -H "Content-Type: application/json" \
+ -d '{"model":"switchyard","messages":[{"role":"user","content":"hi"}]}'
```
+The Rust server also supports random, LLM-classifier, and stage-router routes,
+OpenAI Responses and Anthropic Messages endpoints, TLS, and Prometheus metrics.
+See the [`switchyard-server` guide](crates/switchyard-server/README.md) for the
+complete configuration schema and operational details.
+
## Architecture
Switchyard sits between your client applications and one or more LLM backends:
@@ -183,60 +143,30 @@ flowchart LR
Clients keep their native OpenAI or Anthropic API format. Switchyard picks a
configured backend, forwards the request in that backend's own format, and
-translates the response back into the shape the client expects. See
-[Architecture](docs/architecture.md) for the system context and the full
-request flow.
-
-## Installation Options
-
-Install from PyPI:
-
-```bash
-pip install nemo-switchyard
-```
-
-Optional extras:
-
-```bash
-pip install "nemo-switchyard[server]" # FastAPI / Uvicorn HTTP endpoints
-pip install "nemo-switchyard[cli]" # Interactive CLI launchers (Claude / Codex)
-pip install "nemo-switchyard[all]" # Server, CLI, tracing, intake, and affinity-redis extras
-```
-
-See [Installation](INSTALLATION.md) for a full breakdown of what each extra adds.
+translates the response back into the shape the client expects.
## Documentation
-- **[Getting Started](docs/getting_started.md)**: step-by-step setup, first request, troubleshooting
-- **[Known Issues](docs/known_issues.md)**: known issues in 0.1.0
-- **[Agent Launchers](docs/guides/agent_launchers.md)**: Claude Code, Codex, and OpenClaw launcher behavior
-- **[Cli Reference](docs/cli_reference.md)**: canonical reference for every `switchyard` subcommand and flag
-- **[Architecture](docs/architecture.md)**: system context and end-to-end request flow
-- **[Routing Algorithms](docs/routing_algorithms/)**: signal-driven weak/strong stage-router routing: picker layers, signal dimensions, and calibration data.
-- **[Contributing](CONTRIBUTING.md)**: dev setup, testing, CI gates, PR process
-- **[Development](DEVELOPMENT.md)**: project structure, benchmarks, conventions
-- **[Agents](AGENTS.md)**: full design philosophy and architectural patterns
+- **[`switchyard-server`](crates/switchyard-server/README.md)**: server configuration, routing algorithms, and metrics
+- **[`switchyard-libsy`](crates/libsy/README.md)**: embed routing algorithms in a Rust application
+- **[`switchyard-protocol`](crates/protocol/README.md)**: provider-neutral request, response, and streaming types
+- **[`switchyard-translation`](crates/switchyard-translation/README.md)**: request, response, and stream translation
-## Supported Providers
+## Supported API Formats
-- **OpenAI**: Chat Completions API
-- **Anthropic**: Claude Messages API
-- **OpenAI Responses API**: structured output / reasoning
-- **OpenAI-compatible APIs**: vLLM, Ollama, Azure, etc. (anything with `/v1/chat/completions`)
+The server exposes:
-## Requirements
+- OpenAI Chat Completions
+- OpenAI Responses
+- Anthropic Messages
-- Python 3.12+
-- macOS, Linux, or Windows
-- API keys for your chosen backend (OpenAI, Anthropic, etc.)
-- Linux x86_64 wheels require an x86-64-v3 / AVX2-class CPU (post 2013).
-- Linux aarch64 wheels require a Neoverse N1-class CPU (post 2020).
+Configured upstream clients support the same formats. The OpenAI Chat format
+also works with compatible servers such as vLLM, NVIDIA NIM, Ollama, and Azure.
## Community
- **Issues**: [GitHub Issues](https://github.com/NVIDIA-NeMo/Switchyard/issues)
- **Code of Conduct**: [Code of Conduct](CODE_OF_CONDUCT.md)
-- **Contributing**: [Contributing](CONTRIBUTING.md)
## License
diff --git a/tests/readme/conftest.py b/tests/readme/conftest.py
deleted file mode 100644
index f7a9763cb..000000000
--- a/tests/readme/conftest.py
+++ /dev/null
@@ -1,34 +0,0 @@
-# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
-# SPDX-License-Identifier: Apache-2.0
-
-"""Markdown-docs fixture: run the README snippet against a local mock upstream.
-
-Mirrors ``tests/getting_started/conftest.py``: the README's "Use as a Python
-library" snippet builds a passthrough profile and calls ``switchyard.call``,
-which would otherwise hit a real backend. The fixture points that passthrough
-profile at a local in-process mock OpenAI server (loopback, a fixed
-``chat.completion``) so it runs offline. Gated on the ``--markdown-docs`` flag
-so regular runs are untouched.
-"""
-
-from __future__ import annotations
-
-from collections.abc import Iterator
-
-import pytest
-
-from tests._mock_openai_server import (
- markdown_docs_active,
- redirect_passthrough_to_local_mock,
-)
-
-
[email protected](autouse=True, scope="session")
-def _markdown_docs_hermetic_upstream(
- request: pytest.FixtureRequest,
-) -> Iterator[None]:
- if not markdown_docs_active(request.config):
- yield
- return
- with redirect_passthrough_to_local_mock():
- yield
diff --git a/tests/readme/test_readme.py b/tests/readme/test_readme.py
index 788312b8a..f119f2be9 100644
--- a/tests/readme/test_readme.py
+++ b/tests/readme/test_readme.py
@@ -1,36 +1,19 @@
# SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
-"""Executable coverage for ``README.md``.
-
-Companion to ``tests/getting_started/``. Three guards:
-
-* the "Use as a Python library" snippet executes (via ``--markdown-docs`` +
- the local mock-upstream fixture in ``conftest.py``);
-* README and routing-guide examples validate against the route-bundle schema;
-* every CLI subcommand / flag the README names still exists.
-"""
+"""Executable coverage for the README.md."""
from __future__ import annotations
-import argparse
+import os
+import subprocess
from pathlib import Path
import pytest
-import yaml as pyyaml
from markdown_it import MarkdownIt
-from switchyard.cli import route_bundle as rb
-from switchyard.cli.switchyard_cli import _build_parser
-
REPO_ROOT = Path(__file__).resolve().parents[2]
README_PATH = REPO_ROOT / "README.md"
-ROUTING_DOC_PATHS = (
- REPO_ROOT / "docs" / "routing_algorithms" / "overview.md",
- REPO_ROOT / "docs" / "routing_algorithms" / "random_routing.md",
- REPO_ROOT / "docs" / "routing_algorithms" / "llm_classifier_routing.md",
- REPO_ROOT / "docs" / "routing_algorithms" / "stage_router_routing.md",
-)
@pytest.fixture(scope="module")
@@ -49,116 +32,54 @@ def _code_blocks(text: str, lang: str) -> list[str]:
]
-def test_python_snippet_tripwire(readme_text: str) -> None:
- # Guards the shape the conftest's passthrough-profile→local-mock fixture depends on,
- # plus the dict-access fix (call() returns a dict, not an object with `.body`).
- assert (
- "from switchyard import ChatRequest, PassthroughProfileConfig, ProfileSwitchyard"
- in readme_text
- ), (
- "README Python snippet's imports moved — update conftest.py."
- )
- assert "ProfileSwitchyard(PassthroughProfileConfig(" in readme_text, (
- "README snippet no longer builds a passthrough profile — update the "
- "markdown-docs fixture in conftest.py."
- )
- assert 'response["choices"][0]["message"]["content"]' in readme_text, (
- "README snippet's response access changed. `Switchyard.call()` returns "
- "a JSON-compatible dict — `response.body` would raise AttributeError."
- )
-
-
-def _validate_route_blocks(text: str, source: Path) -> int:
- # Schema/key validation, not a full chain build: building documented routes
- # is NOT hermetic — `passthrough` with `discover: true` does a live catalog
- # fetch. The schema layer (route type + per-type key allowlist) is what we
- # can check offline, and it catches the likeliest drift: a renamed `type:`
- # or a key that no longer exists on that type.
- blocks = _code_blocks(text, "yaml")
- validated_routes = 0
- for idx, block in enumerate(blocks):
- payload = pyyaml.safe_load(block)
- if not isinstance(payload, dict) or "routes" not in payload:
- continue
- try:
- bundle = rb._validate_route_bundle_dict(payload)
- except rb.RouteBundleConfigError as exc:
- raise AssertionError(
- f"YAML block {idx} in {source} failed bundle schema "
- f"validation: {exc}\n\nBlock:\n{block}"
- ) from exc
- for model_id, route_raw in bundle.routes.items():
- route = rb._normalize_route(model_id, route_raw)
- try:
- route_type = rb._route_type(model_id, route)
- rb._validate_route_keys(model_id, route, route_type)
- except rb.RouteBundleConfigError as exc:
- raise AssertionError(
- f"YAML block {idx} route {model_id!r} in {source} failed "
- f"schema validation: {exc}\n\nBlock:\n{block}"
- ) from exc
- validated_routes += 1
- return validated_routes
-
-
-def test_route_block_validation_rejects_invalid_bundle_defaults() -> None:
- text = """```yaml
-defaults:
- unsupported: true
-routes:
- gpt-4o:
- type: model
- model: gpt-4o
-```
-"""
- with pytest.raises(AssertionError, match="unknown key.*defaults: unsupported"):
- _validate_route_blocks(text, Path("example.md"))
-
-
-def test_all_yaml_route_blocks_in_readme_validate_against_the_schema(
+def test_rust_server_toml_blocks_validate_with_rust_schema(
readme_text: str,
+ tmp_path: Path,
) -> None:
- assert _validate_route_blocks(readme_text, README_PATH), (
- "no README yaml block parsed as a route bundle"
- )
-
-
-def test_canonical_routing_docs_validate_against_the_route_bundle_schema() -> None:
- validated_routes = sum(
- _validate_route_blocks(path.read_text(), path) for path in ROUTING_DOC_PATHS
- )
-
- assert validated_routes >= len(ROUTING_DOC_PATHS)
-
-
-def _subparsers(parser: argparse.ArgumentParser) -> dict[str, argparse.ArgumentParser]:
- action = next(a for a in parser._actions if isinstance(a, argparse._SubParsersAction))
- return action.choices # type: ignore[return-value]
-
-
-def test_cli_parser_exposes_every_subcommand_the_readme_names() -> None:
- parser = _build_parser()
- subs = _subparsers(parser)
- for cmd in ("serve", "launch", "configure"):
- assert cmd in subs, f"top-level `switchyard {cmd}` is documented but missing"
- assert subs[cmd].format_help().strip()
+ blocks = _code_blocks(readme_text, "toml")
+ server_configs = [
+ block
+ for block in blocks
+ if "schema_version" in block
+ and "[llm_clients." in block
+ and "[targets." in block
+ and "[routes." in block
+ ]
- launch_subs = _subparsers(subs["launch"])
- for target in ("claude", "codex", "openclaw"):
- assert target in launch_subs, (
- f"`switchyard launch {target}` is documented but missing"
+ assert server_configs, "no README TOML block found for the Rust server"
+
+ env = os.environ.copy()
+ env["OPENROUTER_API_KEY"] = "readme-test-key"
+ for index, config in enumerate(server_configs):
+ config_path = tmp_path / f"readme-server-{index}.toml"
+ config_path.write_text(config)
+ # Dry-run uses the production Rust loader for schema and reference validation.
+ result = subprocess.run(
+ [
+ "cargo",
+ "run",
+ "--quiet",
+ "--locked",
+ "-p",
+ "switchyard-server",
+ "--",
+ "--config",
+ str(config_path),
+ "--dry-run",
+ ],
+ cwd=REPO_ROOT,
+ env=env,
+ capture_output=True,
+ text=True,
+ check=False,
)
-
-
-def test_cli_parser_advertises_documented_flags() -> None:
- parser = _build_parser()
- subs = _subparsers(parser)
- # --routing-profiles is a global switchyard flag now, not on serve
- assert "--routing-profiles" in parser.format_help()
- assert "--port" in subs["serve"].format_help()
-
- claude_help = _subparsers(subs["launch"])["claude"].format_help()
- for flag in ("--base-url", "--model"):
- assert flag in claude_help, (
- f"`launch claude {flag}` documented but missing from --help"
+ assert result.returncode == 0, (
+ f"README TOML block {index} failed Rust schema validation:\n"
+ f"{result.stderr}{result.stdout}"
)
+
+# TODO: Add Python snippet tripwire test back in when we have a Python snippet to test.
+# TODO: Add route block validation test back in when we document YAML route bundles.
+# TODO: Add routing docs schema test back in when the README links those guides.
+# TODO: Add CLI subcommand test back in when the README documents Python CLI commands.
+# TODO: Add CLI flag test back in when the README documents Python CLI flags.