AI Hybrid Inference: guard against unstable browser versions
Problem Statement
The implementation of the AI APIs can change while the API is stabilizing. This is impossible to guard against using normal feature detection because the feature exists, it just changes behavior.
Solution
Detect known stable versions of the API using the userAgentData API. This API has limited support, but it's simple to use and supported by Chrome and Edge, the two browsers implementing the Chromium AI API, so it's sufficient for now.
⚠️ No Changeset found
Latest commit: 90434ab686b7b92247bef3f8c02dc136ae7d0a14
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Vertex AI Mock Responses Check :warning:
A newer major version of the mock responses for Vertex AI unit tests is available. update_vertexai_responses.sh should be updated to clone the latest version of the responses: v13.1
Size Report 1
Affected Products
@firebase/aiType Base (dae5fee) Merge (cde0bbb) Diff browser 49.0 kB 49.6 kB +547 B (+1.1%) main 50.4 kB 51.0 kB +547 B (+1.1%) module 49.0 kB 49.6 kB +547 B (+1.1%) firebaseType Base (dae5fee) Merge (cde0bbb) Diff firebase-ai.js 40.5 kB 40.9 kB +420 B (+1.0%) firebase-vertexai.js 40.5 kB 40.9 kB +420 B (+1.0%)
Test Logs
Size Analysis Report 1
Affected Products
@firebase/aigetGenerativeModelSize
Type Base (dae5fee) Merge (cde0bbb) Diff size 28.4 kB 28.9 kB +434 B (+1.5%) size-with-ext-deps 49.1 kB 49.6 kB +435 B (+0.9%)