No bindings for Firebase AI Logic
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 38/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- firebase, react, typescript
Research direction
Start with the provider, hook, and initializer declarations in src/sdk.tsx, then compare the ReactFire recipe demo from #798 with its plain Firebase AI Logic usage. Review the existing FirebaseAppProvider references and the @firebase/ai surface described in the issue. Done means a reviewed binding for the stable generateContent, generateContentStream, and ChatSession cases, while leaving LiveSession and startAudioConversation out of scope.
Written by the indexing model from the issue text.
Description
ReactFire ships a provider and hook set for nine Firebase products and none for Firebase AI Logic (@firebase/ai). An app that uses it initializes it by hand, outside the FirebaseAppProvider tree the rest of the app runs through.
src/sdk.tsx declares AppCheckProvider, AuthProvider, AnalyticsProvider, DatabaseProvider, FirestoreProvider, FunctionsProvider, PerformanceProvider, StorageProvider and RemoteConfigProvider, each with a matching useX and useInitX. A search of src/ for getAI, firebase/ai or @firebase/ai returns nothing (control: FirebaseAppProvider appears in two files, so the search can return hits).
Why this surface wants hooks more than most
AI Logic is stream and session shaped, which is exactly the async state a hook is good at and the raw SDK leaves to the caller:
generateContentStreamreturns an async iterable plus an aggregated response promise. Consuming it in React means accumulating tokens into state, and cancelling the in-flight request when the component unmounts. Neither has an obvious idiom today.ChatSession.sendMessage/sendMessageStreamhold conversation history that is naturally component state, currently kept by hand alongside the session object.- One-shot
generateContentis the trivial case and falls out of the same binding.
What it looks like in practice
Both demo apps in this repository hit it. In the ReactFire recipe demo (#798) the AI page is byte-identical to the plain SDK version, because there is no binding to differ: the page calls the SDK directly, taking the FirebaseApp from useFirebaseApp(). That is a fair outcome rather than a bug, but it is the only page in the comparison where ReactFire has nothing to offer, and a reader notices that the app reaches around the provider tree for one product and through it for the others.
Scope
Out of scope for now: LiveSession and startAudioConversation, which are Public Preview. The connect and teardown lifecycle there is a strong hook candidate and worth revisiting once the API is stable, but filing against a preview surface is premature.
Notes
No existing issue covers this: searches for "AI Logic", "gemini", "vertex" and "genai" in issue titles return nothing across open and closed, with a control search returning results.
Filed at @jhuleatt's request from the 2026-08-24 sync: file AI Logic features that ReactFire does not support as issues so they can be reviewed and prioritized.
- Dominant language
- TypeScript
- Stars
- 3.6k
- Forks
- 403
- Avg merge
- 5d 1h
- Merged PRs (30d)
- 10
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FirebaseExtended/reactfire
-
v5
Difficulty 4/5 3-5 days Newbie friendliness 48/100
FirebaseExtended/reactfire#793 ·
-
v5
Difficulty 4/5 3-5 days Newbie friendliness 35/100
FirebaseExtended/reactfire#790 · 2 comments ·
-
v5
Difficulty 4/5 3-5 days Newbie friendliness 55/100
FirebaseExtended/reactfire#789 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
FirebaseExtended/reactfire#788 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
FirebaseExtended/reactfire#784 ·
All issues in FirebaseExtended/reactfire
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
melgarafael/DeskcommCRM#1812 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
prisma/prisma-cli#309 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gregwebs/pi-quota-dispatcher#26 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
openwatersio/slackwater.xyz#124 ·
Maintainers usually reply within 1 day
-
agent-reported area/browser area/docs documentation good first issue hacktoberfest help wanted P2
Difficulty 1/5 Under an hour Newbie friendliness 90/100
Maintainers usually reply within 2 days