Skip to main content

Crate switchyard_runner

Crate switchyard_runner 

Source
Expand description

Shared configured routing for Switchyard serving surfaces.

WASI builds omit HTTP-backed route execution.

Structs§

AlgorithmConfigError
Error returned when an algorithm description cannot be constructed.
AlgorithmFactory
Parsed deployment configuration for building algorithms with host-owned execution.
AuxiliaryTarget
Exact upstream model and client used for an auxiliary provider operation.
CategoryModelConfig
Runtime model groups for a custom classifier, keyed by group name.
ConfiguredTarget
ConfiguredTarget names one target that a route uses.
DecisionDescription
Fully resolved routing decision.
DecisionJudgeRouteConfig
Relative-advantage judgment using a decision model instead of an LLM prompt.
DecisionTarget
Non-secret configured target details returned by the decision endpoint.
LlmClassifierRouteConfig
Settings for an llm_classifier route. Which fields are required depends on the ClassifierMode; using a field from the wrong mode is an error.
ModelCapabilities
Capabilities declared for one route.
ModelInfo
Borrowed model metadata returned while listing routes.
ProviderKeyRedactor
Replaces configured provider keys without changing the credentials sent upstream.
Route
A configured algorithm and the per-target clients its calls resolve through.
RouteErrorSummary
Safe, structured terminal-failure data for routing telemetry.
RouteTargets
RouteTargets lists the targets one route calls, as the runner reads them from the server config.
RoutingOutcome
The terminal result of routing.
RunOutput
The selected model and untouched response produced by a route execution.
Runner
Immutable named route table.
RuntimeModels
The models one algorithm run may use, grouped by Category. Within a category they are ordered best-first.
StageClassifierConfig
The judge a stage_router route falls through to, and how it routes.
TargetModel
TargetModel identifies the model a target sends requests to and the client that serves it.
VgrRouteConfig

Enums§

AdvisorTriggerConfig
What fires an advisor route’s review.
AlgorithmSpec
A routing algorithm described by configured target names. Converting it to &str gives the route’s type, such as stage_router.
CallerAuthKind
Caller credential family required by a forwarded-auth route.
ClassifierMode
Which of the three llm_classifier behaviors a route uses.
ClassifierPolicyConfig
How a custom classifier turns the judge’s JSON verdict into a target.
RouteErrorKind
Stable class of a terminal route-execution failure.
RouteErrorPhase
When a terminal failure occurred relative to response delivery.
RunnerError
Error returned while loading or executing configured routes.
SubagentRouteConfig
Routing policy applied only to delegated sub-agent work, nested inside a passthrough or stage_router route.
VgrModeConfig

Functions§

api_key_variables
This function returns a deployment’s declared credential variable names without reading their values. It parses the deployment and checks its schema version before returning names from LLM and decision clients.
route_targets
This function lists each route’s targets without building clients or reading credentials. It returns the same parse error the server reports for a config that does not match the schema.
stream_error_summary
Returns a safe telemetry summary for an error yielded by an active response stream.