@@ -2796,6 +2796,14 @@ static void test_template_output_peg_parsers(bool detailed_debug) {
27962796 .expect (message_assist_thoughts)
27972797 .run ();
27982798
2799+ // Analysis channel (reasoning) with final channel (content) with reasoning_format = none
2800+ tst.test (
2801+ " <|channel|>analysis<|message|>I'm\n thinking<|end|><|start|>assistant<|channel|>final<|message|>Hello, world!\n What's "
2802+ " up?" )
2803+ .reasoning_format (COMMON_REASONING_FORMAT_NONE)
2804+ .expect_content (" <|channel|>analysis<|message|>I'm\n thinking<|end|>Hello, world!\n What's up?" )
2805+ .run ();
2806+
27992807 // Analysis channel only (partial) - still works when reasoning format is set
28002808 tst.test (" <|channel|>analysis<|message|>I'm\n thinking" )
28012809 .reasoning_format (COMMON_REASONING_FORMAT_AUTO)
@@ -2805,24 +2813,28 @@ static void test_template_output_peg_parsers(bool detailed_debug) {
28052813
28062814 // Tool call with recipient in role header: " to=functions.NAME<|channel|>analysis<|message|>JSON"
28072815 tst.test (" to=functions.special_function<|channel|>analysis<|message|>{\" arg1\" : 1}" )
2816+ .reasoning_format (COMMON_REASONING_FORMAT_AUTO)
28082817 .tools ({ special_function_tool })
28092818 .expect (message_assist_call)
28102819 .run ();
28112820
28122821 // Tool call with recipient in channel header: "<|channel|>analysis to=functions.NAME<|message|>JSON"
28132822 tst.test (" <|channel|>analysis to=functions.special_function<|message|>{\" arg1\" : 1}" )
2823+ .reasoning_format (COMMON_REASONING_FORMAT_AUTO)
28142824 .tools ({ special_function_tool })
28152825 .expect (message_assist_call)
28162826 .run ();
28172827
28182828 // Tool call with constraint: " to=functions.NAME<|channel|>analysis <|constrain|>json<|message|>JSON"
28192829 tst.test (" to=functions.special_function<|channel|>analysis <|constrain|>json<|message|>{\" arg1\" : 1}" )
2830+ .reasoning_format (COMMON_REASONING_FORMAT_AUTO)
28202831 .tools ({ special_function_tool })
28212832 .expect (message_assist_call)
28222833 .run ();
28232834
28242835 // Tool call in commentary channel (channel header variant)
28252836 tst.test (" <|channel|>commentary to=functions.special_function<|message|>{\" arg1\" : 1}" )
2837+ .reasoning_format (COMMON_REASONING_FORMAT_AUTO)
28262838 .tools ({ special_function_tool })
28272839 .expect (message_assist_call)
28282840 .run ();
0 commit comments