From e41d5d55439808e79326009599d5d83e157bf2d1 Mon Sep 17 00:00:00 2001 From: simon-veitner-redhat Date: Thu, 8 Oct 2026 17:29:20 +0200 Subject: [PATCH] [Bugfix] Don't warn about missing watermark config for default requests (#60412) Signed-off-by: Simon Veitner Co-authored-by: Claude Opus 5.5 (1M context) Co-authored-by: Lucas Wilkinson --- tests/watermarking/test_compatibility.py | 5 +++-- vllm/config/vllm.py | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/watermarking/test_compatibility.py b/tests/watermarking/test_compatibility.py index 748223d94b..48c27db09d 100644 --- a/tests/watermarking/test_compatibility.py +++ b/tests/watermarking/test_compatibility.py @@ -93,7 +93,7 @@ def test_default_watermarking_resolves_when_configured(): assert enabled.watermarking is None -@pytest.mark.parametrize("watermarking", [None, True]) +@pytest.mark.parametrize("watermarking", [True]) def test_requested_watermarking_without_engine_config_warns_and_disables( watermarking, caplog_vllm, reset_warning_once ): @@ -148,6 +148,7 @@ def test_incompatible_modes_are_allowed_when_watermarking_is_disabled(params): @pytest.mark.parametrize( "params", [ + SamplingParams(), SamplingParams(temperature=0), SamplingParams(trace_decode_token_ids=[1]), ], @@ -158,7 +159,7 @@ def test_requests_without_engine_config_are_unwatermarked( with caplog_vllm.at_level("WARNING"): resolved = _validate(params, server_uses_watermarking=False) - assert "engine has no watermark configuration" in caplog_vllm.text + assert "engine has no watermark configuration" not in caplog_vllm.text assert resolved is False assert params.watermarking is None diff --git a/vllm/config/vllm.py b/vllm/config/vllm.py index 3fee812700..5d38b67653 100644 --- a/vllm/config/vllm.py +++ b/vllm/config/vllm.py @@ -1310,7 +1310,7 @@ class VllmConfig: ) -> bool: watermark_config = getattr(self, "watermark_config", None) if watermark_config is None: - if config is not None and config.watermarking is not False: + if config is not None and config.watermarking is True: logger.warning_once( "Watermarking is enabled for this request, but the engine has no " "watermark configuration. This and subsequent requests will run "