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(common_utils.py): fix linting error
Krrish Dholakia34a1a48af14f
diff --git a/litellm/llms/anthropic/common_utils.py b/litellm/llms/anthropic/common_utils.pyindex 52a96f5a303..967d29f4540 100644--- a/litellm/llms/anthropic/common_utils.py+++ b/litellm/llms/anthropic/common_utils.py@@ -24,7 +24,7 @@ class AnthropicError(BaseLLMException):class AnthropicModelInfo(BaseLLMModelInfo):@staticmethod- def get_api_base(api_base: Optional[str] = None) -> str | None:+ def get_api_base(api_base: Optional[str] = None) -> Optional[str]:return (api_baseor get_secret_str("ANTHROPIC_API_BASE")@@ -32,12 +32,12 @@ class AnthropicModelInfo(BaseLLMModelInfo):)@staticmethod- def get_api_key(api_key: str | None = None) -> str | None:+ def get_api_key(api_key: Optional[str] = None) -> Optional[str]:return api_key or get_secret_str("ANTHROPIC_API_KEY")@staticmethod- def get_base_model(model: str) -> str | None:- return model.replace("anthropic/", "")+ def get_base_model(model: Optional[str] = None) -> Optional[str]:+ return model.replace("anthropic/", "") if model else Nonedef get_models(self, api_key: Optional[str] = None, api_base: Optional[str] = None