(model: ModelName)
| 415 | } |
| 416 | |
| 417 | export function renderModelName(model: ModelName): string { |
| 418 | const publicName = getPublicModelDisplayName(model) |
| 419 | if (publicName) { |
| 420 | return publicName |
| 421 | } |
| 422 | if (process.env.USER_TYPE === 'ant') { |
| 423 | const resolved = parseUserSpecifiedModel(model) |
| 424 | const antModel = resolveAntModel(model) |
| 425 | if (antModel) { |
| 426 | const baseName = antModel.model.replace(/\[1m\]$/i, '') |
| 427 | const masked = maskModelCodename(baseName) |
| 428 | const suffix = has1mContext(resolved) ? '[1m]' : '' |
| 429 | return masked + suffix |
| 430 | } |
| 431 | if (resolved !== model) { |
| 432 | return `${model} (${resolved})` |
| 433 | } |
| 434 | return resolved |
| 435 | } |
| 436 | return model |
| 437 | } |
| 438 | |
| 439 | /** |
| 440 | * Returns a safe author name for public display (e.g., in git commit trailers). |
no test coverage detected