File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -1352,16 +1352,15 @@ static void common_chat_parse_deepseek_v3_1(common_chat_msg_parser & builder) {
13521352 // There's no opening "<think>" tag, so we need to handle this differently
13531353
13541354 // First, try to find the "</think>" tag that separates thinking from regular content
1355- static const common_regex thinking_end_regex (" </think>" );
1356- if (auto res = builder.try_find_regex (thinking_end_regex, std::string::npos, false )) {
1355+ if (auto res = builder.try_find_literal (" </think>" )) {
13571356 // The prelude contains everything before the "</think>" tag
13581357 auto stripped_reasoning = string_strip (res->prelude );
13591358
13601359 if (!stripped_reasoning.empty ()) {
13611360 builder.add_reasoning_content (stripped_reasoning);
13621361 }
13631362
1364- // The parser position is already advanced past the "</think>" tag by try_find_regex
1363+ // The parser position is already advanced past the "</think>" tag by try_find_literal
13651364 // The rest is regular content
13661365 builder.add_content (builder.consume_rest ());
13671366 } else {
You can’t perform that action at this time.
0 commit comments