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
Remove double imports
Sameer Kankute5abb677624b0
diff --git a/litellm/litellm_core_utils/default_encoding.py b/litellm/litellm_core_utils/default_encoding.pyindex d1f51e50720..41bfcbb63f4 100644--- a/litellm/litellm_core_utils/default_encoding.py+++ b/litellm/litellm_core_utils/default_encoding.py@@ -31,7 +31,7 @@ for attempt in range(_max_retries):try:encoding = tiktoken.get_encoding("cl100k_base")break- except (FileExistsError, OSError) as e:+ except (FileExistsError, OSError):if attempt == _max_retries - 1:# Last attempt, re-raise the exceptionraisediff --git a/litellm/main.py b/litellm/main.pyindex 6e069988726..a0f3461b45c 100644--- a/litellm/main.py+++ b/litellm/main.py@@ -110,30 +110,18 @@ from litellm.types.utils import (RawRequestTypedDict,StreamingChoices,)-from litellm.types.utils import (- ModelResponseStream,- RawRequestTypedDict,- StreamingChoices,-)+from litellm.utils import (- Choices,Choices,CustomStreamWrapper,EmbeddingResponse,Message,ModelResponse,- EmbeddingResponse,- Message,- ModelResponse,ProviderConfigManager,TextChoices,TextCompletionResponse,TextCompletionStreamWrapper,TranscriptionResponse,- TextChoices,- TextCompletionResponse,- TextCompletionStreamWrapper,- TranscriptionResponse,Usage,_get_model_info_helper,add_provider_specific_params_to_optional_params,