(providerId: string, modelId: string)
| 328 | } |
| 329 | |
| 330 | function formatModelDisplayName(providerId: string, modelId: string): string { |
| 331 | const shortId = stripProviderPrefix(providerId, modelId) |
| 332 | const normalized = stripTechnicalSuffixes(shortId) |
| 333 | const tokens = mergeVersionTokens(tokenizeModelName(normalized)) |
| 334 | |
| 335 | const displayName = tokens |
| 336 | .map(formatModelToken) |
| 337 | .join(' ') |
| 338 | .split(/\s+/) |
| 339 | .filter( |
| 340 | (word, index, words) => index === 0 || word.toLowerCase() !== words[index - 1].toLowerCase() |
| 341 | ) |
| 342 | .join(' ') |
| 343 | |
| 344 | return displayName.replace(/^GPT (\d[\w.]*)/i, 'GPT-$1').replace(/\bGpt\b/g, 'GPT') |
| 345 | } |
| 346 | |
| 347 | function buildCapabilityTags(capabilities: ModelCapabilities): string[] { |
| 348 | const tags: string[] = [] |
no test coverage detected