(model: string)
| 819 | } |
| 820 | |
| 821 | export function getShortModelName(model: string): string { |
| 822 | if (autoModelNames[model]) return autoModelNames[model] |
| 823 | const canonical = resolveAlias(getCanonicalName(model)) |
| 824 | const claude = deriveClaudeShortName(canonical) |
| 825 | if (claude) return claude |
| 826 | for (const [key, name] of SORTED_SHORT_NAMES) { |
| 827 | // Match on a version boundary, not a bare prefix: an unlisted future minor |
| 828 | // (e.g. gpt-5.6) must NOT collapse into the base "gpt-5" entry — it should |
| 829 | // fall through to its raw id rather than show a wrong name/tier. |
| 830 | if (canonical === key || canonical.startsWith(key + '-')) return name |
| 831 | } |
| 832 | return canonical |
| 833 | } |
no test coverage detected