Build1 publisher3 min readPublished
Firebase AI Logic replaces the DIY Gemini backend with a console setup sequence
The successor to Vertex AI in Firebase runs Gemini from the browser through Firebase's managed path, and the first thing it asks for is a reCAPTCHA Enterprise key, two enabled Google APIs and an App Check registration.
The Engineer · Build desk

What happened
- Firebase AI Logic is the successor to Vertex AI in Firebase, a rename the post dates to May 2025.
- Gemini runs from the browser inside the Angular app, with requests going through Firebase's managed path instead of a Node or Python proxy the team hosts and secures itself.
- The Angular guide pins the firebase JS SDK at 12.19.0 or newer, which it says is required for current Gemini and App Check behaviour.
- After the AI Logic wizard, the guide tells you to wait 5 to 10 minutes and then confirm in Google Cloud that both the Firebase AI Logic API and the Gemini API appear in the enabled-APIs table.
Compiled by The EngineerSomething wrong?How this is made
Why it matters
- cost You stop hosting a proxy and take on project configuration instead: a reCAPTCHA Enterprise key, two API enablements and a browser-key restriction list, none of which live in the repo. That state sits with whoever owns the Google Cloud project.
- constraint The reCAPTCHA key is scoped to production domains and explicitly not localhost, so a developer on a laptop runs against a different enforcement path from the one described for production.
- decision A team adopting this decides feature by feature: secrets-bearing prompts and private-corpus RAG stay on Genkit or Cloud Functions by the author's own advice.
- exposure With inference starting in the browser, abuse and billing control rests on App Check enforcement plus Console monitoring, and any high-risk action needs a server gate added behind it.
The call chain is short. `firebase.config.ts` holds the credentials. `firebase-ai.ts` calls `initializeApp`, sets up App Check and calls `getAI`, exposed as Angular providers. `app.config.ts` registers those providers once, and `ai.service.ts` injects `FIREBASE_AI` and calls `generateContent()` [13]. Two of those files are new; the rest of the change is edits to `app.config.ts`, `index.html` and one service [14], so five files are in play and three of them already exist in a standard Angular app [18].
Firebase and Google Cloud call the same API by different names. Firebase's wizard labels the second required API "Gemini Developer API"; Google Cloud lists the same thing as Gemini API, on `generativelanguage.googleapis.com`; and filtering for Gemini also surfaces Gemini for Google Cloud API, which the post says is not required for an Angular app [8]. Of the three names that turn up, two are the ones you need [19]. The post is blunt about the consequence of not checking: it says skipping the verification step is the most common cause of 403 caller-does-not-have-permission errors later [9].
App Check takes real setup work in this path. You create a reCAPTCHA Enterprise key of type Website, add production domains only and specifically not `localhost`, then paste the site key into Firebase's App Check screen for the web app [10][11]. On the APIs tab, Firebase AI Logic already shows Monitoring and Baseline Protection at `Basic - Enforced`, with Replay Protection available if you want it [11]. Then you open the browser key that matches `firebaseConfig.apiKey` in Google Cloud Credentials, where the guide notes about 25 APIs are already allowed on the project [12].
On the migration itself, this post is a pointer. It covers the Angular setup only and sends readers to a separate write-up for the rename, the new APIs and the move off `firebase/vertexai` [2]. The scale of that import-path change is not documented in this source. The author does say that since the earlier article on Vertex AI in Firebase, "so much has changed that this article may look like a complete rewrite" [21].
The managed path still leaves the server in play for some cases. The same post keeps sensitive prompts and secrets server-side with Genkit or Cloud Functions, keeps heavy RAG over private corpora server-side, and pairs App Check enforcement with Console monitoring plus server gates for high-risk actions [15]. What it puts in the browser is the latency-sensitive, tool-calling shape: multi-turn chat, shopping assistants and on-page copilots, with inference starting from the client and no extra hop through your own server [16]. In the author's ByteWise demo the agent reads inventory and updates the cart through function calling, with business logic still in Angular services [17]. The guide stops at the first `generateContent()` [20].
What to watch
- Whether the linked migration write-up documents a breaking change on the firebase/vertexai import path or only an alias and a rename.
- Whether Firebase moves the App Check floor for the AI Logic API above the Basic - Enforced baseline it now ships with.
- Whether the required firebase SDK version moves again past 12.19.0 for Gemini and App Check behaviour.