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

Function getPublicModelDisplayName

src/utils/model/model.ts:435–474  ·  view source on GitHub ↗
(model: ModelName)

Source from the content-addressed store, hash-verified

433 * if the model is not recognized as a public model.
434 */
435export function getPublicModelDisplayName(model: ModelName): string | null {
436 switch (model) {
437 case getModelStrings().opus47:
438 return 'Opus 4.7'
439 case getModelStrings().opus47 + '[1m]':
440 return 'Opus 4.7 (1M context)'
441 case getModelStrings().opus46:
442 return 'Opus 4.6'
443 case getModelStrings().opus46 + '[1m]':
444 return 'Opus 4.6 (1M context)'
445 case getModelStrings().opus45:
446 return 'Opus 4.5'
447 case getModelStrings().opus41:
448 return 'Opus 4.1'
449 case getModelStrings().opus40:
450 return 'Opus 4'
451 case getModelStrings().sonnet46 + '[1m]':
452 return 'Sonnet 4.6 (1M context)'
453 case getModelStrings().sonnet46:
454 return 'Sonnet 4.6'
455 case getModelStrings().sonnet45 + '[1m]':
456 return 'Sonnet 4.5 (1M context)'
457 case getModelStrings().sonnet45:
458 return 'Sonnet 4.5'
459 case getModelStrings().sonnet40:
460 return 'Sonnet 4'
461 case getModelStrings().sonnet40 + '[1m]':
462 return 'Sonnet 4 (1M context)'
463 case getModelStrings().sonnet37:
464 return 'Sonnet 3.7'
465 case getModelStrings().sonnet35:
466 return 'Sonnet 3.5'
467 case getModelStrings().haiku45:
468 return 'Haiku 4.5'
469 case getModelStrings().haiku35:
470 return 'Haiku 3.5'
471 default:
472 return null
473 }
474}
475
476function maskModelCodename(baseName: string): string {
477 // Mask only the first dash-separated segment (the codename), preserve the rest

Callers 2

renderModelNameFunction · 0.85
getPublicModelNameFunction · 0.85

Calls 1

getModelStringsFunction · 0.70

Tested by

no test coverage detected