@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 79c7e09235
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 8, 06:15 UTC

[KV Connector] Add temporary, off-by-default `VLLM_DISABLE_REQUEST_ID_RANDOMIZATION` workaround (#34415)

Signed-off-by: Seiji Eicher <seiji@anyscale.com>

Seiji Eicher committed Feb 14, 2026 at 23:26 UTC 79c7e092350e4ae82d679ea4b2cdaaa4b580944b
2 files changed +15 -1
vllm/envs.py
+6
@@ -169,6 +169,7 @@ if TYPE_CHECKING:
169 VLLM_XGRAMMAR_CACHE_MB: int = 0
170 VLLM_MSGPACK_ZERO_COPY_THRESHOLD: int = 256
171 VLLM_ALLOW_INSECURE_SERIALIZATION: bool = False
172 + VLLM_DISABLE_REQUEST_ID_RANDOMIZATION: bool = False
173 VLLM_NIXL_SIDE_CHANNEL_HOST: str = "localhost"
174 VLLM_NIXL_SIDE_CHANNEL_PORT: int = 5600
175 VLLM_MOONCAKE_BOOTSTRAP_PORT: int = 8998
@@ -1236,6 +1237,11 @@ environment_variables: dict[str, Callable[[], Any]] = {
1237 "VLLM_ALLOW_INSECURE_SERIALIZATION": lambda: bool(
1238 int(os.getenv("VLLM_ALLOW_INSECURE_SERIALIZATION", "0"))
1239 ),
1240 + # Temporary: skip adding random suffix to internal request IDs. May be
1241 + # needed for KV connectors that match request IDs across instances.
1242 + "VLLM_DISABLE_REQUEST_ID_RANDOMIZATION": lambda: bool(
1243 + int(os.getenv("VLLM_DISABLE_REQUEST_ID_RANDOMIZATION", "0"))
1244 + ),
1245 # IP address used for NIXL handshake between remote agents.
1246 "VLLM_NIXL_SIDE_CHANNEL_HOST": lambda: os.getenv(
1247 "VLLM_NIXL_SIDE_CHANNEL_HOST", "localhost"
vllm/v1/engine/input_processor.py
+9 -1
@@ -5,6 +5,7 @@ import time
5 from collections.abc import Mapping
6 from typing import Any, Literal, cast
7
8 +import vllm.envs as envs
9 from vllm.config import VllmConfig
10 from vllm.inputs.data import (
11 ProcessorInputs,
@@ -296,7 +297,14 @@ class InputProcessor:
297 " passed to vLLM; use the request_id field."
298 )
299 request.external_req_id = request.request_id
299 - request.request_id = f"{request.external_req_id}-{random_uuid():.8}"
300 + if envs.VLLM_DISABLE_REQUEST_ID_RANDOMIZATION:
301 + logger.warning_once(
302 + "VLLM_DISABLE_REQUEST_ID_RANDOMIZATION is set and will be "
303 + "removed in a future release. Duplicate externally-provided "
304 + "request IDs may cause failures and/or subtle correctness errors."
305 + )
306 + else:
307 + request.request_id = f"{request.external_req_id}-{random_uuid():.8}"
308
309 def process_inputs(
310 self,