Skip to content

Commit 8b29daf

Browse files
[AI] More robust thoughtTokenCount gemini 3 test (#15730)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 34e87c9 commit 8b29daf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

FirebaseAI/Tests/TestApp/Tests/Integration/GenerateContentIntegrationTests.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ struct GenerateContentIntegrationTests {
8585
#expect(promptTokensDetails.modality == .text)
8686
#expect(promptTokensDetails.tokenCount == usageMetadata.promptTokenCount)
8787
if modelName.hasPrefix("gemini-3") {
88-
#expect(usageMetadata.thoughtsTokenCount == 64)
88+
// For gemini-3 models, the thoughtsTokenCount can vary slightly between runs.
89+
#expect(usageMetadata.thoughtsTokenCount >= 64)
8990
} else {
9091
#expect(usageMetadata.thoughtsTokenCount == 0)
9192
}

0 commit comments

Comments
 (0)