Skip to content

feat(firebase-ai): create ai package, vertexai wraps around it#8555

Merged
mikehardy merged 86 commits into
mainfrom
firebase-ai
Aug 18, 2025
Merged

feat(firebase-ai): create ai package, vertexai wraps around it#8555
mikehardy merged 86 commits into
mainfrom
firebase-ai

Conversation

@russellwheatley

@russellwheatley russellwheatley commented Jun 3, 2025

Copy link
Copy Markdown
Member

Description

  • Moved the bulk of code to new ai package. Kept relevant types in vertexai package and deprecated them.
  • Updated implementation (where possible) to match firebase-js-sdk.
  • Updated mocks to match latest implementation on vertexai-sdk-test-data repo which now segments responses from vertexai and googleai.
  • I did attempt to symlink ai into vertexai but nested symlinks within directories were not being packaged in dist/ so opted to make ai package a dependency which I think is a better way of doing it.
  • Created an ai example app for illustration and tested latest vertexai and ai implementations which surfaced a couple of subtle bugs that have been resolved.

Important

  • We need to do the same attribution as we did for vertexai for this pull request.
  • Double check what needs to be in the CHANGELOG for this release.

Related issues

Release Summary

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


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

@vercel

vercel Bot commented Jun 3, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
react-native-firebase Ready Ready Preview Comment Aug 18, 2025 0:22am

Comment thread packages/app/lib/modular/index.d.ts
Comment thread packages/ai/lib/index.ts
Comment thread packages/ai/lib/index.ts
Comment thread packages/ai/lib/methods/count-tokens.ts Outdated
Comment thread packages/ai/lib/requests/request.ts Outdated
Comment thread eslint.config.mjs
Comment thread packages/ai/__tests__/api.test.ts Outdated
Comment thread packages/ai/__tests__/api.test.ts Outdated
Comment thread packages/ai/__tests__/api.test.ts Outdated
Comment thread packages/ai/__tests__/api.test.ts Outdated
Comment thread packages/vertexai/__tests__/backwards-compatbility.test.ts Outdated
Comment thread packages/vertexai/__tests__/backwards-compatbility.test.ts Outdated
Comment thread packages/vertexai/__tests__/backwards-compatbility.test.ts Outdated
Comment thread packages/vertexai/__tests__/backwards-compatbility.test.ts Outdated
Comment thread packages/vertexai/__tests__/backwards-compatbility.test.ts Outdated
@mikehardy

Copy link
Copy Markdown
Collaborator

Looking into this one now for review - noticed Other tests were failing because TextEncoder implementation seems to be missing and is needed ? Unexpected as it seems that should have been failing for a while if so, but...okay

rebased to main and put an in situ implementation of the string -> uint8array conversion in the storage library and it passes locally, hopefully this goes green in CI - will finish the review later

@mikehardy mikehardy merged commit 50c9e0d into main Aug 18, 2025
23 of 24 checks passed
@mikehardy mikehardy deleted the firebase-ai branch August 18, 2025 19:29
@mikehardy mikehardy removed the Workflow: Pending Merge Waiting on CI or similar label Aug 18, 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.

6 participants