
An AI chatbot platform supporting multiple providers (OpenAI, Gemini, Anthropic) with retrieval-augmented generation backed by a Postgres + pgvector store. Built with Next.js 15 and NextAuth.js for authentication, Tailwind CSS with shadcn/ui for the interface, and React Query for data fetching.
A chat API needs one reliable response even when a single AI provider is down, rate-limited, or slow. Solved with an automatic fallback chain (Gemini → Groq → OpenRouter) that tracks per-provider cooldowns, so a failing provider is skipped instantly on the next request instead of retried.