Inspiration
We kept running into the same frustrating workflow that we'd be brainstorming in ChatGPT, realize Claude would be better for the code implementation, then need Gemini to reason through the math, and Perplexity to fact-check something. Every time we switched, we'd have to copy and paste the entire conversation for context. We were spending more time wrangling tabs than actually thinking. We thought: what if you could just switch right there in the same thread with full context and never lose your train of thought?
What it does
Switch is a multi-model AI chat app that lets you seamlessly switch between ChatGPT, Claude, Gemini, and Perplexity mid-conversation without losing context. It also has a Compare mode that sends your prompt to all four models at once so you can see their responses side by side and pick the best one. There's even a Switch Auto mode that intelligently routes your prompt to the best model such as coding goes to Claude, research to Perplexity, creative writing to GPT-4, and analysis to Gemini. Every conversation keeps a rolling memory summary and supports pinned context, so models always know what's going on.
How we built it
We built Switch with Next.js and React on the frontend, Supabase for the database, and Tailwind CSS for styling. On the backend, we created a unified provider router that normalizes requests across Anthropic, OpenAI, Google Gemini, and Perplexity. We built an intelligent context builder that assembles pinned context, rolling conversation summaries, and the last 20 messages for every request. The entire app dynamically themes itself based on the active provider and each model has its own color palette applied via CSS variables.
Challenges we ran into
Getting the context right across model switches was tricky because each provider has different quirks (Anthropic and Perplexity require strict message alternation, OpenAI outputs needed emoji stripping and newline normalization). Compare mode was challenging because we had to fire four concurrent API calls, manage individual loading/error states, and keep token budgets reasonable (we cap each model at 1024 tokens in compare mode). Building the auto-routing classifier that picks the right model for each prompt required careful prompt engineering and a reliable fallback chain.
Accomplishments that we're proud of
The model switching is truly seamless, you can start a conversation with GPT-4, switch to Claude for code, hop to Perplexity for a fact check, and it all lives in one coherent thread with full context. The Compare mode carousel with the 3D layout feels great to use. The provider-specific theming that changes the entire app's look when you switch models is a nice touch. And the auto-router that intelligently picks the best model for your query type actually works well in practice.
What we learned
No single AI model is the best at everything, they each have real strengths, and the ability to switch between them in context makes a noticeable difference in output quality. We also learned a lot about the subtle differences between provider APIs and how much normalization work is needed to make them feel consistent. Building good context management (summaries, pinned context, message history) is just as important as the model itself.
What's next for switch
Adding real-time streaming responses, user authentication with per-user conversation history, a token usage dashboard, message editing and branching, conversation export, and more models as they come out. We'd also love to add a smarter auto-router that learns from your selection patterns in Compare mode to get better at picking the right model over time.
Built With
- css
- javascript
- next.js
- react
- supabase
Log in or sign up for Devpost to join the conversation.