@@ -60,6 +60,7 @@ import { InlineButton } from "../ui/button";
6060import {
6161 isProviderInstancePickerReady ,
6262 isProviderInstancePickerVisible ,
63+ shouldShowInstanceBadge ,
6364 type ProviderInstanceEntry ,
6465} from "../../providerInstances" ;
6566import { providerModelKey , sortProviderModelItems } from "../../modelOrdering" ;
@@ -575,8 +576,8 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
575576
576577 const isLocked = lockedProvider !== null ;
577578 const isSearching = searchQuery . trim ( ) . length > 0 ;
578- // Inside one provider's tab the provider line repeats the selected rail icon on every row .
579- const rowsMixProviders = isSearching || selectedInstanceId === "favorites" ;
579+ // Rows that mix providers mark each with an inline icon; a provider's own tab already shows it on the rail .
580+ const inlineProviderIcon = isSearching || selectedInstanceId === "favorites" ;
580581 // Fit the tallest tab so switching tabs never resizes the popup and moves the rail under the cursor.
581582 const tallestTabUnits = ( ( ) => {
582583 const unitsByTab = new Map < ProviderInstanceId | "favorites" , number > ( ) ;
@@ -592,7 +593,7 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
592593 for ( const model of flatModels ) {
593594 if ( ! matchesLockedProvider ( model ) ) continue ;
594595 const isFavorite = favoritesSet . has ( providerModelKey ( model . instanceId , model . slug ) ) ;
595- if ( isFavorite ) addRow ( "favorites" , true ) ;
596+ if ( isFavorite ) addRow ( "favorites" , Boolean ( model . subProvider ) ) ;
596597 if ( model . isLegacy && ! isFavorite ) {
597598 tabsWithLegacyRow . add ( model . instanceId ) ;
598599 } else {
@@ -993,6 +994,7 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
993994 }
994995 const disabledReason =
995996 getModelDisabledReason ?.( model . instanceId , model . slug ) ?? null ;
997+ const entry = entryByInstanceId . get ( model . instanceId ) ;
996998 return (
997999 < ModelListRow
9981000 key = { modelKey }
@@ -1012,7 +1014,12 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
10121014 ? selectedModelKeySet . has ( modelKey )
10131015 : modelKey === activeModelKey
10141016 }
1015- showProvider = { rowsMixProviders || Boolean ( model . subProvider ) }
1017+ inlineProviderIcon = { inlineProviderIcon }
1018+ showInstanceBadge = {
1019+ inlineProviderIcon &&
1020+ entry !== undefined &&
1021+ shouldShowInstanceBadge ( entry , instanceEntries )
1022+ }
10161023 showNewBadge = { model . badge === "new" }
10171024 unavailable = { model . isUnavailable === true }
10181025 jumpLabel = { modelJumpLabelByKey . get ( modelKey ) ?? null }
0 commit comments