[Bugfix][Frontend] Apply model-default reasoning parser in GPU-less render server (#54835)
Signed-off-by: Shimi Bandiel <shimib@google.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Cyrus Leung <tlleungac@connect.ust.hk>
This commit is contained in:
co-authored by
Claude
Cyrus Leung
parent
68088ed392
commit
09e0ce3d82
@@ -2136,6 +2136,25 @@ class EngineArgs:
|
||||
cfg = json.loads(cfg)
|
||||
return WatermarkConfig(**cfg)
|
||||
|
||||
def create_structured_outputs_config(self) -> StructuredOutputsConfig:
|
||||
"""Merge frontend parser flags into the structured outputs config.
|
||||
|
||||
Mutates `self.structured_outputs_config` in place and returns it
|
||||
(not a copy). Model-specific defaults (e.g. gpt_oss ->
|
||||
"openai_gptoss") are applied later by `verify_and_update_config`
|
||||
only when the resolved value is still empty, so explicit CLI flags
|
||||
take precedence.
|
||||
"""
|
||||
if self.reasoning_parser:
|
||||
self.structured_outputs_config.reasoning_parser = self.reasoning_parser
|
||||
|
||||
if self.reasoning_parser_plugin:
|
||||
self.structured_outputs_config.reasoning_parser_plugin = (
|
||||
self.reasoning_parser_plugin
|
||||
)
|
||||
|
||||
return self.structured_outputs_config
|
||||
|
||||
def create_observability_config(self) -> ObservabilityConfig:
|
||||
return ObservabilityConfig(
|
||||
show_hidden_metrics_for_version=self.show_hidden_metrics_for_version,
|
||||
@@ -2728,13 +2747,7 @@ class EngineArgs:
|
||||
load_config = self.create_load_config()
|
||||
|
||||
# Pass reasoning_parser into StructuredOutputsConfig
|
||||
if self.reasoning_parser:
|
||||
self.structured_outputs_config.reasoning_parser = self.reasoning_parser
|
||||
|
||||
if self.reasoning_parser_plugin:
|
||||
self.structured_outputs_config.reasoning_parser_plugin = (
|
||||
self.reasoning_parser_plugin
|
||||
)
|
||||
self.create_structured_outputs_config()
|
||||
|
||||
observability_config = self.create_observability_config()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user