You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chat: fix Laguna thinking=off false reasoning and </assistant> in output
Two bugs in the Laguna autoparser workaround:
1. With reasoning.start="" (delimiter-style), the streaming PEG parser
speculatively captures all generated content as reasoning while
waiting for </think>. When thinking is disabled and </think> never
arrives, the stream ends with everything misclassified as reasoning,
causing [Start thinking] to display for ordinary responses.
Fix: check ctx.inputs.enable_thinking in analyze_reasoning::build_parser
for the empty-start case. When thinking is off, return p.eps() so the
parser skips reasoning entirely and treats all output as content.
2. </assistant> (the Laguna EOT token) appears as raw text in streaming
output because the stop-word erase logic runs only on antiprompt
entries. preserved_tokens only controls special-token decode; it
does not strip text from the stream.
Fix: add an additional_stops field to autoparser, populate it from
the Laguna workaround with "</assistant>", propagate it through
generate_parser into common_chat_params::additional_stops (which the
server already routes into antiprompt via the "stop" JSON key), and
apply it to task.params.antiprompt in cli.cpp so the CLI path also
benefits.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments