Add token usage to gemini (streaming), litellm and anthropic

Also included a token_usage sample that showcases the token usage of subagents with different models under a parent agent.

PiperOrigin-RevId: 759347015
This commit is contained in:
Selcuk Gun
2025-05-15 16:22:04 -07:00
committed by Copybara-Service
parent 4d5760917d
commit 509db3f9fb
8 changed files with 515 additions and 45 deletions

View File

@@ -218,7 +218,7 @@ class BaseLlmFlow(ABC):
When the model returns transcription, the author is "user". Otherwise, the
author is the agent name(not 'model').
Args:
llm_response: The LLM response from the LLM call.
"""