Repository navigation
fix(proxy)!: count prompt-only token_counter requests with the provider when call_endpoint is set #46839
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
mateo-berri
merged 10 commits into
main
from
litellm_fix_token_counter_prompt_only_provider_count
Oct 16, 2026
Merged
fix(proxy)!: count prompt-only token_counter requests with the provider when call_endpoint is set #46839
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
7fb8018
fix(proxy): count prompt-only token_counter requests with the provide…
mateo-berri e683d71
fix(proxy): keep the local count for a prompt-only token_counter requ…
mateo-berri 355406d
fix(proxy): log a prompt-only token count fallback as a one-line warning
mateo-berri e8a0f5a
fix(proxy): send a prompt-only token_counter request to the provider …
mateo-berri bf4748c
fix(proxy): count a token_counter prompt sent next to an empty messag…
mateo-berri a637fba
fix(proxy): count a prompt next to messages on the local token count …
mateo-berri 2703897
fix(proxy): answer 400 for a token count prompt next to a conversatio…
mateo-berri 3e8d052
test(proxy): count tools with a prompt in the token counter fallback …
mateo-berri 49d81ff
test(proxy): cover prompt counting on /utils/token_counter in the Gem…
mateo-berri aac4a81
test(proxy): name the token counter fallback test by what it checks
mateo-berri 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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.