Force reasoning mode for GLM-5.3 chat templates (#39227)
Co-authored-by: Brayden Zhong <b8zhong@uwaterloo.ca> Co-authored-by: Mohammad Angkad <mohammad.angkad@radixark.ai> 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
Brayden Zhong
Mohammad Angkad
Xinyuan Tong
Xinyuan Tong
parent
ebd37705e4
commit
6c514ab025
@@ -168,6 +168,13 @@ REASONING_MODE_RULES = (
|
||||
and not ctx.has_text("thinking")
|
||||
),
|
||||
),
|
||||
DetectionRule(
|
||||
name="glm53_always_think",
|
||||
value=ReasoningToggleConfig(special_case="always"),
|
||||
# GLM-5.3's generation prompt opens <think>, so the output carries no
|
||||
# opening tag; lambda because _is_glm53 is defined below.
|
||||
predicate=lambda ctx: _is_glm53(ctx),
|
||||
),
|
||||
DetectionRule(
|
||||
name="mistral_reasoning_effort",
|
||||
value=ReasoningToggleConfig(special_case="mistral"),
|
||||
|
||||
Reference in New Issue
Block a user