MCPcopy Create free account
hub / github.com/Noumena-Network/code / getKnownModelOption

Function getKnownModelOption

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

506 * Returns null if the model is not recognized.
507 */
508function getKnownModelOption(model: string): ModelOption | null {
509 const marketingName = getMarketingNameForModel(model)
510 if (!marketingName) return null
511
512 const familyInfo = getModelFamilyInfo(model)
513 if (!familyInfo) {
514 return {
515 value: model,
516 label: marketingName,
517 description: model,
518 }
519 }
520
521 // Check if the alias currently resolves to a different (newer) version
522 if (marketingName !== familyInfo.currentVersionName) {
523 return {
524 value: model,
525 label: marketingName,
526 description: `Newer version available · select ${familyInfo.alias} for ${familyInfo.currentVersionName}`,
527 }
528 }
529
530 // Same version as the alias — just show the friendly name
531 return {
532 value: model,
533 label: marketingName,
534 description: model,
535 }
536}
537
538export function getModelOptions(fastMode = false): ModelOption[] {
539 const options = getModelOptionsBase(fastMode)

Callers 1

getModelOptionsFunction · 0.85

Calls 2

getMarketingNameForModelFunction · 0.85
getModelFamilyInfoFunction · 0.85

Tested by

no test coverage detected