Firebase AI Logic in Angular: Client-Side Gemini Without a Custom Backend A developer published a guide showing how to call Google's Gemini models directly from an Angular browser app using Firebase AI Logic, the successor to Vertex AI in Firebase, without building a custom backend proxy. The approach relies on the modular Firebase JS SDK with Angular dependency injection, App Check attestation via reCAPTCHA Enterprise, and a Gemini Developer API backend, requiring only two new Firebase-specific files. The guide walks through Console setup, API enablement, and the first generateContent() call, with a ByteWise demo using function calling for inventory and cart operations. Since I last wrote Building AI-powered e-commerce applications using Angular & Firebase AI Logic formerly Vertex AI in Firebase https://dev.to/wayne gakuo/building-ai-powered-e-commerce-applications-using-angular-firebase-ai-logic-formerly-vertex-ai-4mdi in 2025, so much has changed that this article may look like a complete rewrite. Firebase AI Logic is the successor to Vertex AI in Firebase May 2025 . This post covers the Angular setup only. For the full rename, new APIs, and migration from firebase/vertexai , see Vertex AI in Firebase is now Firebase AI Logic — What Actually Changed https://dev.to/wayne gakuo/vertex-ai-in-firebase-is-now-firebase-ai-logic-what-actually-changed-fbb . Official Firebase docs cover each piece, but the order matters. This guide follows the sequence that actually works. We use the modular firebase JS SDK + Angular DI , so this works on Angular 18+. Most Gemini tutorials show either AI Studio + a raw API key or a custom Node/Python proxy you host and secure yourself. Firebase AI Logic sits in between: Gemini runs from your Angular app in the browser , but requests go through Firebase's managed path and not a DIY backend you maintain. What you get on web: | Benefit | Why it matters | |---|---| | No custom AI backend | Call generateContent from a service; skip building Express/Cloud Functions just to hide an API key | | App Check attestation | Proves traffic comes from your real app reCAPTCHA Enterprise in prod, debug tokens on localhost — required for production AI Logic on web | | One Firebase project | Same Console for Hosting, Auth, Firestore, Remote Config, and AI monitoring | | Gemini Developer API path | GoogleAIBackend : fast onboarding, Spark plan for prototypes, Console wizard provisions APIs for you | | Upgrade path | Switch to AgentPlatformBackend later if you need enterprise Vertex/Agent Platform features; often a one-line backend change | Good fit for web apps: When to use something else: For ByteWise, the agent reads inventory and updates the cart via function calling ; still client-side AI Logic, with business logic in Angular services. This guide stops at your first generateContent ; the ByteWise repo https://github.com/waynegakuo/bytewise goes further. Firebase Console AI Logic + App Check + API keys ↓ firebase.config.ts ← credentials firebase-ai.ts ← initializeApp + App Check + getAI providers app.config.ts ← register providers once ai.service.ts ← inject FIREBASE AI → generateContent You only create two new Firebase-specific files beyond a standard Angular app: | File | Purpose | |---|---| | src/environments/firebase.config.ts | firebaseConfig + reCAPTCHA site key | | src/app/firebase/firebase-ai.ts | Bootstrap: tokens, App Check, provideFirebaseAI | Everything else is small edits to files you already have app.config.ts , index.html , one service . ApplicationConfig style firebase = 12.19.0 npm install firebase@^12.19.0