MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / getKnownModelOption

Function getKnownModelOption

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

470 * Returns null if the model is not recognized.
471 */
472function getKnownModelOption(model: string): ModelOption | null {
473 const marketingName = getMarketingNameForModel(model)
474 if (!marketingName) return null
475
476 const familyInfo = getModelFamilyInfo(model)
477 if (!familyInfo) {
478 return {
479 value: model,
480 label: marketingName,
481 description: model,
482 }
483 }
484
485 // Check if the alias currently resolves to a different (newer) version
486 if (marketingName !== familyInfo.currentVersionName) {
487 return {
488 value: model,
489 label: marketingName,
490 description: `Newer version available · select ${familyInfo.alias} for ${familyInfo.currentVersionName}`,
491 }
492 }
493
494 // Same version as the alias — just show the friendly name
495 return {
496 value: model,
497 label: marketingName,
498 description: model,
499 }
500}
501
502export function getModelOptions(fastMode = false): ModelOption[] {
503 const options = getModelOptionsBase(fastMode)

Callers 1

getModelOptionsFunction · 0.85

Calls 2

getMarketingNameForModelFunction · 0.85
getModelFamilyInfoFunction · 0.85

Tested by

no test coverage detected