You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the report, and thanks @gui-complypro for the note about preview models.
To answer the question in the issue: yes, GoogleAIBackend selects the Gemini Developer API.
In the Firebase JS SDK both backends send their requests to the firebasevertexai.googleapis.com host, and the backend only changes the path.
The Gemini Developer API path is projects/{project}/models/{model}, which is the path in your error. The Vertex AI path adds a locations/{location} segment.
AngularFire passes your getAI options to the SDK unchanged, so the backend you asked for is the one in effect.
That makes the 403 a project setting rather than a backend mix-up. Firebase's AI Logic error-codes page lists this exact message, "Requests to this API firebasevertexai.googleapis.com ... are blocked", under API key restrictions:
The API key in your app's Firebase config excludes the Firebase AI Logic API.
The fix is in the Google Cloud console under APIs & Services, Credentials: add the Firebase AI Logic API to that key's API restrictions. It can take a few minutes to apply.
The Gemini Developer API does not need Vertex AI and runs on the Spark plan. Preview models such as gemini-3-pro-preview need the Blaze plan, whichever provider you use.
I'm closing this since there is nothing for AngularFire to change here. If fixing the key restriction does not clear the 403, please open a new issue with the request URL and the key settings, and I'll take another look.
Activity
JGSolutions commentedon Dec 12, 2025
here is the js 403 error I get:
https://firebasevertexai.googleapis.com/v1beta/projects/board-games-315b9/models/gemini-3-pro-preview:streamGenerateContent?alt=sse: [403 ] Requests to this API firebasevertexai.googleapis.com method google.firebase.vertexai.v1beta.GenerativeService.StreamGenerateContent are blocked.
I know I have to enable the vertex i don't want to. I want to use the Gemini
gui-complypro commentedon Dec 18, 2025
Preview models are only available in the global region.
fix(schematics): point the ng add AI feature at @angular/fire/ai (#3685)
feat(schematics): rewrite Vertex AI imports to AI Logic on ng update (#…
KingDarBoja commentedon Oct 27, 2026
This should be fixed already with latest AngularFire version (v21).
armando-navarro commentedon Nov 5, 2026
Thanks for the report, and thanks @gui-complypro for the note about preview models.
To answer the question in the issue: yes,
GoogleAIBackendselects the Gemini Developer API.firebasevertexai.googleapis.comhost, and the backend only changes the path.projects/{project}/models/{model}, which is the path in your error. The Vertex AI path adds alocations/{location}segment.getAIoptions to the SDK unchanged, so the backend you asked for is the one in effect.That makes the 403 a project setting rather than a backend mix-up. Firebase's AI Logic error-codes page lists this exact message, "Requests to this API firebasevertexai.googleapis.com ... are blocked", under API key restrictions:
gemini-3-pro-previewneed the Blaze plan, whichever provider you use.AngularFire 21.0.0 ships
@angular/fire/aiwithprovideAI,getAIand both backends, and the AI Logic guide covers the setup: https://github.com/angular/angularfire/blob/21.0.x/docs/ai.mdI'm closing this since there is nothing for AngularFire to change here. If fixing the key restriction does not clear the 403, please open a new issue with the request URL and the key settings, and I'll take another look.