Skip to content

Bug: Inconsistent cancellation error messages - "API Streaming Failed" during thinking vs "API Request Cancelled" during streaming #4903

Open
@hannesrudolph

Description

@hannesrudolph

App Version

3.21.1 (6ca706b)

API Provider

OpenRouter

Model Used

anthropic/claude 4.0 sonnet (thinking/reasoning enabled)

🔁 Steps to Reproduce

  1. Start a task with Claude 4.0 Sonnet (reasoning enabled)
  2. Wait for the thinking phase to begin (model shows "thinking" indicator)
  3. Click the Cancel button during the thinking phase
  4. Observe the error message: red "API Streaming Failed" with message [RooCode#say] task [task-id] aborted
  5. Start another task with the same model configuration
  6. Wait for the results streaming phase to begin (after thinking is complete)
  7. Click the Cancel button during the results streaming phase
  8. Observe the different message: grey "API Request Cancelled"

💥 Outcome Summary

Expected: Both cancellations should show the same consistent "API Request Cancelled" message since both are user-initiated cancellations.
Actual: Canceling during thinking phase shows misleading red "API Streaming Failed" error, while canceling during streaming shows correct grey "API Request Cancelled" message.

📄 Relevant Logs or Errors

[RooCode#say] task 2c076f0b-0f17-4270-86b0-baf3d264f1f5.34535c05 aborted

Related Issues

Related to #4039 - This issue affects reasoning models beyond just DeepSeek R1, including Claude 4.0 Sonnet via OpenRouter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

    Type

    No type

    Projects

    Status

    Issue [In Progress]

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions