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

chore: nuke launcher docs (#221)

Ayush Agarwal510b7bb823a4
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index bc7a44ab3..2e199e652 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -108,7 +108,7 @@ Use one of:
- `revert:` — revert a previous commit
- `style:` — formatting-only changes
-Scopes are optional: `fix(cli): preserve launcher args`.
+Scopes are optional: `fix(cli): preserve command arguments`.
Breaking changes use `!` or a `BREAKING CHANGE:` footer:
```text
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index 7c92bb70f..e0826286b 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -54,7 +54,7 @@ switchyard/
│ │ ├── processors/ # RequestProcessor / ResponseProcessor implementations
│ │ ├── factories/ # MiddlewareFactory implementations + configs
│ │ └── endpoints/ # FastAPI endpoint wrappers (require [server])
-│ ├── cli/ # CLI entry point + launchers (requires [cli])
+│ ├── cli/ # CLI entry point (requires [cli])
│ └── server/ # FastAPI app factory + verify helpers (requires [server])
├── crates/
│ ├── switchyard-translation/ # Rust request/response/stream translation engine
diff --git a/INSTALLATION.md b/INSTALLATION.md
index a6f03e423..bb83dfdef 100644
--- a/INSTALLATION.md
+++ b/INSTALLATION.md
@@ -23,7 +23,7 @@ pip install nemo-switchyard
**Does NOT include:**
- FastAPI / Uvicorn (server)
-- prompt-toolkit (CLI launcher)
+- prompt-toolkit (interactive command-line UI)
**Use case:** Library users, middleware plugins, embedded integrations.
@@ -44,24 +44,19 @@ pip install nemo-switchyard[server]
**Use case:** Deploying Switchyard as a service, e2e proxy operations.
-### `[cli]` — Claude Code Launcher
+### `[cli]` — Command-Line Tools
-Add terminal UI support for the `switchyard launch claude` command:
+Add prompt-toolkit support for interactive command-line workflows:
```bash
pip install nemo-switchyard[cli]
```
-**Adds:**
-- prompt-toolkit (terminal UI framework for the interactive launch TUI)
-
-**Use case:** Running Claude Code with Switchyard routing.
-
## Combined Extras
### Full Installation
-All optional dependencies for complete feature set:
+Install all optional dependencies:
```bash
pip install nemo-switchyard[all]
@@ -76,12 +71,12 @@ Equivalent to: `nemo-switchyard[server,cli,tracing,intake,affinity-redis]`
pip install nemo-switchyard # Core only
```
-**Proxy server without launcher:**
+**Proxy server:**
```bash
pip install nemo-switchyard[server]
```
-**Full Claude Code integration:**
+**Command-line tools:**
```bash
pip install nemo-switchyard[cli] # Includes core
```
@@ -105,7 +100,7 @@ pip install nemo-switchyard[all]
| Extra | Size | Purpose |
|-------|------|---------|
| `[server]` | ~50 MB | HTTP proxy (FastAPI + Uvicorn) |
-| `[cli]` | ~5 MB | Terminal UI (prompt-toolkit) |
+| `[cli]` | ~5 MB | Interactive terminal UI (prompt-toolkit) |
## Embedding in Your Own Application
@@ -141,18 +136,13 @@ from switchyard.server.switchyard_app import build_switchyard_app # needs [ser
### Import Error: "No module named 'prompt_toolkit'"
-You're trying to run the CLI launcher without the `[cli]` extra:
+You're using an interactive command-line workflow without the `[cli]` extra:
```bash
# Install CLI support
pip install nemo-switchyard[cli]
```
-```python
-from switchyard import Switchyard # OK (core)
-from switchyard.cli.launchers.claude_code_launcher import launch_claude # needs [cli]
-```
-
## Development
For development with all testing tools, use `uv` (recommended):
diff --git a/docs/architecture.md b/docs/architecture.md
index ccf0a46db..e77dab115 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -48,10 +48,8 @@ formats select an endpoint directly and do not run capability probes.
| `ANTHROPIC` | Always sends to `/v1/messages`. No probe. | You know the upstream is Anthropic-native (Anthropic API, NIM Claude routes). |
| `RESPONSES` | Always sends to `/v1/responses`. No probe. | You know the upstream supports the OpenAI Responses API. Fails on NIM / non-OpenAI upstreams. |
| `OPENAI` | Always sends to `/v1/chat/completions`. No probe. | You know the upstream is OpenAI-compatible (NIM, OpenRouter, etc). Safe universal choice. |
-| `AUTO` | Probes at startup, picks best format (see below). | Upstream is unknown or varies across deployments. Used by Claude Code and Codex launchers. OpenClaw is intentionally pinned to `OPENAI`. |
-| *(omitted)* | Defaults to `OPENAI` — no probe, no fast-path. Silently uses Chat Completions, which is wrong for Anthropic/Bedrock models. Always set `format:` explicitly. | |
-Claude Code and Codex launchers use `AUTO` for their single-model targets.
-OpenClaw is intentionally pinned to `OPENAI` for its equivalent target.
+| `AUTO` | Probes at startup and picks the best format. | The upstream is unknown or varies across deployments. |
+| *(omitted)* | Defaults to `OPENAI` with no probe. | Always set `format:` explicitly when the upstream is not OpenAI-compatible. |
### AUTO Decision Tree
@@ -88,16 +86,12 @@ upstream format.
> probes and makes the upstream contract clear. Use `AUTO` when provider
> capabilities are unknown or vary across deployments.
>
-> **`AUTO` costs startup latency.** Each probe is a live request to the upstream
-> made before the agent starts, so a slow endpoint adds a round-trip per probe
-> (up to three, tried in order). This is the main reason a launch that uses
-> `AUTO` (Claude Code, Codex) starts slower than one pinned to an explicit
-> format. Set `format:` explicitly to remove the probing entirely. To see the
-> per-probe cost of a launch, run it with `--startup-timing` (or
-> `SWITCHYARD_STARTUP_TIMING=1`), which prints each probe on its own line.
+> **`AUTO` costs startup latency.** Each probe is a live request to the upstream,
+> so a slow endpoint adds a round-trip per probe, with up to three tried in
+> order. Set `format:` explicitly to remove probing.
+
## Related Documentation
- [Getting Started](getting_started.md): install Switchyard and run a first request
-- [Agent Launchers](guides/agent_launchers.md): run coding agents through a local proxy
- [Routing Overview](routing_algorithms/overview.md): choose and configure a routing strategy
- [CLI Reference](cli_reference.md): configure and operate Switchyard from the command line
diff --git a/docs/cli_reference.md b/docs/cli_reference.md
index 9950631a5..3bb6bc6f8 100644
--- a/docs/cli_reference.md
+++ b/docs/cli_reference.md
@@ -1,17 +1,17 @@
# CLI Reference
-This page is the canonical reference for every `switchyard` subcommand. It mirrors the output of `switchyard --help` and `switchyard <verb> --help`. If you spot drift, file a docs ticket. Tutorials and recipes live in [Getting Started](getting_started.md); this page is reference material only.
+This page is the canonical reference for the documented `switchyard`
+subcommands. It mirrors the relevant output of `switchyard --help` and
+`switchyard <verb> --help`. Tutorials and recipes live in
+[Getting Started](getting_started.md); this page is reference material only.
## Verbs at a glance
| Verb | Audience | What it does |
|---|---|---|
| [`serve`](#switchyard-serve) | Ops | Long-running proxy server. Serve a YAML route bundle selected with the global `--routing-profiles` flag. |
-| [`launch claude`](#switchyard-launch-claude) | Dev | Spawns Claude Code against a local proxy. Auto-picks a free port, sets `ANTHROPIC_*` env vars, tears the proxy down when Claude exits. `--smoke` runs a one-shot harness round-trip and exits. |
-| [`launch codex`](#switchyard-launch-codex) | Dev | Spawns OpenAI Codex CLI against a local proxy and injects a transient `switchyard` provider via repeated `-c` flags. `--smoke` runs a one-shot Codex round-trip. |
-| [`launch openclaw`](#switchyard-launch-openclaw) | Dev | Spawns `openclaw chat` against a local proxy using a transient `openclaw.json`; the user's OpenClaw configuration is untouched. `--smoke` runs a one-shot agent turn. |
-| [`configure`](#switchyard-configure) | Both | Persists user-level defaults under `~/.config/switchyard/` (provider credentials, per-launcher model defaults, saved routing-profile path). With `--show`, also prints resolved provider, API-key source, and harness binary paths (and optional `GET /models` probe via `--check`). With `--list-models`, also prints a ranked / searchable list of the backend's models. |
-| [`verify`](#switchyard-verify) | Ops | Sequenced pass/fail checklist for proxy + backend only. K8s readiness probe / CI install gate. No harness binary required. For harness-driven smoke tests, see `launch {claude,codex,openclaw} --smoke`. |
+| [`configure`](#switchyard-configure) | Both | Persists provider credentials, a saved routing-profile path, and skill-distillation settings under `~/.config/switchyard/`. With `--show`, also prints a redacted resolution snapshot. With `--list-models`, prints a searchable list of backend models. |
+| [`verify`](#switchyard-verify) | Ops | Sequenced pass/fail checklist for the proxy and backend. Suitable for a readiness probe or CI install gate. |
## Global flags
@@ -20,13 +20,14 @@ These apply to the top-level `switchyard` command, before any verb.
| Flag | Purpose |
|---|---|
| `--version` | Print the installed Switchyard version (`switchyard X.Y.Z`) and exit. Reads the version from the installed package metadata. |
-| `--routing-profiles PATH` / `-c PATH` | [Routing](#routing) bundle applied to `serve`, `launch`, and `configure`. Pass before the verb; separate with `--` for clarity. |
-| `--enable-rl-logging` | Write local [RL trace logs](#rl-trace-logging) (one `message_history` JSON file per turn) for `launch` and `serve` route-bundle sessions. Pass before the verb: `switchyard --enable-rl-logging launch claude`. |
+| `--routing-profiles PATH` / `-c PATH` | [Routing](#routing) bundle applied to `serve` and `configure`. Pass before the verb; separate with `--` for clarity. |
+| `--enable-rl-logging` | Write local [RL trace logs](#rl-trace-logging), one `message_history` JSON file per turn, for `serve` route-bundle sessions. |
| `--rl-log-dir DIR` | Output directory for `--enable-rl-logging` traces (default: `./rl_data`). No effect without `--enable-rl-logging`. |
## Cross-cutting flag families
-Most flags appear on more than one verb. Definitions live here so the per-verb sections can stay short.
+Most flags appear on more than one verb. Definitions live here so the per-verb
+sections can stay short.
### Credentials and endpoint
@@ -34,7 +35,7 @@ Most flags appear on more than one verb. Definitions live here so the per-verb s
|---|---|
| `--api-key VALUE` | API key for the backend. Resolves through the [API-key waterfall](#api-key-resolution). |
| `--base-url URL` | Backend base URL. Resolves through the [base-URL waterfall](#base-url-resolution). |
-| `--provider ID` | Provider id for saved configuration (default: `openrouter`). Used by `configure` (setup, `--show`, and `--list-models`). |
+| `--provider ID` | Provider id for saved configuration (default: `openrouter`). Used by `configure` setup, `--show`, and `--list-models`. |
### Backend format selection
@@ -55,25 +56,18 @@ upstream requests. Configuration files use these lowercase values:
3. Probe `/v1/responses`; use `responses` when supported.
4. Fall back to `openai` (`/v1/chat/completions`).
-Single-model Claude Code and Codex launches use `auto`. OpenClaw is pinned to
-`openai`. Prefer an explicit format when the upstream contract is known so
-startup does not require capability probes.
+Prefer an explicit format when the upstream contract is known so startup does
+not require capability probes.
### Routing
-Routing policies live in routing-profile YAML files. Two flags drive routing
-on the launchers; `serve` uses `--routing-profiles`:
+Routing policies live in routing-profile YAML files. `serve` uses the global
+`--routing-profiles` flag:
| Flag | Purpose |
|---|---|
-| `--model ID` | Single-model passthrough. Every request is rewritten to `model=ID` and forwarded to `--base-url`. |
| `--routing-profiles PATH` | Path to a routing-profile YAML bundle. Each entry under `routes:` builds its own chain. Public route types are `model`, `random_routing`, `stage_router`, `escalation_router`, and `deterministic`. Falls back to the path persisted by `switchyard --routing-profiles PATH -- configure` when omitted. |
-On the launchers, the two flags are mutually exclusive: pass one or the other, not both.
-
-- `--model ID`: single-model passthrough. Any model id from `GET /v1/models` is accepted; every request is rewritten to `model=ID` and forwarded upstream.
-- `--routing-profiles PATH`: loads a multi-chain YAML bundle; the first declared route becomes the initial model.
-
For `type: deterministic` routes, the `classifier:` block also accepts:
| Key | Purpose |
@@ -87,11 +81,15 @@ Benchmark runs started through `benchmark/run-baseline.sh --server-config` copy
Each route name becomes a model ID on `GET /v1/models`. Clients select a route
by setting the request's `model` field to that name.
-### Intake sink (serve and launchers)
+### Intake sink (serve)
-`serve` and launchers share the same Intake sink connection flags. `serve` wires intake processors into every route in the loaded bundle; requests still opt in with `store=true` or `x-switchyard-intake-enabled=true`. Launchers also inject those opt-in headers into the spawned client.
+`serve` wires intake processors into every route in the loaded bundle. Requests
+still opt in with `store=true` or `x-switchyard-intake-enabled=true`.
-> **Note:** Switchyard has two independent ways to capture training data. The **Intake sink** (this section) posts live captures to nemo-platform. **`--enable-rl-logging`** (a [global flag](#global-flags)) writes local `message_history` JSON traces for `launch` and `serve` route-bundle sessions. See [RL trace logging](#rl-trace-logging). Either, both, or neither may be enabled.
+> **Note:** Switchyard has two independent ways to capture training data. The
+> **Intake sink** posts live captures to nemo-platform.
+> **`--enable-rl-logging`** writes local `message_history` JSON traces for
+> `serve` route-bundle sessions. Either, both, or neither may be enabled.
| Flag | Purpose |
|---|---|
@@ -99,16 +97,7 @@ by setting the request's `model` field to that name.
| `--intake-base-url URL` | Override intake base URL. |
| `--intake-workspace NAME` | Override workspace for Intake records. |
| `--intake-api-key VALUE` | Override bearer token. Disables the SDK's transparent refresh. |
-| `--intake-target-url URL` | Post flat per-request telemetry to this full URL (a data-lake posting endpoint) instead of chat-completions ingest. Defaults to `$SWITCHYARD_INTAKE_TARGET_URL`. |
-
-Launchers additionally accept context fields stamped into each ingested request:
-
-| Flag | Purpose |
-|---|---|
-| `--intake-app NAME` | App name stamped into the chat-completions ingest metadata. |
-| `--intake-task NAME` | Task name stamped into the chat-completions ingest metadata (default: `developer-session`). |
-| `--intake-session-id ID` | Session id stamped on every ingested request. |
-| `--intake-user-id ID` | Anonymous user id stamped on every ingested request. Defaults to the stable per-machine id at `~/.switchyard/user_id`. |
+| `--intake-target-url URL` | Post flat per-request telemetry to this full URL instead of chat-completions ingest. Defaults to `$SWITCHYARD_INTAKE_TARGET_URL`. |
The Intake sink posts live model-call captures to nemo-platform
`/apis/intake/v2/workspaces/{workspace}/ingest/chat-completions`. That endpoint
@@ -124,31 +113,38 @@ queries while keeping the original labels under `request.switchyard`.
Set `--intake-target-url` to a full posting URL to send captures to a different
store instead. Switchyard then posts a flat, top-level, type-prefixed document
-(`s_` string, `l_` long, `f_` float, `b_` bool, `text_` debug — one indexable
-field per metric) to that URL, unauthenticated, rather than the nested
-nemo-platform payload. Unset, it uses the nemo-platform ingest above.
+(`s_` string, `l_` long, `f_` float, `b_` bool, `text_` debug) to that URL,
+unauthenticated, rather than the nested nemo-platform payload.
### RL trace logging
-`--enable-rl-logging` attaches a response-side logger to the proxy chain of any
-`launch` session or `serve --routing-profiles` bundle. Each completed turn
-(streaming or not) is written to its own JSON file under `--rl-log-dir`
-(default `./rl_data`), named `{timestamp}_trace_{id}_{id}.json`. The schema
-matches the pre-1.0 trace format:
+`--enable-rl-logging` attaches a response-side logger to the proxy chain of a
+`serve --routing-profiles` bundle. Each completed turn, streaming or not, is
+written to its own JSON file under `--rl-log-dir` (default `./rl_data`), named
+`{timestamp}_trace_{id}_{id}.json`. The schema matches the pre-1.0 trace format:
```json
{
"uuid": "…",
- "messages": [ … full request history …, {"role": "assistant", "content": "…", "tool_calls": […]} ],
- "tools": [ {"id": "…", "description": "…", "inputSchema": {"jsonSchema": { … }}} ],
+ "messages": [
+ {
+ "role": "assistant",
+ "content": "…",
+ "tool_calls": []
+ }
+ ],
+ "tools": [],
"tool_choice": "auto",
- "token_count": {"prompt_tokens": 0, "completion_tokens": 0, "total_tokens": 0},
+ "token_count": {
+ "prompt_tokens": 0,
+ "completion_tokens": 0,
+ "total_tokens": 0
+ },
"is_valid": true
}
```
-Turns without an assistant choice (e.g. upstream errors) are skipped. The flag
-works on `launch` and on `serve` with a route bundle.
+Turns without an assistant choice, such as upstream errors, are skipped.
### Transport (server verbs)
@@ -163,16 +159,16 @@ works on `launch` and on `serve` with a route bundle.
### API-key resolution
-Launcher and verify flows resolve the API key in this order, stopping at the
-first non-empty value:
+Verification resolves the API key in this order, stopping at the first
+non-empty value:
1. `--api-key` on the CLI
2. `$OPENROUTER_API_KEY`
3. `$NVIDIA_API_KEY`
4. `$OPENAI_API_KEY`
-5. `$ANTHROPIC_API_KEY` (Claude/OpenClaw launchers and verify only)
-6. `~/.config/switchyard/credentials.json` → the provider entry written by `configure` (launchers only)
-7. `secrets/secrets.json` → first provider section with `api_key` set, with `openrouter` then `nvidia` checked first
+5. `$ANTHROPIC_API_KEY`
+6. `secrets/secrets.json` → first provider section with `api_key` set, with
+ `openrouter` then `nvidia` checked first
For OpenRouter, set `OPENROUTER_API_KEY`; `OPENROUTER_BASE_URL` is optional
because the built-in default is `https://openrouter.ai/api/v1`.
@@ -182,10 +178,8 @@ because the built-in default is `https://openrouter.ai/api/v1`.
1. `--base-url` on the CLI
2. The base URL matching the selected environment credential:
`$OPENROUTER_BASE_URL`, `$NVIDIA_BASE_URL`, or `$OPENAI_BASE_URL`
-3. `~/.config/switchyard/config.json` → the selected provider written by
- `configure` (launchers only)
-4. `secrets/secrets.json` → same section traversal as the API key
-5. Default: OpenRouter (`https://openrouter.ai/api/v1`)
+3. `secrets/secrets.json` → same section traversal as the API key
+4. Default: OpenRouter (`https://openrouter.ai/api/v1`)
### `secrets.json` format
@@ -208,7 +202,9 @@ because the built-in default is `https://openrouter.ai/api/v1`.
Serve a long-running proxy from a YAML route bundle. Each entry under `routes:`
builds a runnable chain and is exposed as a model on `GET /v1/models`.
-The server exposes the OpenAI Chat Completions (`/v1/chat/completions`), Anthropic Messages (`/v1/messages`), and OpenAI Responses (`/v1/responses`) APIs on the same host and port.
+The server exposes the OpenAI Chat Completions (`/v1/chat/completions`),
+Anthropic Messages (`/v1/messages`), and OpenAI Responses (`/v1/responses`)
+APIs on the same host and port.
**Synopsis**
@@ -228,189 +224,47 @@ switchyard [--routing-profiles PATH] serve
| `--host`, `--port`/`-p`, `--reload` | [Transport](#transport-server-verbs). |
| `--inbound FORMAT` | Backwards-compatible no-op; all request APIs are always registered. |
| `--workers` / `-w` | uvicorn worker count. |
-| `--routing-log-file PATH` | Append one JSONL routing record per request (task, session, actual model, tier, token and cache usage) to PATH. Also exposes `GET /v1/routing/session-stats?session_id=...`. |
-| `--intake-enabled` / `--enable-intake`, `--intake-base-url`, `--intake-workspace`, `--intake-api-key`, `--intake-target-url` | [Intake sink](#intake-sink-serve-and-launchers). |
+| `--routing-log-file PATH` | Append one JSONL routing record per request to `PATH`. Also exposes `GET /v1/routing/session-stats?session_id=...`. |
+| `--intake-enabled` / `--enable-intake`, `--intake-base-url`, `--intake-workspace`, `--intake-api-key`, `--intake-target-url` | [Intake sink](#intake-sink-serve). |
**Notes**
-- `serve` always registers `POST /v1/chat/completions`, `POST /v1/messages`, `POST /v1/responses`, `GET /v1/models`, and `GET /health`. There is no flag to expose just one request API.
+- `serve` always registers `POST /v1/chat/completions`, `POST /v1/messages`,
+ `POST /v1/responses`, `GET /v1/models`, and `GET /health`.
- `GET /v1/stats` and `GET /v1/routing/stats` expose route statistics.
-- `--inbound` is retained as a compatibility no-op; all supported request APIs are always registered.
+- `--inbound` is retained as a compatibility no-op.
**Examples**
```bash
-# Route bundle on port 4000
switchyard --routing-profiles routes.yaml -- serve --port 4000
-# Persist a bundle for later runs; no-TTY configure requires explicit provider credentials
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
switchyard serve --port 4000
-# Multi-worker uvicorn
SWITCHYARD_WORKERS=4 switchyard --routing-profiles routes.yaml -- serve
```
-## `switchyard launch claude`
-
-Start a proxy on a free local port, spawn `claude` against it, and tear the proxy down when Claude exits.
-
-**Synopsis**
-
-```text
-switchyard [--routing-profiles PATH] launch claude [--model ID]
- [--base-url URL] [--api-key VALUE]
- [--port PORT] [--timeout SECONDS]
- [--intake-enabled [INTAKE OVERRIDES]]
- [--reconfigure] [--dry-run] [--smoke]
- [--no-tui] [--no-model-discovery]
- [-- CLAUDE_ARGS...]
-```
-
-When neither CLI routing flag is passed, `launch claude` uses a saved routing bundle
-first, then a saved `claude.model` as single-model passthrough. The built-in
-LLM-as-classifier route is the default only when neither a bundle nor a single-model
-default is resolved.
-
-**Flags**
-
-| Flag | Source |
-|---|---|
-| `--model`, `--routing-profiles` | [Routing](#routing). |
-| `--api-key`, `--base-url` | [Credentials](#credentials-and-endpoint). |
-| `--weak-model`, `--classifier-model`, `--profile`, `--classifier-min-confidence` | Tier overrides for the built-in LLM-as-classifier route. They are ignored when route resolution selects an explicit or saved bundle or single model. |
-| `--intake-enabled` and overrides | [Intake sink](#intake-sink-serve-and-launchers). |
-| `--port PORT` | Proxy port (default: auto-pick free port). |
-| `--timeout SECONDS` | Request timeout for the backend LLM client. |
-| `--reconfigure` | Run Claude setup before launching, even if defaults already exist. |
-| `--dry-run` | Print resolved launch settings without starting the proxy or Claude. |
-| `--smoke` | Start the proxy, run one `claude -p "<smoke>" --max-turns 1` round-trip, assert exit `0`, and exit. Requires `--model`; cannot be combined with `--routing-profiles`. |
-| `--no-tui` | First-run setup: use plain prompts instead of the TUI selector. |
-| `--no-model-discovery` | First-run setup: skip `GET /models` and type the model manually. |
-| `CLAUDE_ARGS` | Anything after `--` is forwarded verbatim to `claude`. |
-
-**Env vars set on the spawned `claude` process**
-
-- `ANTHROPIC_BASE_URL`: pointed at the local proxy
-- `ANTHROPIC_AUTH_TOKEN`: opaque placeholder; skips Console OAuth
-- `ANTHROPIC_API_KEY`: set to `""` to silence the auth-conflict warning
-- `ANTHROPIC_MODEL` and `ANTHROPIC_SMALL_FAST_MODEL`: pre-selected so Claude's `/model` picker shows your model
-- `ANTHROPIC_CUSTOM_MODEL_OPTION`: registers the model in Claude Code's custom model UI entry
-- `CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY`: tells Claude Code to call `GET /v1/models` on the proxy so the full registered route list appears in the picker
-
-**Examples**
-
-```bash
-# Single-model passthrough
-switchyard launch claude --model openai/gpt-4o-mini
-
-# Use a routing bundle
-switchyard --routing-profiles ~/.config/switchyard/profiles.yaml -- launch claude
-
-# One-shot smoke test
-switchyard launch claude --smoke --model openai/gpt-4o-mini
-
-# Forward args to the underlying claude binary
-switchyard launch claude --model openai/gpt-4o-mini -- --version
-```
-
-## `switchyard launch codex`
-
-Start a proxy and spawn OpenAI Codex CLI against it. Codex talks to the proxy via
-the OpenAI Responses API (`/v1/responses`). For single-model launches,
-Switchyard probes the upstream and uses native Anthropic Messages, OpenAI
-Responses, or Chat Completions according to the provider's capabilities.
-
-**Synopsis**
-
-```text
-switchyard [--routing-profiles PATH] launch codex [--model ID]
- [--base-url URL] [--api-key VALUE]
- [--port PORT] [--timeout SECONDS]
- [--intake-enabled [INTAKE OVERRIDES]]
- [--reconfigure] [--dry-run] [--smoke]
- [--no-tui] [--no-model-discovery]
- [-- CODEX_ARGS...]
-```
-
-When neither CLI routing flag is passed, `launch codex` uses a saved routing bundle
-first, then a saved `codex.model` as single-model passthrough. The built-in
-LLM-as-classifier route is the default only when neither a bundle nor a single-model
-default is resolved. `--weak-model`, `--classifier-model`, `--profile`, and
-`--classifier-min-confidence` tune only that built-in route. `CODEX_ARGS` are forwarded
-verbatim to `codex`.
-
-**Provider override on the spawned `codex` process**
-
-`launch codex` injects a transient `switchyard` provider into Codex via repeated `-c` flags. No edits to `~/.codex/config.toml` are required.
-
-**Examples**
-
-```bash
-switchyard launch codex --model openai/gpt-4o-mini
-switchyard --routing-profiles routes.yaml -- launch codex
-switchyard launch codex --smoke --model openai/gpt-4o-mini
-switchyard launch codex --model openai/gpt-4o-mini -- exec "explain this file"
-```
-
-## `switchyard launch openclaw`
-
-For [OpenClaw](https://github.com/openclaw/openclaw). OpenClaw talks to the proxy via OpenAI Chat Completions (`/v1/chat/completions`); the chain translates as needed for the upstream backend.
-
-**Synopsis**
-
-```text
-switchyard [--routing-profiles PATH] launch openclaw [--model ID]
- [--base-url URL] [--api-key VALUE]
- [--port PORT] [--timeout SECONDS]
- [--intake-enabled [INTAKE OVERRIDES]]
- [--reconfigure] [--dry-run] [--smoke]
- [--no-tui] [--no-model-discovery]
- [-- OPENCLAW_ARGS...]
-```
-
-When neither CLI routing flag is passed, `launch openclaw` uses a saved routing bundle
-first, then a saved `openclaw.model` as single-model passthrough. The built-in
-LLM-as-classifier route is the default only when neither a bundle nor a single-model
-default is resolved. `--weak-model`, `--classifier-model`, `--profile`, and
-`--classifier-min-confidence` tune only that built-in route.
-
-The launcher spawns `openclaw chat`, an alias for `openclaw tui --local`, which is OpenClaw's interactive local terminal UI bound to the embedded agent runtime. `OPENCLAW_ARGS` are forwarded after `chat`, so pass `chat`-compatible flags (`--message`, `--thinking`, `--session`, etc.). `openclaw agent` is a non-interactive one-shot turn and is used only by the `--smoke` path.
-
-**Provider override on the spawned `openclaw` process**
-
-`launch openclaw` writes a transient `openclaw.json` to a temporary directory and points OpenClaw at it via `OPENCLAW_STATE_DIR` / `OPENCLAW_HOME` / `OPENCLAW_CONFIG_PATH`. The transient config declares a `models.providers.switchyard` block with `api: "openai-completions"`, `baseUrl` pointing at the proxy, and `apiKey: "${SWITCHYARD_API_KEY}"` (the launcher sets `SWITCHYARD_API_KEY=switchyard`, an opaque placeholder; the proxy ignores inbound auth). The user's real `~/.openclaw/` (sessions, channels, plugins) is **untouched** for the duration of the launch.
-
-The tempdir is removed when `openclaw` exits, including on Ctrl-C.
-
-**Examples**
-
-```bash
-switchyard launch openclaw --model openai/gpt-4o-mini
-switchyard --routing-profiles routes.yaml -- launch openclaw
-switchyard launch openclaw --smoke --model openai/gpt-4o-mini
-switchyard launch openclaw --model openai/gpt-4o-mini -- --message "Hello"
-```
-
## `switchyard configure`
-Persist user-level Switchyard defaults under `~/.config/switchyard/`. Credentials are stored separately from non-secret config, with owner-only file permissions.
-Skill distillation config also lives in `~/.config/switchyard/config.json` under `skill_distillation` and can be updated without configuring provider credentials.
+Persist user-level Switchyard defaults under `~/.config/switchyard/`.
+Credentials are stored separately from non-secret config, with owner-only file
+permissions. Skill-distillation config also lives in
+`~/.config/switchyard/config.json`.
**Synopsis**
```text
-switchyard [--routing-profiles PATH] configure [--show [--check] [--json] | --reset | --list-models]
- [--target {all,provider,claude,codex,openclaw}]
+switchyard [--routing-profiles PATH] configure
+ [--show [--check] [--json] | --reset | --list-models]
+ [--target provider]
[--query SUBSTRING] [--limit N]
[--provider ID]
[--base-url URL] [--api-key VALUE]
- [--claude-model ID] [--claude-base-url URL] [--claude-api-key VALUE]
- [--codex-model ID] [--codex-base-url URL] [--codex-api-key VALUE]
- [--openclaw-model ID] [--openclaw-base-url URL] [--openclaw-api-key VALUE]
- [--skill-distillation NAMESPACE] [--disable-skill-distillation]
+ [--skill-distillation NAMESPACE]
+ [--disable-skill-distillation]
[--no-model-discovery] [--no-tui]
```
@@ -418,35 +272,31 @@ switchyard [--routing-profiles PATH] configure [--show [--check] [--json] | --re
| Flag | What it does |
|---|---|
-| _(none)_ | Interactive setup. Prompts for any missing default; runs the model-discovery TUI unless `--no-model-discovery`. |
-| `--show` | Print the redacted saved config plus a resolution snapshot: resolved provider, base URL, API-key source, saved Claude / Codex defaults, routing-profile summary, and paths to the `claude` and `codex` harness binaries. Pair with `--check` for a live `GET /models` probe, or `--json` to emit only the raw redacted JSON snapshot. |
+| _(none)_ | Interactive setup. Prompts for missing provider defaults and runs model discovery unless `--no-model-discovery`. |
+| `--show` | Print the redacted saved config plus a provider, base-URL, and API-key resolution snapshot. Pair with `--check` for a live `GET /models` probe, or `--json` for the raw redacted JSON snapshot. |
| `--reset` | Delete persisted user config and credentials. |
-| `--list-models` | Fetch `GET /models` from the resolved provider and print a ranked, searchable list. Pair with `--target {claude,codex}` for launcher-targeted ranking, `--query` to filter by substring, `--limit` to cap results. |
+| `--list-models` | Fetch `GET /models` from the resolved provider. Pair with `--query` to filter by substring and `--limit` to cap results. |
**Configuration knobs**
| Flag | Purpose |
|---|---|
-| `--target` | For setup: which defaults to write (`all` (default), `provider`, `claude`, `codex`, or `openclaw`). For `--list-models`: ranking target (`all`, `claude`, `codex`, or `openclaw`; `provider` is accepted and treated as `all`). |
-| `--provider`, `--base-url`, `--api-key` | Provider-level defaults applied to every launcher. Also act as one-off overrides for `--show` (changes the row that's used to resolve "base URL source" and "API key source") and for the `--list-models` discovery call. |
-| `--claude-*` / `--codex-*` / `--openclaw-*` | Per-launcher overrides on top of the provider defaults. |
-| `--routing-profiles PATH` | Global flag; pass before `configure`. Parses the YAML at `PATH` and stores the parsed bundle inline in `~/.config/switchyard/config.json`. Subsequent `serve` and `launch` runs use this when no `--routing-profiles` is on the CLI. Pass an empty string to clear. |
-| `--skill-distillation NAMESPACE` | Save a namespace for one skill that improves over time. Many sessions or trajectories can contribute to it; the namespace is not a session ID. This release stores only the namespace; session saving, distillation, and launch-time skill loading are separate implementation work. |
-| `--disable-skill-distillation` | Remove the saved skill distillation config. Cannot be combined with `--skill-distillation`. |
+| `--target provider` | Save provider-level defaults without requiring model-specific settings. |
+| `--provider`, `--base-url`, `--api-key` | Provider-level defaults and one-off overrides for `--show` and `--list-models`. |
+| `--routing-profiles PATH` | Global flag; pass before `configure`. Parses the YAML at `PATH` and stores the parsed bundle inline in `~/.config/switchyard/config.json`. Subsequent `serve` runs use it when no path is supplied. Pass an empty string to clear. |
+| `--skill-distillation NAMESPACE` | Save a namespace for one skill that improves over time. Many sessions or trajectories can contribute to it; the namespace is not a session ID. |
+| `--disable-skill-distillation` | Remove the saved skill-distillation config. Cannot be combined with `--skill-distillation`. |
| `--query` / `-q SUBSTRING` | With `--list-models`, case-insensitive substring filter. |
| `--limit N` | With `--list-models`, cap on the number of models printed (default: 50; pass `0` for unlimited). |
-| `--no-model-discovery` | Skip `GET /models` and rely on explicit or existing model values during interactive setup. |
+| `--no-model-discovery` | Skip `GET /models` and rely on existing provider values during interactive setup. |
| `--no-tui` | Use plain text prompts instead of the TUI selector. |
-| `--check` | With `--show`, call `GET /models` against the resolved provider and report pass/fail in the output. |
+| `--check` | With `--show`, call `GET /models` against the resolved provider and report pass/fail. |
> **Saved bundles keep `${VAR}` references literal.** A saved routing-profile
-> bundle stores `${OPENROUTER_API_KEY}` (and any other `${VAR}`) verbatim. The
-> referenced environment variables must therefore
-> be present in the environment at `serve` / `launch` time; on another machine or
-> shell, export them again or Switchyard aborts with
-> `missing environment variable(s): NAME`.
+> bundle stores `${OPENROUTER_API_KEY}` and other `${VAR}` references verbatim.
+> Export them before running `serve`.
-**Skill distillation config**
+**Skill-distillation config**
```json
{
@@ -456,71 +306,46 @@ switchyard [--routing-profiles PATH] configure [--show [--check] [--json] | --re
}
```
-Namespaces must be a single safe path component: letters, numbers, dot, underscore, and hyphen only.
-One namespace identifies one skill that improves over time, and many sessions or trajectories can contribute to it. Use a different namespace when you want a separate skill. A namespace is not a session ID; each future launcher run will receive its own internal session ID.
-The top-level key is omitted when skill distillation is not configured. `namespace` is the only supported key today; any extra manually edited keys are rejected instead of being treated as inactive future options.
+Namespaces must be a single safe path component: letters, numbers, dot,
+underscore, and hyphen only. One namespace identifies one skill that improves
+over time, and many sessions or trajectories can contribute to it.
**Examples**
```bash
-# First-run interactive setup
switchyard configure
-# Save a routing bundle as the default for serve + launchers
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
-# Inspect what's stored, plus resolved provider / key source / harness paths
switchyard configure --show
-
-# Inspect plus live GET /models probe
switchyard configure --show --check
-
-# Raw redacted JSON, e.g. for tooling
switchyard configure --show --json
-# One-off override for a probe (without persisting anything)
-switchyard configure --show --provider openrouter --api-key "$OPENROUTER_API_KEY" --base-url https://openrouter.ai/api/v1 --check
-
-# Browse the backend's models
-switchyard configure --list-models --target claude --query gpt
-switchyard configure --list-models --limit 0 --provider openrouter --api-key "$OPENROUTER_API_KEY" --base-url https://openrouter.ai/api/v1
-
-# Set just the Claude default model non-interactively
-switchyard configure --target claude --claude-model openai/gpt-4o-mini --no-tui
+switchyard configure --list-models --query gpt
+switchyard configure --list-models --limit 0 --provider openrouter \
+ --api-key "$OPENROUTER_API_KEY" \
+ --base-url https://openrouter.ai/api/v1
-# Non-interactive / CI: save provider credentials only (no launcher models required)
-switchyard configure --target provider --provider openrouter \
- --api-key "$OPENROUTER_API_KEY" --base-url https://openrouter.ai/api/v1 \
- --no-tui --no-model-discovery
-
-# Save a skill distillation namespace without provider credentials
switchyard configure --skill-distillation tooluniverse-trialqa
-
-# Remove the skill distillation namespace without touching provider credentials
switchyard configure --disable-skill-distillation
-
-# Wipe everything
switchyard configure --reset
```
!!! note "Non-interactive / CI usage"
- **`--target all` (the default) requires launcher models in no-TTY mode.** Without a
- TTY or `--claude-model` / `--codex-model` / `--openclaw-model`, the command exits with
- `No Claude model configured or discovered`. Pass `--target provider` to save only
- provider credentials, or supply explicit `--claude-model` / `--codex-model` / `--openclaw-model` values.
+ Pass `--target provider` to save provider credentials without requiring
+ model-specific settings.
- **`configure` requires an explicit `--api-key` flag.** It does not read `OPENROUTER_API_KEY`
- (or any other `*_API_KEY` environment variable) and does not read `api_key` from a
- routing-profile bundle (`--routing-profiles`). Always pass `--api-key` when running
- non-interactively.
+ **`configure` requires an explicit `--api-key` flag.** It does not read
+ `OPENROUTER_API_KEY` or another `*_API_KEY` environment variable, and it
+ does not read `api_key` from a routing-profile bundle.
## `switchyard verify`
-Sequenced pass/fail checklist that confirms a Switchyard install works end-to-end against a real backend, without spawning a harness binary. Fast (~1–3s on a healthy stack); suitable for K8s readiness probes and pre-deployment smoke tests.
-
-For harness-driven smoke tests (proxy + spawn `claude` / `codex` / `openclaw` once with a fixed prompt), use [`launch claude --smoke`](#switchyard-launch-claude) / [`launch codex --smoke`](#switchyard-launch-codex) / [`launch openclaw --smoke`](#switchyard-launch-openclaw) instead.
+Sequenced pass/fail checklist that confirms a Switchyard install works
+end-to-end against a real backend. It is suitable for readiness probes and
+pre-deployment smoke tests.
**Synopsis**
@@ -531,14 +356,14 @@ switchyard verify [--model ID] [--base-url URL] [--api-key VALUE]
**Example model**
-`openai/gpt-4o-mini` is a portable OpenRouter example. Pass `--model` when
-your provider uses a different model ID.
+`openai/gpt-4o-mini` is a portable OpenRouter example. Pass `--model` when your
+provider uses a different model ID.
**Checklist**
1. Resolve credentials (CLI → env → `secrets.json`).
2. Reach the backend via `GET /models`.
-3. Probe `/v1/chat/completions`, `/v1/messages`, and `/v1/responses` support (informational; informs `BackendFormat.AUTO`).
+3. Probe `/v1/chat/completions`, `/v1/messages`, and `/v1/responses` support.
4. Start a proxy on a free port.
5. Round-trip a chat completion through the chain.
6. Tear the proxy down.
@@ -546,29 +371,31 @@ your provider uses a different model ID.
**Exit codes**
- `0`: every step passed.
-- Non-zero: first failing step; the error message names the source it tried and what to fix.
+- Non-zero: first failing step; the error message names the source it tried and
+ what to fix.
**Examples**
```bash
switchyard verify
switchyard verify --model openai/gpt-4o-mini
-switchyard verify --api-key "$OPENROUTER_API_KEY" --base-url https://openrouter.ai/api/v1
+switchyard verify --api-key "$OPENROUTER_API_KEY" \
+ --base-url https://openrouter.ai/api/v1
```
## Environment variables
| Variable | Purpose |
|---|---|
-| `OPENROUTER_API_KEY`, `NVIDIA_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY` | Backend credentials. Resolved in this order by launchers and `verify`; `ANTHROPIC_API_KEY` is only consulted where Anthropic input is supported. |
+| `OPENROUTER_API_KEY`, `NVIDIA_API_KEY`, `OPENAI_API_KEY`, `ANTHROPIC_API_KEY` | Backend credentials resolved by `verify`. |
| `OPENROUTER_BASE_URL`, `NVIDIA_BASE_URL`, `OPENAI_BASE_URL` | Backend base URL overrides paired with the selected provider credential. |
-| `OPENAI_API_BASE` | Legacy alias for `OPENAI_BASE_URL`. Consulted as a last fallback when neither `--base-url` nor `OPENAI_BASE_URL` is set. Prefer `OPENAI_BASE_URL` for new configurations. |
-| `SWITCHYARD_INTAKE_ENABLED` | Boolean equivalent of `--intake-enabled` / `--enable-intake`. Set to `1` or `true` to enable the intake sink without a CLI flag. Precedence: CLI flag first, then this env var. |
-| `SWITCHYARD_INTAKE_TARGET_URL` | Full posting URL for the alternate flat-document intake sink (paired with `--intake-target-url`). Precedence: CLI flag first, then this env var. |
+| `OPENAI_API_BASE` | Legacy alias for `OPENAI_BASE_URL`. Prefer `OPENAI_BASE_URL` for new configurations. |
+| `SWITCHYARD_INTAKE_ENABLED` | Boolean equivalent of `--intake-enabled` / `--enable-intake`. |
+| `SWITCHYARD_INTAKE_TARGET_URL` | Full posting URL for the alternate flat-document intake sink. |
| `SWITCHYARD_WORKERS` | Default uvicorn worker count for `serve`. |
-| `SWITCHYARD_TELEMETRY_OPT_OUT` | Disable the `X-Switchyard-Version` telemetry header on outbound calls. `NEMO_SWITCHYARD_TELEMETRY_OPT_OUT` is honored for backwards compatibility. |
-| `SWITCHYARD_INTAKE_BASE_URL`, `SWITCHYARD_INTAKE_WORKSPACE`, `SWITCHYARD_INTAKE_API_KEY`, `SWITCHYARD_INTAKE_APP`, `SWITCHYARD_INTAKE_TASK`, `SWITCHYARD_SESSION_ID`, `SWITCHYARD_USER_ID` | Intake-sink overrides for CI / headless runs. Precedence: the matching CLI flag (e.g. `--intake-user-id`) first, then the env var, then any persisted / SDK default (e.g. `~/.switchyard/user_id`). |
-| `NMP_ACCESS_TOKEN` | Fallback bearer token for the intake sink when the NMP SDK config is not present. |
+| `SWITCHYARD_TELEMETRY_OPT_OUT` | Disable the `X-Switchyard-Version` telemetry header on outbound calls. |
+| `SWITCHYARD_INTAKE_BASE_URL`, `SWITCHYARD_INTAKE_WORKSPACE`, `SWITCHYARD_INTAKE_API_KEY`, `SWITCHYARD_INTAKE_APP`, `SWITCHYARD_INTAKE_TASK`, `SWITCHYARD_SESSION_ID`, `SWITCHYARD_USER_ID` | Intake-sink overrides for CI and headless runs. |
+| `NMP_ACCESS_TOKEN` | Fallback bearer token for the Intake sink when the NMP SDK config is not present. |
## See also
diff --git a/docs/core_concepts.md b/docs/core_concepts.md
index 3e452ab8c..f5cc5cebd 100644
--- a/docs/core_concepts.md
+++ b/docs/core_concepts.md
@@ -90,6 +90,5 @@ Python route bundles. See the
- [Getting Started](getting_started.md) to install and send a first request.
- [Routing Overview](routing_algorithms/overview.md) to choose and tune a strategy.
-- [Agent Launchers](guides/agent_launchers.md) to run Claude Code, Codex, or OpenClaw.
- [Architecture](architecture.md) to see a request travel end to end.
- [CLI Reference](cli_reference.md) for flags and environment variables.
diff --git a/docs/getting_started.md b/docs/getting_started.md
index 2d7a71c9a..b10edd531 100644
--- a/docs/getting_started.md
+++ b/docs/getting_started.md
@@ -113,8 +113,6 @@ curl http://localhost:4000/v1/chat/completions \
-d '{"model":"switchyard","messages":[{"role":"user","content":"hello"}]}'
```
-<!-- TODO: Add agent launchers back when they are wired to the Rust server. -->
-
## Routing algorithms
### Choose a route type
@@ -180,4 +178,4 @@ export SWITCHYARD_TELEMETRY_OPT_OUT=1
- [`switchyard-translation`](../crates/switchyard-translation/README.md):
request, response, and stream translation
-<!-- TODO: Restore architecture, CLI, launcher, and routing links when those pages are Rust-first. -->
+<!-- TODO: Restore architecture, CLI, and routing links when those pages are Rust-first. -->
diff --git a/docs/guides/agent_launchers.md b/docs/guides/agent_launchers.md
deleted file mode 100644
index f22562c7e..000000000
--- a/docs/guides/agent_launchers.md
+++ /dev/null
@@ -1,162 +0,0 @@
-# Agent Launchers
-
-Switchyard launchers start a local proxy, configure the target coding agent to
-use it, and shut the proxy down when the agent exits. Use them when you want
-Claude Code, Codex, or OpenClaw to run through the same routing and translation
-stack used by `switchyard serve`.
-
-## Supported launchers
-
-| Harness | Status | Entrypoint | Tested version | Inbound format |
-|---|---|---|---|---|
-| Claude Code | Supported | `switchyard launch claude` | 2.1.162 | Anthropic Messages |
-| Codex CLI | Supported | `switchyard launch codex` | 0.137.0 | OpenAI Responses |
-| OpenClaw | Experimental | `switchyard launch openclaw` | 2026.6.1 | OpenAI Chat Completions |
-
-Other versions may work, but these are the versions covered by release docs.
-
-## Start a launcher
-
-Run `switchyard configure` once, then launch the agent:
-
-```bash
-switchyard configure
-switchyard launch claude
-switchyard launch codex
-switchyard launch openclaw
-```
-
-Each launcher reads saved provider credentials from `~/.config/switchyard/`.
-Interactive Claude Code and Codex sessions show live request and token totals
-in the status footer. A saved route bundle is used when configured.
-
-## Default routing behavior
-
-The built-in LLM-as-classifier route is the default only when there is no
-`--model`, no CLI `--routing-profiles`, no saved route bundle, and no
-saved model default. Each turn is classified and dispatched to a weak or
-strong tier using the validated coding-agent trio:
-
-| Role | Model |
-|---|---|
-| Strong | Claude Opus 4.7 (`anthropic/claude-opus-4.7`) |
-| Weak | Kimi K2.6 (`moonshotai/kimi-k2.6`) |
-| Classifier | Gemini 3.5 Flash (`google/gemini-3.5-flash`) |
-
-`--weak-model`, `--classifier-model`, `--profile`, and
-`--classifier-min-confidence` tune only this built-in route. They are ignored
-when route resolution selects an explicit or saved route bundle or single
-model.
-
-The default trio uses OpenRouter model ids and therefore requires OpenRouter
-connectivity (`OPENROUTER_API_KEY`). If the resolved provider is not OpenRouter,
-the launcher fails fast. The strong tier stays `anthropic/claude-opus-4.7`, so
-`--weak-model`/`--classifier-model` don't make the trio reachable — pass
-`--model` for a single model, use `--routing-profiles` for a bundle, or set
-`OPENROUTER_API_KEY`.
-
-## Override the default route
-
-Use `--model` for a single-model passthrough session:
-
-```bash
-switchyard launch claude --model openai/gpt-4o-mini
-```
-
-For launcher route-bundle routing, whether the bundle contains one route or
-several, use:
-
-```bash
-switchyard --routing-profiles routes.yaml -- launch claude
-```
-
-`--model` and `--routing-profiles` are mutually exclusive. The first route in
-the bundle becomes the initial model, and `/v1/models` plus the agent's model
-picker expose the registered routes.
-
-For route-bundle sessions, the footer reports active-model and aggregate
-request/token counts, including errors. `/v1/routing/stats` aggregates usage
-across the registered chains.
-
-The same `--routing-profiles` bundle can be served directly with
-`switchyard --routing-profiles routes.yaml -- serve`.
-
-## Model requirements
-
-Coding agents need models that support streaming and tool calling together. If
-you pass `--model` explicitly, verify that model with a direct streaming +
-tool-calling request before treating an empty response as a Switchyard issue.
-
-### Agent stalls or produces no output
-
-**Symptom:** the agent prints no output, and the upstream returns HTTP 200 with
-`finish_reason=stop`, empty content, and no tool calls.
-
-**Cause:** the selected model does not support streaming and tool calling
-simultaneously.
-
-**Diagnose:**
-
-1. Probe the model directly, bypassing Switchyard, with a streaming +
- tool-calling request.
-2. Switch back to the validated default route. If that works, the issue is
- model-specific.
-
-In passthrough mode, Switchyard forwards the empty response as-is. Multi-target
-routing profiles treat empty completions as errors and surface them explicitly.
-
-### Claude Code with MCP tools
-
-Bedrock-backed routes enforce a 64-character `toolSpec.name` limit. Claude
-Code's MCP bridge can auto-inject longer tool names, such as
-`mcp__plugin_microsoft_docs_microsoft_learn__microsoft_code_sample_search`,
-which is 72 characters and produces a `BedrockException` 400 on tool-bearing
-requests. If you hit this, point that tier at a non-Bedrock endpoint, such as
-OpenRouter with `anthropic/claude-opus-4.7`, or choose another route target.
-
-## Claude Code model picker
-
-Claude Code's `/model` picker only shows routes whose id starts with `claude`
-or `anthropic`, even though Switchyard's `/v1/models` returns every route. This
-is a [Claude Code rule](https://code.claude.com/docs/en/llm-gateway#model-selection),
-not a Switchyard restriction.
-
-`switchyard launch claude` exposes route ids that do not already start with
-`claude` or `anthropic` under a `claude-` alias alongside the original id. This
-is an alias only; it does not create a second Switchyard chain.
-
-| YAML key | Also reachable as |
-|---|---|
-| `opus-ds` | `claude-opus-ds` |
-| `openai/gpt-4o` | `claude-openai/gpt-4o` |
-| `claude-opus-direct` | `opus-direct` |
-
-Both spellings work:
-
-```bash
-switchyard launch claude --model opus-ds
-switchyard launch claude --model claude-opus-ds
-```
-
-The first registered model, which becomes `ANTHROPIC_CUSTOM_MODEL_OPTION`,
-always has either an existing `claude`/`anthropic` prefix or the generated
-`claude-` alias, so Claude Code's initial selection passes the picker filter.
-
-This aliasing applies only to the Claude launcher. `switchyard launch codex`,
-`switchyard launch openclaw`, and `switchyard serve` expose route ids verbatim.
-
-You can also write the `claude-` prefix directly in route YAML if you
-want the route ids to match exactly what appears in `/model`:
-
-```yaml
-routes:
- claude-opus-ds:
- type: stage_router
- ...
- claude-opus-direct:
- type: model
- ...
-```
-
-Other agent harnesses, such as Cursor or Aider, can point at the standalone
-`switchyard serve` proxy. They do not have dedicated launchers today.
diff --git a/docs/index.md b/docs/index.md
index 3801dd0ad..a07954a0f 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -13,11 +13,10 @@ split across model tiers, or selected by routing policy.
| Area | What Switchyard provides |
|---|---|
| Client ingress | OpenAI Chat Completions, Anthropic Messages, and OpenAI Responses compatible endpoints. |
-| Agent launchers | One-command local proxies for Claude Code, Codex, and OpenClaw. |
| Format translation | Request and response translation between supported wire formats. |
| Routing policies | Random splits, LLM classifier routing with optional session affinity, signal-driven stage-router routing, and YAML route bundles. |
| Operations | Request/token statistics and context-window fallback behavior. |
-| Deployment options | Local coding-agent proxy, shared HTTP service, or embedded Python runtime. |
+| Deployment options | Local or shared HTTP service, or embedded Python runtime. |
At a high level, Switchyard keeps client integrations separate from model
providers and routing policy:
@@ -34,7 +33,6 @@ For system context and request lifecycle diagrams, see
```bash
pip install "nemo-switchyard[cli,server]"
switchyard configure
-switchyard launch claude
```
For source installs, non-interactive configuration, and a curl sanity check, use
@@ -44,12 +42,6 @@ For source installs, non-interactive configuration, and a curl sanity check, use
<div class="grid cards" markdown>
-- **Run coding agents**
-
- Launch Claude Code, Codex, or OpenClaw through a local Switchyard proxy.
-
- [Agent Launchers](guides/agent_launchers.md)
-
- **Configure routing**
Pick between fixed splits, classifier routing, and stage-router routing, with
@@ -107,10 +99,9 @@ and clients select one with the request's `model` field:
switchyard --routing-profiles routes.yaml -- serve --port 4000
```
-The same bundle can drive a launcher or be saved as the default:
+The same bundle can be saved as the default:
```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
@@ -119,7 +110,7 @@ switchyard --routing-profiles routes.yaml -- configure --target provider \
Non-interactive `configure` does not read provider credentials from the routing
bundle; pass `--api-key` explicitly when persisting the bundle for CI.
-Route types, launcher use, and persistence are covered in
+Route types and persistence are covered in
[Routing Overview](routing_algorithms/overview.md). The Rust server uses its
own explicit TOML configuration for LLM clients, targets, and libsy algorithms.
diff --git a/docs/routing_algorithms/escalation_router_routing.md b/docs/routing_algorithms/escalation_router_routing.md
index 696512c3a..45095a73b 100644
--- a/docs/routing_algorithms/escalation_router_routing.md
+++ b/docs/routing_algorithms/escalation_router_routing.md
@@ -104,12 +104,6 @@ Run the route as a standalone proxy:
switchyard --routing-profiles routes.yaml -- serve --port 4000
```
-Or use the same bundle with an agent launcher:
-
-```bash
-switchyard --routing-profiles routes.yaml -- launch claude
-```
-
The route ID (`agent-escalation`) is the model ID clients select to use the
router. The strong and weak model IDs are also registered as direct
passthrough choices. The judge is internal to the route and is not exposed as
diff --git a/docs/skill_distillation.md b/docs/skill_distillation.md
index c66d50171..068482249 100644
--- a/docs/skill_distillation.md
+++ b/docs/skill_distillation.md
@@ -1,14 +1,14 @@
# Skill Distillation
-Skill distillation turns agent sessions into a reusable skill for the same
-kind of work. The model is not retrained. Switchyard saves the session history,
-uses it to update a `SKILL.md`, and makes the active skill available to later
-agent launches for the same namespace.
+Skill distillation is intended to turn agent sessions into a reusable skill for
+the same kind of work without retraining the model. The workflow will save
+session history, use it to update a `SKILL.md`, and make the active skill
+available to later agent runs for the same namespace.
-The current release adds the saved configuration and the Rust contracts that
+The current release provides saved configuration and the Rust contracts that
later implementations will share. It does not yet save session files, run
distillation, update skills, import external runs, validate results, or mount
-skills into launched agents.
+skills into agent runtimes.
## Configure It
@@ -22,8 +22,8 @@ switchyard configure --show
One namespace identifies one skill that improves over time. Keep using the same
namespace when more sessions or trajectories should contribute to that skill;
choose a different namespace when you want a separate skill. A namespace is not
-a session ID. In the automatic workflow, Switchyard will generate a separate
-internal session ID for each launcher run.
+a session ID. The future automatic workflow will generate a separate internal
+session ID for each captured run.
The namespace is stored in the user config and can be updated without provider
credentials. To remove it:
@@ -34,39 +34,37 @@ switchyard configure --disable-skill-distillation
## Intended Workflow
-Once launcher support lands, the flow should be automatic:
+A future host integration should automate this flow:
```text
-configure a namespace
-run an agent through switchyard launch
+select a namespace
+capture a completed agent session
save the session under that namespace
distill when the session ends
create or update the namespace's active SKILL.md
-load that active skill in the next launch for the same namespace
+load that active skill in the next run for the same namespace
```
If no skill exists yet, the first distilled session creates one. Later sessions
update the existing skill and keep enough history to inspect or roll back the
change.
-Skill distillation is namespace-based. The namespace is saved user
-configuration, not a per-request header. A future request may be recorded as
-part of a saved session, but a single HTTP request should not change which skill
-is being learned or used.
+Skill distillation is namespace-based. A namespace identifies one skill that
+improves over time; it is not a session ID or per-request header. A future
+request may be recorded as part of a saved session, but a single HTTP request
+should not change which skill is being learned or used.
## Session Ownership
-The user configures only the namespace. In the automatic workflow, Switchyard
-will own session capture and the session lifecycle. Each `switchyard launch`
-will generate a separate session ID, record completed model turns as they pass
-through the local proxy, and finalize the project-local session record when the
-launched agent exits. The user will not provide a session ID, choose a storage
-path, or run a separate recorder.
+The host runtime should generate a separate session ID, record completed model
+turns, and finalize the project-local session record when the agent exits. The
+user should choose only the namespace, not a session ID, storage path, or
+separate recorder.
The capture backend is an internal implementation detail. The initial
implementation will use a Switchyard-managed project-local store; a later
trajectory source or storage backend can replace or supplement it without
-changing the configuration or launcher workflow.
+changing the Rust contracts or host workflow.
## Config
@@ -102,7 +100,7 @@ executable files.
Skill generation should happen after sessions finish, not during normal model
request handling. Switchyard owns the session-to-skill lifecycle, including
-capture, distillation, validation, history, and launch-time skill loading. It
+capture, distillation, validation, history, and run-time skill loading. It
should not turn every request into a memory update.
The automatic workflow still needs guardrails. Every skill update should record
@@ -158,7 +156,7 @@ steps run.
`SkillEvidenceId` is not a second session tracker. A session ID groups requests
and turns while an agent is running. A `SkillEvidenceId` identifies the
completed run after Switchyard saves it for distillation. The initial workflow
-will create one evidence record for each completed launcher session. Switchyard
+will create one evidence record for each completed captured session. Switchyard
keeps this ID stable within the namespace. The Rust contract uses it to reject
duplicate inputs in one distillation request and to record which evidence a
skill candidate used. The code that creates an evidence record reuses a safe
diff --git a/mkdocs.yml b/mkdocs.yml
index 0409a52e7..1650033e0 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -21,7 +21,6 @@ nav:
- Getting Started: getting_started.md
- Known Issues in 0.1.0: known_issues.md
- Guides:
- - Agent Launchers: guides/agent_launchers.md
- Skill Distillation: skill_distillation.md
- Concepts:
- Core Concepts: core_concepts.md
diff --git a/tests/test_cli_reference_docs.py b/tests/test_cli_reference_docs.py
index 119e65bc9..bc0de940d 100644
--- a/tests/test_cli_reference_docs.py
+++ b/tests/test_cli_reference_docs.py
@@ -14,6 +14,17 @@ from switchyard.cli.switchyard_cli import _build_parser
REPO_ROOT = Path(__file__).resolve().parents[1]
CLI_REFERENCE = REPO_ROOT / "docs" / "cli_reference.md"
_MARKDOWN = MarkdownIt()
+_AGENT_SPECIFIC_CONFIGURE_OPTIONS = {
+ "--claude-api-key",
+ "--claude-base-url",
+ "--claude-model",
+ "--codex-api-key",
+ "--codex-base-url",
+ "--codex-model",
+ "--openclaw-api-key",
+ "--openclaw-base-url",
+ "--openclaw-model",
+}
def _subparsers(parser: argparse.ArgumentParser) -> dict[str, argparse.ArgumentParser]:
@@ -52,8 +63,7 @@ def _long_options(parser: argparse.ArgumentParser) -> set[str]:
def test_cli_reference_documents_every_serve_flag() -> None:
parser = _build_parser()
serve = _subparsers(parser)["serve"]
- doc = CLI_REFERENCE.read_text()
- serve_section = _markdown_section(doc, "switchyard serve")
+ serve_section = _markdown_section(CLI_REFERENCE.read_text(), "switchyard serve")
expected = _long_options(serve) | {"--routing-profiles"}
missing = sorted(flag for flag in expected if flag not in serve_section)
@@ -63,13 +73,17 @@ def test_cli_reference_documents_every_serve_flag() -> None:
)
-def test_cli_reference_documents_every_configure_flag() -> None:
+def test_cli_reference_documents_supported_configure_flags() -> None:
parser = _build_parser()
configure = _subparsers(parser)["configure"]
- doc = CLI_REFERENCE.read_text()
- configure_section = _markdown_section(doc, "switchyard configure")
+ configure_section = _markdown_section(
+ CLI_REFERENCE.read_text(),
+ "switchyard configure",
+ )
- expected = _long_options(configure) | {"--routing-profiles"}
+ expected = (
+ _long_options(configure) - _AGENT_SPECIFIC_CONFIGURE_OPTIONS
+ ) | {"--routing-profiles"}
missing = sorted(flag for flag in expected if flag not in configure_section)
assert not missing, (
@@ -119,20 +133,16 @@ def test_cli_reference_marks_serve_inbound_as_noop() -> None:
assert "compat" in serve_section
-def test_cli_reference_documents_shared_intake_flags_once() -> None:
+def test_cli_reference_documents_serve_intake_flags_once() -> None:
doc = CLI_REFERENCE.read_text()
- assert "### Intake sink (serve and launchers)" in doc
- assert "### Intake sink (serve)" not in doc
- assert "### Intake sink (launchers)" not in doc
- assert "### Intake sink (launchers only)" not in doc
+ assert "### Intake sink (serve)" in doc
assert "`--intake-enabled`" in doc
assert "`--enable-intake`" in doc
assert doc.count("`--intake-base-url URL`") == 1
assert doc.count("`--intake-workspace NAME`") == 1
assert doc.count("`--intake-api-key VALUE`") == 1
assert doc.count("`--intake-target-url URL`") == 1
- assert "`--intake-app NAME`" in doc
def _public_cli_doc_paths() -> list[Path]:
@@ -167,20 +177,8 @@ def _has_stale_routing_profiles(line: str) -> bool:
for index, word in enumerate(words):
if word != "switchyard" or index + 2 >= len(words):
continue
- subcommand = words[index + 1]
- if subcommand in {"serve", "configure"} and "--routing-profiles" in words[index + 2:]:
- return True
- if subcommand == "launch" and index + 3 < len(words):
- if "--routing-profiles" in words[index + 3:]:
- return True
- return False
-
-
-def _has_launcher_preset(line: str) -> bool:
- words = _command_words(line)
- for index, word in enumerate(words):
- if word == "switchyard" and words[index + 1:index + 2] == ["launch"]:
- if "--preset" in words[index + 3:]:
+ if words[index + 1] in {"serve", "configure"}:
+ if "--routing-profiles" in words[index + 2:]:
return True
return False
@@ -206,7 +204,6 @@ def _matching_markdown_lines(predicate: Callable[[str], bool]) -> list[str]:
def test_cli_docs_do_not_use_stale_flag_placements() -> None:
stale_checks = {
"--routing-profiles must be a global switchyard flag": _has_stale_routing_profiles,
- "--preset is no longer a launcher flag": _has_launcher_preset,
"serve does not accept --api-key": _has_serve_api_key,
}
@@ -217,3 +214,6 @@ def test_cli_docs_do_not_use_stale_flag_placements() -> None:
failures.append(reason + ":\n" + "\n".join(matches))
assert not failures, "\n\n".join(failures)
+
+
+# TODO: Add agent-specific command-reference coverage when that documentation returns.