Commit graph

4 commits

Author SHA1 Message Date
Ishaan Jaffer
e8461b5b97
style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
Gustavo Martin Alvarez
b3a17596fe
fix(gemini): resolve image token undercounting in usage metadata (#22608)
* fix(gemini): ensure image token accumulation in usage metadata

Fixed an issue where image tokens were being overwritten instead of accumulated in Gemini responses. Added support for both camelCase and snake_case token count keys. Fixes #22082.

* test: add regression test for image token accumulation and cleanup files

* fix(gemini): ensure consistent accumulation for responseTokensDetails

* fix(gemini): harden token count parsing and add vertex accumulation test

Parse tokenCount/token_count as int-safe values to satisfy mypy and avoid None/object arithmetic. Add regression test for duplicate modality accumulation in Vertex _calculate_usage.
2026-03-04 18:52:08 -08:00
Yuta Saito
34e8e97222 fix: ci test
gemini 2.5 depricated
2026-01-17 09:17:31 +09:00
Sameer Kankute
b01eb2b970 Add usage object in image generation of gemini 2025-12-22 11:59:30 +05:30