(model: ModelName)
| 483 | } |
| 484 | |
| 485 | export function renderModelName(model: ModelName): string { |
| 486 | const publicName = getPublicModelDisplayName(model) |
| 487 | if (publicName) { |
| 488 | return publicName |
| 489 | } |
| 490 | if (process.env.USER_TYPE === 'ant') { |
| 491 | const resolved = parseUserSpecifiedModel(model) |
| 492 | const antModel = resolveAntModel(model) |
| 493 | if (antModel) { |
| 494 | const baseName = antModel.model.replace(/\[1m\]$/i, '') |
| 495 | const masked = maskModelCodename(baseName) |
| 496 | const suffix = has1mContext(resolved) ? '[1m]' : '' |
| 497 | return masked + suffix |
| 498 | } |
| 499 | if (resolved !== model) { |
| 500 | return `${model} (${resolved})` |
| 501 | } |
| 502 | return resolved |
| 503 | } |
| 504 | return model |
| 505 | } |
| 506 | |
| 507 | /** |
| 508 | * Returns a safe author name for public display (e.g., in git commit trailers). |
no test coverage detected