File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -171,6 +171,10 @@ void common_chat_msg_parser::consume_literal(const std::string & literal) {
171171bool common_chat_msg_parser::try_parse_reasoning (const std::string & start_think, const std::string & end_think) {
172172 std::string pending_reasoning_prefix;
173173
174+ if (syntax_.reasoning_format == COMMON_REASONING_FORMAT_NONE) {
175+ return false ;
176+ }
177+
174178 auto set_reasoning_prefix = [&](size_t prefix_pos) {
175179 if (!syntax_.thinking_forced_open || syntax_.reasoning_in_content ) {
176180 return ;
@@ -206,10 +210,6 @@ bool common_chat_msg_parser::try_parse_reasoning(const std::string & start_think
206210 }
207211 };
208212
209- if (syntax_.reasoning_format == COMMON_REASONING_FORMAT_NONE) {
210- return false ;
211- }
212-
213213 const size_t saved_pos = pos_;
214214 const size_t saved_content_size = result_.content .size ();
215215 const size_t saved_reasoning_size = result_.reasoning_content .size ();
You can’t perform that action at this time.
0 commit comments