common : add commentary rules for gpt-oss-20b (#21286)

This commit is contained in:
Aldehir Rojas
2026-04-02 08:59:59 -05:00
committed by GitHub
parent e15efe007d
commit 223373742b
4 changed files with 124 additions and 16 deletions
+18
View File
@@ -3175,6 +3175,24 @@ static void test_template_output_peg_parsers(bool detailed_debug) {
.expect_reasoning("I will execute python to say hello")
.expect_content("")
.run();
// Edge cases
// "<|channel|>commentary to=assistant" before reasoning
tst.test(
"<|channel|>commentary to=assistant<|channel|>analysis<|message|>I'm\nthinking<|end|><|start|>assistant<|channel|>final<|message|>Hello, world!\nWhat's "
"up?")
.reasoning_format(COMMON_REASONING_FORMAT_AUTO)
.expect(message_assist_thoughts)
.run();
// "<|channel|>commentary to=assistant" before final message
tst.test(
"<|channel|>analysis<|message|>I'm\nthinking<|end|><|start|>assistant<|channel|>commentary to=assistant<|channel|>final<|message|>Hello, world!\nWhat's "
"up?")
.reasoning_format(COMMON_REASONING_FORMAT_AUTO)
.expect(message_assist_thoughts)
.run();
}
{