API schemas: L
LatencyAliasStatus
Section titled “LatencyAliasStatus”Type: object
alias(string, required)capability(string, required, one of"chat","embeddings","moderations","rerank")max_age(string, required)probe_every(integer, required, min 2, max 1000)selections(integer, required, min 0)targets(array of object, required)index(integer, required, min 0)provider_id(string, required)model_id(string, required)known(boolean, required)header_latency_ms(number or null, required, min 0) — EWMA alpha 0.2 with a 30s penalty added for transport failures, 429 or 5xx; null when unknown or expiredobserved_at(string or null (date-time), required)samples(integer, required, min 0)selected(integer, required, min 0) — Primary selections, not count of admitted sends
LatencyRoutingPolicy
Section titled “LatencyRoutingPolicy”Type: object
Passive process-local header-latency preference for text stateless Chat, embeddings, moderations or rerank. Requires at least two targets and excludes target weights; validated even when latency_routing is disabled. Tools, streaming, state and unknown payload extensions keep existing routing and are not sampled.
max_age(string, required) — Go duration from 1s through 15m; expired observations are unknownprobe_every(integer, required, min 2, max 1000) — One circular normal-request selection per N selections; never an extra provider call
LegalHold
Section titled “LegalHold”Type: object
id(string, required, pattern^lh_[a-f0-9]{32}$)reason(string, required)reference(string, required)placed_by(string, required)placed_at(string (date-time), required)released_at(string or null (date-time), required)released_by(string)release_reason(string)active(boolean, required)
LifecycleBootSetting
Section titled “LifecycleBootSetting”Type: object or object
- All of (1): any
- All of (2): any
- One of (1): object
value(null)source(null)
- One of (2): object
value(string)source(string)
key(string, required, one of"lifecycle.drain_delay","lifecycle.shutdown_timeout")group("lifecycle", required)value(string or null, required)default(string, required, one of"2s","10s","2m10s") — Default in the process’s environment: drain_delay is 10s in a Kubernetes Pod, 2s elsewhere.source(string or null, required, one of"default","yaml","environment",null)restart_required(true, required)
LifetimeBudgetPolicyParameterDefinition
Section titled “LifetimeBudgetPolicyParameterDefinition”Type: object
key("quotas.policies[]", required)group("quota", required)kind("lifetime_budget_policy", required)period("lifetime", required)reset("never", required)default(null, required)sources(["yaml","console"], required)restart_required(false, required)yaml_requires_restart(true, required)
ListTotals
Section titled “ListTotals”Type: object
T186.011: every row of a sessions or end users query counted, with their traces, cost (for a reader who sees cost) and tokens.
rows(integer, required)traces(integer, required)cost_state(string, one of"known","partial","unknown","none")cost_usd(string)tokens(integer)
LocalInferenceConfig
Section titled “LocalInferenceConfig”Type: object
The boot settings of local_inference: what this gateway process may start. Read from the gateway YAML at start; restart required; no API route changes them.
supervise(boolean) — local_inference.supervise: this process may start model servers. Default false: pools are mode register only.runtimes(LocalInferenceRuntimes)model_dirs(array of string, max items 16) — local_inference.model_dirs: the directories weights may be read fromcontainer_images(array of string, max items 16) — local_inference.container_images: the images a vllm pool may runpools(array of LocalInferencePool, max items 16) — local_inference.poolssource(string, one of"yaml")restart_required(boolean)
LocalInferenceEndpoint
Section titled “LocalInferenceEndpoint”Type: object
url(string, required, max length 512) — The replica’s OpenAI-compatible base URL (http or https, no credentials, query or fragment), such as http://10.0.0.5:8000/v1device(string, pattern^[A-Za-z0-9][A-Za-z0-9._:/-]{0,95}$) — A label for the GPU or MIG slice behind the replica, shown in status; a name starting with MIG- needs local_inference_mig
LocalInferenceGPU
Section titled “LocalInferenceGPU”Type: object
local_inference.pools[].gpu. Every mode but off needs its flags: local_inference_gpu with local_inference_metal or local_inference_nvidia, and local_inference_mig for a MIG slice.
mode(string, one of"off","metal","nvidia") — Default off: CPU onlydevices(array of string, max items 16) — Supervise, mode nvidia: one replica is bound to each entry (GPU or MIG UUID, or GPU index). Empty: discovered with nvidia-smi, by one pool at most.share_device(boolean) — Allow more replicas than devices (several replicas on one GPU without MIG). Accepted with a warning; the generated alias then defaults to ordered.memory_fraction(number, min 0.05, max 0.95) — vllm, supervise: the share of the device’s memory one replica may take. Default 0.85 of a whole GPU or of a MIG slice of 10 GB or more, 0.70 of a smaller slice, divided by the replicas sharing the device.
LocalInferenceHealth
Section titled “LocalInferenceHealth”Type: object
path(string, pattern^/[A-Za-z0-9._~/-]{0,127}$) — Probed on the replica’s origin. Default /health (llama_cpp, mlx, vllm) or /api/version (ollama). The model list (/models under the base URL) is probed as well.interval(string) — Between probes. Default 5s; 1s to 5m.ready_timeout(string) — How long a started replica may take to pass its first probe before it is restarted. Default 5m; 5s to 1h.unhealthy_after(integer, min 0, max 20) — Consecutive failed probes that take a ready replica out of routing; twice as many end and restart a supervised one. Default 3.
LocalInferencePool
Section titled “LocalInferencePool”Type: object
One entry of local_inference.pools: equal replicas of one model on one backend. Each replica becomes a provider connection <id>-r<n> that no provider route can edit.
id(string, required, pattern^[a-z][a-z0-9-]{0,39}$)backend(string, required, one of"llama_cpp","mlx","ollama","vllm")mode(string, one of"register","supervise") — Default register: the operator runs the servers and the gateway health-checks and routes. supervise: the gateway starts them; needs local_inference.supervise and the backend’s runtime.model(string, required, pattern^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$) — The model name the replicas serve, sent upstream (a supervised mlx pool is addressed as default_model)alias(string, pattern^[A-Za-z0-9][A-Za-z0-9._:/-]{0,127}$) — When set, a chat model with this ID over every replica is generated, unless a model with that ID is declaredrouting_strategy(string, one of"least_busy","ordered") — Of the generated alias. Default least_busy; ordered with gpu.share_device.weights(string, max length 1024) — Supervise: where the operator put the model, inside local_inference.model_dirs: a .gguf file (llama_cpp), a model directory (mlx, vllm) or the model store directory (ollama). The gateway never downloads weights.replicas(integer, min 0, max 16) — Supervise: how many servers run. Default 1.slots(integer, min 0, max 256) — Supervise: parallel requests per replica. 0: the server’s default.context_tokens(integer, min 0, max 1048576) — Supervise: the context window of one request (256 or more). 0: the server’s default. Not for mlx.port_base(integer, min 1024, max 65535) — Supervise: the loopback port of replica 1; replica n listens on 127.0.0.1:port_base+n-1image(string) — Supervise, vllm: one of local_inference.container_imagesgpu(LocalInferenceGPU)endpoints(array of LocalInferenceEndpoint, max items 16) — Register: one entry per replicaapi_key_env(string, pattern^[A-Z_][A-Z0-9_]{0,127}$) — Register: the environment variable holding the bearer key the replicas ask for; empty sends no credential. Set in the gateway YAML only: the API accepts it only unchanged for a pool the YAML declares with the same endpoints.health(LocalInferenceHealth)restart(LocalInferenceRestart)stop_grace(string) — Supervise: how long a stop waits for requests in flight, and then for the process to end, before it is killed. Default 10s; 1s to 5m.scrape_metrics(boolean) — Default true: llama_cpp and vllm replicas declare /metrics for the model server metrics scrape (provider_metrics_scrape)extra_args(array of string, max items 32) — Supervise: appended to the model server’s arguments. Set in the gateway YAML only: the API accepts them only unchanged for a pool the YAML declares.disabled(boolean) — Keep the pool, run and route nothing
LocalInferenceReplica
Section titled “LocalInferenceReplica”Type: object
The state of one replica on the answering gateway process
id(string, required) — The replica’s provider connection ID, <pool>-r<n>pool(string, required)number(integer, required)backend(string, required)mode(string, required, one of"register","supervise")base_url(string, required)state(string, required, one of"ready","starting","unhealthy","backoff","failed","blocked","stopped","stopping") — Only ready replicas receive trafficreason(string) — A fixed code: flag_off:<flag>, supervise_disabled, operator_stop, operator_restart, no_device, device_discovery_failed, port_in_use, weights_unavailable, start_failed, exited, ready_timeout, unresponsive, probe_failed, probe_status, restart_limit, pending or shutting_downdesired(string, required, one of"running","stopped")gpu(boolean, required)device(object)id(string)kind(string, one of"gpu","mig","metal")profile(string) — The MIG profile when discovered, such as 1g.5gb
memory_fraction(number)pid(integer)container(string)in_flight(integer, required) — Requests this gateway process has in flight on the replicarestarts_total(integer, required)restarts_last_hour(integer, required)last_exit(string) — How the process last ended (exit status or signal)last_output(string, max length 300) — The last line the model server wrote before it ended, to explain a failurestarted_at(string (date-time))ready_at(string (date-time))last_probe_at(string (date-time))next_start_at(string (date-time))circuit(string, one of"closed","open")load(object) — The replica’s own running and waiting requests at its last metrics scrape (provider_metrics_scrape)requests_running(number)requests_waiting(number)
metrics_scrape(object) — The last scrape of this replica, as on a provider connection
LocalInferenceRestart
Section titled “LocalInferenceRestart”Type: object
backoff(string) — Wait before the first restart; doubles up to one minute. Default 2s; 500ms to 1m.max_per_hour(integer, min 0, max 60) — Restarts in one hour after which the replica is left failed until an operator starts it. Default 6.
LocalInferenceRuntimes
Section titled “LocalInferenceRuntimes”Type: object
local_inference.runtimes, as the admin API shows it: whether each executable is admitted. The paths are set in the gateway YAML (absolute, read at start) and are never served or changed here.
llama_cpp(boolean) — local_inference.runtimes.llama_cpp: llama-servermlx(boolean) — local_inference.runtimes.mlx: mlx_lm.serverollama(boolean) — local_inference.runtimes.ollama: ollamacontainer(boolean) — local_inference.runtimes.container: the container runtime (docker) of the vllm backendnvidia_smi(boolean) — local_inference.runtimes.nvidia_smi: used to discover GPUs and MIG slices when a pool lists no gpu.devices
LocalInferenceView
Section titled “LocalInferenceView”Type: object
version(integer (int64), required)enabled(boolean, required)flags(object, required) — local_inference, local_inference_gpu, local_inference_metal, local_inference_nvidia, local_inference_mig- any other key: boolean
source(string, required, one of"default","yaml","console")declared(boolean, required) — The gateway YAML declares poolsoverride_ignored(string) — Empty, or why a stored pool list is set aside (the boot settings no longer admit it, or the YAML is the source of truth): the YAML’s pools are in forcerouting_strategies(boolean)metrics_scrape(boolean)scope("process", required)boot(LocalInferenceConfig, required)limits(object, required)max_pools(integer)max_replicas_per_pool(integer)max_replicas(integer)
pools(array of LocalInferencePool and object, required)- All of (1): LocalInferencePool
- All of (2): object
effective_mode(string)effective_routing_strategy(string)required_flags(array of string)missing_flags(array of string)warnings(array of string)replica_status(array of LocalInferenceReplica)effective(object) — health_path, health_interval, ready_timeout, unhealthy_after, restart_backoff, restart_max_per_hour, stop_grace and replicas with defaults appliedmetrics_path(string)alias_state(string, one of"generated","declared_elsewhere")
LocalMFACatalog
Section titled “LocalMFACatalog”Type: object
version(integer)base_fingerprint(string)stored_base_fingerprint(string)base_mismatch(boolean) — An override exists and was written against a different YAML basesource(string, one of"default","yaml","console")declared(LocalMFAPolicy)override(LocalMFAPolicy or null)- One of (1): LocalMFAPolicy
- One of (2): null
effective(LocalMFAPolicy)defaults(LocalMFAPolicy)limits(object)features(object)- any other key: boolean
webauthn(object)rp_id(string)origins(array of string)display_name(string)configured(boolean)source(string)restart_required(boolean)
encryption_key_available(boolean)restart_required(boolean)
LocalMFAPolicy
Section titled “LocalMFAPolicy”Type: object
required_roles(array of string, required, max items 6)protect_bootstrap(boolean, required) — Also blocks the shared admin Bearer pathprotect_shared_viewer(boolean, required)challenge_ttl(string, required) — Go duration, whole seconds, 30s..15m (default 5m)fresh_proof_ttl(string, required) — 30s..15m (default 5m)enrollment_ticket_ttl(string, required) — 5m..72h (default 1h)max_attempts(integer, required, min 1, max 10)attempt_window(string, required) — 30s..1h (default 5m)lockout_duration(string, required) — 30s..1h (default 5m)max_pending_per_principal(integer, required, min 1, max 10)max_pending_total(integer, required, min 100, max 100000)max_passkeys(integer, required, min 1, max 20)recovery_code_count(integer, required, min 5, max 20)totp(object, required)issuer(string, required, min length 1, max length 80)algorithm(string, required, one of"SHA1","SHA256","SHA512")digits(integer, required, one of6,8)period_seconds(integer, required, min 15, max 120)skew_steps(integer, required, min 0, max 2)
LogDestinationBinding
Section titled “LogDestinationBinding”Type: object
id(string, required, pattern^[a-z][a-z0-9_-]{0,63}$)template_id(string, required, pattern^[a-z][a-z0-9_-]{0,63}$) — Existing operator YAML destination identifierflush_seconds(integer, required, min 0, max 300) — Zero selects existing default ten secondsmax_batch(integer, required, min 0, max 5000) — Zero selects existing default five hundred recordsprefix(string, required, max length 200, pattern^[A-Za-z0-9._/-]*$) — Relative path; no double-dot or leading slashservice(string, required, max length 256) — Maximum 256 UTF-8 bytes for managed writes
LogDestinationPolicySnapshot
Section titled “LogDestinationPolicySnapshot”Type: object
version(integer, required, min 0)override(null or array of LogDestinationBinding, required)- One of (1): null
- One of (2): array of LogDestinationBinding
effective(array of object, required, max items 10) — Normalized batching; legacy YAML service strings remain unchanged and are not truncated to managed-write limitsid(string, required)template_id(string, required)flush_seconds(integer, required, min 1, max 300)max_batch(integer, required, min 1, max 5000)prefix(string, required)service(string, required)
templates(array of object, required, max items 10)id(string, required)type(string, required, one of"s3","gcs","azure_blob","langfuse","datadog","http")target(string, required) — Sanitized display target; no userinfo, query, fragment or credential references
source(string, required, one of"yaml","console")restart_required(false, required)applies_to("new_completions", required)trust_requires_restart(true, required)
LoggingBootSetting
Section titled “LoggingBootSetting”Type: object or object
- One of (1): object
value(null)source(null)
- One of (2): object
value(string)source(string)
key("logging.level", required)group("logging", required)value(string or null, required, one of"info","warn","error",null)default("info", required)source(string or null, required, one of"default","yaml",null)restart_required(true, required)
LoggingSnapshot
Section titled “LoggingSnapshot”Type: object
The logging.* boot settings (T183) under the YAML block’s name and the YAML leaf names. level is the applied minimum level; write_mode and request_events keep their status fields (source, default, active) inside.
level(string, required, one of"info","warn","error")format("json", required)request_events(object) — logging.request_events as read at startup. With stdout, every finished inference request that reaches the usage registry writes one JSON line with event gateway.request to stdout, metadata only (see the request events guide for the schema). active says whether this process has the writer; neither field proves that a pipeline receives the lines.destination(string, required, one of"off","stdout")source(string, required, one of"default","yaml")default("off", required)restart_required(true, required)active(boolean, required) — Whether this process attached the request event writer at startup.schema_version(1, required) — Version of the gateway.request event schema this binary writes.queue_capacity(integer, required) — Events the bounded queue holds before new ones are dropped and counted in gateway_request_events_dropped_total.
write_mode(object) — T173: logging.write_mode as read at startup. async (the default) encodes and writes the process log on one worker behind a bounded queue: records keep their order, a caller waits when the queue is full (counted in gateway_log_queue_waits_total, never dropped), a record that carries an error or another non-scalar value waits until it is written, and the queue is flushed at graceful shutdown. sync writes each record on the goroutine that logs it. active says whether this process writes through the queue.mode(string, required, one of"async","sync")source(string, required, one of"default","yaml")default("async", required)restart_required(true, required)active(boolean, required) — Whether this process attached the asynchronous log queue at startup.queue_capacity(1024, required) — Records the queue holds before a caller waits for room.