Skip to content

[FirebaseAI] Rename VertexAI to FirebaseAI #1243

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

Merged
merged 4 commits into from
May 5, 2025
Merged

Conversation

a-maurice
Copy link
Collaborator

@a-maurice a-maurice commented May 2, 2025

Description

Provide details of the change, and generalize the change in the PR title above.

Rename the product from VertexAI to FirebaseAI. Note that VertexAI is still an option as a backend, it is just the overall product that is being renamed.


Testing

Describe how you've tested these changes.

Running the testapp locally
Build: https://github.com/firebase/firebase-unity-sdk/actions/runs/14805425451
Test: https://github.com/firebase/firebase-unity-sdk/actions/runs/14843992056


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @a-maurice, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

Summary of Changes

This pull request renames the VertexAI product to FirebaseAI. The underlying backend can still be VertexAI, but the overall product is being renamed. This involves changes to CMakeLists.txt, AssemblyInfo.cs, documentation, source code, test app code, project settings, build scripts, and unity package configurations.

Highlights

  • Renaming: The primary focus is renaming the product from VertexAI to FirebaseAI across the codebase.
  • CMake Configuration: Updates to CMakeLists.txt to reflect the new FirebaseAI product name and directory structure.
  • Namespace Updates: Changes to namespaces in C# files from Firebase.VertexAI to Firebase.FirebaseAI.
  • Documentation Updates: Updates to documentation files (e.g., README) to reflect the FirebaseAI product name.
  • Test App Updates: Updates to the test app to use the new FirebaseAI namespace and product name.
  • Exception Class: The VertexAIException.cs file is removed, and a new FirebaseAIException.cs file is added, containing a set of exception classes related to Firebase AI.

Changelog

Click here to see the changelog
  • CMakeLists.txt
    • Renamed FIREBASE_INCLUDE_VERTEXAI to FIREBASE_INCLUDE_FIREBASEAI.
    • Changed add_subdirectory(vertexai) to add_subdirectory(firebaseai).
  • app/platform/Unity/AssemblyInfo.cs
    • Changed InternalsVisibleTo("Firebase.VertexAI") to InternalsVisibleTo("Firebase.FirebaseAI").
  • docs/firebaseai/FirebaseAIReadme.md
    • Updated the document title and content to reflect the Firebase AI product name.
  • firebaseai/CMakeLists.txt
    • Updated CMake file to reflect the Firebase AI library.
    • Changed folder paths and documentation sources to use firebaseai instead of vertexai.
  • firebaseai/src/Candidate.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
    • Updated ParseFinishReason to use Firebase.FirebaseAI.FinishReason.
  • firebaseai/src/Chat.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
    • Updated exception types to FirebaseAIException.
  • firebaseai/src/Citation.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
  • firebaseai/src/CountTokensResponse.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
    • Updated documentation link to Firebase AI pricing.
  • firebaseai/src/FirebaseAI.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
    • Updated exception type thrown by VertexAI method to FirebaseAIInvalidLocationException.
  • firebaseai/src/FirebaseAIException.cs
    • Added a new file containing exception classes related to Firebase AI.
  • firebaseai/src/FunctionCalling.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
  • firebaseai/src/GenerateContentResponse.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
    • Updated FromJson method to use Firebase.FirebaseAI.PromptFeedback and Firebase.FirebaseAI.UsageMetadata.
    • Updated ParseBlockReason to use Firebase.FirebaseAI.BlockReason.
  • firebaseai/src/GenerationConfig.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
  • firebaseai/src/GenerativeModel.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
    • Updated documentation to use FirebaseAI.GetGenerativeModel.
    • Updated exception types to FirebaseAIException.
  • firebaseai/src/Internal/EnumConverters.cs
    • Changed namespace from Firebase.VertexAI.Internal to Firebase.FirebaseAI.Internal.
  • firebaseai/src/Internal/FirebaseInterops.cs
    • Changed namespace from Firebase.VertexAI.Internal to Firebase.FirebaseAI.Internal.
    • Changed #if FIREBASE_VERTEXAI_DEBUG_LOGGING to #if FIREBASEAI_DEBUG_LOGGING.
  • firebaseai/src/Internal/InternalHelpers.cs
    • Changed namespace from Firebase.VertexAI.Internal to Firebase.FirebaseAI.Internal.
    • Renamed VertexAIExtensions to FirebaseAIExtensions.
    • Updated exception types to FirebaseAISerializationException.
  • firebaseai/src/LiveGenerationConfig.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
  • firebaseai/src/LiveGenerativeModel.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
    • Updated documentation to use FirebaseAI.GetLiveModel.
  • firebaseai/src/LiveSession.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
    • Updated exception type to FirebaseAIInvalidStateException.
  • firebaseai/src/LiveSessionResponse.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
  • firebaseai/src/ModalityTokenCount.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
  • firebaseai/src/ModelContent.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
    • Updated exception type to FirebaseAISerializationException.
  • firebaseai/src/RequestOptions.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
  • firebaseai/src/ResponseModality.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
  • firebaseai/src/Safety.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
  • firebaseai/src/Schema.cs
    • Changed namespace from Firebase.VertexAI to Firebase.FirebaseAI.
  • firebaseai/testapp/Assets/Firebase/Sample/FirebaseAI/UIHandler.cs
    • Changed namespace from Firebase.Sample.VertexAI to Firebase.Sample.FirebaseAI.
  • firebaseai/testapp/Assets/Firebase/Sample/FirebaseAI/UIHandlerAutomated.cs
    • Changed namespace from Firebase.Sample.VertexAI to Firebase.Sample.FirebaseAI.
    • Updated UIHandlerAutomated to run tests on Firebase AI.
    • Updated exception type to FirebaseAIException.
  • firebaseai/testapp/ProjectSettings/ProjectSettings.asset
    • Updated product name and application identifiers to reflect Firebase AI.
  • firebaseai/testapp/readme.md
    • Updated documentation to reflect Firebase AI.
  • proxy/AssemblyInfoApp.cs
    • Changed InternalsVisibleTo("Firebase.VertexAI") to InternalsVisibleTo("Firebase.FirebaseAI").
  • release_build_files/CMakeLists.txt
    • Updated documentation path to firebaseai/FirebaseAIReadme.md.
  • scripts/build_scripts/build_package.py
    • Changed vertexai to firebaseai in SUPPORT_TARGETS.
  • scripts/build_scripts/build_zips.py
    • Changed vertexai to firebaseai in SUPPORT_TARGETS and TVOS_SUPPORT_TARGETS.
  • scripts/create_debug_export.py
    • Changed vertexai to firebaseai in package names.
  • scripts/gha/integration_testing/build_testapps.json
    • Changed vertexai to firebaseai and updated related names, bundle IDs, and paths.
    • Updated UPM package name to com.google.firebase.firebaseai-*.tgz.
  • scripts/gha/restore_secrets.py
    • Changed vertexai to firebaseai in secret mappings.
  • unity_packer/debug_single_export_json/firebaseai.json
    • Updated package name and paths to reflect Firebase AI.
    • Updated common manifest to reflect Firebase AI.
  • unity_packer/guids.json
    • Updated GUIDs to reflect Firebase AI.
  • vertexai/src/VertexAIException.cs
    • Removed the VertexAIException.cs file.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.


