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

Function buildModelSummary

apps/sim/app/(landing)/models/utils.ts:423–440  ·  view source on GitHub ↗
(
  providerName: string,
  displayName: string,
  pricing: PricingInfo,
  contextWindow: number | null,
  capabilityTags: string[]
)

Source from the content-addressed store, hash-verified

421}
422
423function buildModelSummary(
424 providerName: string,
425 displayName: string,
426 pricing: PricingInfo,
427 contextWindow: number | null,
428 capabilityTags: string[]
429): string {
430 const parts = [
431 `${displayName} is a ${providerName} model tracked in Sim.`,
432 contextWindow ? `It supports a ${formatTokenCount(contextWindow)} token context window.` : null,
433 `Pricing starts at ${formatPrice(pricing.input)}/1M input tokens and ${formatPrice(pricing.output)}/1M output tokens.`,
434 capabilityTags.length > 0
435 ? `Key capabilities include ${capabilityTags.slice(0, 3).join(', ')}.`
436 : null,
437 ]
438
439 return parts.filter(Boolean).join(' ')
440}
441
442function computeModelRelevanceScore(model: CatalogModel): number {
443 return (

Callers 1

utils.tsFile · 0.85

Calls 3

formatPriceFunction · 0.85
joinMethod · 0.80
formatTokenCountFunction · 0.70

Tested by

no test coverage detected