Next.js + Bun + TypeScript app to compare two LLMs side by side using AI SDK v5 and OpenRouter.
- Create
.env.local:
OPENROUTER_API_KEY=your_key
APP_URL=http://localhost:3000
APP_NAME=LLM Arena
- Install deps:
bun install
- Run dev:
bun run dev
Open http://localhost:3000.
- Model list is fetched from
/api/models(server proxies OpenRouter). - Chats stream via
/api/chatusing the selectedmodelId.