A name change, swift and clean,
From Vertex to Firebase AI's sheen,
Though backends stay,
The product's way,
Now Firebase's AI is seen.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The pull request renames the product from VertexAI to FirebaseAI, updating relevant files and documentation. The changes appear to be comprehensive and consistent with the renaming effort. The author has included testing information, which is helpful.

Summary of Findings

  • Exception Class Naming Consistency: The naming of exception classes should be consistent. While most exceptions follow the FirebaseAI*Exception pattern, the base class is named FirebaseAIException instead of FirebaseAIAbstractException or similar. This could lead to confusion.
  • Documentation Updates: Ensure all documentation, including inline comments and external documentation, reflects the product renaming. Verify that links to external resources are updated to reflect the new product name where applicable.
  • Conditional Compilation Symbol: The conditional compilation symbol FIREBASE_VERTEXAI_DEBUG_LOGGING was renamed to FIREBASEAI_DEBUG_LOGGING. Ensure that this change is reflected in all relevant build configurations and that the new symbol is consistently used throughout the codebase.

Merge Readiness

The pull request appears to be well-structured and addresses the renaming of the product effectively. However, before merging, it's crucial to address the naming inconsistency in the exception classes and ensure that all documentation and external links are updated to reflect the new product name. Additionally, verify the correct usage of the new conditional compilation symbol. I am unable to directly approve this pull request, and recommend that others review and approve this code before merging. Addressing the naming inconsistency and documentation updates would improve the overall quality and clarity of the codebase. Given the medium severity issue, I recommend that the pull request not be merged until it is addressed.

@a-maurice a-maurice requested a review from cynthiajoan May 5, 2025 19:58
@a-maurice a-maurice merged commit 95c625b into main May 5, 2025
28 of 29 checks passed
@a-maurice a-maurice deleted the am-firebaseai_rename branch May 5, 2025 21:37
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