-
Notifications
You must be signed in to change notification settings - Fork 623
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
fix(anthropic): include cached tokens in usage count logs #947
Conversation
Earlier failures were due to:
Branch updated to latest and
run clean. The development build has been re-tested, the highlighted entry is from ./target/debug/goose and usage verified with the anthropic console. The warning:
is not introduced by this change. |
thank you @evalstate! @salman1993 good with merging this one? |
Hi @evalstate, Thank you for your contribution! Before we can proceed with merging your pull request, it needs to be updated with the latest changes from the main branch to ensure compatibility and ease of integration. Here are the steps you can follow to update your branch:
Once you've updated your branch, please let me know by commenting on the pull request, and I'll take another look. Thank you! |
Co-authored-by: angiejones <jones.angie@gmail.com>
cache_creation_input_tokens
andcache_read_input_tokens
were not beingadded to the usage total recorded in
goose.log
. This fix includesthose categories in the calculation of "input tokens" as per the API guide.
refs: https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching#tracking-cache-performance