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

Function renderModelName

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

Source from the content-addressed store, hash-verified

506}
507
508export function renderModelName(model: ModelName): string {
509 const publicName = getPublicModelDisplayName(model)
510 if (publicName) {
511 return publicName
512 }
513 if (isInternalBuild()) {
514 const resolved = parseUserSpecifiedModel(model)
515 const antModel = resolveAntModel(model)
516 if (antModel) {
517 const baseName = antModel.model.replace(/\[1m\]$/i, '')
518 const masked = maskModelCodename(baseName)
519 const suffix = has1mContext(resolved) ? '[1m]' : ''
520 return masked + suffix
521 }
522 if (resolved !== model) {
523 return `${model} (${resolved})`
524 }
525 return resolved
526 }
527 return model
528}
529
530/**
531 * Returns a safe author name for public display (e.g., in git commit trailers).

Callers 15

queryLoopFunction · 0.85
renderToolUseTagFunction · 0.85
BuiltInStatusLineContentFunction · 0.85
OverviewTabFunction · 0.85
ModelEntryFunction · 0.85
generateTokenChartFunction · 0.85
renderOverviewToAnsiFunction · 0.85
renderModelsToAnsiFunction · 0.85
AdvisorMessageFunction · 0.85
renderModelSettingFunction · 0.85

Calls 6

isInternalBuildFunction · 0.85
parseUserSpecifiedModelFunction · 0.85
resolveAntModelFunction · 0.85
maskModelCodenameFunction · 0.85
has1mContextFunction · 0.85

Tested by

no test coverage detected