[Feature] Gigachat 3.5 support (#29189)
Co-authored-by: Stanislav Petrov <stapetrov@sberbank.ru> Co-authored-by: Viacheslav Barinov <vvadbarinov@sberbank.ru> Co-authored-by: Viacheslav <viacheslav.teh@gmail.com> Co-authored-by: Xinyuan Tong <xinyuantong.cs@gmail.com> Co-authored-by: Xinyuan Tong <115166877+JustinTong0323@users.noreply.github.com>
This commit is contained in:
co-authored by
Stanislav Petrov
Viacheslav Barinov
Viacheslav
Xinyuan Tong
Xinyuan Tong
parent
b54d5b7c7b
commit
b63f8416b3
@@ -67,6 +67,22 @@ class TestTemplateManagerReasoningDetection(CustomTestCase):
|
||||
)
|
||||
return force, config, parser
|
||||
|
||||
def test_gigachat35_gcml_template_wins_over_generic_think_tags(self):
|
||||
"""The GCML marker must map both parsers to gigachat35; the template also
|
||||
carries <think>, so the rule has to outrank the generic deepseek-r1
|
||||
think-tags fallback."""
|
||||
template = """
|
||||
{{- 'assistant<|role_sep|>\\n<think>' -}}
|
||||
<|GCML|tool_calls>
|
||||
"""
|
||||
vocab = ["<think>", "</think>", "<|role_sep|>\n"]
|
||||
force, config, parser = self._detect(template, vocab)
|
||||
self.assertEqual(parser, "gigachat35")
|
||||
self.assertEqual(
|
||||
detect_tool_call_parser(template, _DummyTokenizer(vocab), config, force),
|
||||
"gigachat35",
|
||||
)
|
||||
|
||||
def test_qwen3_template_not_misclassified_as_glm45(self):
|
||||
template = """
|
||||
{% set enable_thinking = enable_thinking if enable_thinking is defined else true %}
|
||||
|
||||
Reference in New Issue
Block a user