Skip to content

Commit 606ea13

Browse files
committed
Fix reasoning parsing for gpt-oss
This also requires patching the Jinja2 template: ```diff --- gpt-oss.j2.old 2025-08-06 10:59:18 +++ gpt-oss.j2.new 2025-08-06 11:00:43 @@ -303,5 +303,5 @@ {#- Generation prompt #} {%- if add_generation_prompt -%} -<|start|>assistant +<|start|>assistant<|channel|>analysis {%- endif -%} ```
1 parent 0d88315 commit 606ea13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

common/chat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1318,7 +1318,7 @@ static common_chat_params common_chat_params_init_gpt_oss(const common_chat_temp
13181318
}
13191319
static void common_chat_parse_gpt_oss(common_chat_msg_parser & builder) {
13201320
// TODO @ngxson : this won't work with --special enabled, we should fix that
1321-
builder.try_parse_reasoning("<|channel|>analysis<|message|>", "<|start|>assistant<|channel|>final<|message|>");
1321+
builder.try_parse_reasoning("<|message|>", "<|start|>assistant<|channel|>final<|message|>");
13221322
if (!builder.syntax().parse_tool_calls) {
13231323
builder.add_content(builder.consume_rest());
13241324
return;

0 commit comments

Comments
 (0)