[model] add Qwen3.8 model support (#10749)

Co-authored-by: hiyouga <hiyouga@buaa.edu.cn>
This commit is contained in:
Hertz
2026-09-02 15:52:22 +08:00
committed by GitHub
parent d6bb97ddff
commit 4451765a6b
13 changed files with 272 additions and 9 deletions

View File

@@ -281,6 +281,14 @@ def test_qwen_tool_extractor():
assert formatter.extract(result) == [("test_tool", """{"foo": "bar", "size": 10}""")]
@pytest.mark.runs_on(["cpu", "mps"])
def test_qwen38_tool_formatter():
formatter = ToolFormatter(tool_format="qwen3_8")
wrapped_tool = {"type": "function", "function": TOOLS[0]}
output = formatter.apply(content=json.dumps(TOOLS))[0]
assert json.dumps(wrapped_tool, ensure_ascii=False) in output
@pytest.mark.runs_on(["cpu", "mps"])
def test_qwen_multi_tool_extractor():
formatter = ToolFormatter(tool_format="qwen")