StealThis .dev

Model Comparison Panel

Send one prompt to two or three simulated language models at once and watch their answers stream side by side. Each column carries live badges for latency, token count and estimated cost, a pick-winner vote control, and a synced-scroll toggle so long completions line up as you read. Includes model swap menus, a regenerate action, and a running tally of which model you crowned most often across rounds.

Open in Lab
vanilla-js css
Targets: JS HTML

Code

The Model Comparison Panel is an evaluation surface for putting language models head to head. Type a single prompt, hit Compare, and each model column streams its own answer token by token while a status pill counts up latency in real time. When a column finishes it settles into badges showing total latency, tokens produced, and an estimated cost derived from a per-model price, so you can weigh quality against speed and spend at a glance.

Every column exposes a model picker so you can swap between a curated roster of frontier and small models, a Pick winner button that records your vote and updates a persistent scoreboard, and a per-column regenerate control. A global Sync scroll toggle links the answer bodies together — scrolling one drives the others proportionally, which is invaluable when comparing two long completions line by line. Prompt suggestions, a clear-all reset, and a live token/cost roll-up round out the workflow.

Under the hood the streaming is simulated with requestAnimationFrame-driven chunk scheduling and performance.now() for accurate elapsed timing, while the synced scrolling demonstrates coordinated scroll event handling with a re-entrancy guard to avoid feedback loops. Everything is vanilla JavaScript and CSS with no dependencies, keyboard-operable controls, ARIA live regions for the streaming answers, and a responsive layout that collapses the columns into a single scrollable stack below 520px.