( providerName: string, displayName: string, pricing: PricingInfo, contextWindow: number | null, capabilityTags: string[] )
| 421 | } |
| 422 | |
| 423 | function 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 | |
| 442 | function computeModelRelevanceScore(model: CatalogModel): number { |
| 443 | return ( |
no test coverage detected