Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Clear fetch abort timeout #8663

Merged
merged 3 commits into from
Dec 4, 2024
Merged

Clear fetch abort timeout #8663

merged 3 commits into from
Dec 4, 2024

Conversation

dlarocque
Copy link
Contributor

We set a timeout to abort a request after 180s by default, but we don't cancel this timeout after the request completes. We should cancel this timeout after the request completes to prevent Node scripts from hanging.

I inlined everything in buildFetchOptions and removed that function. Let me know if I should revert this and initialize the AbortController in there- but I think the timeout-related code still has to be inlined so that we can get the timeoutId.

I tested this in a Node script using the default timeout and a custom timeout, and they both work as expected. If the timeout is triggered before the request completes, an AbortError is thrown. If the request completes before the timeout is triggered, the timeout is cancelled, and the Node script is able to exit.

Fixes b/380936830 (internal)

@dlarocque dlarocque requested review from a team as code owners December 3, 2024 19:08
Copy link

changeset-bot bot commented Dec 3, 2024

🦋 Changeset detected

Latest commit: 02b9fc3

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 Patch
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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Dec 3, 2024

Size Report 1

Affected Products

  • @firebase/messaging

    TypeBase (ffbf5a6)Merge (780b37f)Diff
    browser21.3 kB22.0 kB+765 B (+3.6%)
    main21.7 kB22.4 kB+765 B (+3.5%)
    module21.3 kB22.0 kB+765 B (+3.6%)
  • @firebase/vertexai

    TypeBase (ffbf5a6)Merge (780b37f)Diff
    browser28.9 kB28.8 kB-83 B (-0.3%)
    main29.7 kB29.6 kB-83 B (-0.3%)
    module28.9 kB28.8 kB-83 B (-0.3%)
  • bundle

    TypeBase (ffbf5a6)Merge (780b37f)Diff
    messaging (send + receive)46.9 kB47.4 kB+466 B (+1.0%)
  • firebase

    TypeBase (ffbf5a6)Merge (780b37f)Diff
    firebase-compat.js794 kB795 kB+408 B (+0.1%)
    firebase-messaging-compat.js38.3 kB38.7 kB+408 B (+1.1%)
    firebase-messaging.js28.7 kB29.1 kB+452 B (+1.6%)
    firebase-vertexai.js23.9 kB23.8 kB-90 B (-0.4%)

Test Logs

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

packages/vertexai/src/requests/request.ts Outdated Show resolved Hide resolved
packages/vertexai/src/requests/request.ts Outdated Show resolved Hide resolved
packages/vertexai/src/requests/request.ts Show resolved Hide resolved
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Dec 3, 2024

Size Analysis Report 1

Affected Products

  • @firebase/messaging

    • deleteToken

      Size

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      size12.7 kB13.1 kB+465 B (+3.7%)
      size-with-ext-deps39.4 kB39.9 kB+466 B (+1.2%)

      Dependency

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      functions

      39 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbRemove
      dbSet
      deleteToken
      deleteToken$1
      deleteTokenInternal
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      40 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbRemove
      dbSet
      deleteToken
      deleteToken$1
      deleteTokenInternal
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey
      waitForRegistrationActive

      + waitForRegistrationActive

      variables

      24 dependencies

      CONSOLE_CAMPAIGN_ANALYTICS_ENABLED
      CONSOLE_CAMPAIGN_ID
      CONSOLE_CAMPAIGN_NAME
      CONSOLE_CAMPAIGN_TIME
      DATABASE_NAME
      DATABASE_VERSION
      DEFAULT_SW_PATH
      DEFAULT_SW_SCOPE
      DEFAULT_VAPID_KEY
      ENDPOINT
      ERROR_FACTORY
      ERROR_MAP
      MessageType
      MessageType$1
      OBJECT_STORE_NAME
      OLD_DB_NAME
      OLD_DB_VERSION
      OLD_OBJECT_STORE_NAME
      TOKEN_EXPIRATION_MS
      WindowMessagingFactory
      WindowMessagingInternalFactory
      dbPromise
      name
      version

      25 dependencies

      CONSOLE_CAMPAIGN_ANALYTICS_ENABLED
      CONSOLE_CAMPAIGN_ID
      CONSOLE_CAMPAIGN_NAME
      CONSOLE_CAMPAIGN_TIME
      DATABASE_NAME
      DATABASE_VERSION
      DEFAULT_REGISTRATION_TIMEOUT
      DEFAULT_SW_PATH
      DEFAULT_SW_SCOPE
      DEFAULT_VAPID_KEY
      ENDPOINT
      ERROR_FACTORY
      ERROR_MAP
      MessageType
      MessageType$1
      OBJECT_STORE_NAME
      OLD_DB_NAME
      OLD_DB_VERSION
      OLD_OBJECT_STORE_NAME
      TOKEN_EXPIRATION_MS
      WindowMessagingFactory
      WindowMessagingInternalFactory
      dbPromise
      name
      version

      + DEFAULT_REGISTRATION_TIMEOUT

    • getMessaging

      Size

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      size12.7 kB13.2 kB+465 B (+3.6%)
      size-with-ext-deps46.6 kB47.0 kB+466 B (+1.0%)

      Dependency

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      functions

      37 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMessagingInWindow
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      isWindowSupported
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      38 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMessagingInWindow
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      isWindowSupported
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey
      waitForRegistrationActive

      + waitForRegistrationActive

      variables

      24 dependencies

      CONSOLE_CAMPAIGN_ANALYTICS_ENABLED
      CONSOLE_CAMPAIGN_ID
      CONSOLE_CAMPAIGN_NAME
      CONSOLE_CAMPAIGN_TIME
      DATABASE_NAME
      DATABASE_VERSION
      DEFAULT_SW_PATH
      DEFAULT_SW_SCOPE
      DEFAULT_VAPID_KEY
      ENDPOINT
      ERROR_FACTORY
      ERROR_MAP
      MessageType
      MessageType$1
      OBJECT_STORE_NAME
      OLD_DB_NAME
      OLD_DB_VERSION
      OLD_OBJECT_STORE_NAME
      TOKEN_EXPIRATION_MS
      WindowMessagingFactory
      WindowMessagingInternalFactory
      dbPromise
      name
      version

      25 dependencies

      CONSOLE_CAMPAIGN_ANALYTICS_ENABLED
      CONSOLE_CAMPAIGN_ID
      CONSOLE_CAMPAIGN_NAME
      CONSOLE_CAMPAIGN_TIME
      DATABASE_NAME
      DATABASE_VERSION
      DEFAULT_REGISTRATION_TIMEOUT
      DEFAULT_SW_PATH
      DEFAULT_SW_SCOPE
      DEFAULT_VAPID_KEY
      ENDPOINT
      ERROR_FACTORY
      ERROR_MAP
      MessageType
      MessageType$1
      OBJECT_STORE_NAME
      OLD_DB_NAME
      OLD_DB_VERSION
      OLD_OBJECT_STORE_NAME
      TOKEN_EXPIRATION_MS
      WindowMessagingFactory
      WindowMessagingInternalFactory
      dbPromise
      name
      version

      + DEFAULT_REGISTRATION_TIMEOUT

    • getToken

      Size

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      size12.2 kB12.6 kB+467 B (+3.8%)
      size-with-ext-deps38.9 kB39.3 kB+466 B (+1.2%)

      Dependency

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      functions

      36 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      37 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey
      waitForRegistrationActive

      + waitForRegistrationActive

      variables

      24 dependencies

      CONSOLE_CAMPAIGN_ANALYTICS_ENABLED
      CONSOLE_CAMPAIGN_ID
      CONSOLE_CAMPAIGN_NAME
      CONSOLE_CAMPAIGN_TIME
      DATABASE_NAME
      DATABASE_VERSION
      DEFAULT_SW_PATH
      DEFAULT_SW_SCOPE
      DEFAULT_VAPID_KEY
      ENDPOINT
      ERROR_FACTORY
      ERROR_MAP
      MessageType
      MessageType$1
      OBJECT_STORE_NAME
      OLD_DB_NAME
      OLD_DB_VERSION
      OLD_OBJECT_STORE_NAME
      TOKEN_EXPIRATION_MS
      WindowMessagingFactory
      WindowMessagingInternalFactory
      dbPromise
      name
      version

      25 dependencies

      CONSOLE_CAMPAIGN_ANALYTICS_ENABLED
      CONSOLE_CAMPAIGN_ID
      CONSOLE_CAMPAIGN_NAME
      CONSOLE_CAMPAIGN_TIME
      DATABASE_NAME
      DATABASE_VERSION
      DEFAULT_REGISTRATION_TIMEOUT
      DEFAULT_SW_PATH
      DEFAULT_SW_SCOPE
      DEFAULT_VAPID_KEY
      ENDPOINT
      ERROR_FACTORY
      ERROR_MAP
      MessageType
      MessageType$1
      OBJECT_STORE_NAME
      OLD_DB_NAME
      OLD_DB_VERSION
      OLD_OBJECT_STORE_NAME
      TOKEN_EXPIRATION_MS
      WindowMessagingFactory
      WindowMessagingInternalFactory
      dbPromise
      name
      version

      + DEFAULT_REGISTRATION_TIMEOUT

    • isSupported

      Size

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      size12.5 kB13.0 kB+465 B (+3.7%)
      size-with-ext-deps39.2 kB39.7 kB+466 B (+1.2%)

      Dependency

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      functions

      36 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      isWindowSupported
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      37 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      isWindowSupported
      logToScion
      messageEventListener
      migrateOldDatabase
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey
      waitForRegistrationActive

      + waitForRegistrationActive

      variables

      24 dependencies

      CONSOLE_CAMPAIGN_ANALYTICS_ENABLED
      CONSOLE_CAMPAIGN_ID
      CONSOLE_CAMPAIGN_NAME
      CONSOLE_CAMPAIGN_TIME
      DATABASE_NAME
      DATABASE_VERSION
      DEFAULT_SW_PATH
      DEFAULT_SW_SCOPE
      DEFAULT_VAPID_KEY
      ENDPOINT
      ERROR_FACTORY
      ERROR_MAP
      MessageType
      MessageType$1
      OBJECT_STORE_NAME
      OLD_DB_NAME
      OLD_DB_VERSION
      OLD_OBJECT_STORE_NAME
      TOKEN_EXPIRATION_MS
      WindowMessagingFactory
      WindowMessagingInternalFactory
      dbPromise
      name
      version

      25 dependencies

      CONSOLE_CAMPAIGN_ANALYTICS_ENABLED
      CONSOLE_CAMPAIGN_ID
      CONSOLE_CAMPAIGN_NAME
      CONSOLE_CAMPAIGN_TIME
      DATABASE_NAME
      DATABASE_VERSION
      DEFAULT_REGISTRATION_TIMEOUT
      DEFAULT_SW_PATH
      DEFAULT_SW_SCOPE
      DEFAULT_VAPID_KEY
      ENDPOINT
      ERROR_FACTORY
      ERROR_MAP
      MessageType
      MessageType$1
      OBJECT_STORE_NAME
      OLD_DB_NAME
      OLD_DB_VERSION
      OLD_OBJECT_STORE_NAME
      TOKEN_EXPIRATION_MS
      WindowMessagingFactory
      WindowMessagingInternalFactory
      dbPromise
      name
      version

      + DEFAULT_REGISTRATION_TIMEOUT

    • onMessage

      Size

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      size12.3 kB12.8 kB+467 B (+3.8%)
      size-with-ext-deps39.0 kB39.5 kB+466 B (+1.2%)

      Dependency

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      functions

      37 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      logToScion
      messageEventListener
      migrateOldDatabase
      onMessage
      onMessage$1
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey

      38 dependencies

      _mergeStrings
      arrayToBase64
      base64ToArray
      checkTokenDetails
      dbGet
      dbSet
      externalizePayload
      extractAppConfig
      getBody
      getDbPromise
      getEndpoint
      getEventType
      getHeaders
      getKey
      getMissingValueError
      getNewToken
      getPushSubscription
      getToken$1
      getTokenInternal
      isConsoleMessage
      isTokenValid
      logToScion
      messageEventListener
      migrateOldDatabase
      onMessage
      onMessage$1
      propagateDataPayload
      propagateFcmOptions
      propagateNotificationPayload
      registerDefaultSw
      registerMessagingInWindow
      requestDeleteToken
      requestGetToken
      requestUpdateToken
      updateSwReg
      updateToken
      updateVapidKey
      waitForRegistrationActive

      + waitForRegistrationActive

      variables

      24 dependencies

      CONSOLE_CAMPAIGN_ANALYTICS_ENABLED
      CONSOLE_CAMPAIGN_ID
      CONSOLE_CAMPAIGN_NAME
      CONSOLE_CAMPAIGN_TIME
      DATABASE_NAME
      DATABASE_VERSION
      DEFAULT_SW_PATH
      DEFAULT_SW_SCOPE
      DEFAULT_VAPID_KEY
      ENDPOINT
      ERROR_FACTORY
      ERROR_MAP
      MessageType
      MessageType$1
      OBJECT_STORE_NAME
      OLD_DB_NAME
      OLD_DB_VERSION
      OLD_OBJECT_STORE_NAME
      TOKEN_EXPIRATION_MS
      WindowMessagingFactory
      WindowMessagingInternalFactory
      dbPromise
      name
      version

      25 dependencies

      CONSOLE_CAMPAIGN_ANALYTICS_ENABLED
      CONSOLE_CAMPAIGN_ID
      CONSOLE_CAMPAIGN_NAME
      CONSOLE_CAMPAIGN_TIME
      DATABASE_NAME
      DATABASE_VERSION
      DEFAULT_REGISTRATION_TIMEOUT
      DEFAULT_SW_PATH
      DEFAULT_SW_SCOPE
      DEFAULT_VAPID_KEY
      ENDPOINT
      ERROR_FACTORY
      ERROR_MAP
      MessageType
      MessageType$1
      OBJECT_STORE_NAME
      OLD_DB_NAME
      OLD_DB_VERSION
      OLD_OBJECT_STORE_NAME
      TOKEN_EXPIRATION_MS
      WindowMessagingFactory
      WindowMessagingInternalFactory
      dbPromise
      name
      version

      + DEFAULT_REGISTRATION_TIMEOUT

  • @firebase/vertexai

    • ChatSession

      Size

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      size14.7 kB14.6 kB-48 B (-0.3%)
      size-with-ext-deps33.2 kB33.1 kB-48 B (-0.1%)

      Dependency

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      functions

      22 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      buildFetchOptions
      constructRequest
      createEnhancedContentResponse
      formatBlockErrorMessage
      formatNewContent
      generateContent
      generateContentStream
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getHeaders
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      processStream
      registerVertex
      validateChatHistory

      21 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      constructRequest
      createEnhancedContentResponse
      formatBlockErrorMessage
      formatNewContent
      generateContent
      generateContentStream
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getHeaders
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      processStream
      registerVertex
      validateChatHistory

      - buildFetchOptions

      variables

      26 dependencies

      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      LANGUAGE_TAG
      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

      27 dependencies

      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      LANGUAGE_TAG
      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

      + DEFAULT_FETCH_TIMEOUT_MS

    • GenerativeModel

      Size

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      size17.2 kB17.1 kB-48 B (-0.3%)
      size-with-ext-deps35.7 kB35.6 kB-48 B (-0.1%)

      Dependency

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      functions

      25 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      buildFetchOptions
      constructRequest
      countTokens
      createEnhancedContentResponse
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      formatSystemInstruction
      generateContent
      generateContentStream
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getHeaders
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      processStream
      registerVertex
      validateChatHistory

      24 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      constructRequest
      countTokens
      createEnhancedContentResponse
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      formatSystemInstruction
      generateContent
      generateContentStream
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getHeaders
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      processStream
      registerVertex
      validateChatHistory

      - buildFetchOptions

      variables

      26 dependencies

      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      LANGUAGE_TAG
      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

      27 dependencies

      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      LANGUAGE_TAG
      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

      + DEFAULT_FETCH_TIMEOUT_MS

    • getGenerativeModel

      Size

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      size17.3 kB17.3 kB-48 B (-0.3%)
      size-with-ext-deps35.8 kB35.8 kB-48 B (-0.1%)

      Dependency

      TypeBase (ffbf5a6)Merge (780b37f)Diff
      functions

      26 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      buildFetchOptions
      constructRequest
      countTokens
      createEnhancedContentResponse
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      formatSystemInstruction
      generateContent
      generateContentStream
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getGenerativeModel
      getHeaders
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      processStream
      registerVertex
      validateChatHistory

      25 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      constructRequest
      countTokens
      createEnhancedContentResponse
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      formatSystemInstruction
      generateContent
      generateContentStream
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getGenerativeModel
      getHeaders
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      processStream
      registerVertex
      validateChatHistory

      - buildFetchOptions

      variables

      26 dependencies

      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      LANGUAGE_TAG
      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

      27 dependencies

      BlockReason
      DEFAULT_API_VERSION
      DEFAULT_BASE_URL
      DEFAULT_FETCH_TIMEOUT_MS
      DEFAULT_LOCATION
      FinishReason
      FunctionCallingMode
      HarmBlockMethod
      HarmBlockThreshold
      HarmCategory
      HarmProbability
      HarmSeverity
      LANGUAGE_TAG
      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

      + DEFAULT_FETCH_TIMEOUT_MS

Test Logs

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

Copy link
Contributor

@DellaBitta DellaBitta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only suggestion

@dlarocque dlarocque requested a review from hsubox76 December 4, 2024 15:34
Copy link
Contributor

@hsubox76 hsubox76 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with one minor nit.

@dlarocque dlarocque merged commit c540ba9 into main Dec 4, 2024
33 checks passed
@dlarocque dlarocque deleted the dl/vertex-timeout branch December 4, 2024 17:38
@google-oss-bot google-oss-bot mentioned this pull request Dec 10, 2024
@firebase firebase locked and limited conversation to collaborators Jan 4, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants