From 85889decd5fd7fe8b7ec2d383c274e5f61e204c2 Mon Sep 17 00:00:00 2001 From: emilypgoogle <110422458+emilypgoogle@users.noreply.github.com> Date: Thu, 21 Aug 2025 20:31:24 +0000 Subject: [PATCH 1/4] Create release config for m169 --- release.json | 10 +++ release_report.json | 158 ++++++++++++++++++++++++++++++++++++++++++++ release_report.md | 70 ++++++++++++++++++++ 3 files changed, 238 insertions(+) create mode 100644 release.json create mode 100644 release_report.json create mode 100644 release_report.md diff --git a/release.json b/release.json new file mode 100644 index 00000000000..5c27fe8ad11 --- /dev/null +++ b/release.json @@ -0,0 +1,10 @@ +{ + "name": "m169", + "libraries": [ + ":firebase-ai", + ":firebase-crashlytics", + ":firebase-crashlytics-ndk", + ":firebase-sessions", + ":firebase-perf" + ] +} \ No newline at end of file diff --git a/release_report.json b/release_report.json new file mode 100644 index 00000000000..9c1926cab1b --- /dev/null +++ b/release_report.json @@ -0,0 +1,158 @@ +{ + "changesByLibraryName": { + "firebase-ai": [ + { + "commitId": "ca65d4bfbfcdc5e8161b408a57131003433a50c0", + "prId": "7284", + "author": "emilypgoogle", + "message": "Make APINotConfiguredException adjustments (#7284)\n\n", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/ca65d4bfbfcdc5e8161b408a57131003433a50c0", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7284" + }, + { + "commitId": "5fdf0247f5b9aa08cd07a02c518ad8d52bd53ca8", + "prId": "7285", + "author": "Daymon", + "message": "[FAL] Add support for limited-use tokens (#7285)\n\nPer [b/440338679](https://b.corp.google.com/issues/440338679),\n\nThis adds support for the `useLimitedUseAppCheckTokens` parameter to the\n`getInstance` constructor and the `.ai` helper method.\n\nTo help assist this process, I've also update the\n`FirebaseAIMultiResourceComponent` to use a hashed data class containing\nall the unique data of each `getInstance`. Previously, it only tracked\ninstances by the location. Now, it tracks instances by the location,\nbackend, and the value of `useLimitedUseAppCheckTokens`. In all\npracticality, this is unlikely to get much usage, but it helps avoid any\npotential edge-case issues where customers expect different instances.\n\nDocumentation is present for the added changes, as well as a changelog\nentry. These both match what we did on the iCore side, but feel free to\nadjust as needed. Furthermore, the `api.txt` file has been updated with\nthe corresponding changes.", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/5fdf0247f5b9aa08cd07a02c518ad8d52bd53ca8", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7285" + }, + { + "commitId": "d8cb105c8f0749ed0f76543f72e94d32e2344349", + "prId": "7282", + "author": "Rodrigo Lazo", + "message": "[AI] Improve refdocs (#7282)\n\nThe improvements include:\n\n- Link directly to the list of supported models in the documentation.\n- Fix rendering issues with numbers being translated as numbered lists\n- Link to firebase documentation instead of vertex documentation when\ncorresponding.", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/d8cb105c8f0749ed0f76543f72e94d32e2344349", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7282" + }, + { + "commitId": "be8f4809baa8eaca33cd7d4c21b955d40204dfd7", + "prId": "7272", + "author": "Rodrigo Lazo", + "message": "[AI] Add support for thinkingSummaries and thoughtSignatures (#7272)\n\nAdded support for returning [thought\nsummaries](https://ai.google.dev/gemini-api/docs/thinking#summaries)\nwhen using thinking-compatible models.\n\nAdditionally, it adds support for automatic handling of\n`thoughtSignatures`.\n\n---------\n\nCo-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/be8f4809baa8eaca33cd7d4c21b955d40204dfd7", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7272" + }, + { + "commitId": "c85227e344230aa676066352184bc6ccd510294f", + "prId": "7270", + "author": "Rodrigo Lazo", + "message": "[AI] Correctly handle empty candidates in the accessors (#7270)\n\nBefore, if a response had no candidates, accessors would throw an\nexception when used instead of handle the case elegantly. Now they\neither return an empty list, for collections, or null, for string.\n\nThe test file is added in\nhttps://github.com/FirebaseExtended/vertexai-sdk-test-data/pull/48", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/c85227e344230aa676066352184bc6ccd510294f", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7270" + }, + { + "commitId": "da659d7d614c41375a29868bed234b6890329e18", + "prId": "7259", + "author": "Rodrigo Lazo", + "message": "[Ai] Expose `APINotConfiguredException` in the public API (#7259)\n\nThe exception was added in #7233 but was mistakenly marked as internal.", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/da659d7d614c41375a29868bed234b6890329e18", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7259" + }, + { + "commitId": "628a6c6131fe14916592e60da5b4eeea94537b03", + "prId": "7260", + "author": "David Motsonashvili", + "message": "Added dilation parameter to generateMaskAndPadForOutpainting (#7260)\n\nThe dilation parameter gets passed through to the mask, and is optional.\n\nEnded up doing manual overloading to preserve binary compatibility.\n\n---------\n\nCo-authored-by: David Motsonashvili ", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/628a6c6131fe14916592e60da5b4eeea94537b03", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7260" + }, + { + "commitId": "2253d3f53da5b047b1525b5ef0bb07f80df2d1d0", + "prId": "7229", + "author": "David Motsonashvili", + "message": "documentation fixes for M168 (#7229)\n\nCo-authored-by: David Motsonashvili ", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/2253d3f53da5b047b1525b5ef0bb07f80df2d1d0", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7229" + }, + { + "commitId": "5e778b940e72d6ce10455a6604f2857820df1d28", + "prId": "7250", + "author": "emilypgoogle", + "message": "Configure Firebase AI tests to run nightly (#7250)\n\n", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/5e778b940e72d6ce10455a6604f2857820df1d28", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7250" + }, + { + "commitId": "8b1b50d421d558ca0d7e3f606fb289a5a370275d", + "prId": "7233", + "author": "emilypgoogle", + "message": "Add NotConfiguredException with a better error message than provided by the server. (#7233)\n\nThe previous error text \"genai config not found\" is ambiguous and as a\ngeneric ServerException did not provide documentation for resolutions.", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/8b1b50d421d558ca0d7e3f606fb289a5a370275d", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7233" + }, + { + "commitId": "316e1686c3ac9675384da435f43a1eff6c78f755", + "prId": "7228", + "author": "Ryan Wilson", + "message": "Temporarily remove CHANGELOG entry (#7228)\n\nThe backend won't be published until sometime next week, removing this\nuntil it's ready. No changes to the code are necessary as there are no\npublic API changes and it'll still hit a runtime error.", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/316e1686c3ac9675384da435f43a1eff6c78f755", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7228" + } + ], + "firebase-crashlytics": [ + { + "commitId": "296ab29eaf48de0b1b243f0ea98e33771bfea91b", + "prId": "7277", + "author": "Rodrigo Lazo", + "message": "[Infra] Improve datastore support (#7277)\n\nBump the dependency to version 1.1.7 to include the mitigation\nintroduced in\n\nhttps://developer.android.com/jetpack/androidx/releases/datastore#1.1.5\n\nAdditionally, a corruption handler has been added to the\n`JavaDataStorage` class.\n\nInclude `firebase-sessions` changelog entry so it's released.\n\n---------\n\nCo-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/296ab29eaf48de0b1b243f0ea98e33771bfea91b", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7277" + } + ], + "firebase-crashlytics-ndk": [ + { + "commitId": "296ab29eaf48de0b1b243f0ea98e33771bfea91b", + "prId": "7277", + "author": "Rodrigo Lazo", + "message": "[Infra] Improve datastore support (#7277)\n\nBump the dependency to version 1.1.7 to include the mitigation\nintroduced in\n\nhttps://developer.android.com/jetpack/androidx/releases/datastore#1.1.5\n\nAdditionally, a corruption handler has been added to the\n`JavaDataStorage` class.\n\nInclude `firebase-sessions` changelog entry so it's released.\n\n---------\n\nCo-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/296ab29eaf48de0b1b243f0ea98e33771bfea91b", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7277" + } + ], + "firebase-sessions": [ + { + "commitId": "296ab29eaf48de0b1b243f0ea98e33771bfea91b", + "prId": "7277", + "author": "Rodrigo Lazo", + "message": "[Infra] Improve datastore support (#7277)\n\nBump the dependency to version 1.1.7 to include the mitigation\nintroduced in\n\nhttps://developer.android.com/jetpack/androidx/releases/datastore#1.1.5\n\nAdditionally, a corruption handler has been added to the\n`JavaDataStorage` class.\n\nInclude `firebase-sessions` changelog entry so it's released.\n\n---------\n\nCo-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/296ab29eaf48de0b1b243f0ea98e33771bfea91b", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7277" + } + ], + "firebase-perf": [ + { + "commitId": "3c6bed3e768712ead6ea7c556f68dd9dc4017e0c", + "prId": "7278", + "author": "Tejas Deshpande", + "message": "Revert \"Make a change to prevent false positive background app starts.\" (#7278)\n\nReverts firebase/firebase-android-sdk#7274\n\nReverting this if the current change is going to be included in M169. \n\nAn additional change is needed to verify that the\n`mainThreadRunnableTime` should be set only if no activity's onCreate\nhas been called - otherwise this can cause a regression of *genuine*\nbackground starts.", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/3c6bed3e768712ead6ea7c556f68dd9dc4017e0c", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7278" + }, + { + "commitId": "e11e900b31360e6dba51adab7b26b5329903ebf4", + "prId": "7274", + "author": "Tejas Deshpande", + "message": "Make a change to prevent false positive background app starts. (#7274)\n\nAdded a change in `AppStartTrace` to prevent false positives of a\nbackground app start on API 34+ devices.\n\nSee https://github.com/firebase/firebase-android-sdk/issues/5920\n\nVerified locally:\n\n```\n2025-08-20 10:34:51.283 18373-18373 AppMonDemo com.tdeshpande.appmontester D mainThreadRunnable.run(): activityCreated = false\n2025-08-20 10:34:51.292 18373-18373 AppMonDemo com.tdeshpande.appmontester D onActivityPreCreated: mainThreadRunnableRun = true\n2025-08-20 10:34:51.294 18373-18373 AppMonDemo com.tdeshpande.appmontester D onActivityCreated: mainThreadRunnableRun = true\n2025-08-20 10:34:51.314 18373-18373 AppMonDemo com.tdeshpande.appmontester D onActivityStarted: mainThreadRunnableRun = true\n2025-08-20 10:34:51.318 18373-18373 FirebasePerformance com.tdeshpande.appmontester I Firebase Performance Monitoring is successfully initialized! In a minute, visit the Firebase console to view your data: \n2025-08-20 10:34:51.319 18373-18373 FirebasePerformance com.tdeshpande.appmontester D onResume(): com.tdeshpande.appmontester.MainActivity: 74362 microseconds\n2025-08-20 10:34:51.320 18373-18373 AppMonDemo com.tdeshpande.appmontester D onActivityResumed: mainThreadRunnableRun = true\n2025-08-20 10:34:51.323 18373-18431 FirebasePerformance com.tdeshpande.appmontester I Logging trace metric: _as (duration: 74.362ms). In a minute, visit the Firebase console to view your data: \n```", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/e11e900b31360e6dba51adab7b26b5329903ebf4", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7274" + }, + { + "commitId": "042827da3e2106264b87dd777eed3f32034851f2", + "prId": "7214", + "author": "Tejas Deshpande", + "message": "Refactor RCM fetch random delay to not depend on FirebaseApp initialization. (#7214)\n\nThis should help address the issue where there could be a deadlock if\n`FirebaseApp` is still being initialized.\n\nSee https://github.com/firebase/firebase-android-sdk/issues/4831", + "commitLink": "https://github.com/firebase/firebase-android-sdk/commit/042827da3e2106264b87dd777eed3f32034851f2", + "prLink": "https://github.com/firebase/firebase-android-sdk/pull/7214" + } + ] + }, + "changedLibrariesWithNoChangelog": [ + ":firebase-appdistribution", + ":firebase-appdistribution-api", + ":firebase-common", + ":firebase-config", + ":firebase-dataconnect", + ":firebase-ml-modeldownloader" + ] +} \ No newline at end of file diff --git a/release_report.md b/release_report.md new file mode 100644 index 00000000000..4f86ad689cb --- /dev/null +++ b/release_report.md @@ -0,0 +1,70 @@ +# Release Report +## firebase-ai + +* Make APINotConfiguredException adjustments (#7284) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7284) [commit](https://github.com/firebase/firebase-android-sdk/commit/ca65d4bfbfcdc5e8161b408a57131003433a50c0) [emilypgoogle] + +* [FAL] Add support for limited-use tokens (#7285) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7285) [commit](https://github.com/firebase/firebase-android-sdk/commit/5fdf0247f5b9aa08cd07a02c518ad8d52bd53ca8) [Daymon] + +* [AI] Improve refdocs (#7282) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7282) [commit](https://github.com/firebase/firebase-android-sdk/commit/d8cb105c8f0749ed0f76543f72e94d32e2344349) [Rodrigo Lazo] + +* [AI] Add support for thinkingSummaries and thoughtSignatures (#7272) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7272) [commit](https://github.com/firebase/firebase-android-sdk/commit/be8f4809baa8eaca33cd7d4c21b955d40204dfd7) [Rodrigo Lazo] + +* [AI] Correctly handle empty candidates in the accessors (#7270) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7270) [commit](https://github.com/firebase/firebase-android-sdk/commit/c85227e344230aa676066352184bc6ccd510294f) [Rodrigo Lazo] + +* [Ai] Expose `APINotConfiguredException` in the public API (#7259) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7259) [commit](https://github.com/firebase/firebase-android-sdk/commit/da659d7d614c41375a29868bed234b6890329e18) [Rodrigo Lazo] + +* Added dilation parameter to generateMaskAndPadForOutpainting (#7260) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7260) [commit](https://github.com/firebase/firebase-android-sdk/commit/628a6c6131fe14916592e60da5b4eeea94537b03) [David Motsonashvili] + +* documentation fixes for M168 (#7229) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7229) [commit](https://github.com/firebase/firebase-android-sdk/commit/2253d3f53da5b047b1525b5ef0bb07f80df2d1d0) [David Motsonashvili] + +* Configure Firebase AI tests to run nightly (#7250) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7250) [commit](https://github.com/firebase/firebase-android-sdk/commit/5e778b940e72d6ce10455a6604f2857820df1d28) [emilypgoogle] + +* Add NotConfiguredException with a better error message than provided by the server. (#7233) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7233) [commit](https://github.com/firebase/firebase-android-sdk/commit/8b1b50d421d558ca0d7e3f606fb289a5a370275d) [emilypgoogle] + +* Temporarily remove CHANGELOG entry (#7228) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7228) [commit](https://github.com/firebase/firebase-android-sdk/commit/316e1686c3ac9675384da435f43a1eff6c78f755) [Ryan Wilson] + +## firebase-crashlytics + +* [Infra] Improve datastore support (#7277) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7277) [commit](https://github.com/firebase/firebase-android-sdk/commit/296ab29eaf48de0b1b243f0ea98e33771bfea91b) [Rodrigo Lazo] + +## firebase-crashlytics-ndk + +* [Infra] Improve datastore support (#7277) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7277) [commit](https://github.com/firebase/firebase-android-sdk/commit/296ab29eaf48de0b1b243f0ea98e33771bfea91b) [Rodrigo Lazo] + +## firebase-sessions + +* [Infra] Improve datastore support (#7277) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7277) [commit](https://github.com/firebase/firebase-android-sdk/commit/296ab29eaf48de0b1b243f0ea98e33771bfea91b) [Rodrigo Lazo] + +## firebase-perf + +* Revert "Make a change to prevent false positive background app starts." (#7278) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7278) [commit](https://github.com/firebase/firebase-android-sdk/commit/3c6bed3e768712ead6ea7c556f68dd9dc4017e0c) [Tejas Deshpande] + +* Make a change to prevent false positive background app starts. (#7274) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7274) [commit](https://github.com/firebase/firebase-android-sdk/commit/e11e900b31360e6dba51adab7b26b5329903ebf4) [Tejas Deshpande] + +* Refactor RCM fetch random delay to not depend on FirebaseApp initialization. (#7214) + [pr](https://github.com/firebase/firebase-android-sdk/pull/7214) [commit](https://github.com/firebase/firebase-android-sdk/commit/042827da3e2106264b87dd777eed3f32034851f2) [Tejas Deshpande] + + +## SDKs with changes, but no changelogs +:firebase-appdistribution +:firebase-appdistribution-api +:firebase-common +:firebase-config +:firebase-dataconnect +:firebase-ml-modeldownloader \ No newline at end of file From cdf3091f5f78534cf0eb3e15a12f0e4b5656a66d Mon Sep 17 00:00:00 2001 From: Daymon <17409137+daymxn@users.noreply.github.com> Date: Mon, 25 Aug 2025 11:32:32 -0500 Subject: [PATCH 2/4] [FAL] Update limited-use token docs (#7299) Per [b/440356335](https://b.corp.google.com/issues/440356335), This updates the limited-use token related docs to point to the web page that will go live with the release. Initially, it was planned for the docs to go live when Unity released, but Rachel now intends to have them live immediately -- with a note about Unity until they go live. The updates are made per Rachel's recommendations and discussions in the javadoc CL/ALF doc. --- firebase-ai/CHANGELOG.md | 10 +++++----- .../com/google/firebase/ai/FirebaseAI.kt | 20 ++++++------------- 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/firebase-ai/CHANGELOG.md b/firebase-ai/CHANGELOG.md index 0bc7acbe160..1d85bf47c86 100644 --- a/firebase-ai/CHANGELOG.md +++ b/firebase-ai/CHANGELOG.md @@ -7,11 +7,11 @@ configured. * [changed] Added a `dilation` parameter to `ImagenMaskReference.generateMaskAndPadForOutpainting` (#7260) -* [feature] Added a new configuration option to enable limited-use App Check tokens for attesting - Firebase AI Logic requests. This enhances security against replay attacks. To use this feature, - configure it explicitly via the new `useLimitedUseAppCheckTokens` parameter when initializing - `FirebaseAI`. We recommend migrating to limited-use tokens now, so your app will be ready to take - advantage of replay protection when it becomes available for Firebase AI Logic. +* [feature] Added support for limited-use tokens with Firebase App Check. These short-lived tokens + provide greater protection for the APIs that give you access to Gemini and Imagen models. Learn + how to [enable usage of limited-use tokens](https://firebase.google.com/docs/ai-logic/app-check). + (#7285) + # 17.1.0 ======= diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/FirebaseAI.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/FirebaseAI.kt index f43a78384b5..25290fe2ba7 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/FirebaseAI.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/FirebaseAI.kt @@ -231,22 +231,12 @@ internal constructor( * * @param backend the backend reference to make generative AI requests to. * @param useLimitedUseAppCheckTokens when sending tokens to the backend, this option enables - * the usage of App Check's limited-use tokens instead of the standard cached tokens. - * - * A new limited-use tokens will be generated for each request; providing a smaller attack - * surface for malicious parties to hijack tokens. When used alongside replay protection, - * limited-use tokens are also _consumed_ after each request, ensuring they can't be used again. + * the usage of App Check's limited-use tokens instead of the standard cached tokens. Learn more + * about [limited-use tokens](https://firebase.google.com/docs/ai-logic/app-check), including + * their nuances, when to use them, and best practices for integrating them into your app. * * _This flag is set to `false` by default._ - * - * **Important:** Replay protection is not currently supported for the FirebaseAI backend. While - * this feature is being developed, you can still migrate to using limited-use tokens. Because - * limited-use tokens are backwards compatible, you can still use them without replay - * protection. Due to their shorter TTL over standard App Check tokens, they still provide a - * security benefit. Migrating to limited-use tokens sooner minimizes disruption when support - * for replay protection is added. */ - // TODO(b/440356335): Update docs above when web page goes live in M170 @JvmStatic @JvmOverloads public fun getInstance( @@ -290,7 +280,9 @@ public fun Firebase.ai( * * @param backend the backend reference to make generative AI requests to. * @param useLimitedUseAppCheckTokens use App Check's limited-use tokens when sending requests to - * the backend. To learn more about what this means, see the full docs on [FirebaseAI.getInstance]. + * the backend. Learn more about + * [limited-use tokens](https://firebase.google.com/docs/ai-logic/app-check), including their + * nuances, when to use them, and best practices for integrating them into your app. */ // TODO(b/440356335): Update docs above when web page goes live in M170 public fun Firebase.ai( From 84c8585293522f5571db642c771ce93942e1bc6b Mon Sep 17 00:00:00 2001 From: emilypgoogle <110422458+emilypgoogle@users.noreply.github.com> Date: Wed, 27 Aug 2025 14:03:54 -0500 Subject: [PATCH 3/4] m169 doc changes (#7304) We changed public constructors to internal constructors without moving the relevant docs, this fixes that. --- .../google/firebase/ai/common/Exceptions.kt | 2 +- .../com/google/firebase/ai/type/Exceptions.kt | 2 +- .../ai/type/GenerateContentResponse.kt | 2 +- .../com/google/firebase/ai/type/Part.kt | 44 +++++++++---------- 4 files changed, 23 insertions(+), 27 deletions(-) diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/common/Exceptions.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/common/Exceptions.kt index 82ad80838f6..9e94f88dcfa 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/common/Exceptions.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/common/Exceptions.kt @@ -90,7 +90,7 @@ internal class UnsupportedUserLocationException(cause: Throwable? = null) : FirebaseCommonAIException("User location is not supported for the API use.", cause) /** - * The user's project has not been configured and enabled for the selected API. + * The Firebase project has not been configured and enabled for the selected API. * * For the Gemini Developer API, see * [steps](https://firebase.google.com/docs/ai-logic/faq-and-troubleshooting?api=dev#error-genai-config-not-found) diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Exceptions.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Exceptions.kt index a006f34e915..fb23ca26e95 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Exceptions.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Exceptions.kt @@ -152,7 +152,7 @@ public class UnsupportedUserLocationException internal constructor(cause: Throwa FirebaseAIException("User location is not supported for the API use.", cause) /** - * The user's project has not been configured and enabled for the selected API. + * The Firebase project has not been configured and enabled for the selected API. * * For the Gemini Developer API, see * [steps](https://firebase.google.com/docs/ai-logic/faq-and-troubleshooting?api=dev#error-genai-config-not-found) diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/GenerateContentResponse.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/GenerateContentResponse.kt index 45398ce356b..bbf5fc0ff73 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/GenerateContentResponse.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/GenerateContentResponse.kt @@ -59,7 +59,7 @@ public class GenerateContentResponse( /** * Convenience field representing all the text parts in the response that are marked as thoughts - * as a single string, if they exists. + * as a single string, if they exist. * * Learn more about [thinking](https://firebase.google.com/docs/ai-logic/thinking?api=dev). */ diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Part.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Part.kt index 24bbd888cf9..a6bbb83e406 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Part.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Part.kt @@ -106,8 +106,6 @@ internal constructor( /** * Represents image data sent to and received from requests. The image is converted client-side to * JPEG encoding at 80% quality before being sent to the server. - * - * @param image [Bitmap] to convert into a [Part] */ public class ImagePart internal constructor( @@ -116,6 +114,7 @@ internal constructor( internal val thoughtSignature: String? ) : Part { + /** @param image [Bitmap] to convert into a [Part] */ public constructor(image: Bitmap) : this(image, false, null) internal fun toInlineDataPart() = @@ -127,13 +126,7 @@ internal constructor( ) } -/** - * Represents binary data with an associated MIME type sent to and received from requests. - * - * @param inlineData the binary data as a [ByteArray] - * @param mimeType an IANA standard MIME type. For supported values, see the - * [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements). - */ +/** Represents binary data with an associated MIME type sent to and received from requests. */ public class InlineDataPart internal constructor( public val inlineData: ByteArray, @@ -142,6 +135,11 @@ internal constructor( internal val thoughtSignature: String? ) : Part { + /** + * @param inlineData the binary data as a [ByteArray] + * @param mimeType an IANA standard MIME type. For supported values, see the + * [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements). + */ public constructor( inlineData: ByteArray, mimeType: String @@ -199,13 +197,7 @@ internal constructor( } } -/** - * Represents function call output to be returned to the model when it requests a function call. - * - * @param name The name of the called function. - * @param response The response produced by the function as a [JSONObject]. - * @param id Matching `id` for a [FunctionCallPart], if one was provided. - */ +/** Represents function call output to be returned to the model when it requests a function call. */ public class FunctionResponsePart internal constructor( public val name: String, @@ -215,6 +207,11 @@ internal constructor( internal val thoughtSignature: String? ) : Part { + /** + * @param name The name of the called function. + * @param response The response produced by the function as a [JSONObject]. + * @param id Matching `id` for a [FunctionCallPart], if one was provided. + */ @JvmOverloads public constructor( name: String, @@ -242,14 +239,7 @@ internal constructor( } } -/** - * Represents file data stored in Cloud Storage for Firebase, referenced by URI. - * - * @param uri The `"gs://"`-prefixed URI of the file in Cloud Storage for Firebase, for example, - * `"gs://bucket-name/path/image.jpg"` - * @param mimeType an IANA standard MIME type. For supported MIME type values see the - * [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements). - */ +/** Represents file data stored in Cloud Storage for Firebase, referenced by URI. */ public class FileDataPart internal constructor( public val uri: String, @@ -258,6 +248,12 @@ internal constructor( internal val thoughtSignature: String? ) : Part { + /** + * @param uri The `"gs://"`-prefixed URI of the file in Cloud Storage for Firebase, for example, + * `"gs://bucket-name/path/image.jpg"` + * @param mimeType an IANA standard MIME type. For supported MIME type values see the + * [Firebase documentation](https://firebase.google.com/docs/vertex-ai/input-file-requirements). + */ public constructor(uri: String, mimeType: String) : this(uri, mimeType, false, null) @Serializable From f53462a0a73713d50bc30c08fe20529cefc125d4 Mon Sep 17 00:00:00 2001 From: emilypgoogle <110422458+emilypgoogle@users.noreply.github.com> Date: Wed, 27 Aug 2025 16:16:06 -0500 Subject: [PATCH 4/4] m169 fix more documentation (#7307) I missed a constructor in the initial PR --- .../kotlin/com/google/firebase/ai/type/Part.kt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Part.kt b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Part.kt index a6bbb83e406..a8fdfa91fed 100644 --- a/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Part.kt +++ b/firebase-ai/src/main/kotlin/com/google/firebase/ai/type/Part.kt @@ -157,14 +157,7 @@ internal constructor( } } -/** - * Represents function call name and params received from requests. - * - * @param name the name of the function to call - * @param args the function parameters and values as a [Map] - * @param id Unique id of the function call. If present, the returned [FunctionResponsePart] should - * have a matching `id` field. - */ +/** Represents function call name and params received from requests. */ public class FunctionCallPart internal constructor( public val name: String, @@ -174,6 +167,12 @@ internal constructor( internal val thoughtSignature: String? ) : Part { + /** + * @param name the name of the function to call + * @param args the function parameters and values as a [Map] + * @param id Unique id of the function call. If present, the returned [FunctionResponsePart] + * should have a matching `id` field. + */ @JvmOverloads public constructor( name: String,