You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api-reference/epp-http-headers.md
+21-5Lines changed: 21 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,18 +8,34 @@ These headers allow the EPP to identify the request's goals, group them for fair
8
8
9
9
| Header | Description |
10
10
| --- | --- |
11
-
|`x-gateway-inference-objective`| Specifies the name of the `InferenceObjective` resource associated with the request. The EPP uses this to look up the corresponding objective resource in the **same namespace as the InferencePool** to apply the defined priority and performance goals. |
12
-
|`x-gateway-inference-fairness-id`| Provides a unique identifier for grouping requests for fairness-based flow control. Requests with the same ID share capacity according to the fairness policy. If omitted, the EPP defaults to `default-flow`. |
13
-
|`x-gateway-model-name-rewrite`| Specifies the target model name to be used for the request. This is an alternative approach to model name rewriting; while the `InferenceModelRewrite` API provides rule-based rewriting on the server side, this header allows for an explicit, per-request override. When present, the EPP uses this value to override the model name in the request body and for recording model-specific metrics. |
11
+
|`x-llm-d-inference-objective`| Specifies the name of the `InferenceObjective` resource associated with the request. The EPP uses this to look up the corresponding objective resource in the **same namespace as the InferencePool** to apply the defined priority and performance goals. |
12
+
|`x-llm-d-inference-fairness-id`| Provides a unique identifier for grouping requests for fairness-based flow control. Requests with the same ID share capacity according to the fairness policy. If omitted, the EPP defaults to `default-flow`. |
13
+
|`x-llm-d-model-name-rewrite`| Specifies the target model name to be used for the request. This is an alternative approach to model name rewriting; while the `InferenceModelRewrite` API provides rule-based rewriting on the server side, this header allows for an explicit, per-request override. When present, the EPP uses this value to override the model name in the request body and for recording model-specific metrics. |
14
14
15
15
## Service Level Objectives (SLOs)
16
16
17
17
These headers are used by admission control and load balancing plugins to make decisions based on latency targets.
18
18
19
19
| Header | Description |
20
20
| --- | --- |
21
-
|`x-slo-ttft-ms`| Specifies the target Time To First Token (TTFT) in milliseconds. Used by plugins to determine if a request can be admitted while meeting the latency goal. |
22
-
|`x-slo-tpot-ms`| Specifies the target Time Per Output Token (TPOT) in milliseconds. Used for admission control based on predicted or observed token generation latency. |
21
+
|`x-llm-d-slo-ttft-ms`| Specifies the target Time To First Token (TTFT) in milliseconds. Used by plugins to determine if a request can be admitted while meeting the latency goal. |
22
+
|`x-llm-d-slo-tpot-ms`| Specifies the target Time Per Output Token (TPOT) in milliseconds. Used for admission control based on predicted or observed token generation latency. |
23
+
24
+
## Deprecated Aliases
25
+
26
+
llm-d Router [v0.9.0](https://github.com/llm-d/llm-d-router/releases/tag/v0.9.0) and later accept the previous EPP-managed header names as deprecated read aliases. New integrations and examples should use the canonical `x-llm-d-*` names. Earlier releases expect the previous names, so mixed-version fleets should coordinate the header migration during rolling upgrades.
27
+
28
+
If a request sends both a canonical header and its deprecated alias, the canonical `x-llm-d-*` value wins deterministically. No alias removal release or date has been announced; treat aliases as temporary compatibility support and prefer the canonical names for all new clients.
This rename applies only to llm-d/EPP-managed user and control headers. [Gateway API Inference Extension (GAIE) Endpoint Picker Protocol](https://github.com/kubernetes-sigs/gateway-api-inference-extension/tree/main/docs/proposals/004-endpoint-picker-protocol) headers, such as `x-gateway-destination-endpoint*`, are unchanged.
Copy file name to clipboardExpand all lines: docs/architecture/advanced/latency-predictor.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ Each prediction sidecar sustains roughly 300 QPS of prediction work on a `c4-sta
97
97
The `predicted-latency-producer` plugin has two training modes, exposed via a `streamingMode` parameter:
98
98
99
99
-**`streamingMode: false`** (default) — Trains on end-to-end request latency. TTFT is recorded at response completion (effectively e2e latency); TPOT is not trained. **Use this mode if** your workload mixes streaming and non-streaming responses, or if you only need latency-aware routing without per-request SLO enforcement.
100
-
-**`streamingMode: true`** — Trains separate TTFT and TPOT models. TTFT is recorded on the first streamed chunk; TPOT is sampled across subsequent tokens. **Use this mode if** your workload is fully streaming and you need meaningful `x-slo-ttft-ms` / `x-slo-tpot-ms` enforcement — a mixed workload in this mode will produce incorrect measurements for the non-streamed responses.
100
+
-**`streamingMode: true`** — Trains separate TTFT and TPOT models. TTFT is recorded on the first streamed chunk; TPOT is sampled across subsequent tokens. **Use this mode if** your workload is fully streaming and you need meaningful `x-llm-d-slo-ttft-ms` / `x-llm-d-slo-tpot-ms` enforcement — a mixed workload in this mode will produce incorrect measurements for the non-streamed responses.
Copy file name to clipboardExpand all lines: docs/architecture/core/router/epp/flow-control.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ The Flow Control layer intercepts requests at the EPP and holds them in centrali
27
27
To understand how policy plugins act, it helps to visualize the queuing topology as a grid defined by two dimensions: **Priority** and **Flow (Fairness ID)**.
28
28
29
29
1.**Flow Identification**: Every request is assigned a `FlowKey` — a tuple of `(FairnessID, Priority)`.
30
-
*`FairnessID` is extracted from the `x-gateway-inference-fairness-id` header (e.g., tenant ID).
30
+
*`FairnessID` is extracted from the `x-llm-d-inference-fairness-id` header (e.g., tenant ID).
31
31
*`Priority` is derived from the `InferenceObjective`.
32
32
2.**Separate Queues**: Each unique `FlowKey` maps to its own in-memory queue.
33
33
@@ -48,8 +48,8 @@ Here is an example of how to target a specific `InferenceObjective` and ensure f
48
48
```bash
49
49
curl -X POST http://${IP}:${PORT}/v1/completions \
@@ -362,7 +362,7 @@ The Flow Control layer behavior is customizable via several extension points imp
362
362
363
363
* **[`fcfs-ordering-policy`](https://github.com/llm-d/llm-d-router/tree/main/pkg/epp/framework/plugins/flowcontrol/ordering/fcfs/README.md)**: First-Come, First-Served based on arrival time. (Default)
364
364
* **[`edf-ordering-policy`](https://github.com/llm-d/llm-d-router/tree/main/pkg/epp/framework/plugins/flowcontrol/ordering/edf/README.md)**: Earliest Deadline First, prioritizing requests with the closest expiration time.
365
-
* **[`slo-deadline-ordering-policy`](https://github.com/llm-d/llm-d-router/tree/main/pkg/epp/framework/plugins/flowcontrol/ordering/slodeadline/README.md)**: Orders requests by an SLO-based deadline computed from arrival time. Uses the `x-slo-ttft-ms` header. Requests without this header are placed behind all SLO requests, risking starvation.
365
+
* **[`slo-deadline-ordering-policy`](https://github.com/llm-d/llm-d-router/tree/main/pkg/epp/framework/plugins/flowcontrol/ordering/slodeadline/README.md)**: Orders requests by an SLO-based deadline computed from arrival time. Uses the `x-llm-d-slo-ttft-ms` header. Requests without this header are placed behind all SLO requests, risking starvation.
Copy file name to clipboardExpand all lines: docs/getting-started/README.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -61,7 +61,7 @@ Split inference into dedicated **prefill workers** (prompt processing) and **dec
61
61
62
62
### Predicted Latency-Based Routing
63
63
64
-
An **llm-d Router** capability implemented primarily as an EPP plugin that routes each request to the replica predicted to serve it fastest, using an XGBoost model trained online on live traffic to predict ITL and TTFT. Optionally enforce per-request SLOs via `x-slo-ttft-ms` / `x-slo-tpot-ms` headers — requests that no replica can meet within budget are shed at admission rather than routed to a guaranteed miss. Useful when workload variance makes queue-depth a poor proxy for true load, or when clients need to express interactive vs. batch latency budgets.
64
+
An **llm-d Router** capability implemented primarily as an EPP plugin that routes each request to the replica predicted to serve it fastest, using an XGBoost model trained online on live traffic to predict ITL and TTFT. Optionally enforce per-request SLOs via `x-llm-d-slo-ttft-ms` / `x-llm-d-slo-tpot-ms` headers — requests that no replica can meet within budget are shed at admission rather than routed to a guaranteed miss. Useful when workload variance makes queue-depth a poor proxy for true load, or when clients need to express interactive vs. batch latency budgets.
@@ -249,7 +249,7 @@ curl -X POST http://${IP}/v1/completions \
249
249
> [!WARNING]
250
250
> **Trust Boundary**: In a production system, allowing end-users to self-assert their tenant ID or traffic priority (`premium-traffic`) is an abuse vector.
251
251
>
252
-
> **Production Pattern**: Your ingress API Gateway (or an Envoy `ext_authz` filter) should be configured to automatically strip any incoming `x-gateway-*` headersfrom external traffic. It should then validate the user's API Key or JWT, extract their tier/tenant from the token claims, and securely inject the authoritative `x-gateway-inference-fairness-id` and `x-gateway-inference-objective` headers before passing the request to the EPP.
252
+
> **Production Pattern**: Your ingress API Gateway (or an Envoy `ext_authz` filter) should be configured to automatically strip any incoming `x-llm-d-*` headers, plus the deprecated EPP-managed aliases listed in the [EPP HTTP headers reference](../../docs/api-reference/epp-http-headers.md), from external traffic. Gateway API Inference Extension (GAIE) endpoint picker protocol headers such as `x-gateway-destination-endpoint*` are not part of this stripping rule. After stripping, validate the user's API Key or JWT, extract their tier/tenant from the token claims, and securely inject the authoritative `x-llm-d-inference-fairness-id` and `x-llm-d-inference-objective` headers before passing the request to the EPP.
253
253
254
254
### Use Case 2: Backpressure Management
255
255
@@ -279,8 +279,8 @@ To verify backpressure management, you must overwhelm the pool's capacity. Becau
Copy file name to clipboardExpand all lines: guides/predicted-latency-routing/README.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,7 @@ Two ready-to-use values files ship with this guide:
62
62
| File | When to use |
63
63
|---|---|
64
64
|[`router/predicted-latency.values.yaml`](./router/predicted-latency.values.yaml)| Default — predictor trains on end-to-end latency. Routing-only, no SLO header support. |
65
-
|[`router/predicted-latency-slo.values.yaml`](./router/predicted-latency-slo.values.yaml)| SLO-aware — Assumes `x-slo-ttft-ms` / `x-slo-tpot-ms` are set on requests. Every request must be sent with `"stream": true`. |
65
+
|[`router/predicted-latency-slo.values.yaml`](./router/predicted-latency-slo.values.yaml)| SLO-aware — Assumes `x-llm-d-slo-ttft-ms` / `x-llm-d-slo-tpot-ms` are set on requests. Every request must be sent with `"stream": true`. |
66
66
67
67
Both target model server pods labeled `llm-d.ai/guide=optimized-baseline` since in the next step we will simply reuse the model server manifests from the [optimized-baseline guide](../optimized-baseline).
68
68
@@ -126,8 +126,8 @@ Once enabled, latency-based scheduling works on every request — no header chan
126
126
127
127
To opt an individual request into SLO-aware routing, add one or both headers:
128
128
129
-
-`x-slo-ttft-ms` — Time-to-first-token SLO in milliseconds.
130
-
-`x-slo-tpot-ms` — Time-per-output-token SLO in milliseconds.
129
+
-`x-llm-d-slo-ttft-ms` — Time-to-first-token SLO in milliseconds.
130
+
-`x-llm-d-slo-tpot-ms` — Time-per-output-token SLO in milliseconds.
131
131
132
132
### 1. Get the IP of the Proxy
133
133
@@ -164,8 +164,8 @@ kubectl run curl-debug --rm -it \
164
164
```bash
165
165
curl -X POST http://${IP}/v1/completions \
166
166
-H 'Content-Type: application/json' \
167
-
-H 'x-slo-ttft-ms: 200' \
168
-
-H 'x-slo-tpot-ms: 50' \
167
+
-H 'x-llm-d-slo-ttft-ms: 200' \
168
+
-H 'x-llm-d-slo-tpot-ms: 50' \
169
169
-d '{
170
170
"model": "'${MODEL_NAME}'",
171
171
"prompt": "Explain the difference between prefill and decode.",
0 commit comments