Conversation
Signed-off-by: Brandon Luo <br32710@ll.mit.edu>
br32710
force-pushed
the
token-counting
branch
from
September 11, 2026 16:07
d93e6a4 to
efb5285
Compare
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Describe what changed and why.
Added the fields completion_tokens (output tokens) and prompt_tokens (input tokens) in the log files litellm-spend-report.json and meta.json to support cost estimation even when the model costs are unknown (e.g. for local models). The token counts are determined by polling LiteLLM and only work in internal mode.
User Impact
If user-facing, describe CLI/API/config/docs impact and migration steps.
No migration steps needed, if token counts are not present in LiteLLM they will be set to 0 by default.
Release Note / Changelog
CHANGELOG.md([Unreleased]) for user-facing changesIf this PR includes deprecation or breaking behavior, include:
Validation
List tests/checks run and their results.
All tests were run and passed successfully.
Checklist