Skip to content

docs(count_tokens): document proxy count errors as a 1.107.0 breaking change - #2564

Closed
misbah-berri wants to merge 2 commits into
BerriAI:mainfrom
misbah-berri:docs/count-tokens-breaking
Closed

misbah-berri wants to merge 2 commits into
BerriAI:mainfrom
misbah-berri:docs/count-tokens-breaking

Conversation

@misbah-berri

Copy link
Copy Markdown
Collaborator

In 1.107.0 the proxy count routes (/v1/messages/count_tokens, /v1/responses/input_tokens, Google :countTokens and /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_framing and token_count_model escape hatches, and what still counts locally (providers with no count API and the SDK acount_tokens). The count_tokens page no longer says the proxy falls back to tiktoken. It adds a table of errors per condition, a section on token_count_framing and token_count_model, the litellm_count_source values, and an Azure AI (Claude) row in the providers table.

Every claim was checked against the rc/1.107.0 source. The new text follows ASD-STE100.

… 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.
@vercel

vercel Bot commented Oct 23, 2026

Copy link
Copy Markdown

@misbah-berri is attempting to deploy a commit to the CLERKIEAI Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
litellm Ready Ready Preview Oct 24, 2026 1:34am UTC

Request Review

The 1.107 line is being released as 1.108.0, so date the change on the
count_tokens page from v1.108.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant