(model: ModelName)
| 506 | } |
| 507 | |
| 508 | export 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). |
no test coverage detected