Skip to content

fix(google_genai): include thinking tokens in completion usage - #619

Open
ekeith (evanmkeith) wants to merge 1 commit into
mainfrom
07-27-fix-gemini-thinking-tokens-completion-tokens
Open

fix(google_genai): include thinking tokens in completion usage#619
ekeith (evanmkeith) wants to merge 1 commit into
mainfrom
07-27-fix-gemini-thinking-tokens-completion-tokens

Conversation

@evanmkeith

Copy link
Copy Markdown
Contributor

Summary

  • Fold Gemini thoughts_token_count into Google GenAI completion_tokens
  • Preserve completion_reasoning_tokens as the separate reasoning detail metric
  • Tighten the reasoning regression test to assert span metrics match provider usage metadata

Testing

  • nox -s "test_google_genai(latest)" -- -k test_reasoning
  • nox -s "test_google_genai(latest)"
  • nox -s "test_google_genai(1.75.0)" -- -k test_reasoning
  • nox -s "test_google_genai(1.30.0)" -- -k test_reasoning
  • git diff --check

## Summary

  - Fold Gemini `thoughts_token_count` into Google GenAI `completion_tokens`
  - Preserve `completion_reasoning_tokens` as the separate reasoning detail metric
  - Tighten the reasoning regression test to assert span metrics match provider usage metadata

  ## Testing

  - `nox -s "test_google_genai(latest)" -- -k test_reasoning`
  - `nox -s "test_google_genai(latest)"`
  - `nox -s "test_google_genai(1.75.0)" -- -k test_reasoning`
  - `nox -s "test_google_genai(1.30.0)" -- -k test_reasoning`
  - `git diff --check`
@evanmkeith ekeith (evanmkeith) changed the title ix(google_genai): include thinking tokens in completion usage fix(google_genai): include thinking tokens in completion usage Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant