From 35d1403cbabead9bab2e29438f2e849845766c55 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Mon, 2 Nov 2026 19:57:32 -0800 Subject: [PATCH] fix(token_counter): count a request with no model name again --- litellm/litellm_core_utils/token_counter.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/litellm_core_utils/token_counter.py b/litellm/litellm_core_utils/token_counter.py index f8f3214fabc..91cc28b408a 100644 --- a/litellm/litellm_core_utils/token_counter.py +++ b/litellm/litellm_core_utils/token_counter.py @@ -712,7 +712,7 @@ class _MessageCountParams: self.bills_tool_choice = ( self.tool_section.counts_tool_choice if self.tool_section is not None - else huggingface_tokenizer_kind(model) != "deepseek" + else huggingface_tokenizer_kind(model or "") != "deepseek" ) self._model = model