[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)
|
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."""
|
"""Ensure validation fails if tool choice is enabled with no call parser."""
|
||||||
# If we enable-auto-tool-choice, explode with no tool-call-parser
|
# If we enable-auto-tool-choice, explode with no tool-call-parser
|
||||||
args = serve_parser.parse_args(args=["--enable-auto-tool-choice"])
|
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)
|
validate_parsed_serve_args(args)
|
||||||
|
|
||||||
|
|
||||||
def test_enable_auto_choice_fails_with_enable_reasoning(serve_parser):
|
def test_auto_tool_choice_with_reasoning_parser_passes(serve_parser):
|
||||||
"""Ensure validation fails if reasoning is enabled with auto tool choice."""
|
"""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 = serve_parser.parse_args(
|
||||||
args=[
|
args=[
|
||||||
"--enable-auto-tool-choice",
|
"--enable-auto-tool-choice",
|
||||||
|
"--tool-call-parser",
|
||||||
|
"mistral",
|
||||||
"--reasoning-parser",
|
"--reasoning-parser",
|
||||||
"deepseek_r1",
|
"deepseek_r1",
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
with pytest.raises(TypeError):
|
validate_parsed_serve_args(args)
|
||||||
validate_parsed_serve_args(args)
|
|
||||||
|
|
||||||
|
|
||||||
def test_passes_with_reasoning_parser(serve_parser):
|
def test_passes_with_reasoning_parser(serve_parser):
|
||||||
|
|||||||
Reference in New Issue
Block a user