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",