mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-18 21:40:53 +00:00
Add <final> tag handling to stripThinkingTags() to prevent reasoning-tag provider responses from leaking incomplete tags during streaming. When using providers like google-antigravity/*, ollama, or minimax, the model wraps responses in <think>...</think> and <final>...</final> tags. The TUI was only stripping <think> tags, causing <final> to leak through and display as the response ~50% of the time. This is a defense-in-depth fix for the TUI layer. Fixes: #1561 Co-authored-by: Claude Code <noreply@anthropic.com>