(
pricing: ModelCatalogItem["pricing"],
)
| 55 | * lives here rather than being re-derived per app. |
| 56 | */ |
| 57 | export function pricingEntries( |
| 58 | pricing: ModelCatalogItem["pricing"], |
| 59 | ): Array<[label: string, value: string]> { |
| 60 | return Object.entries(pricing ?? {}) |
| 61 | .filter(([key]) => key !== "currency") |
| 62 | .map(([key, value]) => [humanizePricingKey(key), value]); |
| 63 | } |
| 64 | |
| 65 | function normalizeModel(model: ModelInfo): ModelCatalogItem | null { |
| 66 | const id = model.id ?? model.name; |
no test coverage detected