From 9616fa35b088466387f1be4fd4ab13ff3d3642e2 Mon Sep 17 00:00:00 2001 From: Alec Solder Date: Fri, 14 Nov 2025 12:12:25 -0800 Subject: [PATCH 1/4] Reduce validation to a warning Signed-off-by: Alec Solder --- vllm/config/structured_outputs.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/vllm/config/structured_outputs.py b/vllm/config/structured_outputs.py index 1b32675c3dbd..a209d22feb89 100644 --- a/vllm/config/structured_outputs.py +++ b/vllm/config/structured_outputs.py @@ -8,12 +8,15 @@ from typing_extensions import Self from vllm.config.utils import config +from vllm.logger import init_logger from vllm.utils.hashing import safe_hash StructuredOutputsBackend = Literal[ "auto", "xgrammar", "guidance", "outlines", "lm-format-enforcer" ] +logger = init_logger(__name__) + @config @dataclass @@ -74,9 +77,11 @@ def _validate_structured_output_config(self) -> Self: self.reasoning_parser != "" and self.reasoning_parser not in valid_reasoning_parsers ): - raise ValueError( - f"invalid reasoning parser: {self.reasoning_parser} " - f"(chose from {{ {','.join(valid_reasoning_parsers)} }})" + logger.warning( + "Reasoning parser %s not defined in reasoning_parser_plugin " + "argument. Assuming it is registered to the " + "ReasoningParserManager programmatically.", + self.reasoning_parser, ) if self.disable_any_whitespace and self.backend not in ("xgrammar", "guidance"): From 62d6c381186c390d1f687d7508859c361a571de8 Mon Sep 17 00:00:00 2001 From: Alec Solder Date: Mon, 17 Nov 2025 11:52:49 -0800 Subject: [PATCH 2/4] Better warning message Signed-off-by: Alec Solder --- vllm/config/structured_outputs.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/vllm/config/structured_outputs.py b/vllm/config/structured_outputs.py index a209d22feb89..9cebe5839057 100644 --- a/vllm/config/structured_outputs.py +++ b/vllm/config/structured_outputs.py @@ -78,9 +78,10 @@ def _validate_structured_output_config(self) -> Self: and self.reasoning_parser not in valid_reasoning_parsers ): logger.warning( - "Reasoning parser %s not defined in reasoning_parser_plugin " - "argument. Assuming it is registered to the " - "ReasoningParserManager programmatically.", + "Reasoning parser %s not found among built-in parsers or " + "reasoning_parser_plugin argument. Assuming it will be " + "registered to the ReasoningParserManager programmatically " + "before use.", self.reasoning_parser, ) From 95c318014a72c935ef513d7f49574cf8cee807a4 Mon Sep 17 00:00:00 2001 From: Alec Solder Date: Mon, 24 Nov 2025 14:20:44 -0800 Subject: [PATCH 3/4] Removing validation and reasoning parser plugin registration from here as it occurs elsewhere Signed-off-by: Alec Solder --- vllm/config/structured_outputs.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/vllm/config/structured_outputs.py b/vllm/config/structured_outputs.py index 9cebe5839057..bfb416dd5b03 100644 --- a/vllm/config/structured_outputs.py +++ b/vllm/config/structured_outputs.py @@ -66,25 +66,6 @@ def compute_hash(self) -> str: @model_validator(mode="after") def _validate_structured_output_config(self) -> Self: - # Import here to avoid circular import - from vllm.reasoning.abs_reasoning_parsers import ReasoningParserManager - - if self.reasoning_parser_plugin and len(self.reasoning_parser_plugin) > 3: - ReasoningParserManager.import_reasoning_parser(self.reasoning_parser_plugin) - - valid_reasoning_parsers = ReasoningParserManager.list_registered() - if ( - self.reasoning_parser != "" - and self.reasoning_parser not in valid_reasoning_parsers - ): - logger.warning( - "Reasoning parser %s not found among built-in parsers or " - "reasoning_parser_plugin argument. Assuming it will be " - "registered to the ReasoningParserManager programmatically " - "before use.", - self.reasoning_parser, - ) - if self.disable_any_whitespace and self.backend not in ("xgrammar", "guidance"): raise ValueError( "disable_any_whitespace is only supported for " From 0c744ddc55044dacc7050ac87558ca7ac5e6e46e Mon Sep 17 00:00:00 2001 From: Alec Solder Date: Mon, 1 Dec 2025 07:49:13 -0800 Subject: [PATCH 4/4] Removing now unused logger Signed-off-by: Alec Solder --- vllm/config/structured_outputs.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/vllm/config/structured_outputs.py b/vllm/config/structured_outputs.py index bfb416dd5b03..e63725f95337 100644 --- a/vllm/config/structured_outputs.py +++ b/vllm/config/structured_outputs.py @@ -8,15 +8,12 @@ from typing_extensions import Self from vllm.config.utils import config -from vllm.logger import init_logger from vllm.utils.hashing import safe_hash StructuredOutputsBackend = Literal[ "auto", "xgrammar", "guidance", "outlines", "lm-format-enforcer" ] -logger = init_logger(__name__) - @config @dataclass