@@ -1446,33 +1446,6 @@ static void test_template_output_parsers() {
14461446        assert_equals (COMMON_CHAT_FORMAT_GPT_OSS, common_chat_templates_apply (tmpls.get (), inputs_no_tools).format );
14471447        assert_equals (COMMON_CHAT_FORMAT_GPT_OSS, common_chat_templates_apply (tmpls.get (), inputs_tools).format );
14481448
1449-         assert_msg_equals (message_assist_empty,
1450-             common_chat_parse (
1451-                 " <|channel|>"  ,
1452-                 /*  is_partial= */   true ,
1453-                 {
1454-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1455-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1456-                 }));
1457- 
1458-         assert_msg_equals (message_assist_empty,
1459-             common_chat_parse (
1460-                 " <|channel|>analysis"  ,
1461-                 /*  is_partial= */   true ,
1462-                 {
1463-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1464-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1465-                 }));
1466- 
1467-         assert_msg_equals (message_assist_empty,
1468-             common_chat_parse (
1469-                 " <|channel|>analysis<|message|>"  ,
1470-                 /*  is_partial= */   true ,
1471-                 {
1472-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1473-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1474-                 }));
1475- 
14761449        assert_msg_equals (simple_assist_msg (" "  , " I'm\n think"  ),
14771450            common_chat_parse (
14781451                " <|channel|>analysis<|message|>I'm\n think"  ,
@@ -1489,69 +1462,6 @@ static void test_template_output_parsers() {
14891462                    /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
14901463                    /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
14911464                }));
1492-         assert_msg_equals (simple_assist_msg (" "  , " I'm\n thinking"  ),
1493-             common_chat_parse (
1494-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1495-                 " <|start|>"  ,
1496-                 /*  is_partial= */   true ,
1497-                 {
1498-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1499-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1500-                 }));
1501-         assert_msg_equals (simple_assist_msg (" "  , " I'm\n thinking"  ),
1502-             common_chat_parse (
1503-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1504-                 " <|start|>assistant"  ,
1505-                 /*  is_partial= */   true ,
1506-                 {
1507-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1508-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1509-                 }));
1510-         assert_msg_equals (simple_assist_msg (" "  , " I'm\n thinking"  ),
1511-             common_chat_parse (
1512-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1513-                 " <|start|>assistant<|channel|>"  ,
1514-                 /*  is_partial= */   true ,
1515-                 {
1516-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1517-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1518-                 }));
1519-         assert_msg_equals (simple_assist_msg (" "  , " I'm\n thinking"  ),
1520-             common_chat_parse (
1521-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1522-                 " <|start|>assistant<|channel|>final"  ,
1523-                 /*  is_partial= */   true ,
1524-                 {
1525-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1526-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1527-                 }));
1528-         assert_msg_equals (simple_assist_msg (" "  , " I'm\n thinking"  ),
1529-             common_chat_parse (
1530-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1531-                 " <|start|>assistant<|channel|>final<|message|>"  ,
1532-                 /*  is_partial= */   true ,
1533-                 {
1534-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1535-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1536-                 }));
1537-         assert_msg_equals (simple_assist_msg (" Hello"  , " I'm\n thinking"  ),
1538-             common_chat_parse (
1539-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1540-                 " <|start|>assistant<|channel|>final<|message|>Hello"  ,
1541-                 /*  is_partial= */   true ,
1542-                 {
1543-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1544-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1545-                 }));
1546-         assert_msg_equals (simple_assist_msg (" Hello, world!\n What's up?"  , " I'm\n thinking"  ),
1547-             common_chat_parse (
1548-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1549-                 " <|start|>assistant<|channel|>final<|message|>Hello, world!\n What's up?"  ,
1550-                 /*  is_partial= */   true ,
1551-                 {
1552-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1553-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1554-                 }));
15551465        assert_msg_equals (simple_assist_msg (" Hello, world!\n What's up?"  , " I'm\n thinking"  ),
15561466            common_chat_parse (
15571467                " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
@@ -1561,51 +1471,6 @@ static void test_template_output_parsers() {
15611471                    /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
15621472                    /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
15631473                }));
1564-         assert_msg_equals (simple_assist_msg (" "  , " I'm\n thinking"  ),
1565-             common_chat_parse (
1566-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1567-                 " <|start|>"  ,
1568-                 /*  is_partial= */   true ,
1569-                 {
1570-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1571-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1572-                 }));
1573-         assert_msg_equals (simple_assist_msg (" "  , " I'm\n thinking"  ),
1574-             common_chat_parse (
1575-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1576-                 " <|start|>assistant"  ,
1577-                 /*  is_partial= */   true ,
1578-                 {
1579-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1580-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1581-                 }));
1582-         assert_msg_equals (simple_assist_msg (" "  , " I'm\n thinking"  ),
1583-             common_chat_parse (
1584-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1585-                 " <|start|>assistant<|channel|>"  ,
1586-                 /*  is_partial= */   true ,
1587-                 {
1588-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1589-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1590-                 }));
1591-         assert_msg_equals (simple_assist_msg (" "  , " I'm\n thinking"  ),
1592-             common_chat_parse (
1593-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1594-                 " <|start|>assistant<|channel|>commentary"  ,
1595-                 /*  is_partial= */   true ,
1596-                 {
1597-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1598-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1599-                 }));
1600-         assert_msg_equals (simple_assist_msg (" "  , " I'm\n thinking"  ),
1601-             common_chat_parse (
1602-                 " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
1603-                 " <|start|>assistant<|channel|>commentary"  ,
1604-                 /*  is_partial= */   true ,
1605-                 {
1606-                     /*  .format = */   COMMON_CHAT_FORMAT_GPT_OSS,
1607-                     /*  .reasoning_format = */   COMMON_REASONING_FORMAT_AUTO,
1608-                 }));
16091474        assert_msg_equals (simple_assist_msg (" "  , " I'm\n thinking"  , " special_function"  , " {\" arg1"  ),
16101475            common_chat_parse (
16111476                " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
@@ -1677,9 +1542,7 @@ static void test_template_output_parsers() {
16771542                    /*  .parse_tool_calls = */   false ,
16781543                }));
16791544        assert_msg_equals (
1680-             simple_assist_msg (
1681-                 " <tool_call>{\" name\" : \" special_function\" , \" arguments\" : {\" arg1"  ,
1682-                 " I'm\n thinking"  ),
1545+             simple_assist_msg (" "  , " I'm\n thinking"  ),
16831546            common_chat_parse (
16841547                " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
16851548                " <|start|>assistant<|channel|>commentary to=functions.special_function<|message|>{\" arg1"  ,
@@ -1692,9 +1555,7 @@ static void test_template_output_parsers() {
16921555                    /*  .parse_tool_calls = */   false ,
16931556                }));
16941557        assert_msg_equals (
1695-             simple_assist_msg (
1696-                 " <tool_call>{\" name\" : \" special_function\" , \" arguments\" : {\" arg1\" :1}}</tool_call>"  ,
1697-                 " I'm\n thinking"  ),
1558+             simple_assist_msg (" "  , " I'm\n thinking"  ),
16981559            common_chat_parse (
16991560                " <|channel|>analysis<|message|>I'm\n thinking<|end|>" 
17001561                " <|start|>assistant<|channel|>commentary to=functions.special_function <|constrain|>json<|message|>{\" arg1\" : 1}"  ,
0 commit comments