MCPcopy Create free account
hub / github.com/codeaashu/claude-code / getDeprecatedModelInfo

Function getDeprecatedModelInfo

src/utils/model/deprecation.ts:66–83  ·  view source on GitHub ↗

* Check if a model is deprecated and get its deprecation info

(modelId: string)

Source from the content-addressed store, hash-verified

64 * Check if a model is deprecated and get its deprecation info
65 */
66function getDeprecatedModelInfo(modelId: string): DeprecationInfo {
67 const lowercaseModelId = modelId.toLowerCase()
68 const provider = getAPIProvider()
69
70 for (const [key, value] of Object.entries(DEPRECATED_MODELS)) {
71 const retirementDate = value.retirementDates[provider]
72 if (!lowercaseModelId.includes(key) || !retirementDate) {
73 continue
74 }
75 return {
76 isDeprecated: true,
77 modelName: value.modelName,
78 retirementDate,
79 }
80 }
81
82 return { isDeprecated: false }
83}
84
85/**
86 * Get a deprecation warning message for a model, or null if not deprecated

Callers 1

Calls 2

getAPIProviderFunction · 0.85
entriesMethod · 0.80

Tested by

no test coverage detected