Skip to content

Conversation

andrewheard
Copy link
Contributor

@andrewheard andrewheard commented Aug 1, 2025

Added support for including thought summaries and thought signatures.

Edits by @hsubox76:

  • thoughtSignature is not meant to be exposed publicly but needs to be stored in chat history, so it's marked internal to keep it out of public typings and docs, but still exists in the type so it can be used in chat validation and testing
  • consolidated some duplicate logic in addHelpers()
  • Filled in previously missing description for functionCalls() method

Copy link

changeset-bot bot commented Aug 1, 2025

🦋 Changeset detected

Latest commit: fb7085a

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

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

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

@andrewheard
Copy link
Contributor Author

cc: @dlarocque

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 12, 2025

Size Report 1

Affected Products

  • @firebase/ai

    TypeBase (cc605e7)Merge (7f1b37e)Diff
    browser45.8 kB45.5 kB-343 B (-0.7%)
    main48.9 kB48.6 kB-343 B (-0.7%)
    module45.8 kB45.5 kB-343 B (-0.7%)
  • @firebase/firestore

    TypeBase (cc605e7)Merge (7f1b37e)Diff
    browser391 kB391 kB+1 B (+0.0%)
    main611 kB611 kB+1 B (+0.0%)
    module391 kB391 kB+1 B (+0.0%)
    react-native392 kB392 kB+1 B (+0.0%)
  • @firebase/firestore-lite

    TypeBase (cc605e7)Merge (7f1b37e)Diff
    browser115 kB115 kB+1 B (+0.0%)
    main158 kB158 kB+1 B (+0.0%)
    module115 kB115 kB+1 B (+0.0%)
    react-native116 kB116 kB+1 B (+0.0%)
  • @firebase/functions

    TypeBase (cc605e7)Merge (7f1b37e)Diff
    browser13.9 kB14.2 kB+297 B (+2.1%)
    main14.4 kB14.7 kB+302 B (+2.1%)
    module13.9 kB14.2 kB+297 B (+2.1%)
  • bundle

    TypeBase (cc605e7)Merge (7f1b37e)Diff
    firestore (Transaction)224 kB224 kB+1 B (+0.0%)
    firestore-lite (Transaction)107 kB107 kB+1 B (+0.0%)
    functions (call)38.6 kB38.7 kB+132 B (+0.3%)
  • firebase

    TypeBase (cc605e7)Merge (7f1b37e)Diff
    firebase-ai.js35.8 kB35.4 kB-359 B (-1.0%)
    firebase-compat.js800 kB800 kB+131 B (+0.0%)
    firebase-firestore-compat.js349 kB349 kB+1 B (+0.0%)
    firebase-firestore-lite.js138 kB138 kB+1 B (+0.0%)
    firebase-firestore.js455 kB455 kB+1 B (+0.0%)
    firebase-functions-compat.js14.7 kB14.8 kB+126 B (+0.9%)
    firebase-functions.js19.4 kB19.5 kB+182 B (+0.9%)

Test Logs

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

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Aug 12, 2025

Size Analysis Report 1

