@@ -66,7 +66,7 @@ import { useTablesList } from '@/hooks/queries/tables'
6666import { useWorkflowMap } from '@/hooks/queries/workflows'
6767import { useReactiveConditions } from '@/hooks/use-reactive-conditions'
6868import { useSelectorDisplayName } from '@/hooks/use-selector-display-name'
69- import { isModelDeprecated } from '@/providers/models'
69+ import { getModelSunsetStatus } from '@/providers/models'
7070import { useVariablesStore } from '@/stores/variables/store'
7171import { useSubBlockStore } from '@/stores/workflows/subblock/store'
7272import { useWorkflowStore } from '@/stores/workflows/workflow/store'
@@ -132,12 +132,23 @@ function getBlockSunset(
132132 }
133133 }
134134
135- if ( typeof model === 'string' && isModelDeprecated ( model ) ) {
136- return {
137- status : 'legacy' ,
138- kind : 'model' ,
139- tooltip : `${ model } is deprecated. Click to upgrade` ,
140- prompt : `The "${ name } " block uses the deprecated model "${ model } ". Switch it to the latest equivalent model.` ,
135+ if ( typeof model === 'string' ) {
136+ const modelStatus = getModelSunsetStatus ( model )
137+ if ( modelStatus === 'deprecated' ) {
138+ return {
139+ status : 'deprecated' ,
140+ kind : 'model' ,
141+ tooltip : `${ model } is no longer available. Click to switch models` ,
142+ prompt : `The "${ name } " block uses "${ model } ", which the provider has retired — calls to it now fail. Switch it to the latest equivalent model.` ,
143+ }
144+ }
145+ if ( modelStatus === 'legacy' ) {
146+ return {
147+ status : 'legacy' ,
148+ kind : 'model' ,
149+ tooltip : `${ model } is deprecated. Click to upgrade` ,
150+ prompt : `The "${ name } " block uses the deprecated model "${ model } ". Switch it to the latest equivalent model.` ,
151+ }
141152 }
142153 }
143154
0 commit comments