Skip to content
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

feat(vertexai): Add support for AbortSignal #8890

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

dlarocque
Copy link
Contributor

@dlarocque dlarocque commented Apr 2, 2025

Draft until API approval.

Still need to add tests.

Copy link

changeset-bot bot commented Apr 2, 2025

🦋 Changeset detected

Latest commit: 3e0cc6b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@firebase/vertexai Minor
firebase Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Apr 2, 2025

Changeset File Check ⚠️

  • Package @firebase/vertexai has a minor bump which requires an additional line to bump the main "firebase" package to minor.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 2, 2025

Size Report 1

Affected Products

  • @firebase/vertexai

    TypeBase (88a8055)Merge (87d495c)Diff
    browser34.7 kB36.1 kB+1.40 kB (+4.0%)
    main35.7 kB37.1 kB+1.40 kB (+3.9%)
    module34.7 kB36.1 kB+1.40 kB (+4.0%)
  • firebase

    TypeBase (88a8055)Merge (87d495c)Diff
    firebase-vertexai.js28.3 kB29.0 kB+717 B (+2.5%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Apr 2, 2025

Size Analysis Report 1

Affected Products

  • @firebase/vertexai

    • ChatSession

      Size

      TypeBase (88a8055)Merge (87d495c)Diff
      size15.8 kB16.3 kB+514 B (+3.3%)
      size-with-ext-deps34.7 kB35.2 kB+516 B (+1.5%)

      Dependency

      TypeBase (88a8055)Merge (87d495c)Diff
      variables

      31 dependencies

      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      ImagenAspectRatio
      ImagenPersonFilterLevel
      ImagenSafetyFilterLevel
      LANGUAGE_TAG
      Modality
      PACKAGE_VERSION
      POSSIBLE_ROLES
      SILENT_ERROR
      SchemaType
      Task
      VALID_PARTS_PER_ROLE
      VALID_PART_FIELDS
      VALID_PREVIOUS_CONTENT_ROLES
      VERTEX_TYPE
      badFinishReasons
      logger
      name
      responseLineRE
      version

      33 dependencies

      ABORT_ERROR_NAME
      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      ImagenAspectRatio
      ImagenPersonFilterLevel
      ImagenSafetyFilterLevel
      LANGUAGE_TAG
      Modality
      PACKAGE_VERSION
      POSSIBLE_ROLES
      SILENT_ERROR
      SchemaType
      TIMEOUT_EXPIRED_MESSAGE
      Task
      VALID_PARTS_PER_ROLE
      VALID_PART_FIELDS
      VALID_PREVIOUS_CONTENT_ROLES
      VERTEX_TYPE
      badFinishReasons
      logger
      name
      responseLineRE
      version

      + ABORT_ERROR_NAME
      + TIMEOUT_EXPIRED_MESSAGE

    • GenerativeModel

      Size

      TypeBase (88a8055)Merge (87d495c)Diff
      size18.9 kB19.5 kB+645 B (+3.4%)
      size-with-ext-deps37.9 kB38.5 kB+647 B (+1.7%)

      Dependency

      TypeBase (88a8055)Merge (87d495c)Diff
      variables

      31 dependencies

      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      ImagenAspectRatio
      ImagenPersonFilterLevel
      ImagenSafetyFilterLevel
      LANGUAGE_TAG
      Modality
      PACKAGE_VERSION
      POSSIBLE_ROLES
      SILENT_ERROR
      SchemaType
      Task
      VALID_PARTS_PER_ROLE
      VALID_PART_FIELDS
      VALID_PREVIOUS_CONTENT_ROLES
      VERTEX_TYPE
      badFinishReasons
      logger
      name
      responseLineRE
      version

      33 dependencies

      ABORT_ERROR_NAME
      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      ImagenAspectRatio
      ImagenPersonFilterLevel
      ImagenSafetyFilterLevel
      LANGUAGE_TAG
      Modality
      PACKAGE_VERSION
      POSSIBLE_ROLES
      SILENT_ERROR
      SchemaType
      TIMEOUT_EXPIRED_MESSAGE
      Task
      VALID_PARTS_PER_ROLE
      VALID_PART_FIELDS
      VALID_PREVIOUS_CONTENT_ROLES
      VERTEX_TYPE
      badFinishReasons
      logger
      name
      responseLineRE
      version

      + ABORT_ERROR_NAME
      + TIMEOUT_EXPIRED_MESSAGE

    • ImagenModel

      Size

      TypeBase (88a8055)Merge (87d495c)Diff
      size10.1 kB10.6 kB+510 B (+5.1%)
      size-with-ext-deps28.1 kB28.6 kB+516 B (+1.8%)

      Dependency

      TypeBase (88a8055)Merge (87d495c)Diff
      variables

      24 dependencies

      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      ImagenAspectRatio
      ImagenPersonFilterLevel
      ImagenSafetyFilterLevel
      LANGUAGE_TAG
      Modality
      PACKAGE_VERSION
      SchemaType
      Task
      VERTEX_TYPE
      logger
      name
      version

      26 dependencies

      ABORT_ERROR_NAME
      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      ImagenAspectRatio
      ImagenPersonFilterLevel
      ImagenSafetyFilterLevel
      LANGUAGE_TAG
      Modality
      PACKAGE_VERSION
      SchemaType
      TIMEOUT_EXPIRED_MESSAGE
      Task
      VERTEX_TYPE
      logger
      name
      version

      + ABORT_ERROR_NAME
      + TIMEOUT_EXPIRED_MESSAGE

    • getGenerativeModel

      Size

      TypeBase (88a8055)Merge (87d495c)Diff
      size19.1 kB19.7 kB+645 B (+3.4%)
      size-with-ext-deps38.1 kB38.7 kB+647 B (+1.7%)

      Dependency

      TypeBase (88a8055)Merge (87d495c)Diff
      variables

      31 dependencies

      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      ImagenAspectRatio
      ImagenPersonFilterLevel
      ImagenSafetyFilterLevel
      LANGUAGE_TAG
      Modality
      PACKAGE_VERSION
      POSSIBLE_ROLES
      SILENT_ERROR
      SchemaType
      Task
      VALID_PARTS_PER_ROLE
      VALID_PART_FIELDS
      VALID_PREVIOUS_CONTENT_ROLES
      VERTEX_TYPE
      badFinishReasons
      logger
      name
      responseLineRE
      version

      33 dependencies

      ABORT_ERROR_NAME
      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      ImagenAspectRatio
      ImagenPersonFilterLevel
      ImagenSafetyFilterLevel
      LANGUAGE_TAG
      Modality
      PACKAGE_VERSION
      POSSIBLE_ROLES
      SILENT_ERROR
      SchemaType
      TIMEOUT_EXPIRED_MESSAGE
      Task
      VALID_PARTS_PER_ROLE
      VALID_PART_FIELDS
      VALID_PREVIOUS_CONTENT_ROLES
      VERTEX_TYPE
      badFinishReasons
      logger
      name
      responseLineRE
      version

      + ABORT_ERROR_NAME
      + TIMEOUT_EXPIRED_MESSAGE

    • getImagenModel

      Size

      TypeBase (88a8055)Merge (87d495c)Diff
      size10.2 kB10.7 kB+510 B (+5.0%)
      size-with-ext-deps28.2 kB28.7 kB+516 B (+1.8%)

      Dependency

      TypeBase (88a8055)Merge (87d495c)Diff
      variables

      24 dependencies

      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      ImagenAspectRatio
      ImagenPersonFilterLevel
      ImagenSafetyFilterLevel
      LANGUAGE_TAG
      Modality
      PACKAGE_VERSION
      SchemaType
      Task
      VERTEX_TYPE
      logger
      name
      version

      26 dependencies

      ABORT_ERROR_NAME
      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      ImagenAspectRatio
      ImagenPersonFilterLevel
      ImagenSafetyFilterLevel
      LANGUAGE_TAG
      Modality
      PACKAGE_VERSION
      SchemaType
      TIMEOUT_EXPIRED_MESSAGE
      Task
      VERTEX_TYPE
      logger
      name
      version

      + ABORT_ERROR_NAME
      + TIMEOUT_EXPIRED_MESSAGE

Test Logs

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

Copy link
Contributor

github-actions bot commented Apr 2, 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: v8.0

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