How I built a switchable AI provider system in Next.js (Gemini GPT-4 Claude, one workspace setting)
I had Gemini hardcoded into every AI function in my codebase. Then a beta user told me her clients have data policies about Google. I rebuilt the whole AI layer in two days.