Skip to content

AI Hybrid Inference: guard against unstable browser versions #9084

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

Open
wants to merge 2 commits into
base: erikeldridge-vertex-expectedinputs
Choose a base branch
from

Conversation

erikeldridge
Copy link

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.

@erikeldridge erikeldridge requested a review from a team as a code owner June 7, 2025 00:11
Copy link

changeset-bot bot commented Jun 7, 2025

⚠️ No Changeset found

Latest commit: 90434ab

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

@erikeldridge erikeldridge requested review from gsiddh and removed request for a team June 7, 2025 00:11
Copy link
Contributor

github-actions bot commented Jun 7, 2025

Vertex AI Mock Responses Check ⚠️

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

@google-oss-bot
Copy link
Contributor

Size Report 1

Affected Products

  • @firebase/ai

    TypeBase (dae5fee)Merge (cde0bbb)Diff
    browser49.0 kB49.6 kB+547 B (+1.1%)
    main50.4 kB51.0 kB+547 B (+1.1%)
    module49.0 kB49.6 kB+547 B (+1.1%)
  • firebase

    TypeBase (dae5fee)Merge (cde0bbb)Diff
    firebase-ai.js40.5 kB40.9 kB+420 B (+1.0%)
    firebase-vertexai.js40.5 kB40.9 kB+420 B (+1.0%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/wVXHkeTZNX.html

@google-oss-bot
Copy link
Contributor

Size Analysis Report 1

Affected Products

  • @firebase/ai

    • getGenerativeModel

      Size

      TypeBase (dae5fee)Merge (cde0bbb)Diff
      size28.4 kB28.9 kB+434 B (+1.5%)
      size-with-ext-deps49.1 kB49.6 kB+435 B (+0.9%)

Test Logs

  1. https://storage.googleapis.com/firebase-sdk-metric-reports/dCYJosIy6T.html

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