fix(google): count Gemini thinking tokens in usage.output_tokens - #2653
Merged
Conversation
6 tasks
davidberenstein1957
force-pushed
the
chore/format-pr-2622
branch
from
August 12, 2026 09:36
7032af1 to
413adfc
Compare
Thinking tokens were dropped from the reported output token count, so usage under-reported cost for thinking-enabled Gemini models. Original work by @ebarkhordar in #2622. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
kevinmessiaen
approved these changes
Aug 17, 2026
|
Thanks for picking this up and landing it, and for the credit line in the commit message. Good to see Gemini thinking tokens counted in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Formatted follow-up of #2622 (@ebarkhordar).
Same change as #2622, plus ruff format/lint fixes so CI
make checkcan get past format/import sorting.Why
#2622 was blocked on CI lint (typically
check-formaton README markdown fences; for some PRs alsoruff checkimport sorting).Supersedes
Please close #2622 in favor of this PR once CI is green.
Test plan