Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/sim/app/(landing)/models/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,7 @@ const rawProviders = Object.values(PROVIDER_DEFINITIONS).map((provider) => {
providerSlug,
contextWindow: model.contextWindow ?? null,
releaseDate: model.releaseDate ?? null,
deprecated: model.deprecated ?? false,
deprecated: !!model.sunset,
Comment thread
TheodoreSpeaks marked this conversation as resolved.
pricing: model.pricing,
capabilities: mergedCapabilities,
capabilityTags,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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.`,
}
Comment thread
TheodoreSpeaks marked this conversation as resolved.
}
}

Expand Down
11 changes: 7 additions & 4 deletions apps/sim/blocks/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import type { BlockOutput, OutputFieldDefinition, SubBlockConfig } from '@/block
import {
getBaseModelProviders,
getHostedModels,
getModelSunsetStatus,
getProviderIcon,
getProviderModels,
orderModelIdsByReleaseDate,
Expand Down Expand Up @@ -74,10 +75,12 @@ export function getModelOptions() {
])
)

return allModels.map((model) => {
const icon = getProviderIcon(model)
return { label: model, id: model, ...(icon && { icon }) }
})
return allModels
.filter((model) => getModelSunsetStatus(model) !== 'deprecated')
.map((model) => {
const icon = getProviderIcon(model)
return { label: model, id: model, ...(icon && { icon }) }
})
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,9 @@ function getStaticModelOptions(): { id: string; label?: string }[] {
}
if (provider?.models) {
for (const model of provider.models) {
// Exclude retired models — the agent must not receive a model whose API
// calls fail (mirrors the user picker + VFS menu).
if (model.sunset?.status === 'deprecated') continue
models.push({ id: model.id, label: model.id })
}
}
Expand Down
5 changes: 4 additions & 1 deletion apps/sim/lib/copilot/vfs/serializers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Comment thread
TheodoreSpeaks marked this conversation as resolved.
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
Comment thread
TheodoreSpeaks marked this conversation as resolved.
models.push(option)
}
}
Expand Down
1 change: 0 additions & 1 deletion apps/sim/providers/bedrock/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export function generateToolUseId(toolName: string): string {
*/
const GEO_PROFILE_UNSUPPORTED_MODEL_IDS = new Set([
'mistral.mistral-large-3-675b-instruct',
'mistral.mistral-large-2411-v1:0',
'mistral.mistral-large-2407-v1:0',
'mistral.magistral-small-2509',
'mistral.ministral-3-14b-instruct',
Expand Down
2 changes: 1 addition & 1 deletion apps/sim/providers/models.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const DYNAMIC_PROVIDERS = new Set([
function firstDeprecatedModelId(): string | undefined {
for (const [providerId, provider] of Object.entries(PROVIDER_DEFINITIONS)) {
if (DYNAMIC_PROVIDERS.has(providerId)) continue
const dep = provider.models.find((m) => m.deprecated)
const dep = provider.models.find((m) => m.sunset)
if (dep) return dep.id
}
return undefined
Expand Down
Loading
Loading