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

Function getKnownModelOption

src/utils/model/modelOptions.ts:431–459  ·  view source on GitHub ↗

* Returns a ModelOption for a known Anthropic model with a human-readable * label, and an upgrade hint if a newer version is available via the alias. * Returns null if the model is not recognized.

(model: string)

Source from the content-addressed store, hash-verified

429 * Returns null if the model is not recognized.
430 */
431function getKnownModelOption(model: string): ModelOption | null {
432 const marketingName = getMarketingNameForModel(model)
433 if (!marketingName) return null
434
435 const familyInfo = getModelFamilyInfo(model)
436 if (!familyInfo) {
437 return {
438 value: model,
439 label: marketingName,
440 description: model,
441 }
442 }
443
444 // Check if the alias currently resolves to a different (newer) version
445 if (marketingName !== familyInfo.currentVersionName) {
446 return {
447 value: model,
448 label: marketingName,
449 description: `Newer version available · select ${familyInfo.alias} for ${familyInfo.currentVersionName}`,
450 }
451 }
452
453 // Same version as the alias — just show the friendly name
454 return {
455 value: model,
456 label: marketingName,
457 description: model,
458 }
459}
460
461export function getModelOptions(fastMode = false): ModelOption[] {
462 const options = getModelOptionsBase(fastMode)

Callers 1

getModelOptionsFunction · 0.85

Calls 2

getMarketingNameForModelFunction · 0.85
getModelFamilyInfoFunction · 0.85

Tested by

no test coverage detected