| 4786 | } |
| 4787 | |
| 4788 | static void split_reasoning_content(const char *text, size_t n, char **content_out, char **reasoning_out) { |
| 4789 | char *s = xstrndup(text ? text : "", n); |
| 4790 | char *body = s; |
| 4791 | if (!strncmp(body, "<think>", 7)) body += 7; |
| 4792 | |
| 4793 | char *think_end = strstr(body, "</think>"); |
| 4794 | if (think_end) { |
| 4795 | *think_end = '\0'; |
| 4796 | *reasoning_out = xstrdup(body); |
no test coverage detected