Affected Products

  • @firebase/ai

    • ChatSession

      Size

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      size17.4 kB17.0 kB-370 B (-2.1%)
      size-with-ext-deps35.1 kB34.7 kB-373 B (-1.1%)

      Dependency

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      functions

      30 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      constructRequest
      createEnhancedContentResponse
      decodeInstanceIdentifier
      formatBlockErrorMessage
      formatNewContent
      generateContent
      generateContentOnCloud
      generateContentStream
      generateContentStreamOnCloud
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getHeaders
      getInlineDataParts
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      mapGenerateContentCandidates
      mapGenerateContentRequest
      mapGenerateContentResponse
      mapPromptFeedback
      processGenerateContentResponse
      processStream
      registerAI
      validateChatHistory

      31 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      constructRequest
      createEnhancedContentResponse
      decodeInstanceIdentifier
      formatBlockErrorMessage
      formatNewContent
      generateContent
      generateContentOnCloud
      generateContentStream
      generateContentStreamOnCloud
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getHeaders
      getInlineDataParts
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      hasValidCandidates
      makeRequest
      mapGenerateContentCandidates
      mapGenerateContentRequest
      mapGenerateContentResponse
      mapPromptFeedback
      processGenerateContentResponse
      processStream
      registerAI
      validateChatHistory

      + hasValidCandidates

    • GenerativeModel

      Size

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      size20.9 kB20.6 kB-370 B (-1.8%)
      size-with-ext-deps38.7 kB38.3 kB-373 B (-1.0%)

      Dependency

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      functions

      35 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      constructRequest
      countTokens
      countTokensOnCloud
      createEnhancedContentResponse
      decodeInstanceIdentifier
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      formatSystemInstruction
      generateContent
      generateContentOnCloud
      generateContentStream
      generateContentStreamOnCloud
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getHeaders
      getInlineDataParts
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      mapCountTokensRequest
      mapGenerateContentCandidates
      mapGenerateContentRequest
      mapGenerateContentResponse
      mapPromptFeedback
      processGenerateContentResponse
      processStream
      registerAI
      validateChatHistory

      36 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      constructRequest
      countTokens
      countTokensOnCloud
      createEnhancedContentResponse
      decodeInstanceIdentifier
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      formatSystemInstruction
      generateContent
      generateContentOnCloud
      generateContentStream
      generateContentStreamOnCloud
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getHeaders
      getInlineDataParts
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      hasValidCandidates
      makeRequest
      mapCountTokensRequest
      mapGenerateContentCandidates
      mapGenerateContentRequest
      mapGenerateContentResponse
      mapPromptFeedback
      processGenerateContentResponse
      processStream
      registerAI
      validateChatHistory

      + hasValidCandidates

    • getGenerativeModel

      Size

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      size25.1 kB24.7 kB-370 B (-1.5%)
      size-with-ext-deps42.9 kB42.5 kB-373 B (-0.9%)

      Dependency

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      functions

      36 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      constructRequest
      countTokens
      countTokensOnCloud
      createEnhancedContentResponse
      decodeInstanceIdentifier
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      formatSystemInstruction
      generateContent
      generateContentOnCloud
      generateContentStream
      generateContentStreamOnCloud
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getGenerativeModel
      getHeaders
      getInlineDataParts
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      makeRequest
      mapCountTokensRequest
      mapGenerateContentCandidates
      mapGenerateContentRequest
      mapGenerateContentResponse
      mapPromptFeedback
      processGenerateContentResponse
      processStream
      registerAI
      validateChatHistory

      37 dependencies

      addHelpers
      aggregateResponses
      assignRoleToPartsAndValidateSendMessageRequest
      constructRequest
      countTokens
      countTokensOnCloud
      createEnhancedContentResponse
      decodeInstanceIdentifier
      formatBlockErrorMessage
      formatGenerateContentInput
      formatNewContent
      formatSystemInstruction
      generateContent
      generateContentOnCloud
      generateContentStream
      generateContentStreamOnCloud
      generateResponseSequence
      getClientHeaders
      getFunctionCalls
      getGenerativeModel
      getHeaders
      getInlineDataParts
      getResponsePromise
      getResponseStream
      getText
      hadBadFinishReason
      hasValidCandidates
      makeRequest
      mapCountTokensRequest
      mapGenerateContentCandidates
      mapGenerateContentRequest
      mapGenerateContentResponse
      mapPromptFeedback
      processGenerateContentResponse
      processStream
      registerAI
      validateChatHistory

      + hasValidCandidates

  • @firebase/firestore

    • runTransaction

      Size

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      size139 kB139 kB+1 B (+0.0%)
      size-with-ext-deps211 kB211 kB+1 B (+0.0%)
  • @firebase/functions

    • connectFunctionsEmulator

      Size

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      size2.84 kB2.85 kB+12 B (+0.4%)
      size-with-ext-deps25.0 kB25.1 kB+12 B (+0.0%)
    • getFunctions

      Size

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      size3.03 kB3.04 kB+12 B (+0.4%)
      size-with-ext-deps32.6 kB32.6 kB+12 B (+0.0%)
    • httpsCallable

      Size

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      size8.48 kB8.62 kB+141 B (+1.7%)
      size-with-ext-deps26.2 kB26.5 kB+284 B (+1.1%)

      Dependency

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      functions

      16 dependencies

      _errorForResponse
      call
      callAtURL
      codeForHTTPStatus
      createResponseStream
      decode
      encode
      failAfter
      httpsCallable
      httpsCallable$1
      makeAuthHeaders
      mapValues
      postJSON
      registerFunctions
      stream
      streamAtURL

      17 dependencies

      _errorForResponse
      call
      callAtURL
      codeForHTTPStatus
      createResponseStream
      decode
      encode
      failAfter
      getCredentials
      httpsCallable
      httpsCallable$1
      makeAuthHeaders
      mapValues
      postJSON
      registerFunctions
      stream
      streamAtURL

      + getCredentials

      External Dependency

      ModuleBase (cc605e7)Merge (7f1b37e)Diff
      @firebase/util

      FirebaseError
      getModularInstance

      FirebaseError
      getModularInstance
      isCloudWorkstation

      + isCloudWorkstation

    • httpsCallableFromURL

      Size

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      size8.37 kB8.51 kB+141 B (+1.7%)
      size-with-ext-deps26.1 kB26.4 kB+284 B (+1.1%)

      Dependency

      TypeBase (cc605e7)Merge (7f1b37e)Diff
      functions

      14 dependencies

      _errorForResponse
      callAtURL
      codeForHTTPStatus
      createResponseStream
      decode
      encode
      failAfter
      httpsCallableFromURL
      httpsCallableFromURL$1
      makeAuthHeaders
      mapValues
      postJSON
      registerFunctions
      streamAtURL

      15 dependencies

      _errorForResponse
      callAtURL
      codeForHTTPStatus
      createResponseStream
      decode
      encode
      failAfter
      getCredentials
      httpsCallableFromURL
      httpsCallableFromURL$1
      makeAuthHeaders
      mapValues
      postJSON
      registerFunctions
      streamAtURL

      + getCredentials

      External Dependency

      ModuleBase (cc605e7)Merge (7f1b37e)Diff
      @firebase/util

      FirebaseError
      getModularInstance

      FirebaseError
      getModularInstance
      isCloudWorkstation

      + isCloudWorkstation

Test Logs

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

@hsubox76 hsubox76 marked this pull request as ready for review August 13, 2025 17:43
@hsubox76 hsubox76 requested review from a team as code owners August 13, 2025 17:43
@dlarocque dlarocque self-requested a review August 14, 2025 16:32
@hsubox76 hsubox76 merged commit 9b63cd6 into main Aug 20, 2025
36 of 38 checks passed
@hsubox76 hsubox76 deleted the ah/ai-thought-summaries branch August 20, 2025 16:19
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.

5 participants