Skip to content

feat(ai): implement Firebase JS SDK 12.15.0 portable API parity#9065

Merged
mikehardy merged 3 commits into
mainfrom
ai-parity-12.15.0
Jun 22, 2026
Merged

feat(ai): implement Firebase JS SDK 12.15.0 portable API parity#9065
mikehardy merged 3 commits into
mainfrom
ai-parity-12.15.0

Conversation

@mikehardy

Copy link
Copy Markdown
Collaborator

Description

Closes the portable AI API gaps introduced with Firebase JS SDK 12.15.0 in @react-native-firebase/ai, aligning types and runtime behavior with the firebase-js-sdk AI public surface where React Native can support them.

Changes include image generation config, Google Maps grounding types/tools, retrieval and template tool config, live session resumption (connectionPromise, resumeSession, resumption updates in receive()), context window compression setup, extended FinishReason values, and compare-types config updates for the newly implemented APIs. Browser-only APIs (Chrome on-device AI, audio conversation helpers, hybrid inference) remain intentionally absent.

Related issues

Release Summary

AI package parity with firebase-js-sdk 12.15.0 for image config, Google Maps grounding, retrieval config, live session resumption, context window compression, and template tool config.

Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
    • Yes
  • My change supports the following platforms;
    • Android
    • iOS
    • Other (macOS, web)
  • My change includes tests;
    • e2e tests added or updated in packages/**/e2e
    • jest tests added or updated in packages/**/__tests__
  • I have updated TypeScript types that are affected by my change.
  • This is a breaking change;
    • Yes
    • No

Test Plan

  • yarn compare:types ai — all diffs documented (28 remaining intentional gaps)
  • yarn tests:jest packages/ai/__tests__ — 322/322 passed
  • yarn test:full — install, builds, lint, compare:types, jest, and E2E on iOS/Android/macOS all passed; AI e2e (fetch, fetch stream) green on all platforms

Think react-native-firebase is great? Please consider supporting the project with any of the below:

@mikehardy mikehardy added the Workflow: Pending Merge Waiting on CI or similar label Jun 22, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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!

This pull request brings the @react-native-firebase/ai package into parity with the Firebase JS SDK 12.15.0. It introduces several key features including image generation configuration, Google Maps grounding tools, and robust session resumption capabilities for live AI interactions. These changes ensure that developers have access to the latest AI features while maintaining consistency with the core Firebase SDK.

Highlights

  • API Parity: Aligned @react-native-firebase/ai with Firebase JS SDK 12.15.0, adding support for image generation configuration, Google Maps grounding tools, and retrieval configurations.
  • Live Session Resumption: Implemented resumeSession and session resumption updates to allow maintaining conversation state across WebSocket reconnections.
  • Context Window Management: Added ContextWindowCompressionConfig to support managing the model's context window size during live sessions.
  • Type Updates: Expanded FinishReason enums and updated TypeScript types to match the latest SDK surface, ensuring consistent behavior across platforms.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the 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 may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

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.

gemini-code-assist[bot]

This comment was marked as resolved.

Add image config, Google Maps grounding, retrieval config, live session
resumption, context window compression, and template tool config to match
the firebase-js-sdk AI public surface for React Native.
@mikehardy mikehardy force-pushed the ai-parity-12.15.0 branch from f869e38 to 57e7dc0 Compare June 22, 2026 22:20
@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.10145% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.94%. Comparing base (5c7a21a) to head (4896f45).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9065      +/-   ##
============================================
+ Coverage     60.90%   60.94%   +0.05%     
  Complexity     1602     1602              
============================================
  Files           456      457       +1     
  Lines         33627    33665      +38     
  Branches       5411     5479      +68     
============================================
+ Hits          20477    20514      +37     
- Misses        11978    12019      +41     
+ Partials       1172     1132      -40     
Flag Coverage Δ
android-native 48.56% <100.00%> (+0.01%) ⬆️
e2e-ts-android 48.56% <100.00%> (+0.01%) ⬆️
e2e-ts-ios 51.55% <100.00%> (+0.01%) ⬆️
e2e-ts-macos 26.13% <100.00%> (+0.03%) ⬆️
ios-native 51.55% <100.00%> (+0.01%) ⬆️
jest 62.36% <97.11%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mikehardy

Copy link
Copy Markdown
Collaborator Author

final push was docs only - good to merge after lints

@mikehardy mikehardy force-pushed the ai-parity-12.15.0 branch from 2cf30fd to 4896f45 Compare June 22, 2026 23:44
@mikehardy mikehardy merged commit f375acf into main Jun 22, 2026
21 checks passed
@mikehardy mikehardy deleted the ai-parity-12.15.0 branch June 22, 2026 23:49
@mikehardy mikehardy removed the Workflow: Pending Merge Waiting on CI or similar label Jun 22, 2026
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.

1 participant