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

Function renderModelName

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

Source from the content-addressed store, hash-verified

429}
430
431export function renderModelName(model: ModelName): string {
432 const publicName = getPublicModelDisplayName(model)
433 if (publicName) {
434 return publicName
435 }
436 if (process.env.USER_TYPE === 'ant') {
437 const resolved = parseUserSpecifiedModel(model)
438 const antModel = resolveAntModel(model)
439 if (antModel) {
440 const baseName = antModel.model.replace(/\[1m\]$/i, '')
441 const masked = maskModelCodename(baseName)
442 const suffix = has1mContext(resolved) ? '[1m]' : ''
443 return masked + suffix
444 }
445 if (resolved !== model) {
446 return `${model} (${resolved})`
447 }
448 return resolved
449 }
450 return model
451}
452
453/**
454 * Returns a safe author name for public display (e.g., in git commit trailers).

Callers 13

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

Calls 5

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

Tested by

no test coverage detected