Skip to main content
Version: Latest (main)

Router configuration reference

These are the Router fields that describe a model_runtime deployment and how its features read it, and the environment variables that change how the Router runs its managed workers.

Deployment and binding fields​

FieldWhereMeaning
provider: model_runtimedeploymentThe model runs in the model runtime.
artifact, revisiondeploymentHub repository and commit, or an absolute local path.
devicedeploymentSee Run it with the router.
max_num_seqs, max_num_batched_tokens, batch_window_ms, dtype, enable_shared_context, max_model_lendeploymentThe deployment's engine arguments; an unset one keeps the runtime's default. max_model_len applies to a managed worker without replicas.
input.max_tokens, input.overflowdeploymentInput limit of task models. A deployment that answers questions takes only overflow: window with max_tokens: the scan budget its questions read a long part whole to (see Long inputs). That includes the default decision model, a deployment published for direct System One inference, and the deployment of a local System One alias, whether or not a listener publishes the alias. A routed System One entrypoint is not one deployment. A bound deployment that is none of these keeps a task-model limit.
signal_timeout_msglobal.model_catalogDeadline of a request's model-runtime signals. By default the request's deadline less a tenth of the time left (at least a second), or 45 s for a served request, which has none the router sees. A signal still running resolves through its policy: a jailbreak or PII rule as no answer, which matches unless the rule sets on_unknown: no_match, and any other signal as a failed signal, through on_error or rules.on_unknown.
on_unscannedrecipes[].signals.systemone[], jailbreak[], pii[]With coverage: full, what an answer that could not read the whole input means: match, no_match, unknown (default) or best_effort. jailbreak and pii rules read a long input in windows and default to best_effort, which decides on the windows read.
routing_view, scan_windowdeploymentrouting_view: {max_tokens, head_share} bounds what a routing question reads of a long input to its head and tail (default 8,192 tokens, a quarter head); scan_window: {tokens, overlap, max_parallel, max_tokens, reread_margin} sizes the windows a guard question reads it in (8,192, overlapping by 512), each a call of its own, max_parallel (4) at a time, growing up to max_tokens between the head and the tail when 256 do not cover the input or a scan that fell behind reads the rest in time that way; a larger window that leaves a rule just short of its threshold (within reread_margin, 3, in log-odds) is read again at tokens. Both are sized in bytes, four a token, and never above the model's validated length less 1,024 counted a byte a token; see Long inputs.
replicasdeploymentPlacements of independent workers for one logical model. Each has device or endpoint/model; omit for one worker. Do not combine with deployment-level placement.
outlier_detectiondeploymentconsecutive_timeouts (default 3; 0 turns it off), base_ejection_ms (30000), max_ejection_ms (ten times the base) and max_ejection_percent (50). A replica whose exchanges run out of their deadline that many times in a row leaves dispatch for the base, twice as long each time in a row; see Eject a replica that keeps timing out.
enabledglobal.routerDefault true. Disable routing signals while retaining the frontend, native API and decision model.
endpoint, modeldeploymentAttach to a runtime you run; model is the served model's ID. The connection block adds auth, headers, timeout_ms and tls.
bindings.<type>, recipes[].model_bindings.<type>global.model_catalog, recipeThe deployment a signal type uses: a name, or {deployment, head} to select a head.
deploymentruleThe deployment a decision, classifiers, safety (and hazard) or complexity rule asks.

The binding keys are the signal types domain, jailbreak, pii, fact_check, user_feedback, modality, hallucination, preference and reask. Embeddings name their deployment in global.model_catalog.embeddings.default. Choose a model for a signal shows how each resolves; the task guides list the answer each signal reads.

Router-managed runtimes​

Environment variableDefaultMeaning
VLLM_SRUN_COMMANDvllm-srunCommand the router runs for a managed process.
VLLM_SRUN_DIRa private temporary directoryWhere the router puts the processes' Unix sockets and models files.
VLLM_SRUN_CACHE_DIR/app/models/model-runtime in router imagesHugging Face cache of managed runtimes.
VLLM_SRUN_CPU_THREADSHalf the CPU budget, rounded down; minimum 1, maximum 16Threads per managed CPU worker. A positive integer overrides the default, capped by the router's full CPU budget; invalid or nonpositive values use the default. It does not control worker count or attached runtimes.
VLLM_SRUN_READY_TIMEOUT10mHow long the router waits for a deployment to become ready when it starts or reloads, as a duration such as 30m. A first start may download and verify large models.
VLLM_SRUN_RESULT_CACHE4096Recent classify and decision results for a single-worker deployment; 0 disables it. Multi-worker pools bypass this frontend cache; worker caches remain independent.
VLLM_SRUN_AUTOTUNE_CACHEThe --autotune-cache directory of a runtime.
HF_TOKENToken for gated or private repositories.

The CPU budget is the router's GOMAXPROCS, normally derived from CPU affinity and the container's CPU quota. vllm-sr serve forwards VLLM_SRUN_CPU_THREADS to the router. Worker thread counts stay independent of the active routing signals; see CPU threads for tuning guidance.

The router talks to managed runtimes only over Unix sockets in a directory only its own user can open (mode 0700). It restarts a process that exits, waiting 1 second at first and up to 60 seconds after repeated failures, and stops every process (SIGTERM, then SIGKILL after 10 seconds, logged as runtime_process_killed) when it exits. It also restarts a process in which every model failed to load, the same way, so a model that failed for a passing reason comes back without a configuration reload. A process that still serves any model keeps running.