Skip to content

[Bug]: Favorited legacy models stay buried in the Legacy section instead of hoisting to the top (web) #11925

Description

@TonybynMp4

Before submitting

  • I searched existing issues and did not find a duplicate.
  • I included enough detail to reproduce or investigate the problem.

Area

apps/web

Steps to reproduce

  1. Have a provider (e.g. Claude) with at least one model classified as legacy (e.g. Claude Opus 4.8).
  2. Favorite that legacy model (star it) in the model picker.
  3. Open the model picker on that provider's tab.

Expected behavior

Favorited models are hoisted to the top of the list. A favorited legacy model should behave the same way — it should appear at the top with the other favorites, not inside the "Legacy models" group. Unfavoriting it should return it to the Legacy group.

This is already the behavior on the native iOS client — it was fixed there in cee01c05f5 ("fix(swift-ios): show legacy models in favorites"), which promotes favorited legacy models out of the legacy group and returns them when unfavorited.

Actual behavior

The favorited legacy model stays buried inside the "Legacy models" section instead of being hoisted to the top with the other favorites. The star renders on the row, but the row is under Legacy.

Root cause is in apps/web/src/components/chat/ModelPickerContent.tsx. filteredModels is correctly sorted favorites-first (groupFavorites: true), but legacySection then splits the list purely on isLegacy, ignoring favorite status:

const currentModels = filteredModels.filter((model) => !model.isLegacy);
const legacyModels  = filteredModels.filter((model) =>  model.isLegacy);

So every legacy model — favorited or not — is pulled into the collapsed Legacy group, which defeats the favorite hoist for any legacy favorite. Legacy grouping (#5190) and favorite hoisting shipped independently and were never reconciled on web.

Note: the React Native mobile client does not expose model favorites at all, so this interaction only affects apps/web (and desktop, which wraps it). The native iOS client is already fixed.

Impact

Minor bug or occasional failure

Version or commit

main @ 8fc60a9 (reproduced on v0.0.41-nightly.20260915.1766, identical to main for this file)

Environment

apps/web / desktop, any provider with a favorited legacy model

Activity

  1. juliusmarminge commented on Sep 15, 2026

    @juliusmarminge
    Member

    Triage

    Confirmed. This is a real web/desktop ModelPicker bug, not a product question.

    Favoriting a legacy model stars the row but leaves it in the collapsed Legacy models group. Native iOS already promotes favorited legacy models out of that group (cee01c05f5); React Native has no model favorites, so only web (and desktop wrapping it) is wrong.

    Root cause

    In apps/web/src/components/chat/ModelPickerContent.tsx, filteredModels is already sorted favorites-first (groupFavorites: true). legacySection then splits purely on isLegacy and ignores favorite status:

    const currentModels = filteredModels.filter((model) => !model.isLegacy);
    const legacyModels  = filteredModels.filter((model) =>  model.isLegacy);

    That split shipped with #5190 and was never reconciled with favorite hoisting (#2153). The Favorites tab and search already skip legacySection, which is why those paths look fine.

    Out of scope / already OK

    • Settings provider models list — hoists favorites, no Legacy group
    • RN mobile — no favorites UI
    • Native iOS — already fixed
    • Contracts / server classification — no change needed

    Suggested fix

    Same rule as iOS: on a provider tab, keep favorited legacy models in the main list; only unfavorited legacy models go in the Legacy group. Unfavoriting returns them. Also skip auto-expanding Legacy when the active model is a favorite. Extract a small pure helper and add a unit test next to ModelPickerContent.test.ts (current tests do not cover this split).

    Accepting as a minor bug. No matching duplicate issue or open PR.

  2. added
    bugSomething is broken or behaving incorrectly.
    acceptedfeature request accepted
    via-triageFiled through npx t3 triage
    on Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions