Skip to content

[Test] Add unit tests for DeepSeekV3/V31/V4 and Qwen25 function call detectors#27481

Open
gjsheu wants to merge 1 commit into
sgl-project:mainfrom
gjsheu:archon/task-fix-issue-20865
Open

[Test] Add unit tests for DeepSeekV3/V31/V4 and Qwen25 function call detectors#27481
gjsheu wants to merge 1 commit into
sgl-project:mainfrom
gjsheu:archon/task-fix-issue-20865

Conversation

@gjsheu
Copy link
Copy Markdown
Contributor

@gjsheu gjsheu commented Jun 7, 2026

Summary

Adds 4 missing CPU unit test files for function_call detectors, addressing #20865:

  • test/registered/unit/function_call/test_deepseekv3_detector.py
  • test/registered/unit/function_call/test_deepseekv31_detector.py
  • test/registered/unit/function_call/test_deepseekv4_detector.py
  • test/registered/unit/function_call/test_qwen25_detector.py

Each file covers:

  • has_tool_call — positive and negative
  • detect_and_parse — single call, multiple calls, leading text, no call, malformed JSON
  • structure_info — verifies trigger/begin/end tokens
  • parse_streaming_increment — split-chunk streaming, normal text before tool call

All tests are registered with register_cpu_ci(1.0, "base-a-test-cpu"), use CustomTestCase, and require no server or model loading.

Test plan

  • pytest test/registered/unit/function_call/test_deepseekv3_detector.py -v
  • pytest test/registered/unit/function_call/test_deepseekv31_detector.py -v
  • pytest test/registered/unit/function_call/test_deepseekv4_detector.py -v
  • pytest test/registered/unit/function_call/test_qwen25_detector.py -v

Closes #20865

🤖 Generated with Claude Code via Archon


CI States

Latest PR Test (Base): ❌ Run #27082472709
Latest PR Test (Extra): ❌ Run #27082472703

…detectors

Add 4 missing CPU unit test files for function_call detectors:
- test_deepseekv3_detector.py
- test_deepseekv31_detector.py
- test_deepseekv4_detector.py
- test_qwen25_detector.py

Each file covers has_tool_call, detect_and_parse (single/multi/leading-text/no-call/malformed),
structure_info, and parse_streaming_increment. Registered with register_cpu_ci and uses
CustomTestCase. No server or model loading required.

Closes sgl-project#20865

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Improve Unit Test Coverage

1 participant