[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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user