Skip to content

Commit bf55755

Browse files
wenhugCopilot
andauthored
docs: update EPP header references to x-llm-d (llm-d#1590)
* docs: update EPP header references to x-llm-d Update EPP-managed header documentation to use the canonical x-llm-d names introduced by llm-d-router#1161. Signed-off-by: wenhug <50309350+wenhug@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * docs: clarify EPP header alias compatibility Signed-off-by: wenhug <50309350+wenhug@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Signed-off-by: wenhug <50309350+wenhug@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1c72dc6 commit bf55755

8 files changed

Lines changed: 39 additions & 23 deletions

File tree

docs/api-reference/epp-http-headers.md

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,34 @@ These headers allow the EPP to identify the request's goals, group them for fair
88

99
| Header | Description |
1010
| --- | --- |
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. |
1414

1515
## Service Level Objectives (SLOs)
1616

1717
These headers are used by admission control and load balancing plugins to make decisions based on latency targets.
1818

1919
| Header | Description |
2020
| --- | --- |
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.
29+
30+
| Deprecated alias | Canonical header |
31+
| --- | --- |
32+
| `x-gateway-inference-fairness-id` | `x-llm-d-inference-fairness-id` |
33+
| `x-gateway-inference-objective` | `x-llm-d-inference-objective` |
34+
| `x-gateway-model-name-rewrite` | `x-llm-d-model-name-rewrite` |
35+
| `x-slo-ttft-ms` | `x-llm-d-slo-ttft-ms` |
36+
| `x-slo-tpot-ms` | `x-llm-d-slo-tpot-ms` |
37+
38+
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.
2339

2440
## Response Headers
2541

docs/architecture/advanced/latency-predictor.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Each prediction sidecar sustains roughly 300 QPS of prediction work on a `c4-sta
9797
The `predicted-latency-producer` plugin has two training modes, exposed via a `streamingMode` parameter:
9898

9999
- **`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.
101101

102102
## Scheduling Strategy
103103

docs/architecture/core/router/epp/flow-control.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The Flow Control layer intercepts requests at the EPP and holds them in centrali
2727
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)**.
2828

2929
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).
3131
* `Priority` is derived from the `InferenceObjective`.
3232
2. **Separate Queues**: Each unique `FlowKey` maps to its own in-memory queue.
3333

@@ -48,8 +48,8 @@ Here is an example of how to target a specific `InferenceObjective` and ensure f
4848
```bash
4949
curl -X POST http://${IP}:${PORT}/v1/completions \
5050
-H 'Content-Type: application/json' \
51-
-H 'x-gateway-inference-fairness-id: tenant-a' \
52-
-H 'x-gateway-inference-objective: premium-traffic' \
51+
-H 'x-llm-d-inference-fairness-id: tenant-a' \
52+
-H 'x-llm-d-inference-objective: premium-traffic' \
5353
-d '{
5454
"model": "default-model",
5555
"prompt": "Say hello"
@@ -362,7 +362,7 @@ The Flow Control layer behavior is customizable via several extension points imp
362362

363363
* **[`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)
364364
* **[`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.
366366

367367
#### Saturation Detectors
368368

docs/getting-started/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Split inference into dedicated **prefill workers** (prompt processing) and **dec
6161

6262
### Predicted Latency-Based Routing
6363

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.
6565

6666
### Batch Inference
6767

guides/flow-control/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ Clients must send the appropriate headers to be placed in the correct queues.
238238
```bash
239239
curl -X POST http://${IP}/v1/completions \
240240
-H 'Content-Type: application/json' \
241-
-H 'x-gateway-inference-fairness-id: tenant-a' \
242-
-H 'x-gateway-inference-objective: premium-traffic' \
241+
-H 'x-llm-d-inference-fairness-id: tenant-a' \
242+
-H 'x-llm-d-inference-objective: premium-traffic' \
243243
-d "{
244244
\"model\": \"${MODEL_NAME}\",
245245
\"prompt\": \"Say hello\"
@@ -249,7 +249,7 @@ curl -X POST http://${IP}/v1/completions \
249249
> [!WARNING]
250250
> **Trust Boundary**: In a production system, allowing end-users to self-assert their tenant ID or traffic priority (`premium-traffic`) is an abuse vector.
251251
>
252-
> **Production Pattern**: Your ingress API Gateway (or an Envoy `ext_authz` filter) should be configured to automatically strip any incoming `x-gateway-*` headers from 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.
253253
254254
### Use Case 2: Backpressure Management
255255

@@ -279,8 +279,8 @@ To verify backpressure management, you must overwhelm the pool's capacity. Becau
279279
280280
```bash
281281
hey -c 150 -n 150 -m POST -T "application/json" \
282-
-H "x-gateway-inference-fairness-id: tenant-b" \
283-
-H "x-gateway-inference-objective: best-effort-traffic" \
282+
-H "x-llm-d-inference-fairness-id: tenant-b" \
283+
-H "x-llm-d-inference-objective: best-effort-traffic" \
284284
-D payload.json http://${IP}/v1/completions
285285
```
286286

guides/predicted-latency-routing/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ Two ready-to-use values files ship with this guide:
6262
| File | When to use |
6363
|---|---|
6464
| [`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`. |
6666

6767
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).
6868

@@ -126,8 +126,8 @@ Once enabled, latency-based scheduling works on every request — no header chan
126126

127127
To opt an individual request into SLO-aware routing, add one or both headers:
128128

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.
131131

132132
### 1. Get the IP of the Proxy
133133

@@ -164,8 +164,8 @@ kubectl run curl-debug --rm -it \
164164
```bash
165165
curl -X POST http://${IP}/v1/completions \
166166
-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' \
169169
-d '{
170170
"model": "'${MODEL_NAME}'",
171171
"prompt": "Explain the difference between prefill and decode.",

guides/predicted-latency-routing/router/predicted-latency-slo.values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Predicted Latency-Based Scheduling — SLO-aware setup (streamingMode: true).
22
##
33
## Overrides the chart's default plugin pipeline so predicted-latency-producer
4-
## trains on streaming TPOT samples. Required for x-slo-ttft-ms / x-slo-tpot-ms
4+
## trains on streaming TPOT samples. Required for x-llm-d-slo-ttft-ms / x-llm-d-slo-tpot-ms
55
## request headers to be honored. Every request must be sent with
66
## "stream": true in the body.
77
##

guides/predicted-latency-routing/router/predicted-latency.values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
## Predicted Latency-Based Scheduling — default (routing-only) setup.
22
##
33
## The predictor trains on end-to-end latency. Suitable for non-SLO traffic.
4-
## For SLO header support (x-slo-ttft-ms / x-slo-tpot-ms), use
4+
## For SLO header support (x-llm-d-slo-ttft-ms / x-llm-d-slo-tpot-ms), use
55
## predicted-latency-slo.values.yaml instead.
66

77
router:

0 commit comments

Comments
 (0)