( modelId: string | null, )
| 86 | * Get a deprecation warning message for a model, or null if not deprecated |
| 87 | */ |
| 88 | export function getModelDeprecationWarning( |
| 89 | modelId: string | null, |
| 90 | ): string | null { |
| 91 | if (!modelId) { |
| 92 | return null |
| 93 | } |
| 94 | |
| 95 | const info = getDeprecatedModelInfo(modelId) |
| 96 | if (!info.isDeprecated) { |
| 97 | return null |
| 98 | } |
| 99 | |
| 100 | return `⚠ ${info.modelName} will be retired on ${info.retirementDate}. Consider switching to a newer model.` |
| 101 | } |
| 102 |
no test coverage detected