@@ -152,6 +152,32 @@ static void test_regex() {
152152 }
153153}
154154
155+ static void test_deepseek_v3_1 () {
156+ // Test DeepSeek V3.1 parsing - reasoning content followed by "</think>" and then regular content
157+ {
158+ common_chat_syntax syntax = {
159+ /* .format = */ COMMON_CHAT_FORMAT_DEEPSEEK_V3_1,
160+ /* .reasoning_format = */ COMMON_REASONING_FORMAT_DEEPSEEK,
161+ /* .reasoning_in_content = */ false ,
162+ /* .thinking_forced_open = */ false ,
163+ /* .parse_tool_calls = */ true ,
164+ };
165+ common_chat_msg_parser builder (" REASONING</think><function=finish>\n <parameter=message>ok
166+ static void test_deepseek_v3_1() {
167+ // Test DeepSeek V3.1 parsing - reasoning content followed by " </think>" and then regular content
168+ {
169+ common_chat_syntax syntax = {
170+ /* .format = */ COMMON_CHAT_FORMAT_DEEPSEEK_V3_1,
171+ /* .reasoning_format = */ COMMON_REASONING_FORMAT_DEEPSEEK,
172+ /* .reasoning_in_content = */ false,
173+ /* .thinking_forced_open = */ false,
174+ /* .parse_tool_calls = */ true,
175+ };
176+ common_chat_msg_parser builder(" REASONING</think><function=finish>\n<parameter=message>ok
177+ static void test_deepseek_v3_1 () {
178+ // Test DeepSeek V3.1 parsing - reasoning content followed by "</think>" and then regular content
179+ {
180+ common_chat_msg_parser builder (" REASONING</think><function=finish>\n <parameter=message>ok
155181const std::vector<std::string> barely_healable_jsons = {
156182 " {" ,
157183 " {\" " ,
0 commit comments