MCPcopy Create free account
hub / github.com/simstudioai/sim / formatModelDisplayName

Function formatModelDisplayName

apps/sim/app/(landing)/models/utils.ts:330–345  ·  view source on GitHub ↗
(providerId: string, modelId: string)

Source from the content-addressed store, hash-verified

328}
329
330function 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
347function buildCapabilityTags(capabilities: ModelCapabilities): string[] {
348 const tags: string[] = []

Callers 1

utils.tsFile · 0.85

Calls 6

stripProviderPrefixFunction · 0.85
stripTechnicalSuffixesFunction · 0.85
mergeVersionTokensFunction · 0.85
tokenizeModelNameFunction · 0.85
joinMethod · 0.80
replaceMethod · 0.65

Tested by

no test coverage detected