ValyroUI Русская версия

Model Comparison

Side-by-side answers from several models. Pro · AI chat and agents › Prompts and models

Two to four models answering the same prompt side by side: streaming answers, latency, speed, tokens and cost, a "prefer this" vote, synced scrolling, and tabs on narrow screens.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add model-comparison
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ModelComparison } from 'valyro-ui-pro';

Props

PropTypeDefault
responses *ModelComparisonResponse[]Two to four responses to the same prompt.
promptReactNodeThe prompt, shown above the columns.
preferredstring | nullId of the response the user preferred.
defaultPreferredstring | nullnullInitial preferred when uncontrolled.
onPreferredChange(id: string | null) => voidCalled with the new preferred when it changes.
syncScrollbooleantrueScroll all columns together. Default true.
layout'auto' | 'columns' | 'tabs''auto'auto shows columns when each gets at least 220px, tabs otherwise.
maxHeightnumber | string420Height of each answer before it scrolls.
currencystring'USD'ISO 4217 code for cost.
renderCitation(index: number) => ReactNodeTurns [1] markers into nodes such as Citation chips.
localestringBCP 47 locale for numbers; defaults to the ThemeProvider's.
labelsPartial<ModelComparisonLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

Previous: Model Selector · Next: Prompt Library · All AI chat and agents