Skip to content

feat(ai): add support for setting a thinking budget #6999

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

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

Conversation

thatfiredev
Copy link
Member

This should resolve #6990

Copy link
Contributor

github-actions bot commented May 28, 2025

Javadoc Changes:
--- /home/runner/diff/original/firebase-kotlindoc/android/client/firebase-ai/_toc.yaml	2025-05-28 17:40:07.628885440 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/client/firebase-ai/_toc.yaml	2025-05-28 17:36:40.176708079 +0000
@@ -168,6 +168,12 @@
       path: "/docs/reference/android/com/google/firebase/ai/type/StringFormat.Custom.html"
     - title: "TextPart"
       path: "/docs/reference/android/com/google/firebase/ai/type/TextPart.html"
+    - title: "ThinkingConfig"
+      path: "/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html"
+    - title: "ThinkingConfig.Builder"
+      path: "/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html"
+    - title: "ThinkingConfigKt"
+      path: "/docs/reference/android/com/google/firebase/ai/type/ThinkingConfigKt.html"
     - title: "Tool"
       path: "/docs/reference/android/com/google/firebase/ai/type/Tool.html"
     - title: "ToolConfig"
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/ai/type/GenerationConfig.Builder.html	2025-05-28 17:40:07.645885618 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/ai/type/GenerationConfig.Builder.html	2025-05-28 17:36:40.212708483 +0000
@@ -109,6 +109,12 @@
             </td>
           </tr>
           <tr>
+            <td><code>final <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#thinkingConfig()">thinkingConfig</a></code></div>
+            </td>
+          </tr>
+          <tr>
             <td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a></code></td>
             <td>
               <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#topK()">topK</a></code></div>
@@ -221,6 +227,12 @@
           <tr>
             <td><code>final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a></code></td>
             <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#setThinkingConfig(com.google.firebase.ai.type.ThinkingConfig)">setThinkingConfig</a>(<a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>&nbsp;thinkingConfig)</code></div>
+            </td>
+          </tr>
+          <tr>
+            <td><code>final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a></code></td>
+            <td>
               <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#setTopK(kotlin.Int)">setTopK</a>(<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;topK)</code></div>
             </td>
           </tr>
@@ -280,6 +292,10 @@
         <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#temperature()">temperature</a></pre>
         <p>See <code><a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.html#temperature()">GenerationConfig.temperature</a></code>.</p>
       </div>
+      <div class="api-item"><a name="getThinkingConfig()"></a><a name="setThinkingConfig()"></a><a name="getThinkingConfig--"></a><a name="setThinkingConfig--"></a>
+        <h3 class="api-name" id="thinkingConfig()">thinkingConfig</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#thinkingConfig()">thinkingConfig</a></pre>
+      </div>
       <div class="api-item"><a name="getTopK()"></a><a name="setTopK()"></a><a name="getTopK--"></a><a name="setTopK--"></a>
         <h3 class="api-name" id="topK()">topK</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#topK()">topK</a></pre>
@@ -341,6 +357,10 @@
         <h3 class="api-name" id="setTemperature(kotlin.Float)">setTemperature</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#setTemperature(kotlin.Float)">setTemperature</a>(<a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a>&nbsp;temperature)</pre>
       </div>
