From 82a64de9a23d17137e0170eaa2dc6840f0f38408 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 11 Aug 2026 01:20:05 +0000 Subject: [PATCH] refactor(anthropic): drop redundant dict guard on litellm_params Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/llms/anthropic/chat/handler.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/litellm/llms/anthropic/chat/handler.py b/litellm/llms/anthropic/chat/handler.py index 64f704a49b0..9739c1c6365 100644 --- a/litellm/llms/anthropic/chat/handler.py +++ b/litellm/llms/anthropic/chat/handler.py @@ -236,7 +236,7 @@ class AnthropicChatCompletion(BaseLLM): json_mode=json_mode, speed=optional_params.get("speed") if optional_params else None, inference_geo=AnthropicConfig.get_request_inference_geo(optional_params) - or AnthropicConfig.get_request_inference_geo(litellm_params if isinstance(litellm_params, dict) else None), + or AnthropicConfig.get_request_inference_geo(litellm_params), tool_name_reverse_map=( litellm_params.get(ANTHROPIC_TOOL_NAME_REVERSE_MAP_KEY) if isinstance(litellm_params, dict) else None ), @@ -459,9 +459,7 @@ class AnthropicChatCompletion(BaseLLM): json_mode=json_mode, speed=optional_params.get("speed") if optional_params else None, inference_geo=AnthropicConfig.get_request_inference_geo(optional_params) - or AnthropicConfig.get_request_inference_geo( - litellm_params if isinstance(litellm_params, dict) else None - ), + or AnthropicConfig.get_request_inference_geo(litellm_params), tool_name_reverse_map=( litellm_params.get(ANTHROPIC_TOOL_NAME_REVERSE_MAP_KEY) if isinstance(litellm_params, dict)