9router/open-sse/handlers/chatCore
Omar Nahhas Sanchez 878cdf302b
fix: only strip reasoning_content when content is non-empty (#542)
sseToJsonHandler.js unconditionally deleted reasoning_content from all
non-streaming responses (added for Firecrawl SDK compatibility). This
breaks thinking models (Qwen3.5, Claude extended thinking, etc.) where
the model may use all tokens for reasoning, leaving content empty.

When reasoning_content is stripped in that case, the response appears
completely empty to the client.

Fix: only strip reasoning_content when the response also has non-empty
content, so that reasoning output is preserved when it is the only
useful output.

Co-authored-by: Agent Zero <agent@agent-zero.local>
2026-04-10 10:28:58 +07:00
..
nonStreamingHandler.js fix: strip reasoning_content from non-streaming responses (closes #509) (#517) 2026-04-07 09:46:28 +07:00
requestDetail.js Feat : console log 2026-03-02 09:31:16 +07:00
sseToJsonHandler.js fix: only strip reasoning_content when content is non-empty (#542) 2026-04-10 10:28:58 +07:00
streamingHandler.js Feat : Auto restart after crash 2026-03-14 09:37:29 +07:00