import { useState } from "react"; import { MODEL_CATALOG, type ModelEntry } from "./modelCatalogData"; function formatPricing(input: number, output: number): string { return `$${input.toFixed(2)} / $${output.toFixed(2)}`; } function hfUrl(modelId: string): string { return `https://huggingface.co/${modelId}`; } function ModelRow({ model }: { model: ModelEntry }) { const [expanded, setExpanded] = useState(false); return ( <> setExpanded((prev) => !prev)} aria-expanded={expanded} > e.stopPropagation()} > {model.id} {model.contextLength} {formatPricing(model.inputPricePerMillion, model.outputPricePerMillion)} per 1M tokens {model.country} {expanded && ( {model.details} )} ); } export function ModelCatalog() { return (
{MODEL_CATALOG.map((model) => ( ))}
Model ID Context Length Pricing Country of Origin

Click a row to expand details. Pricing is input / output per million tokens. See{" "} Billing {" "} for live rates.

); }