Description
OpenAI-compatible reasoning models (e.g. OpenAI o-series, DeepSeek-R1 via DeepSeek) stream their chain-of-thought in choices[].delta.reasoning_content and may emit content only at the end — or never. parseOpenAiSseLine only reads delta.content (sse.ts:91), so with suggest --stream:
- The reasoning phase streams no visible text (terminal appears frozen for potentially minutes).
- For providers/models that only emit
reasoning_content, the accumulated string is empty and parseSuggestions() returns nothing → Could not parse any suggestions from LLM response.
Location
src/providers/sse.ts lines 88–100 (parseOpenAiSseLine)
Code
const content = parsed.choices?.[0]?.delta?.content;
if (content) result.text = content;
// delta.reasoning_content is never examined
Suggested fix
Fall back to delta.reasoning_content (optionally with a different chunk kind, or surfaced as text) when content is absent, so the user sees progressive output and parsing has text to work with. Add a unit test using a reasoning_content-only delta stream.
Impact
Broken/blank streaming UX for reasoning models, and hard failures for models that never send content deltas.
Description
OpenAI-compatible reasoning models (e.g. OpenAI
o-series, DeepSeek-R1 via DeepSeek) stream their chain-of-thought inchoices[].delta.reasoning_contentand may emitcontentonly at the end — or never.parseOpenAiSseLineonly readsdelta.content(sse.ts:91), so withsuggest --stream:reasoning_content, the accumulated string is empty andparseSuggestions()returns nothing →Could not parse any suggestions from LLM response.Location
src/providers/sse.tslines 88–100 (parseOpenAiSseLine)Code
Suggested fix
Fall back to
delta.reasoning_content(optionally with a different chunk kind, or surfaced as text) whencontentis absent, so the user sees progressive output and parsing has text to work with. Add a unit test using areasoning_content-only delta stream.Impact
Broken/blank streaming UX for reasoning models, and hard failures for models that never send
contentdeltas.