common : add reasoning_format = none support to gpt-oss (#21094)
This commit is contained in:
parent
edfb440a2f
commit
e6f2ec01ff
2 changed files with 20 additions and 1 deletions
|
|
@ -2796,6 +2796,14 @@ static void test_template_output_peg_parsers(bool detailed_debug) {
|
|||
.expect(message_assist_thoughts)
|
||||
.run();
|
||||
|
||||
// Analysis channel (reasoning) with final channel (content) with reasoning_format = none
|
||||
tst.test(
|
||||
"<|channel|>analysis<|message|>I'm\nthinking<|end|><|start|>assistant<|channel|>final<|message|>Hello, world!\nWhat's "
|
||||
"up?")
|
||||
.reasoning_format(COMMON_REASONING_FORMAT_NONE)
|
||||
.expect_content("<|channel|>analysis<|message|>I'm\nthinking<|end|>Hello, world!\nWhat's up?")
|
||||
.run();
|
||||
|
||||
// Analysis channel only (partial) - still works when reasoning format is set
|
||||
tst.test("<|channel|>analysis<|message|>I'm\nthinking")
|
||||
.reasoning_format(COMMON_REASONING_FORMAT_AUTO)
|
||||
|
|
@ -2805,24 +2813,28 @@ static void test_template_output_peg_parsers(bool detailed_debug) {
|
|||
|
||||
// Tool call with recipient in role header: " to=functions.NAME<|channel|>analysis<|message|>JSON"
|
||||
tst.test(" to=functions.special_function<|channel|>analysis<|message|>{\"arg1\": 1}")
|
||||
.reasoning_format(COMMON_REASONING_FORMAT_AUTO)
|
||||
.tools({ special_function_tool })
|
||||
.expect(message_assist_call)
|
||||
.run();
|
||||
|
||||
// Tool call with recipient in channel header: "<|channel|>analysis to=functions.NAME<|message|>JSON"
|
||||
tst.test("<|channel|>analysis to=functions.special_function<|message|>{\"arg1\": 1}")
|
||||
.reasoning_format(COMMON_REASONING_FORMAT_AUTO)
|
||||
.tools({ special_function_tool })
|
||||
.expect(message_assist_call)
|
||||
.run();
|
||||
|
||||
// Tool call with constraint: " to=functions.NAME<|channel|>analysis <|constrain|>json<|message|>JSON"
|
||||
tst.test(" to=functions.special_function<|channel|>analysis <|constrain|>json<|message|>{\"arg1\": 1}")
|
||||
.reasoning_format(COMMON_REASONING_FORMAT_AUTO)
|
||||
.tools({ special_function_tool })
|
||||
.expect(message_assist_call)
|
||||
.run();
|
||||
|
||||
// Tool call in commentary channel (channel header variant)
|
||||
tst.test("<|channel|>commentary to=functions.special_function<|message|>{\"arg1\": 1}")
|
||||
.reasoning_format(COMMON_REASONING_FORMAT_AUTO)
|
||||
.tools({ special_function_tool })
|
||||
.expect(message_assist_call)
|
||||
.run();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue