(model: ModelName)
| 429 | } |
| 430 | |
| 431 | export 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). |
no test coverage detected