Skip to content

Commit 9b512e4

Browse files
committed
revert
1 parent 6e1fb00 commit 9b512e4

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

common/chat.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
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
}

0 commit comments

Comments
 (0)