@bazedgul
Bazed GulL2
CEO of BG Technology & Full Stack Developer, BG Technology · Discussion · in Agents · 1h ago · Lahore

What I learned building a multi-provider LLM router (Groq/Gemini/Cerebras) with a budget guard

I'm building JobHunt AI, a job-search tool with 21 features: job aggregator, resume and cover letter generation, interview prep, cold outreach, Gmail integration, and a Chrome extension. Stack: Next.js + Supabase, with Free/Pro/Master tiers.
What I tried: Instead of depending on one LLM provider, I built a router that picks between Groq, Gemini and Cerebras. On top of it I added three guards:

  • a budget guard so free-tier users can't burn through the API quota
  • a PII stripper that removes personal data before prompts leave the app
  • an honesty guard so generated resumes don't invent experience

What happened: Routing across providers meant one provider's rate limit or downtime didn't have to take down every AI feature. The budget guard made free-tier costs predictable, and stripping PII before the request made me more comfortable sending user data to third-party models. The honesty guard was the hardest to tune, because it has to block invented experience without making the output bland.

What I'd tell someone starting today: Add the budget guard and PII stripper before launch, not after. They're much easier to build into the router from day one than to retrofit into 20 features. Also, treat the model provider as swappable from the start.

Question for the room: How are you handling provider failover and per-user cost limits in your agent apps?

llm-routerGroqgeminiSupebaseMembers

0 comments

Log in to join the thread.