From ce37729da4c901ff416a768cec3daeb68f0a9cd4 Mon Sep 17 00:00:00 2001 From: Otavio Brito <69211663+otaviofbrito@users.noreply.github.com> Date: Tue, 20 Jan 2026 14:03:27 -0300 Subject: [PATCH] remove count tokens optional param before request is sent to vertex (#19359) --- litellm/llms/anthropic/chat/handler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/llms/anthropic/chat/handler.py b/litellm/llms/anthropic/chat/handler.py index 9cc8c24ed1..6a9aafd076 100644 --- a/litellm/llms/anthropic/chat/handler.py +++ b/litellm/llms/anthropic/chat/handler.py @@ -317,6 +317,7 @@ class AnthropicChatCompletion(BaseLLM): stream = optional_params.pop("stream", None) json_mode: bool = optional_params.pop("json_mode", False) is_vertex_request: bool = optional_params.pop("is_vertex_request", False) + optional_params.pop("vertex_count_tokens_location", None) _is_function_call = False messages = copy.deepcopy(messages) headers = AnthropicConfig().validate_environment(