[CI/Build] Fix incorrect CLI arg validation tests in test_cli_args.py (#46779)

Signed-off-by: sungbin1015 <sbin@solbox.com>
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
sungbin1015
2026-10-06 05:58:47 +00:00
committed by GitHub
co-authored by Claude
parent 40c86ae1ce
commit 1e5d0ea888
+11 -5
View File
@@ -242,7 +242,7 @@ def test_rust_grpc_port_requires_serve_subcommand(monkeypatch):
validate_parsed_serve_args(args)
def test_enable_auto_choice_passes_without_tool_call_parser(serve_parser):
def test_enable_auto_choice_fails_without_tool_call_parser(serve_parser):
"""Ensure validation fails if tool choice is enabled with no call parser."""
# If we enable-auto-tool-choice, explode with no tool-call-parser
args = serve_parser.parse_args(args=["--enable-auto-tool-choice"])
@@ -262,17 +262,23 @@ def test_enable_auto_choice_passes_with_tool_call_parser(serve_parser):
validate_parsed_serve_args(args)
def test_enable_auto_choice_fails_with_enable_reasoning(serve_parser):
"""Ensure validation fails if reasoning is enabled with auto tool choice."""
def test_auto_tool_choice_with_reasoning_parser_passes(serve_parser):
"""Auto tool choice combined with a reasoning parser is supported.
See docs/features/tool_calling.md, which documents using
``--tool-call-parser`` together with ``--reasoning-parser``. This
combination must pass validation as long as a tool call parser is set.
"""
args = serve_parser.parse_args(
args=[
"--enable-auto-tool-choice",
"--tool-call-parser",
"mistral",
"--reasoning-parser",
"deepseek_r1",
]
)
with pytest.raises(TypeError):
validate_parsed_serve_args(args)
validate_parsed_serve_args(args)
def test_passes_with_reasoning_parser(serve_parser):