Launch priceOne payment

Model Comparison

The same prompt run on several models, each in its own column with its own status: streaming, finished or failed with Retry. Time, tokens and cost appear when reported, the fastest and cheapest are marked among those that reported, and a warning appears when the models ran with different settings. Pick one with Use this, rate and copy.

Ready for AI tools one file typed props installs by name prompt included

The decision inside it

Missing numbers are not zeros

A self-hosted model with no price says "Not reported", never $0.00, and it cannot win Cheapest. A comparison is only fair when like is compared with like, so different settings are flagged.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Layro's Model Comparison for this.
Install it: npx shadcn@latest add @layro/model-comparison
Import it from @/components/ui/model-comparison.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Pro components install through the @layro registry with your CLI token: see the Namespaced tab.

API

“Copy prompt” above puts a full brief on your clipboard — install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

PropTypeNotes
promptrequiredReact.ReactNodeThe prompt every model was given.
resultsrequiredModelComparisonResult[]—
onRunModel(result: ModelComparisonResult) => void | Promise<void>Adds Retry to failed columns and "Run again" to finished ones. May return a promise.
selectedIdstring | nullThe chosen answer. Controlled.
onSelectResult(result: ModelComparisonResult | null) => void—
onCopyResult(result: ModelComparisonResult) => void—
onRateResult(result: ModelComparisonResult, rating: "up" | "down") => voidAdds thumbs up and down.
ratingsRecord<string, "up" | "down">Ratings to show, by result id.
clampLinesnumberLines of output before "Show all". Default 8.

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Layro foundations, installed alongside it

layro-themebadgebuttonstate

Lifetime access

Every component, and everything we ship next.

  • All 112 components, source included
  • The template, and everything released after you buy
  • shadcn CLI or download — React 18/19, Tailwind v4
  • One payment. No subscription.

More in RAG & Evals

All RAG & Evals components