anbei.yuan 5789d78c34 fix: strip <think> tokens from reasoning model output
Models with thinking/reasoning capabilities (DeepSeek-R1, MiniMax-M2.7,
QwQ, etc.) include <think>...</think> blocks in their response content.
These internal reasoning tokens leak into agent output and downstream
node inputs, corrupting the workflow.

Add _strip_thinking_tokens() classmethod to OpenAIProvider that filters
<think>...</think> blocks via regex. Applied in both:
- _deserialize_chat_response() (Message content)
- _append_chat_response_output() (timeline content)

The fix is zero-cost for models without thinking tokens (fast path
checks for '<think>' substring before regex).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-09 10:13:10 +08:00
..
2026-01-07 16:24:01 +08:00
2026-01-07 16:24:01 +08:00
2026-01-07 16:24:01 +08:00
2026-01-07 16:24:01 +08:00