MCPcopy Index your code
hub / github.com/codeaashu/claude-code / get3PFallbackSuggestion

Function get3PFallbackSuggestion

src/utils/model/validateModel.ts:144–159  ·  view source on GitHub ↗

* Suggest a fallback model for 3P users when the selected model is unavailable.

(model: string)

Source from the content-addressed store, hash-verified

142 * Suggest a fallback model for 3P users when the selected model is unavailable.
143 */
144function 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

Callers 1

handleValidationErrorFunction · 0.85

Calls 2

getAPIProviderFunction · 0.85
getModelStringsFunction · 0.70

Tested by

no test coverage detected