Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Aug 26, 2025

Summary

This PR implements graceful handling for models that have been removed from the catalog but are still selected in user configurations.

Changes

  • UI Enhancement: Shows removed models in the dropdown with an '(unavailable)' label, allowing users to see their current selection even if it's no longer in the catalog
  • Provider Switching: Automatically clears removed models when switching to a different provider, preventing invalid configurations from being carried over
  • Internationalization: Added support for the 'unavailable' label across all 18 supported languages
  • Test Coverage: Added comprehensive tests for removed model scenarios

Behavior

  1. When a model is removed from the catalog but still selected:

    • The model remains visible in the dropdown with '(unavailable)' suffix
    • Users can continue using it until they switch providers or select a different model
    • The API handles any errors (400/404) which are displayed to the user
  2. When switching providers:

    • If the current model was removed, it's automatically cleared
    • The new provider's default model is selected

Testing

All tests pass successfully:

  • 15 tests passing in ApiOptions.spec.tsx
  • Verified behavior with temporarily removed models
  • Confirmed internationalization works correctly

Related Issues

Similar to #7392 but focused on graceful degradation rather than hiding providers.


Important

Enhances UI to handle removed models gracefully, adds internationalization for 'unavailable' label, and includes tests for robustness.

  • UI Enhancement:
    • Displays removed models in dropdown with '(unavailable)' label in ApiOptions.tsx.
    • Automatically clears removed models when switching providers in ApiOptions.tsx.
  • Internationalization:
    • Adds 'unavailable' label support in 18 languages across multiple settings.json files.
  • Testing:
    • Adds tests for removed model scenarios in ApiOptions.spec.tsx.
  • Misc:
    • Adds new model roo/sonic to roo.ts.

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

@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners August 26, 2025 17:17
@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused labels Aug 26, 2025
@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Aug 26, 2025
Copy link

@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.

Thank you for your contribution! I've reviewed the changes and have some suggestions for improvement. The implementation handles removed models gracefully, and the i18n support across all 18 languages is comprehensive.

- Show removed models in dropdown with '(unavailable)' label
- Allow users to keep selected model even if removed from catalog
- Clear removed models when switching providers
- Add comprehensive test coverage for removed model scenarios
- Add internationalization support for unavailable model label
@hannesrudolph hannesrudolph force-pushed the feat/graceful-removed-models branch from 88c576a to 931db0f Compare October 20, 2025 17:56
@roomote
Copy link

roomote bot commented Oct 20, 2025

Code Review Summary

No issues found - The implementation is clean and follows best practices.

Review Completed

I've thoroughly reviewed this PR and found no bugs, security issues, or breaking changes. The implementation correctly:

  • Handles removed models gracefully by showing them with an "(unavailable)" label
  • Clears removed models when switching providers
  • Includes proper internationalization support across all 18 languages
  • Has adequate test coverage for the new functionality
  • Maintains backward compatibility

The existing bot review comments (#1-#5) are style suggestions rather than critical issues. The code is ready for merge.

Latest Commit Review (3889f6a)

Reviewed the latest commit that removes the deprecated roo/sonic model from the model catalog. This change is clean and consistent with the PR's goal of gracefully handling removed models. No issues found.

description:
"A stealth reasoning model that is blazing fast and excels at agentic coding, accessible for free through Roo Code Cloud for a limited time. (Note: prompts and completions are logged by the model creator and used to improve the model.)",
},
} as const satisfies Record<string, ModelInfo>
Copy link

Choose a reason for hiding this comment

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

Changing type from Record<RooModelId, ModelInfo> to Record<string, ModelInfo> weakens type safety. If this is intended for flexibility, please add a clarifying comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR - Needs Review size:M This PR changes 30-99 lines, ignoring generated files. UI/UX UI/UX related or focused

Projects

Status: PR [Needs Review]

Development

Successfully merging this pull request may close these issues.

3 participants