+      <div class="api-item"><a name="setThinkingConfig-com.google.firebase.ai.type.ThinkingConfig-"></a><a name="setthinkingconfig"></a>
+        <h3 class="api-name" id="setThinkingConfig(com.google.firebase.ai.type.ThinkingConfig)">setThinkingConfig</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#setThinkingConfig(com.google.firebase.ai.type.ThinkingConfig)">setThinkingConfig</a>(<a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>&nbsp;thinkingConfig)</pre>
+      </div>
       <div class="api-item"><a name="setTopK-kotlin.Int-"></a><a name="settopk"></a>
         <h3 class="api-name" id="setTopK(kotlin.Int)">setTopK</h3>
         <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#setTopK(kotlin.Int)">setTopK</a>(<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;topK)</pre>
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html	2025-05-28 17:36:40.189708225 +0000
@@ -0,0 +1,112 @@
+<html devsite="true">
+  <head>
+    <title>ThinkingConfig.Builder</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/android/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>ThinkingConfig.Builder</h1>
+    <p>
+      <pre>public final class <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></pre>
+    </p>
+    <hr>
+    <h2>Summary</h2>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public fields</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html#thinkingBudget()">thinkingBudget</a></code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public constructors</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html#Builder()">Builder</a>()</code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public methods</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code>final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html#build()">build</a>()</code></div>
+            </td>
+          </tr>
+          <tr>
+            <td><code>final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html#setThinkingBudget(kotlin.Int)">setThinkingBudget</a>(<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;thinkingBudget)</code></div>
+              <p>The number of thoughts tokens that the model should generate.</p>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="list">
+      <h2>Public fields</h2>
+      <div class="api-item"><a name="getThinkingBudget()"></a><a name="setThinkingBudget()"></a><a name="getThinkingBudget--"></a><a name="setThinkingBudget--"></a>
+        <h3 class="api-name" id="thinkingBudget()">thinkingBudget</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html#thinkingBudget()">thinkingBudget</a></pre>
+      </div>
+    </div>
+    <div class="list">
+      <h2>Public constructors</h2>
+      <div class="api-item"><a name="Builder--"></a><a name="builder"></a>
+        <h3 class="api-name" id="Builder()">Builder</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html#Builder()">Builder</a>()</pre>
+      </div>
+    </div>
+    <div class="list">
+      <h2>Public methods</h2>
+      <div class="api-item"><a name="build--"></a><a name="build"></a>
+        <h3 class="api-name" id="build()">build</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html#build()">build</a>()</pre>
+      </div>
+      <div class="api-item"><a name="setThinkingBudget-kotlin.Int-"></a><a name="setthinkingbudget"></a>
+        <h3 class="api-name" id="setThinkingBudget(kotlin.Int)">setThinkingBudget</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html#setThinkingBudget(kotlin.Int)">setThinkingBudget</a>(<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;thinkingBudget)</pre>
+        <p>The number of thoughts tokens that the model should generate.</p>
+      </div>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/ai/type/ThinkingConfig.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/ai/type/ThinkingConfig.html	2025-05-28 17:36:40.200708348 +0000
@@ -0,0 +1,93 @@
+<html devsite="true">
+  <head>
+    <title>ThinkingConfig</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/android/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>ThinkingConfig</h1>
+    <p>
+      <pre>public final class <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></pre>
+    </p>
+    <hr>
+    <p>Configuration parameters for thinking features.</p>
+    <h2>Summary</h2>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Nested types</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td>
+              <div><code>public final class <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public fields</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code>final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html#thinkingBudget()">thinkingBudget</a></code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public constructors</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html#ThinkingConfig(kotlin.Int)">ThinkingConfig</a>(<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;thinkingBudget)</code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="list">
+      <h2>Public fields</h2>
+      <div class="api-item"><a name="getThinkingBudget()"></a><a name="setThinkingBudget()"></a><a name="getThinkingBudget--"></a><a name="setThinkingBudget--"></a>
+        <h3 class="api-name" id="thinkingBudget()">thinkingBudget</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;final&nbsp;<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html#thinkingBudget()">thinkingBudget</a></pre>
+      </div>
+    </div>
+    <div class="list">
+      <h2>Public constructors</h2>
+      <div class="api-item"><a name="ThinkingConfig-kotlin.Int-"></a><a name="thinkingconfig"></a>
+        <h3 class="api-name" id="ThinkingConfig(kotlin.Int)">ThinkingConfig</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html#ThinkingConfig(kotlin.Int)">ThinkingConfig</a>(<a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a>&nbsp;thinkingBudget)</pre>
+      </div>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/ai/type/ThinkingConfigKt.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/ai/type/ThinkingConfigKt.html	2025-05-28 17:36:40.226708640 +0000
@@ -0,0 +1,48 @@
+<html devsite="true">
+  <head>
+    <title>ThinkingConfigKt</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/android/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <h1>ThinkingConfigKt</h1>
+    <p>
+      <pre>public final class <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfigKt.html">ThinkingConfigKt</a></pre>
+    </p>
+    <hr>
+    <h2>Summary</h2>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public methods</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code>static&nbsp;final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfigKt.html#thinkingConfig(kotlin.Function1)">thinkingConfig</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> Function1&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a>,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;init<br>)</code></div>
+              <p>Helper method to construct a <code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code> in a DSL-like manner.</p>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="list">
+      <h2>Public methods</h2>
+      <div class="api-item"><a name="thinkingConfig-kotlin.Function1-"></a><a name="thinkingconfig"></a>
+        <h3 class="api-name" id="thinkingConfig(kotlin.Function1)">thinkingConfig</h3>
+        <pre class="api-signature no-pretty-print">public&nbsp;static&nbsp;final&nbsp;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>&nbsp;<a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfigKt.html#thinkingConfig(kotlin.Function1)">thinkingConfig</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp;@<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-extension-function-type/index.html">ExtensionFunctionType</a> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> Function1&lt;@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a>,&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>&gt;&nbsp;init<br>)</pre>
+        <p>Helper method to construct a <code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code> in a DSL-like manner.</p>
+        <p>Example Usage:</p>
+        <pre class="prettyprint">thinkingConfig {<br>  thinkingBudget = 0 // disable thinking<br>}</pre>
+      </div>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/ai/type/package-summary.html	2025-05-28 17:40:07.640885565 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/ai/type/package-summary.html	2025-05-28 17:36:40.202708371 +0000
@@ -385,6 +385,20 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+            <td>
+              <p>Configuration parameters for thinking features.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></td>
+            <td></td>
+          </tr>
+          <tr>
+            <td><code><a href="/docs/reference/android/com/google/firebase/ai/type/ThinkingConfigKt.html">ThinkingConfigKt</a></code></td>
+            <td></td>
+          </tr>
+          <tr>
             <td><code><a href="/docs/reference/android/com/google/firebase/ai/type/Tool.html">Tool</a></code></td>
             <td>
               <p>Contains a set of function declarations that the model has access to.</p>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/client/firebase-ai/_toc.yaml	2025-05-28 17:40:07.680885983 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/client/firebase-ai/_toc.yaml	2025-05-28 17:36:40.260709022 +0000
@@ -156,6 +156,10 @@
       path: "/docs/reference/kotlin/com/google/firebase/ai/type/StringFormat.Custom.html"
     - title: "TextPart"
       path: "/docs/reference/kotlin/com/google/firebase/ai/type/TextPart.html"
+    - title: "ThinkingConfig"
+      path: "/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html"
+    - title: "ThinkingConfig.Builder"
+      path: "/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html"
     - title: "Tool"
       path: "/docs/reference/kotlin/com/google/firebase/ai/type/Tool.html"
     - title: "ToolConfig"
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html	2025-05-28 17:40:07.685886035 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html	2025-05-28 17:36:40.285709303 +0000
@@ -129,6 +129,12 @@
           <tr>
             <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a></code></td>
             <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#setThinkingConfig(com.google.firebase.ai.type.ThinkingConfig)">setThinkingConfig</a>(thinkingConfig:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>?)</code></div>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a></code></td>
+            <td>
               <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#setTopK(kotlin.Int)">setTopK</a>(topK:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?)</code></div>
             </td>
           </tr>
@@ -217,6 +223,12 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>?</code></td>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#thinkingConfig()">thinkingConfig</a></code></div>
+            </td>
+          </tr>
+          <tr>
             <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</code></td>
             <td>
               <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#topK()">topK</a></code></div>
@@ -283,6 +295,10 @@
         <h3 class="api-name" id="setTemperature(kotlin.Float)">setTemperature</h3>
         <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#setTemperature(kotlin.Float)">setTemperature</a>(temperature:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a></pre>
       </div>
+      <div class="api-item"><a name="setThinkingConfig-com.google.firebase.ai.type.ThinkingConfig-"></a><a name="setthinkingconfig"></a>
+        <h3 class="api-name" id="setThinkingConfig(com.google.firebase.ai.type.ThinkingConfig)">setThinkingConfig</h3>
+        <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#setThinkingConfig(com.google.firebase.ai.type.ThinkingConfig)">setThinkingConfig</a>(thinkingConfig:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>?):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a></pre>
+      </div>
       <div class="api-item"><a name="setTopK-kotlin.Int-"></a><a name="settopk"></a>
         <h3 class="api-name" id="setTopK(kotlin.Int)">setTopK</h3>
         <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#setTopK(kotlin.Int)">setTopK</a>(topK:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a></pre>
@@ -339,6 +355,10 @@
         <pre class="api-signature no-pretty-print">var&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#temperature()">temperature</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?</pre>
         <p>See <code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.html#temperature()">GenerationConfig.temperature</a></code>.</p>
       </div>
+      <div class="api-item"><a name="getThinkingConfig()"></a><a name="setThinkingConfig()"></a><a name="getThinkingConfig--"></a><a name="setThinkingConfig--"></a>
+        <h3 class="api-name" id="thinkingConfig()">thinkingConfig</h3>
+        <pre class="api-signature no-pretty-print">var&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#thinkingConfig()">thinkingConfig</a>:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>?</pre>
+      </div>
       <div class="api-item"><a name="getTopK()"></a><a name="setTopK()"></a><a name="getTopK--"></a><a name="setTopK--"></a>
         <h3 class="api-name" id="topK()">topK</h3>
         <pre class="api-signature no-pretty-print">var&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#topK()">topK</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html	2025-05-28 17:36:40.273709168 +0000
@@ -0,0 +1,112 @@
+<html devsite="true">
+  <head>
+    <title>ThinkingConfig.Builder</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/kotlin/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>ThinkingConfig.Builder</h1>
+    <p>
+      <pre>class <a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></pre>
+    </p>
+    <hr>
+    <h2>Summary</h2>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public constructors</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#Builder()">Builder</a>()</code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public functions</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#build()">build</a>()</code></div>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#setThinkingBudget(kotlin.Int)">setThinkingBudget</a>(thinkingBudget:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?)</code></div>
+              <p>The number of thoughts tokens that the model should generate.</p>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public properties</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</code></td>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#thinkingBudget()">thinkingBudget</a></code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="list">
+      <h2>Public constructors</h2>
+      <div class="api-item"><a name="Builder--"></a><a name="builder"></a>
+        <h3 class="api-name" id="Builder()">Builder</h3>
+        <pre class="api-signature no-pretty-print"><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#Builder()">Builder</a>()</pre>
+      </div>
+    </div>
+    <div class="list">
+      <h2>Public functions</h2>
+      <div class="api-item"><a name="build--"></a><a name="build"></a>
+        <h3 class="api-name" id="build()">build</h3>
+        <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#build()">build</a>():&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></pre>
+      </div>
+      <div class="api-item"><a name="setThinkingBudget-kotlin.Int-"></a><a name="setthinkingbudget"></a>
+        <h3 class="api-name" id="setThinkingBudget(kotlin.Int)">setThinkingBudget</h3>
+        <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#setThinkingBudget(kotlin.Int)">setThinkingBudget</a>(thinkingBudget:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></pre>
+        <p>The number of thoughts tokens that the model should generate.</p>
+      </div>
+    </div>
+    <div class="list">
+      <h2>Public properties</h2>
+      <div class="api-item"><a name="getThinkingBudget()"></a><a name="setThinkingBudget()"></a><a name="getThinkingBudget--"></a><a name="setThinkingBudget--"></a>
+        <h3 class="api-name" id="thinkingBudget()">thinkingBudget</h3>
+        <pre class="api-signature no-pretty-print">var&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#thinkingBudget()">thinkingBudget</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
+      </div>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/ThinkingConfig.html	1970-01-01 00:00:00.000000000 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/ThinkingConfig.html	2025-05-28 17:36:40.283709281 +0000
@@ -0,0 +1,93 @@
+<html devsite="true">
+  <head>
+    <title>ThinkingConfig</title>
+{% setvar book_path %}/_book.yaml{% endsetvar %}
+{% include "docs/reference/kotlin/_reference-head-tags.html" %}
+  </head>
+  <body>
+    <div id="metadata-info-block"></div>
+    <h1>ThinkingConfig</h1>
+    <p>
+      <pre>class <a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></pre>
+    </p>
+    <hr>
+    <p>Configuration parameters for thinking features.</p>
+    <h2>Summary</h2>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Nested types</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td>
+              <div><code>class <a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public constructors</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html#ThinkingConfig(kotlin.Int)">ThinkingConfig</a>(thinkingBudget:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?)</code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="devsite-table-wrapper">
+      <table class="responsive">
+        <colgroup>
+          <col width="40%">
+          <col>
+        </colgroup>
+        <thead>
+          <tr>
+            <th colspan="100%"><h3>Public properties</h3></th>
+          </tr>
+        </thead>
+        <tbody class="list">
+          <tr>
+            <td><code><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</code></td>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html#thinkingBudget()">thinkingBudget</a></code></div>
+            </td>
+          </tr>
+        </tbody>
+      </table>
+    </div>
+    <div class="list">
+      <h2>Public constructors</h2>
+      <div class="api-item"><a name="ThinkingConfig-kotlin.Int-"></a><a name="thinkingconfig"></a>
+        <h3 class="api-name" id="ThinkingConfig(kotlin.Int)">ThinkingConfig</h3>
+        <pre class="api-signature no-pretty-print"><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html#ThinkingConfig(kotlin.Int)">ThinkingConfig</a>(thinkingBudget:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?)</pre>
+      </div>
+    </div>
+    <div class="list">
+      <h2>Public properties</h2>
+      <div class="api-item"><a name="getThinkingBudget()"></a><a name="setThinkingBudget()"></a><a name="getThinkingBudget--"></a><a name="setThinkingBudget--"></a>
+        <h3 class="api-name" id="thinkingBudget()">thinkingBudget</h3>
+        <pre class="api-signature no-pretty-print">val&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html#thinkingBudget()">thinkingBudget</a>:&nbsp;<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?</pre>
+      </div>
+    </div>
+  </body>
+</html>
+
--- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/package-summary.html	2025-05-28 17:40:07.684886025 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/package-summary.html	2025-05-28 17:36:40.284709292 +0000
@@ -350,6 +350,16 @@
             </td>
           </tr>
           <tr>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+            <td>
+              <p>Configuration parameters for thinking features.</p>
+            </td>
+          </tr>
+          <tr>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></td>
+            <td></td>
+          </tr>
+          <tr>
             <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/Tool.html">Tool</a></code></td>
             <td>
               <p>Contains a set of function declarations that the model has access to.</p>
@@ -538,6 +548,13 @@
               <p>Helper method to construct a <code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/LiveGenerationConfig.html">LiveGenerationConfig</a></code> in a DSL-like manner.</p>
             </td>
           </tr>
+          <tr>
+            <td><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+            <td>
+              <div><code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/package-summary.html#thinkingConfig(kotlin.Function1)">thinkingConfig</a>(init:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a>.() <span style="white-space: nowrap;">-&gt;</span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>)</code></div>
+              <p>Helper method to construct a <code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code> in a DSL-like manner.</p>
+            </td>
+          </tr>
         </tbody>
       </table>
     </div>
@@ -610,6 +627,13 @@
       <p>Example Usage:</p>
       <pre class="prettyprint">liveGenerationConfig {<br>  temperature = 0.75f<br>  topP = 0.5f<br>  topK = 30<br>  candidateCount = 4<br>  maxOutputTokens = 300<br>  ...<br>}</pre>
     </div>
+    <div class="api-item"><a name="thinkingConfig-kotlin.Function1-"></a><a name="thinkingconfig"></a>
+      <h3 class="api-name" id="thinkingConfig(kotlin.Function1)">thinkingConfig</h3>
+      <pre class="api-signature no-pretty-print">fun&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/package-summary.html#thinkingConfig(kotlin.Function1)">thinkingConfig</a>(init:&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a>.() <span style="white-space: nowrap;">-&gt;</span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>):&nbsp;<a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></pre>
+      <p>Helper method to construct a <code><a href="/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code> in a DSL-like manner.</p>
+      <p>Example Usage:</p>
+      <pre class="prettyprint">thinkingConfig {<br>  thinkingBudget = 0 // disable thinking<br>}</pre>
+    </div>
     <h2>Extension functions</h2>
     <div class="api-item"><a name="-com.google.firebase.ai.type.Part-.asFileDataOrNull--"></a><a name="asfiledataornull"></a>
       <h3 class="api-name" id="(com.google.firebase.ai.type.Part).asFileDataOrNull()">asFileDataOrNull</h3>

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 28, 2025

Copy link
Contributor

github-actions bot commented May 28, 2025

Test Results

 26 files  +2   26 suites  +2   34s ⏱️ ±0s
104 tests +2  104 ✅ +2  0 💤 ±0  0 ❌ ±0 
208 runs  +4  208 ✅ +4  0 💤 ±0  0 ❌ ±0 

Results for commit 80deba1. ± Comparison against base commit 4e027a9.

♻️ This comment has been updated with latest results.

@google-oss-bot
Copy link
Contributor

google-oss-bot commented May 28, 2025

Size Report 1

Affected Products

  • firebase-ai

    TypeBase (4e027a9)Merge (cf37e62)Diff
    aar819 kB827 kB+8.05 kB (+1.0%)
    apk (aggressive)1.55 MB1.55 MB+3.70 kB (+0.2%)
    apk (release)9.52 MB9.52 MB+6.04 kB (+0.1%)

Test Logs

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Thinking budget cannot be set in firebase AI logic android sdk
2 participants