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)