Skip to content

Conversation

mrubens
Copy link
Collaborator

@mrubens mrubens commented Oct 3, 2025

Free Grok 4 Fast is going away, so we should remove it from the Roo Code Cloud provider. In general it seems like we should have a pattern for deprecating models that don't work anymore. I suggest that we show a warning when it's selected and then hide it when not selected.

Warning when selected:
Screenshot 2025-10-02 at 11 58 11 PM

No longer in the list when not selected:
Screenshot 2025-10-02 at 11 58 28 PM


Important

Deprecates Grok 4 Fast model, updates UI to handle deprecated models, and adds tests for deprecated model behavior.

  • Behavior:
    • Mark Grok 4 Fast as deprecated in providers/roo.ts.
    • Update ApiOptions.tsx to filter out deprecated models unless currently selected.
    • Show warning message if a deprecated model is selected.
  • UI Changes:
    • Modify ModelPicker.tsx to exclude deprecated models from selection unless currently selected.
    • Display error message for deprecated models in ModelPicker.tsx.
  • Testing:
    • Add ModelPicker.deprecated.spec.tsx to test deprecated model behavior.
  • Localization:
    • Add modelDeprecated message in multiple locale files for warning display.

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

@mrubens mrubens requested review from cte and jr as code owners October 3, 2025 03:59
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused labels Oct 3, 2025
@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Oct 3, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 3, 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.

I found some issues that need attention; see inline comments for details.

// Include the currently selected model even if deprecated (so users can see what they have selected)
// But filter out other deprecated models from being newly selectable
const availableModels = Object.entries(filteredModels ?? {})
.filter(([modelId, modelInfo]) => {
Copy link

Choose a reason for hiding this comment

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

[P2] The intention is to always include the currently selected model, but this starts from filterModels(...) so the selected model will still be dropped if org policy filters it out. This makes the comment misleading and can hide the current selection. Consider merging the selected model back into availableModels after org filtering (with a soft warning) to keep UX consistent.

// Always include the currently selected model
if (modelId === selectedModelId) return true
// Filter out deprecated models that aren't currently selected
return !modelInfo.deprecated
Copy link

Choose a reason for hiding this comment

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

[P3] Same nuance as in ModelPicker: the selected model is only included if it survives filterModels(...). If org policy removes it, the dropdown options won’t include the current selection even though the control value still points to it. Consider explicitly reinserting the selected model into the options (with a warning) so users can see what’s currently set.

{errorMessage && <ApiErrorMessage errorMessage={errorMessage} />}
{selectedModelId && selectedModelInfo && (
{selectedModelInfo?.deprecated && (
<ApiErrorMessage errorMessage={t("settings:validation.modelDeprecated")} />
Copy link

Choose a reason for hiding this comment

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

[P3] Possible duplicate alerts: both a general errorMessage and the modelDeprecated warning can render, resulting in stacked banners. Consider deduplicating (e.g., prioritize modelDeprecated or merge messages) to reduce noise.

)

// Model info should not be displayed for deprecated models
expect(screen.queryByText("This is a deprecated model")).not.toBeInTheDocument()
Copy link

Choose a reason for hiding this comment

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

[P3] Brittle assertion: checks for 'This is a deprecated model', which is not part of the component copy. Prefer asserting on the absence of ModelInfoView (via a test id) or another stable UI signal to avoid false negatives from text changes.

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
@mrubens mrubens merged commit 7ba8e33 into main Oct 3, 2025
7 checks passed
@mrubens mrubens deleted the deprecate_free_grok_4_fast branch October 3, 2025 04:14
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Oct 3, 2025
@github-project-automation github-project-automation bot moved this from Triage to Done in Roo Code Roadmap Oct 3, 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.

I found some issues that need attention; see inline comments for details.

</Select>
</div>

{/* Show error if a deprecated model is selected */}
Copy link

Choose a reason for hiding this comment

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

P2: The deprecated-model warning is gated by selectedProviderModels.length > 0, so if no selectable models remain (e.g., org policy filters everything out) the warning never shows even if the current selection is deprecated. Consider rendering this banner outside the model-options block so it always appears when selectedModelInfo?.deprecated is true.

)

const { id: selectedModelId, info: selectedModelInfo } = useSelectedModel(apiConfiguration)
return Object.keys(availableModels).sort((a, b) => a.localeCompare(b))
Copy link

Choose a reason for hiding this comment

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

P3: Improve sort stability/readability by using localeCompare with numeric, case-insensitive options for natural ordering.

Suggested change
return Object.keys(availableModels).sort((a, b) => a.localeCompare(b))
return Object.keys(availableModels).sort((a, b) => a.localeCompare(b, undefined, { numeric: true, sensitivity: "base" }))

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.

I found some issues that need attention; see inline comments for details.

// Always include the currently selected model
if (modelId === selectedModelId) return true
// Filter out deprecated models that aren't currently selected
return !modelInfo.deprecated
Copy link

Choose a reason for hiding this comment

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

[P3] Ensure stable, natural ordering of the model list across locales/renders.

Suggested change
return !modelInfo.deprecated
return availableModels.sort((a, b) => a.label.localeCompare(b.label, undefined, { numeric: true, sensitivity: "base" }))

</Select>
</div>

{/* Show error if a deprecated model is selected */}
Copy link

Choose a reason for hiding this comment

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

[P3] Potential duplicate alerts: a general errorMessage may render above while the deprecated-model warning renders here, leading to stacked banners. Consider de-duplicating (e.g., suppress the general error when selectedModelInfo?.deprecated is true, or merge messages) to reduce noise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. UI/UX UI/UX related or focused
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants