Skip to content

Conversation

@kyle-apex
Copy link
Contributor

@kyle-apex kyle-apex commented Apr 2, 2025

Bug: Cannot change model selection after API error due to UI state #1657
UI Bug: OpenRouter ran out of credits prevents user from switching models #1206

Context

Most users have probably experienced having to click "Retry" > "Cancel" when they've reached a rate limit. This fix allows you to quickly try a different provider.

I recognize that these bugs are labeled as "needs scope", but I'm sure there are plenty of users that would appreciate this fix while we determine the proper scope. (I've seen folks on both reddit and discord report this issue in addition to the issues noted above)

Implementation

I added selectApiConfigDisabled to ChatTextArea to separate the behavior from textAreaDisabled and enabled the model selector when clineAsk == "api_req_failed"

Screenshots

Before
image
After
image

How to Test

Reach an API rate limit and notice that the model selector is enabled. Notice that it is disabled in all other situations where textAreaDisabled


Important

Enable model selector in ChatTextArea when API request fails, allowing users to switch models without retrying the failed request.

  • Behavior:
    • Enables model selector in ChatTextArea when clineAsk is "api_req_failed", even if textAreaDisabled is true.
    • selectApiConfigDisabled prop added to ChatTextArea to control model selector state independently.
  • Implementation:
    • Modify ChatTextArea.tsx to use selectApiConfigDisabled for model selector.
    • Update ChatView.tsx to set selectApiConfigDisabled based on clineAsk state.
  • Testing:
    • Add tests in ChatTextArea.test.tsx to verify model selector behavior with selectApiConfigDisabled.

This description was created by Ellipsis for 5c63bde. It will automatically update as commits are pushed.

Bug: Cannot change model selection after API error due to UI state RooCodeInc#1657
UI Bug: OpenRouter ran out of credits prevents user from switching models RooCodeInc#1206
@changeset-bot
Copy link

changeset-bot bot commented Apr 2, 2025

⚠️ No Changeset found

Latest commit: 5c63bde

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. bug Something isn't working labels Apr 2, 2025
@samhvw8
Copy link
Contributor

samhvw8 commented Apr 2, 2025

cool 💪

@hannesrudolph
Copy link
Collaborator

yay!

Copy link
Collaborator

@mrubens mrubens left a comment

Choose a reason for hiding this comment

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

🎉

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Apr 2, 2025
@mrubens mrubens merged commit dc02bb2 into RooCodeInc:main Apr 2, 2025
19 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Apr 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer size:S This PR changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants