MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / getKnownModelOption

Function getKnownModelOption

source code/utils/model/modelOptions.ts:433–461  ·  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

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

Callers 1

getModelOptionsFunction · 0.85

Calls 2

getMarketingNameForModelFunction · 0.85
getModelFamilyInfoFunction · 0.85

Tested by

no test coverage detected