-
Notifications
You must be signed in to change notification settings - Fork 627
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
base: main
Are you sure you want to change the base?
Conversation
Javadoc Changes:--- /home/runner/diff/original/firebase-kotlindoc/android/client/firebase-ai/_toc.yaml 2025-06-27 16:40:17.355448133 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/client/firebase-ai/_toc.yaml 2025-06-27 16:36:37.281840735 +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-06-27 16:40:17.337447921 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/ai/type/GenerationConfig.Builder.html 2025-06-27 16:36:37.261840496 +0000
@@ -109,6 +109,12 @@
</td>
</tr>
<tr>
+ <td><code>final <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+ <td>
+ <div><code><a href="/https/github.com/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="/https/github.com/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="/https/github.com/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a></code></td>
<td>
+ <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#setThinkingConfig(com.google.firebase.ai.type.ThinkingConfig)">setThinkingConfig</a>(<a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a> 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="/https/github.com/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a></code></td>
+ <td>
<div><code><a href="/https/github.com/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> topK)</code></div>
</td>
</tr>
@@ -280,6 +292,10 @@
<pre class="api-signature no-pretty-print">public final <a href="https://developer.android.com/reference/kotlin/java/lang/Float.html">Float</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#temperature()">temperature</a></pre>
<p>See <code><a href="/https/github.com/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 final <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a> <a href="/https/github.com/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 final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> <a href="/https/github.com/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 final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a> <a href="/https/github.com/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> 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 final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html#setThinkingConfig(com.google.firebase.ai.type.ThinkingConfig)">setThinkingConfig</a>(<a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a> 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 final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a> <a href="/https/github.com/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> 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-06-27 16:36:37.256840436 +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="/https/github.com/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="/https/github.com/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="/https/github.com/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="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+ <td>
+ <div><code><a href="/https/github.com/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="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></td>
+ <td>
+ <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html#setThinkingBudget(kotlin.Int)">setThinkingBudget</a>(int thinkingBudget)</code></div>
+ <p>Indicates the thinking budget in tokens.</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 final <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> <a href="/https/github.com/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 <a href="/https/github.com/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 final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a> <a href="/https/github.com/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 final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html#setThinkingBudget(kotlin.Int)">setThinkingBudget</a>(int thinkingBudget)</pre>
+ <p>Indicates the thinking budget in tokens. 0 is DISABLED. -1 is AUTOMATIC. The default values and allowed ranges are model dependent.</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-06-27 16:36:37.267840568 +0000
@@ -0,0 +1,38 @@
+<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="/https/github.com/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="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </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-06-27 16:36:37.257840448 +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="/https/github.com/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 final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+ <td>
+ <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfigKt.html#thinkingConfig(kotlin.Function1)">thinkingConfig</a>(<br> @<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<@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a>, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> init<br>)</code></div>
+ <p>Helper method to construct a <code><a href="/https/github.com/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 static final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfigKt.html#thinkingConfig(kotlin.Function1)">thinkingConfig</a>(<br> @<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<@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a>, <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>> init<br>)</pre>
+ <p>Helper method to construct a <code><a href="/https/github.com/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/UsageMetadata.html 2025-06-27 16:40:17.348448051 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/ai/type/UsageMetadata.html 2025-06-27 16:36:37.273840639 +0000
@@ -56,6 +56,13 @@
<tr>
<td><code>final int</code></td>
<td>
+ <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/UsageMetadata.html#thoughtsTokenCount()">thoughtsTokenCount</a></code></div>
+ <p>The number of tokens used by the model's internal "thinking" process.</p>
+ </td>
+ </tr>
+ <tr>
+ <td><code>final int</code></td>
+ <td>
<div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/UsageMetadata.html#totalTokenCount()">totalTokenCount</a></code></div>
<p>Total number of tokens.</p>
</td>
@@ -77,7 +84,7 @@
<tbody class="list">
<tr>
<td>
- <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</a>(<br> int promptTokenCount,<br> <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> candidatesTokenCount,<br> int totalTokenCount,<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>> promptTokensDetails,<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>> candidatesTokensDetails<br>)</code></div>
+ <div><code><a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List,kotlin.Int)">UsageMetadata</a>(<br> int promptTokenCount,<br> <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> candidatesTokenCount,<br> int totalTokenCount,<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>> promptTokensDetails,<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>> candidatesTokensDetails,<br> int thoughtsTokenCount<br>)</code></div>
</td>
</tr>
</tbody>
@@ -105,6 +112,11 @@
<pre class="api-signature no-pretty-print">public final @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/UsageMetadata.html#promptTokensDetails()">promptTokensDetails</a></pre>
<p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
</div>
+ <div class="api-item"><a name="getThoughtsTokenCount()"></a><a name="setThoughtsTokenCount()"></a><a name="getThoughtsTokenCount--"></a><a name="setThoughtsTokenCount--"></a>
+ <h3 class="api-name" id="thoughtsTokenCount()">thoughtsTokenCount</h3>
+ <pre class="api-signature no-pretty-print">public final int <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/UsageMetadata.html#thoughtsTokenCount()">thoughtsTokenCount</a></pre>
+ <p>The number of tokens used by the model's internal "thinking" process.</p>
+ </div>
<div class="api-item"><a name="getTotalTokenCount()"></a><a name="setTotalTokenCount()"></a><a name="getTotalTokenCount--"></a><a name="setTotalTokenCount--"></a>
<h3 class="api-name" id="totalTokenCount()">totalTokenCount</h3>
<pre class="api-signature no-pretty-print">public final int <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/UsageMetadata.html#totalTokenCount()">totalTokenCount</a></pre>
@@ -113,9 +125,9 @@
</div>
<div class="list">
<h2>Public constructors</h2>
- <div class="api-item"><a name="UsageMetadata(kotlin.Int, kotlin.Int, kotlin.Int, kotlin.collections.List, kotlin.collections.List)"></a><a name="UsageMetadata-kotlin.Int-kotlin.Int-kotlin.Int-kotlin.collections.List-kotlin.collections.List-"></a><a name="usagemetadata"></a>
- <h3 class="api-name" id="UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</h3>
- <pre class="api-signature no-pretty-print">public <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</a>(<br> int promptTokenCount,<br> <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> candidatesTokenCount,<br> int totalTokenCount,<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>> promptTokensDetails,<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>> candidatesTokensDetails<br>)</pre>
+ <div class="api-item"><a name="UsageMetadata(kotlin.Int, kotlin.Int, kotlin.Int, kotlin.collections.List, kotlin.collections.List, kotlin.Int)"></a><a name="UsageMetadata-kotlin.Int-kotlin.Int-kotlin.Int-kotlin.collections.List-kotlin.collections.List-kotlin.Int-"></a><a name="usagemetadata"></a>
+ <h3 class="api-name" id="UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List,kotlin.Int)">UsageMetadata</h3>
+ <pre class="api-signature no-pretty-print">public <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List,kotlin.Int)">UsageMetadata</a>(<br> int promptTokenCount,<br> <a href="https://developer.android.com/reference/kotlin/java/lang/Integer.html">Integer</a> candidatesTokenCount,<br> int totalTokenCount,<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>> promptTokensDetails,<br> @<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="https://developer.android.com/reference/kotlin/java/util/List.html">List</a><@<a href="https://developer.android.com/reference/kotlin/androidx/annotation/NonNull.html">NonNull</a> <a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>> candidatesTokensDetails,<br> int thoughtsTokenCount<br>)</pre>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -158,6 +170,12 @@
<p>The breakdown, by modality, of how many tokens are consumed by the candidates.</p>
</td>
</tr>
+ <tr>
+ <td><code>int thoughtsTokenCount</code></td>
+ <td>
+ <p>The number of tokens used by the model's internal "thinking" process.</p>
+ </td>
+ </tr>
</tbody>
</table>
</div> --- /home/runner/diff/original/firebase-kotlindoc/android/com/google/firebase/ai/type/package-summary.html 2025-06-27 16:40:17.348448051 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/android/com/google/firebase/ai/type/package-summary.html 2025-06-27 16:36:37.274840651 +0000
@@ -385,6 +385,20 @@
</td>
</tr>
<tr>
+ <td><code><a href="/https/github.com/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="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></td>
+ <td></td>
+ </tr>
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/android/com/google/firebase/ai/type/ThinkingConfigKt.html">ThinkingConfigKt</a></code></td>
+ <td></td>
+ </tr>
+ <tr>
<td><code><a href="/https/github.com/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-06-27 16:40:17.330447838 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/client/firebase-ai/_toc.yaml 2025-06-27 16:36:37.255840424 +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-06-27 16:40:17.317447685 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html 2025-06-27 16:36:37.245840305 +0000
@@ -129,6 +129,12 @@
<tr>
<td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a></code></td>
<td>
+ <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#setThinkingConfig(com.google.firebase.ai.type.ThinkingConfig)">setThinkingConfig</a>(thinkingConfig: <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>?)</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html">GenerationConfig.Builder</a></code></td>
+ <td>
<div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#setTopK(kotlin.Int)">setTopK</a>(topK: <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="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>?</code></td>
+ <td>
+ <div><code><a href="/https/github.com/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="/https/github.com/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 <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#setTemperature(kotlin.Float)">setTemperature</a>(temperature: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?): <a href="/https/github.com/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 <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#setThinkingConfig(com.google.firebase.ai.type.ThinkingConfig)">setThinkingConfig</a>(thinkingConfig: <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a>?): <a href="/https/github.com/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 <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#setTopK(kotlin.Int)">setTopK</a>(topK: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?): <a href="/https/github.com/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 <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#temperature()">temperature</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-float/index.html">Float</a>?</pre>
<p>See <code><a href="/https/github.com/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 <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#thinkingConfig()">thinkingConfig</a>: <a href="/https/github.com/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 <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/GenerationConfig.Builder.html#topK()">topK</a>: <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-06-27 16:36:37.240840245 +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="/https/github.com/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="/https/github.com/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="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+ <td>
+ <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#build()">build</a>()</code></div>
+ </td>
+ </tr>
+ <tr>
+ <td><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></td>
+ <td>
+ <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#setThinkingBudget(kotlin.Int)">setThinkingBudget</a>(thinkingBudget: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>)</code></div>
+ <p>Indicates the thinking budget in tokens.</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="/https/github.com/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="/https/github.com/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 <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#build()">build</a>(): <a href="/https/github.com/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 <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#setThinkingBudget(kotlin.Int)">setThinkingBudget</a>(thinkingBudget: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>): <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></pre>
+ <p>Indicates the thinking budget in tokens. 0 is DISABLED. -1 is AUTOMATIC. The default values and allowed ranges are model dependent.</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 <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html#thinkingBudget()">thinkingBudget</a>: <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-06-27 16:36:37.247840329 +0000
@@ -0,0 +1,38 @@
+<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="/https/github.com/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="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </body>
+</html>
+ --- /home/runner/diff/original/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/UsageMetadata.html 2025-06-27 16:40:17.322447744 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/UsageMetadata.html 2025-06-27 16:36:37.251840377 +0000
@@ -27,7 +27,7 @@
<tbody class="list">
<tr>
<td>
- <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</a>(<br> promptTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br> candidatesTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?,<br> totalTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br> promptTokensDetails: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>>,<br> candidatesTokensDetails: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>><br>)</code></div>
+ <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List,kotlin.Int)">UsageMetadata</a>(<br> promptTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br> candidatesTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?,<br> totalTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br> promptTokensDetails: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>>,<br> candidatesTokensDetails: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>>,<br> thoughtsTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><br>)</code></div>
</td>
</tr>
</tbody>
@@ -76,6 +76,13 @@
<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="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/UsageMetadata.html#thoughtsTokenCount()">thoughtsTokenCount</a></code></div>
+ <p>The number of tokens used by the model's internal "thinking" process.</p>
+ </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="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/UsageMetadata.html#totalTokenCount()">totalTokenCount</a></code></div>
<p>Total number of tokens.</p>
</td>
@@ -85,9 +92,9 @@
</div>
<div class="list">
<h2>Public constructors</h2>
- <div class="api-item"><a name="UsageMetadata(kotlin.Int, kotlin.Int, kotlin.Int, kotlin.collections.List, kotlin.collections.List)"></a><a name="UsageMetadata-kotlin.Int-kotlin.Int-kotlin.Int-kotlin.collections.List-kotlin.collections.List-"></a><a name="usagemetadata"></a>
- <h3 class="api-name" id="UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</h3>
- <pre class="api-signature no-pretty-print"><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List)">UsageMetadata</a>(<br> promptTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br> candidatesTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?,<br> totalTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br> promptTokensDetails: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>>,<br> candidatesTokensDetails: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>><br>)</pre>
+ <div class="api-item"><a name="UsageMetadata(kotlin.Int, kotlin.Int, kotlin.Int, kotlin.collections.List, kotlin.collections.List, kotlin.Int)"></a><a name="UsageMetadata-kotlin.Int-kotlin.Int-kotlin.Int-kotlin.collections.List-kotlin.collections.List-kotlin.Int-"></a><a name="usagemetadata"></a>
+ <h3 class="api-name" id="UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List,kotlin.Int)">UsageMetadata</h3>
+ <pre class="api-signature no-pretty-print"><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/UsageMetadata.html#UsageMetadata(kotlin.Int,kotlin.Int,kotlin.Int,kotlin.collections.List,kotlin.collections.List,kotlin.Int)">UsageMetadata</a>(<br> promptTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br> candidatesTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>?,<br> totalTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a>,<br> promptTokensDetails: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>>,<br> candidatesTokensDetails: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>>,<br> thoughtsTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><br>)</pre>
<div class="devsite-table-wrapper">
<table class="responsive">
<colgroup>
@@ -130,6 +137,12 @@
<p>The breakdown, by modality, of how many tokens are consumed by the candidates.</p>
</td>
</tr>
+ <tr>
+ <td><code>thoughtsTokenCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></code></td>
+ <td>
+ <p>The number of tokens used by the model's internal "thinking" process.</p>
+ </td>
+ </tr>
</tbody>
</table>
</div>
@@ -157,6 +170,11 @@
<pre class="api-signature no-pretty-print">val <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/UsageMetadata.html#promptTokensDetails()">promptTokensDetails</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/-list/index.html">List</a><<a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ModalityTokenCount.html">ModalityTokenCount</a>></pre>
<p>The breakdown, by modality, of how many tokens are consumed by the prompt.</p>
</div>
+ <div class="api-item"><a name="getThoughtsTokenCount()"></a><a name="setThoughtsTokenCount()"></a><a name="getThoughtsTokenCount--"></a><a name="setThoughtsTokenCount--"></a>
+ <h3 class="api-name" id="thoughtsTokenCount()">thoughtsTokenCount</h3>
+ <pre class="api-signature no-pretty-print">val <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/UsageMetadata.html#thoughtsTokenCount()">thoughtsTokenCount</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a></pre>
+ <p>The number of tokens used by the model's internal "thinking" process.</p>
+ </div>
<div class="api-item"><a name="getTotalTokenCount()"></a><a name="setTotalTokenCount()"></a><a name="getTotalTokenCount--"></a><a name="setTotalTokenCount--"></a>
<h3 class="api-name" id="totalTokenCount()">totalTokenCount</h3>
<pre class="api-signature no-pretty-print">val <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/UsageMetadata.html#totalTokenCount()">totalTokenCount</a>: <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/package-summary.html 2025-06-27 16:40:17.323447756 +0000
+++ /home/runner/diff/modified/firebase-kotlindoc/kotlin/com/google/firebase/ai/type/package-summary.html 2025-06-27 16:36:37.251840377 +0000
@@ -350,6 +350,16 @@
</td>
</tr>
<tr>
+ <td><code><a href="/https/github.com/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="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a></code></td>
+ <td></td>
+ </tr>
+ <tr>
<td><code><a href="/https/github.com/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>
@@ -544,6 +554,13 @@
<p>Helper method to construct a <code><a href="/https/github.com/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="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code></td>
+ <td>
+ <div><code><a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/package-summary.html#thinkingConfig(kotlin.Function1)">thinkingConfig</a>(init: <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a>.() <span style="white-space: nowrap;">-></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="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></code> in a DSL-like manner.</p>
+ </td>
+ </tr>
</tbody>
</table>
</div>
@@ -616,6 +633,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 <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/package-summary.html#thinkingConfig(kotlin.Function1)">thinkingConfig</a>(init: <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.Builder.html">ThinkingConfig.Builder</a>.() <span style="white-space: nowrap;">-></span> <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html">Unit</a>): <a href="/https/github.com/docs/reference/kotlin/com/google/firebase/ai/type/ThinkingConfig.html">ThinkingConfig</a></pre>
+ <p>Helper method to construct a <code><a href="/https/github.com/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> |
Coverage Report 1Affected ProductsNo changes between base commit (39edc7c) and merge commit (701d02b).Test Logs |
Test Results 26 files + 18 26 suites +18 35s ⏱️ +15s Results for commit f780f6b. ± Comparison against base commit 39edc7c. This pull request removes 22 and adds 104 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
Size Report 1Affected Products
Test Logs |
…rpf/add-thinking-budget-support # Conflicts: # firebase-ai/CHANGELOG.md # firebase-ai/gradle.properties
firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ThinkingConfig.kt
Outdated
Show resolved
Hide resolved
firebase-ai/src/main/kotlin/com/google/firebase/ai/type/ThinkingConfig.kt
Show resolved
Hide resolved
The public api surface has changed for the subproject firebase-ai: Please update the api.txt files for the subprojects being affected by this change by running ./gradlew ${subproject}:generateApiTxtFile. Also perform a major/minor bump accordingly. |
This should resolve #6990