Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Sep 28, 2025

Description

This PR addresses Issue #8348 where Supernova and other free Roo Cloud models were showing blank responses in the UI when they only returned reasoning/thinking content without actual text content.

Problem

When certain Roo Cloud models (like Supernova) only return reasoning content without text content, the UI would appear blank because no text chunks were being yielded to the stream.

Solution

Modified the Roo provider to track whether any text content has been yielded during streaming. If no text content was yielded by the end of the stream (only reasoning was received), an empty text chunk is yielded to ensure the UI has something to display.

Changes

  • Added hasYieldedContent flag in src/api/providers/roo.ts to track if text content was yielded
  • After processing all chunks, if no text content was yielded, yield an empty text chunk
  • Added comprehensive test coverage for the fix

Testing

  • ✅ Added unit tests covering three scenarios:
    • Yielding empty text when only reasoning is received
    • NOT yielding empty text when actual content exists
    • Handling completely empty streams
  • ✅ Existing tests pass without regression

Related Issues

Fixes #8348

Review Confidence

The implementation review showed 95% confidence with no security issues or convention violations.

Feedback and guidance are welcome!


Important

Fixes issue #8348 by ensuring Roo provider yields an empty text chunk if no text content is present, preventing blank UI responses.

  • Behavior:
    • In roo.ts, added hasYieldedContent flag to track if text content is yielded in createMessage().
    • If no text content is yielded, an empty text chunk is yielded to prevent blank UI responses.
  • Testing:
    • Added unit tests in roo.spec.ts to cover scenarios where only reasoning content is received, actual text content is received, and completely empty streams.
  • Misc:

This description was created by Ellipsis for 1b0e3d9. You can customize this summary. It will automatically update as commits are pushed.

…onses

- Added logic to yield empty text chunk when only reasoning content is received
- This prevents the UI from showing blank responses for models that only output thinking/reasoning
- Fixes issue #8348 where Supernova and other free Roo Cloud models showed blank responses
@roomote roomote bot requested review from cte, jr and mrubens as code owners September 28, 2025 10:06
@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. bug Something isn't working labels Sep 28, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Sep 28, 2025
Copy link
Contributor Author

@roomote roomote bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self-review engaged: the robot graded its own homework and still found nits.


// If we only received reasoning content and no text content, yield an empty text chunk
// This ensures the UI doesn't show a blank response
if (!hasYieldedContent) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 — Ordering UX: when the stream contains only usage (no text) the current implementation yields the usage chunk first and the empty text chunk afterward. This can keep the UI blank until the very end. Consider emitting an empty text chunk right before usage when no text has been yielded yet.

Suggested change
if (!hasYieldedContent) {
if (chunk.usage) {
if (!hasYieldedContent) {
yield {
type: "text",
text: "",
}
hasYieldedContent = true
}
yield {
type: "usage",
inputTokens: chunk.usage.prompt_tokens || 0,
outputTokens: chunk.usage.completion_tokens || 0,
}
}

metadata?.taskId ? { headers: { "X-Roo-Task-ID": metadata.taskId } } : undefined,
)

let hasYieldedContent = false
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 — Minor clarity: add a comment clarifying that reasoning-only output should not count as content for avoiding blank UI responses.

Suggested change
let hasYieldedContent = false
// Tracks if any text content has been emitted; reasoning-only output doesn't count
let hasYieldedContent = false

@daniel-lxs
Copy link
Member

#8348 (comment)

@daniel-lxs daniel-lxs closed this Oct 14, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Oct 14, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Oct 14, 2025
@daniel-lxs daniel-lxs deleted the fix/roo-cloud-blank-responses-8348 branch October 14, 2025 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

[BUG] New Roo Cloud provider free models often blank

4 participants