[firebase_ai] Support for Gemini API Key in firebase_ai
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- dart, firebase
- Domain
- ai, mobile-dev
Research direction
Start by reviewing the firebase_ai migration from google_generative_ai and how requests currently use Firebase as a proxy. Determine whether custom API keys, a maintained legacy package, or limitation documentation is the appropriate supported direction; done means one approach is selected and its compatibility and usage implications are documented.
Written by the indexing model from the issue text.
Description
Description:
With the recent migration from google_generative_ai to firebase_ai, we’ve encountered a significant limitation: it is no longer possible to set a custom Gemini API key.
In google_generative_ai, developers could allow end users to input their own Gemini API key. This is essential for applications that:
- Are designed to be self-hosted or run without a dedicated backend.
- Let users manage their own token usage and quotas.
- Require flexibility in using personal Google Cloud accounts.
However, firebase_ai acts as a proxy between the app and Gemini, abstracting away the API key and centralizing access through Firebase. This makes it impossible for the end user to configure their own key, breaking this usage pattern.
Problem:
google_generative_aihas been officially deprecated.firebase_aidoes not allow setting a custom API key.- There is currently no official Google-maintained alternative that supports this use case.
Request:
We propose one of the following solutions:
- Add optional support for setting a custom Gemini API key in
firebase_ai, bypassing the Firebase proxy when detected. - Maintain a minimal legacy version of
google_generative_aito support this use case. - Clearly document this limitation and suggest viable alternatives for developers who rely on this pattern.
Justification:
This change would allow developers to continue building flexible, decentralized applications without being forced to rely solely on Firebase infrastructure, and without breaking compatibility with existing workflows.
- Dominant language
- Dart
- Stars
- 9.3k
- Forks
- 4.1k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 78
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
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 firebase/flutterfire
-
🚀 [firebase_core] Bump Firebase C++ SDK (14.1.0 → 14.2.0)Possibly taken @SelaseKay claimed this today. OpenNeeds Attention type: enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
firebase/flutterfire#18977 · 1 comment ·
Maintainers usually reply within 1 day
-
[firebase_core_web]: Firebase.initializeApp never completes when a Firebase JS SDK script fails to loadPossibly taken @LasseLegarth claimed this 5 days ago. OpenNeeds Attention platform: web plugin: core reproduced type: bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
firebase/flutterfire#18964 · 1 comment ·
Maintainers usually reply within 1 day
-
Needs Attention platform: android plugin: crashlytics type: enhancement
Difficulty 4/5 3-5 days Newbie friendliness 48/100
firebase/flutterfire#18951 · 2 comments ·
Maintainers usually reply within 1 day
-
blocked: external dependency platform: web plugin: ai type: bug
Difficulty 4/5 3-5 days Newbie friendliness 48/100
firebase/flutterfire#18938 · 2 comments ·
Maintainers usually reply within 1 day
-
[cloud_firestore][Windows] Invalid field names (empty or `__x__`) close the app instead of throwing a FirebaseExceptionPossibly taken @SelaseKay claimed this 6 days ago. OpenNeeds Attention platform: windows plugin: cloud_firestore reproduced type: bug type: crash
Difficulty 4/5 3-5 days Newbie friendliness 52/100
firebase/flutterfire#18928 · 1 comment ·
Maintainers usually reply within 1 day
All issues in firebase/flutterfire
Similar issues
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
StabilityNexus/Zplit#77 · 1 comment ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
-
agent: is checked on a wrapper holding several checkables answers from the first one in tree orderOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
AlphaWaveSystems/flutter-probe#865 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
ubuntu/app-center#2306 ·
Maintainers usually reply within 1 day