Skip to content

Fix/google ai token usage metadata#4

Merged
mathieuripert merged 2 commits into
mainfrom
fix/google-ai-token-usage-metadata
Jun 5, 2025
Merged

Fix/google ai token usage metadata#4
mathieuripert merged 2 commits into
mainfrom
fix/google-ai-token-usage-metadata

Conversation

@mathieuripert
Copy link
Copy Markdown
Owner

No description provided.

…was extracting token usage and firing callbacks but not adding it to message metadata like other chat models - Modified do_process_response to use TokenUsage.set() to add usage to each processed message, consistent with ChatOpenAI and ChatAnthropic - Added tests for both Message and MessageDelta with token usage - Fixes issue where last_message.metadata.usage was nil for Google AI
@mathieuripert mathieuripert merged commit baf95f9 into main Jun 5, 2025
2 checks passed
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