Repository navigation
fix(command-code): surface reasoning-only output as content when no text-delta (#10986) - #11063
Merged
diegosouzapw merged 1 commit intoAug 21, 2026
Conversation
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
…ext-delta (diegosouzapw#10986) (diegosouzapw#11063) ⭐5 — Fix do dono com TDD. Estado committed+pushed limpo (hold-vivo cedido por instrução direta do operador).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #10986
Root cause
Command Code's
/alpha/generateexecutor (open-sse/executors/commandCode.ts) aggregates onlytext-deltaevents intomessage.content. When a model (e.g.meta/muse-spark-1.2-contributor) emits its whole answer asreasoning-deltaevents and never atext-delta,state.contentstays""and the client gets a useless/emptycontentfield with HTTP 200 — even though a real answer exists inreasoning_content. The report's metrics (Total Out: 64 / Reasoning: 61) match exactly.Both
createJsonResponseandcreateStreamResponsehad the gap. The combo-routing validator (open-sse/services/combo/validateQuality.ts, from #2341/#3587) already defends this shape for combo-routed requests, but a direct single-model request bypasses it entirely.Fix
Scoped to the executor (surgical, HR#18): when
state.contentis empty ANDstate.reasoningis non-empty AND there are no tool calls (the exact detection #3587 uses), fall backmessage.contentto the reasoning text.reasoning_contentstays populated for reasoning-aware clients. Behavior for the common text-delta case is unchanged (existing testtext-delta + reasoning-delta mixedpasses unmodified).createJsonResponse: content fallback on the assembled message.createStreamResponse: track whether any content delta was emitted; emit one syntheticcontentdelta from the reasoning buffer atfinish(and at stream-end) when none was sent.Regression test (TDD, proved RED then GREEN)
tests/unit/command-code-executor.test.ts— 2 new cases (non-stream JSON + SSE-stream), added after a standalone probe confirmed RED (expected message.content to carry usable text, got: ""). Full file: 22/22 pass.Gates
_rebaseline_2026_08_21_10986_reasoning_only_contentjustification (mirrors fix(combo): clear stale sticky pins when stickiness is disabled #10907/feat(vision-bridge): honor configured vision model + support custom model input & all active providers (#10808, #10809) #10859 pattern).changelog.d/fixes/10986-reasoning-only-content.md).src/lib/modelCapabilities.tsfile-size drift (1072 > 1016 frozen) is pre-existing on the base tip (git show origin/release/v3.8.50= 1071), not touched by this diff.