Skip to content

Conversation

@indiesewell
Copy link

@indiesewell indiesewell commented May 23, 2025

fix: prevent model selection failures when API requests fail (fixes #3813, fixes #3874)

This PR addresses issues #3813 and #3874 where users were unable to select models in the settings interface when certain provider APIs failed.

Changes:

  • Replace Promise.all with Promise.allSettled in webviewMessageHandler.ts to handle provider API failures gracefully
  • Fix model initialization logic in ModelPicker component to ensure proper default selection
  • Ensure models can be selected even when some provider APIs fail

Technical details:
The previous implementation used Promise.all which would fail entirely if any single provider API request failed. By switching to Promise.allSettled, we now properly handle partial failures and allow users to select from available models even when some providers are unreachable or return errors. Additionally, the initialization logic in ModelPicker has been fixed to properly handle the default model selection.


Important

Switch to Promise.allSettled for API requests and fix default model selection in ModelPicker to handle failures gracefully.

  • Behavior:
    • Replace Promise.all with Promise.allSettled in webviewMessageHandler.ts to handle API failures gracefully.
    • Fix default model selection logic in ModelPicker to ensure proper initialization.
  • Technical Details:
    • Promise.allSettled allows handling of partial failures, enabling model selection even if some APIs fail.
    • Initialization logic in ModelPicker ensures default model is selected if no valid model is chosen.

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

…ooCodeInc#3813, RooCodeInc#3874)

- Use Promise.allSettled instead of Promise.all to handle provider API failures gracefully
- Fix model initialization logic in ModelPicker component
- Ensures models can be selected even when some provider APIs fail
@indiesewell indiesewell requested review from cte and mrubens as code owners May 23, 2025 16:27
@hannesrudolph hannesrudolph moved this from New to PR [Pre Approval Review] in Roo Code Roadmap May 23, 2025
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap May 24, 2025
@github-project-automation github-project-automation bot moved this from PR [Pre Approval Review] to Done in Roo Code Roadmap May 24, 2025
@exilelabs exilelabs deleted the fix/model-selection-bug branch May 24, 2025 12:55
SmartManoj pushed a commit to SmartManoj/Raa-Code that referenced this pull request Jun 13, 2025
* reverting timeout if no first chunk

* Create fresh-days-end.md

---------

Co-authored-by: Cline Evaluation <[email protected]>
Co-authored-by: Saoud Rizwan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

Cannot select any model - the drop down after selection blanks out after selecting the model. API cannot select models other than Claude 3.7 Sonnet

1 participant