fix(neuron): truncated-mid-think non-streaming responses are all reasoning (#112) #113
Reference in New Issue
Block a user
Delete Branch "fix/112-prompt-opened-reasoning"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #112
When the chat template force-opens the think block in the generation prompt (
Qwen3-Next-80B-A3B-Thinkingends with<|im_start|>assistant\n<think>\n) and generation exhaustsmax_tokensbefore emitting</think>, the non-streamingsplit_off_reasoninghad no close-marker anchor and returned the entire chain-of-thought ascontent. The streaming path was already correct (prompt_opens_reasoninginitializes its state machine); this threads the same signal into the non-streaming split for both the single-GPU and TP paths: no close marker + prompt-opened block ⇒contentempty, every generated token counted asreasoning_tokens.Six unit tests cover the split matrix, including the new prompt-opened truncation case.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TczcGF7JSjJs8r15RSSGpx