(raw: string)
| 148 | }; |
| 149 | |
| 150 | function normalizeDisplayName(raw: string): string { |
| 151 | // Strip " Input Tokens" / " Output Tokens" suffix and lowercase |
| 152 | return raw |
| 153 | .replace(/\s+(input|output)\s+tokens$/i, "") |
| 154 | .trim() |
| 155 | .toLowerCase(); |
| 156 | } |
| 157 | |
| 158 | function buildPricingMap(entries: z.infer<typeof PricingEntry>[]): Map<string, ModelPricing> { |
| 159 | const map = new Map<string, ModelPricing>(); |