refactor(anthropic): drop redundant dict guard on litellm_params
Some checks failed
LiteLLM Rust / rustfmt, clippy, test (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
Devin AI 2026-08-11 01:20:05 +00:00
parent 116194cd6f
commit 82a64de9a2

View file

@ -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)