From 9731f30a030c545e7f29a8a4ed96b8562be12c88 Mon Sep 17 00:00:00 2001 From: Dan Blanaru <48605845+DanBlanaru@users.noreply.github.com> Date: Fri, 16 Oct 2026 22:59:48 +0200 Subject: [PATCH] [Bugfix] Keep VLLM_RAY_BUNDLE_INDICES out of the compile cache key (#61211) Signed-off-by: DanBlanaru <48605845+DanBlanaru@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 --- tests/test_envs.py | 8 ++++++++ vllm/envs.py | 1 + 2 files changed, 9 insertions(+) diff --git a/tests/test_envs.py b/tests/test_envs.py index 7356539bcd..c27a57ba4d 100644 --- a/tests/test_envs.py +++ b/tests/test_envs.py @@ -48,6 +48,14 @@ def test_api_key_is_not_compile_factor(monkeypatch: pytest.MonkeyPatch): assert "VLLM_API_KEY" not in envs.compile_factors() +def test_ray_bundle_indices_is_not_compile_factor(monkeypatch: pytest.MonkeyPatch): + # Engines sharing a placement group get different bundle indices but + # compile the same graphs, so they must share a cache key. + monkeypatch.setenv("VLLM_RAY_BUNDLE_INDICES", "4,5,6,7") + + assert "VLLM_RAY_BUNDLE_INDICES" not in envs.compile_factors() + + def test_p2p_side_channel_defaults_and_override(monkeypatch: pytest.MonkeyPatch): monkeypatch.delenv("VLLM_P2P_SIDE_CHANNEL_HOST", raising=False) monkeypatch.delenv("VLLM_P2P_SIDE_CHANNEL_PORT", raising=False) diff --git a/vllm/envs.py b/vllm/envs.py index 19e3250e2f..ab04f405d7 100755 --- a/vllm/envs.py +++ b/vllm/envs.py @@ -2366,6 +2366,7 @@ def compile_factors() -> dict[str, object]: "VLLM_RANDOMIZE_DP_DUMMY_INPUTS", "VLLM_MODEL_REDIRECT_PATH", "VLLM_HOST_IP", + "VLLM_RAY_BUNDLE_INDICES", "VLLM_ELASTIC_EP_SCALE_UP_LAUNCH", "VLLM_FORCE_AOT_LOAD", "S3_ACCESS_KEY_ID",