NVIDIA Request Extensions (nvext)
nvext is a top-level JSON object on the request body that provides NVIDIA-specific extensions to the OpenAI-compatible API. nvext fields are consumed by the Dynamo frontend, preprocessor, router, and backend workers to control routing, preprocessing, response metadata, scheduling, and engine-level priority.
Usage
Include nvext as a top-level field alongside standard OpenAI-compatible fields:
Field Reference
Header Overrides
Routing fields can also be set via HTTP headers, which take priority over nvext values:
Agent Hints
The agent_hints sub-object carries per-request hints that the router uses for scheduling, load balancing, and KV cache optimization.
latency_sensitivity
When --router-queue-threshold is set and the queue is active, this value shifts the request’s effective arrival time earlier in the queue, giving it priority over requests with lower (or no) latency_sensitivity. A value of 5.0 means the request is treated as if it arrived 5 seconds earlier than it actually did. A recommended default is 1.2 for latency-sensitive agentic requests. Has no effect when queueing is disabled.
osl
Expected output sequence length — the estimated number of output tokens the request will generate. The router uses this hint in two ways:
- Output block tracking: When
--router-track-output-blocksis enabled, the router adds placeholder blocks during generation and applies fractional decay based on progress towardosl. - Resource estimation: Helps the router estimate total resource requirements when making routing decisions.
speculative_prefill
When set to true, the system speculatively prefills the predicted next-turn prompt after the current assistant turn completes. This is designed for multi-turn agentic workloads where the next request’s prefix is predictable.
How it works:
- As the assistant response streams, the system accumulates the full response text.
- Once the response finishes, a background task constructs the next-turn prompt by appending the assistant response to the conversation history (with thinking content stripped for non-last turns).
- The constructed prompt is tokenized and sent as a
max_tokens=1request to warm the KV cache on a worker. - When the actual next request arrives, it benefits from the already-warm KV cache, reducing TTFT.
priority
Backend engine scheduling priority forwarded to the engine’s generate call. Influences queue ordering, KV cache eviction under memory pressure, and preemption of running requests.
The semantics of the priority value differ between backends:
- SGLang: By default, larger values = higher priority. This can be inverted with
--schedule-low-priority-values-firstto match vLLM’s convention. Requires--enable-priority-schedulingon the engine. - vLLM: Smaller values = higher priority. A request with
priority: 0is scheduled beforepriority: 10. Ties are broken by arrival time. Requires--scheduling-policy priorityon the engine.
When omitted, SGLang defaults to None (engine default); vLLM defaults to 0. TensorRT-LLM does not currently support per-request priority.
Cache Control
The cache_control object enables explicit KV cache pinning with a TTL. When set, the router fires a pin_prefix call to the backend worker after generation completes, protecting the conversation’s KV cache from eviction for the specified duration.
Requires --enable-cache-control and --router-mode=kv on the frontend. See SGLang for Agentic Workloads for full setup and usage details.
Response Extensions
When the client requests response metadata via extra_fields, the response includes an nvext object with the requested fields: