File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 1010#include < minja/minja.hpp>
1111
1212#include < cstdio>
13+ #include < cstdlib>
1314#include < exception>
1415#include < iostream>
1516#include < optional>
@@ -931,15 +932,9 @@ static void common_chat_parse_qwen3_coder_xml(common_chat_msg_parser & builder)
931932 // For now, use empty tools vector - we'll need to pass tools differently
932933 std::vector<common_chat_tool> empty_tools;
933934 if (builder.parse_qwen3_xml_tool_call (content, empty_tools)) {
934- // Only treat as parsed if at least one tool call was actually added.
935- // On malformed or incomplete XML, fall back to plain content.
936- const auto & parsed = builder.result ();
937- if (parsed.tool_calls .empty () && parsed.content .empty ()) {
938- builder.add_content (content);
939- }
935+ // Successfully parsed XML tool call
940936 return ;
941937 }
942-
943938 // If no tool call found, treat as regular content
944939 builder.add_content (content);
945940}
You can’t perform that action at this time.
0 commit comments