Skip to content

ModelViz is a project demonstrating AI model comparison capabilities. It allows users to test and compare various AI models including OpenAI's GPT, Anthropic's Claude, Google Gemini, and Perplexity Sonar models with real-time performance metrics and beautiful visualisations.

License

Notifications You must be signed in to change notification settings

ThomasJButler/ModelViz

Repository files navigation

ModelViz

Interactive analytics platform for comparing AI models across multiple providers with real-time performance metrics, cost analysis, and 3D visualisations.

What It Does

Compare OpenAI, Anthropic, Google (Gemini), and Perplexity models side by side. Test prompts across multiple models simultaneously, track usage metrics, analyse costs, and visualise API performance with an immersive cyberpunk-themed interface.

image

Installation

git clone https://github.com/ThomasJButler/modelviz.git
cd modelviz
npm install
npm run dev

Open http://localhost:3000.

API Key Configuration

API keys are configured in the Settings page (stored securely in browser localStorage):

Provider Key Format Models
OpenAI sk-... GPT-4o, GPT-4 Turbo, GPT-3.5, o1
Anthropic sk-ant-... Claude 3.5 Sonnet, Claude 3 Opus/Haiku
Google AIza... Gemini 2.0 Flash, Gemini 1.5 Pro/Flash
Perplexity pplx-... Sonar models

Demo mode available without API keys for testing the interface.

Tech Stack

Category Technologies
Framework Next.js 16 (App Router, Turbopack), React 19
Language TypeScript (strict mode)
Styling Tailwind CSS, Framer Motion 12
3D Graphics @react-three/fiber, @react-three/drei
Charts Recharts
UI Radix UI, shadcn/ui
Editor Monaco Editor
Storage LocalStorage, IndexedDB (90-day retention)

Key Pages

Page Description
Playground Test AI models with text, JSON, or code input
Dashboard Real-time API analytics with multiple views
Analytics Advanced insights and predictive analytics
Settings API key management with import/export

Project Structure

ModelViz/
├── app/                    # Next.js app router pages
│   ├── playground/        # AI playground with 3D visualisations
│   ├── dashboard/         # Real-time API analytics
│   ├── analytics/         # Advanced insights
│   └── settings/          # API configuration
├── components/            # React components
│   ├── 3d/               # 3D visualisation components
│   ├── effects/          # Cyberpunk visual effects
│   └── ui/               # UI primitives
├── lib/                   # Core business logic
│   ├── api/              # API clients (OpenAI, Anthropic, Google, Perplexity)
│   ├── services/         # MetricsService, ComparisonService
│   └── utils/            # Cost calculator, utilities
└── __tests__/            # Test files

Development

# Run development server
npm run dev

# Run tests
npm test

# Build for production
npm run build

# Type check
npm run lint

Deployment

Optimised for Vercel deployment. Includes:

  • Turbopack for fast development
  • Bundle splitting for optimal loading
  • Edge-compatible API routes

License

MIT - see LICENSE

Author

Thomas Butler thomasjbutler.me | GitHub

About

ModelViz is a project demonstrating AI model comparison capabilities. It allows users to test and compare various AI models including OpenAI's GPT, Anthropic's Claude, Google Gemini, and Perplexity Sonar models with real-time performance metrics and beautiful visualisations.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •