Skip to content

Refactor: Replace Gemini and Vertex SDKs with firebase_ai #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

domesticmouse
Copy link
Contributor

I switched the underlying AI provider implementations from separate google_generative_ai and firebase_vertexai packages to the unified firebase_ai package.

Key changes:

  • Updated pubspec.yaml dependencies to include firebase_ai and remove old SDKs.
  • Removed GeminiProvider and VertexProvider.
  • Introduced FirebaseAIProvider implementing LlmProvider using firebase_ai.
  • Updated example applications (gemini.dart and vertex.dart) to use the new FirebaseAIProvider.

Note: I encountered some environment issues while trying to verify the example app, so I recommend you manually check that the example app is working as expected.

Replace this paragraph with a description of what this PR is changing or adding, and why. Consider including before/after screenshots.

List which issues are fixed by this PR. You must list at least one issue.

If you had to change anything in the flutter/tests repo, include a link to the migration guide as per the breaking change policy.

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read the Flutter Style Guide recently, and have followed its advice.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

I switched the underlying AI provider implementations from separate
google_generative_ai and firebase_vertexai packages to the unified
firebase_ai package.

Key changes:
- Updated pubspec.yaml dependencies to include firebase_ai and remove old SDKs.
- Removed GeminiProvider and VertexProvider.
- Introduced FirebaseAIProvider implementing LlmProvider using firebase_ai.
- Updated example applications (gemini.dart and vertex.dart) to use the new FirebaseAIProvider.

Note: I encountered some environment issues while trying to verify the example app, so I recommend you manually check that the example app is working as expected.
@csells
Copy link
Contributor

csells commented May 26, 2025

@domesticmouse may I ask why you closed this? I was about to review it, merge it and test it.

@domesticmouse domesticmouse reopened this May 26, 2025
@domesticmouse
Copy link
Contributor Author

Short answer, it was a Jules.google generated PR that I wasn't happy with. Feel free to take what is useful, but I expect a fair bit is incorrect.

@csells
Copy link
Contributor

csells commented May 27, 2025

ha. that explains it. let me close this PR and use it as input for my own.

@csells csells closed this May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants