[Bugfix] Don't warn about missing watermark config for default requests (#60412)

Signed-off-by: Simon Veitner <sveitner@redhat.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Lucas Wilkinson <LucasWilkinson@users.noreply.github.com>
This commit is contained in:
simon-veitner-redhat
2026-10-08 15:29:20 +00:00
committed by GitHub
co-authored by Claude Opus 5.5 Lucas Wilkinson
parent 0751f5272f
commit e41d5d5543
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -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
+1 -1
View File
@@ -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 "