| 8766 | if (!st->checked_think_prefix) { |
| 8767 | /* The chat template ends the prompt with the literal `<think>` (or |
| 8768 | * `</think>` when thinking is off), so generation usually starts |
| 8769 | * mid-reasoning rather than with the open tag. If the model does |
| 8770 | * happen to repeat `<think>` we skip it; otherwise start from |
| 8771 | * position 0. The earlier "no-think-prefix => switch to TEXT" |
| 8772 | * shortcut here was incorrect: it leaked reasoning to clients as |
| 8773 | * regular output_text because the model was already inside the |
no test coverage detected