Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 3.8k
feat(models): sunset tiers for models mirroring blocks (legacy amber / deprecated red)#5805
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
f9fc9c3770fb4d7441030File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -66,7 +66,7 @@ import { useTablesList } from '@/hooks/queries/tables' | ||
| import { useWorkflowMap } from '@/hooks/queries/workflows' | ||
| import { useReactiveConditions } from '@/hooks/use-reactive-conditions' | ||
| import { useSelectorDisplayName } from '@/hooks/use-selector-display-name' | ||
| import { isModelDeprecated } from '@/providers/models' | ||
| import { getModelSunsetStatus } from '@/providers/models' | ||
| import { useVariablesStore } from '@/stores/variables/store' | ||
| import { useSubBlockStore } from '@/stores/workflows/subblock/store' | ||
| import { useWorkflowStore } from '@/stores/workflows/workflow/store' | ||
| @@ -132,12 +132,23 @@ function getBlockSunset( | ||
| } | ||
| } | ||
| if (typeof model === 'string' && isModelDeprecated(model)) { | ||
| return { | ||
| status: 'legacy', | ||
| kind: 'model', | ||
| tooltip: `${model} is deprecated. Click to upgrade`, | ||
| prompt: `The "${name}" block uses the deprecated model "${model}". Switch it to the latest equivalent model.`, | ||
| if (typeof model === 'string') { | ||
| const modelStatus = getModelSunsetStatus(model) | ||
| if (modelStatus === 'deprecated') { | ||
| return { | ||
| status: 'deprecated', | ||
| kind: 'model', | ||
| tooltip: `${model} is no longer available. Click to switch models`, | ||
| prompt: `The "${name}" block uses "${model}", which the provider has retired — calls to it now fail. Switch it to the latest equivalent model.`, | ||
| } | ||
| } | ||
| if (modelStatus === 'legacy') { | ||
| return { | ||
| status: 'legacy', | ||
| kind: 'model', | ||
| tooltip: `${model} is a legacy model. Click to upgrade`, | ||
| prompt: `The "${name}" block uses the legacy model "${model}". Switch it to the latest equivalent model.`, | ||
| } | ||
TheodoreSpeaks marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -453,14 +453,17 @@ function getStaticModelOptionsForVFS(): StaticModelOption[] { | ||
| for (const [providerId, def] of Object.entries(PROVIDER_DEFINITIONS)) { | ||
| if (dynamicProviders.has(providerId)) continue | ||
| for (const model of def.models) { | ||
| // Retired models are hidden from the agent's menu (mirrors the user picker) | ||
| // so it never suggests a model whose API calls fail; legacy stays available. | ||
| if (model.sunset?.status === 'deprecated') continue | ||
TheodoreSpeaks marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| const option: StaticModelOption = { | ||
| id: model.id, | ||
| provider: providerId, | ||
| hosted: hostedProviders.has(providerId), | ||
| } | ||
| if (model.recommended) option.recommended = true | ||
| if (model.speedOptimized) option.speedOptimized = true | ||
| if (model.deprecated) option.deprecated = true | ||
| if (model.sunset) option.deprecated = true | ||
TheodoreSpeaks marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| models.push(option) | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.