The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
FIx mypy issues
Sameer Kankute1385d46e9974
diff --git a/litellm/llms/anthropic/experimental_pass_through/utils.py b/litellm/llms/anthropic/experimental_pass_through/utils.pyindex d975bee0bc2..4fd68ef535f 100644--- a/litellm/llms/anthropic/experimental_pass_through/utils.py+++ b/litellm/llms/anthropic/experimental_pass_through/utils.py@@ -2,6 +2,7 @@ import osfrom typing import Optionalimport litellm+from litellm.types.utils import ModelInfodef is_reasoning_auto_summary_enabled() -> bool:@@ -31,25 +32,26 @@ def normalize_reasoning_effort_value(from litellm.utils import get_model_info+ model_info: Optional[ModelInfo] = Nonetry:model_info = get_model_info(model=model, custom_llm_provider=custom_llm_provider)except Exception:- model_info = {}+ model_info = Noneif effort == "max":- if model_info.get("supports_max_reasoning_effort"):+ if model_info and model_info.get("supports_max_reasoning_effort"):return "max"- if model_info.get("supports_xhigh_reasoning_effort"):+ if model_info and model_info.get("supports_xhigh_reasoning_effort"):return "xhigh"return "high"elif effort == "xhigh":- if model_info.get("supports_xhigh_reasoning_effort"):+ if model_info and model_info.get("supports_xhigh_reasoning_effort"):return "xhigh"return "high"elif effort == "minimal":- if model_info.get("supports_minimal_reasoning_effort"):+ if model_info and model_info.get("supports_minimal_reasoning_effort"):return "minimal"return "low"return "medium"