LiteLLM is moving to Rust Read the latest updates.
LiteLLM v1.106.1 fixes count_tokens, MCP tool calls and thinking blocks
Deploy this version
- Docker
- Pip
docker run \
-e LITELLM_MASTER_KEY=sk-<paste-a-long-random-key> \
-e DATABASE_URL=postgresql://<user>:<password>@<host>:5432/<dbname> \
-e STORE_MODEL_IN_DB=True \
-p 4000:4000 \
docker.litellm.ai/berriai/litellm:1.106.1
pip install litellm==1.106.1
This release is published as ghcr.io/berriai/litellm:v1.106.1. See the GitHub release and the full releases page
v1.106.1 is a patch release on top of v1.106.0. It backports six fixes from main and the token counting fixes that shipped in v1.104.4 onto stable/1.106.x, so upgrading from v1.104.4 keeps them. There are no new database migrations. The v1.106.1 tag points at 978b4d1
Key Highlights
- Token counting from
v1.104.4: Anthropic-format count requests for OpenAI and Gemini models are converted the same way/v1/messagesinference converts them, and count responses say where the number came from - Bare MCP tool names: a
tools/callwith a bare tool name on a single-server scope goes to that server, so a cold replica no longer answersTool not found - Clean vector store metadata: vector stores created through the proxy send the provider only the caller's
metadata, so later metadata updates no longer fail with 400
New Models / Updated Models
Bug Fixes
- Anthropic
/v1/messagesrequests no longer drop a thinking block whose text is empty but whosesignatureis set. Only an empty, unsigned block is removed - PR #41362- Chat completions keep signed thinking blocks with empty text, and drop a thinking block only when its signature is missing. A
/v1/messagesrequest that setsprefix_mismatch_behavior: errornow gets the binding mismatch 400 back instead of a retry with thinking stripped. The Anthropic, Azure AI and Bedrock Invoke configs keepthinking.block_bindingwhen they rebuildthinking- PR #46342
LLM API Endpoints
Bugs
- Token counting
- Anthropic-format count requests for OpenAI and Gemini models are converted the same way
/v1/messagesinference converts them - Count responses carry
litellm_count_source, which isprovider,token_count_modelorlocal_estimate. When a provider count fails and local counting is on, the response is a local estimate labelledlocal_estimate - New
model_infosettingstoken_count_framingandtoken_count_modeltune the count for one deployment. When a count model answers, the response also carrieslitellm_count_model - The bundled cost map adds
token_count_framingandtoken_count_tokenizervalues for some models - These fixes come from PR #47389, with PR #47446 and PR #47454 keeping earlier Google
countTokensrequest shapes and prompt plus messages inputs working as before
- Anthropic-format count requests for OpenAI and Gemini models are converted the same way
- Responses API bridge
- A chat completion bridged to
/responsesput each Responses message item in its own choice, so a[message, message, function_call]reply put the tool call onchoices[1]. Message text, annotations, reasoning and tool calls now fold into onechoices[0], andfinish_reasonistool_callswhen any tool call is present - PR #46099
- A chat completion bridged to
- Vector Stores
- Vector stores created through the proxy filled all 16 OpenAI metadata slots with proxy context, so every later metadata update failed with HTTP 400, and caller keys such as
endpointwere overwritten. Create and update now send the provider exactly the caller'smetadata, while logs, tags and limits still see the proxy context. The opt-indb_scripts/strip_vector_store_internal_metadata.pyscript removes LiteLLM's keys from stores created before this release - PR #47021
- Vector stores created through the proxy filled all 16 OpenAI metadata slots with proxy context, so every later metadata update failed with HTTP 400, and caller keys such as
Management Endpoints / UI
Bugs
- Team keys can read and cancel their own team's batches and download the finished results. The same model check applies to file, fine-tuning, vector store, character and video ids - PR #47067
MCP Gateway
- A
tools/callwith a bare tool name on/{server_name}/mcp, or with one server inx-mcp-servers, returnedTool not foundon a cold replica sincev1.103.0. A request scoped to exactly one server now routes a bare name to that server, and a bare name that two servers share goes to the server the path names - PR #46225
All of these fixes and the version bump are backported in PR #47517
PR roll-up by ownership area
- LLM API Endpoints: 5
- Models & Providers: 2
- Auth & Management: 1
- MCP: 1
Full Changelog
https://github.com/BerriAI/litellm/compare/v1.106.0...v1.106.1