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

Function getKnownModelOption

src/utils/model/modelOptions.ts:525–553  ·  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

523 * Returns null if the model is not recognized.
524 */
525function getKnownModelOption(model: string): ModelOption | null {
526 const marketingName = getMarketingNameForModel(model)
527 if (!marketingName) return null
528
529 const familyInfo = getModelFamilyInfo(model)
530 if (!familyInfo) {
531 return {
532 value: model,
533 label: marketingName,
534 description: model,
535 }
536 }
537
538 // Check if the alias currently resolves to a different (newer) version
539 if (marketingName !== familyInfo.currentVersionName) {
540 return {
541 value: model,
542 label: marketingName,
543 description: `Newer version available · select ${familyInfo.alias} for ${familyInfo.currentVersionName}`,
544 }
545 }
546
547 // Same version as the alias — just show the friendly name
548 return {
549 value: model,
550 label: marketingName,
551 description: model,
552 }
553}
554
555export function getModelOptions(fastMode = false): ModelOption[] {
556 const options = getModelOptionsBase(fastMode)

Callers 1

getModelOptionsFunction · 0.85

Calls 2

getMarketingNameForModelFunction · 0.85
getModelFamilyInfoFunction · 0.85

Tested by

no test coverage detected