* Suggest a fallback model for 3P users when the selected model is unavailable.
(model: string)
| 150 | * Suggest a fallback model for 3P users when the selected model is unavailable. |
| 151 | */ |
| 152 | function get3PFallbackSuggestion(model: string): string | undefined { |
| 153 | if (getAPIProvider() === 'firstParty') { |
| 154 | return undefined |
| 155 | } |
| 156 | const lowerModel = model.toLowerCase() |
| 157 | if (lowerModel.includes('opus-4-6') || lowerModel.includes('opus_4_6')) { |
| 158 | return getModelStrings().opus41 |
| 159 | } |
| 160 | if (lowerModel.includes('sonnet-4-6') || lowerModel.includes('sonnet_4_6')) { |
| 161 | return getModelStrings().sonnet45 |
| 162 | } |
| 163 | if (lowerModel.includes('sonnet-4-5') || lowerModel.includes('sonnet_4_5')) { |
| 164 | return getModelStrings().sonnet40 |
| 165 | } |
| 166 | return undefined |
| 167 | } |
no test coverage detected