forked from google/adk-java
-
Notifications
You must be signed in to change notification settings - Fork 19
Token tracking #174
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Sandeep-BA
merged 23 commits into
redbus-labs:main
from
alfredjimmy-redbus:token_tracking
Jul 8, 2026
Merged
Token tracking #174
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
871d849
add : version file
a4fe90e
Merge remote-tracking branch 'upstream/main'
093480b
Merge remote-tracking branch 'upstream/main'
b0d8f0d
removed logs
4daa678
Merge remote-tracking branch 'upstream/main'
a2187f8
Merge remote-tracking branch 'upstream/main'
claude f0a6d52
feat: track token usage for live (BIDI) sessions via plugin callbacks
claude fb8b5fe
docs: add live BIDI token-tracking harness example
claude a5a74b6
test: extend live token harness to probe per-turn vs cumulative usage
claude 6ef37cc
fix: sum per-turn token usage instead of keeping latest value
claude 1159479
Merge branch 'claude/live-bidi-token-tracking' of https://github.com/…
alfredjimmy-redbus 3d49867
token tracking for bidi
alfredjimmy-redbus 1fa262e
Merge branch 'main' into token_tracking
alfredjimmy-redbus cfe33b9
added MapDB Support and Ollama basic integration basis https://github…
alfredjimmy-redbus f8110ec
Merge branch 'temp-br' into token_tracking
alfredjimmy-redbus 35a42f0
Merge branch 'main' of https://github.com/alfredjimmy-redbus/adk-java
alfredjimmy-redbus 797ab08
Merge branch 'main' into token_tracking
alfredjimmy-redbus 3020499
Merge branch 'token_tracking' of https://github.com/alfredjimmy-redbu…
alfredjimmy-redbus 172f747
Merge branch 'main' of https://github.com/alfredjimmy-redbus/adk-java
alfredjimmy-redbus 46a96ea
Merge branch 'main' into token_tracking
alfredjimmy-redbus bcb703f
removed liveTokenTrackingPlugin since it was folded inside sdk
alfredjimmy-redbus 628dbc2
removed appending events
alfredjimmy-redbus 651e934
readded appending events
alfredjimmy-redbus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be really sending optional.empty on goAway or voiceactivity detectionSignal()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, keeping them as Optional.empty() is the right approach for this specific layer (convertToServerResponse).
This method's job is to map server events into client-facing responses (like content, tools, and usage). Because goAway and voiceActivity are infrastructure/connection-level signals, they don't have a representation in the client response model.
If we don't return Optional.empty(), we'd have to map them to an error event, which we previously found was incorrect and causing issues.