Skip to navigation

Server CLI Reference

View as Markdown

switchyard-server runs the standalone Rust proxy for API clients and custom deployments.

Install the standalone binary with cargo install --locked switchyard-server. It reads a native TOML deployment.

Usage

switchyard-server --config <deployment.toml> [options]
OptionDefaultPurpose
--config PATHRequiredTOML file defining LLM clients, targets, and algorithm routes.
--host HOST127.0.0.1Address on which the server listens. Use 0.0.0.0 for remote clients.
-p, --port PORT4000Port on which the server listens.
--backlog BACKLOG65535TCP listen backlog configured before accepting traffic.
--shutdown-timeout SHUTDOWN_TIMEOUT30sMaximum time active requests may drain during shutdown.
--dry-runOffValidate the deployment without binding a socket.
--routing-log-file PATHNoneAppend durable per-request routing records to this JSONL file.
--pricing-file PATHNoneEstimate unreported call costs from a TOML or JSON file of USD rates per million tokens; requires --routing-log-file.
--tls-cert PATHNonePEM certificate path; requires --tls-key.
--tls-key PATHNonePEM private-key path; requires --tls-cert.
-h, --help—Print command help.
-V, --version—Print the server version.

Saved routing records use bundled model prices by default. --pricing-file replaces the entire bundled table, so include every model you want to price.

Validate a deployment, then start the proxy:

switchyard-server --config routes.toml --dry-run
switchyard-server --config routes.toml \
--host 127.0.0.1 --port 4000