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