An AI chat app that utilizes advanced LLM model routing powered by Not Diamond.
Includes an "Arena mode" where you can dynamically improve your model router.
See the latest demo here.
If you find AI Router Chat useful, please consider sponsoring us to support my open-source work :)
Get a Not Diamond API key from Not Diamond.
You'll also need API keys from each LLM provider (OpenAI, Anthropic, Groq, Perplexity, Google) that you'd like to use.
1. Clone Repo
git clone https://github.com/mckaywrigley/ai-router-chat.git
2. Provide API Keys
Create a .env file in the root of the repo with these values:
cp .env.example .env
DATABASE_URL=
NOT_DIAMOND_API_KEY=
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GOOGLE_GENERATIVE_AI_API_KEY=
GROQ_API_KEY=
PERPLEXITY_API_KEY=
3. Install Dependencies
npm i
4. Setup DB
Set up a new project on Supabase.
Copy the connection string (DB URL) from the Supabase output, and paste it into the above .env file.
Once you have the DB URL, run the following command to create the database and tables:
npm run migrate
5. Run App
npm run dev
Deploy to Vercel in 1 click: