Repository navigation
docs(count_tokens): document proxy count errors as a 1.107.0 breaking change - #2564
Closed
misbah-berri wants to merge 2 commits into
Closed
misbah-berri wants to merge 2 commits into
misbah-berri wants to merge 2 commits into
Conversation
… change The proxy count routes now return the provider's error, a 401 or a 400 instead of a 200 with a local tiktoken estimate (#46121, #46815, #47163, #46777, backported in #47209). Expand the rc1 breaking change entry to cover every route and case, and rewrite the count_tokens page: it no longer says unsupported providers fall back to tiktoken on the proxy, and it documents the new errors, token_count_framing, token_count_model and litellm_count_source.
|
@misbah-berri is attempting to deploy a commit to the CLERKIEAI Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
The 1.107 line is being released as 1.108.0, so date the change on the count_tokens page from v1.108.0.
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.
In 1.107.0 the proxy count routes (
/v1/messages/count_tokens,/v1/responses/input_tokens, Google:countTokensand/utils/token_counter?call_endpoint=true) return an error when they cannot use the provider's count, where they used to answer 200 with a local tiktoken estimate. This came in through BerriAI/litellm#46121, BerriAI/litellm#46815, BerriAI/litellm#47163 and BerriAI/litellm#46777, backported in BerriAI/litellm#47209.The rc1 release note's breaking change entry now covers every route and case, the
token_count_framingandtoken_count_modelescape hatches, and what still counts locally (providers with no count API and the SDKacount_tokens). The count_tokens page no longer says the proxy falls back to tiktoken. It adds a table of errors per condition, a section ontoken_count_framingandtoken_count_model, thelitellm_count_sourcevalues, and an Azure AI (Claude) row in the providers table.Every claim was checked against the
rc/1.107.0source. The new text follows ASD-STE100.