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
isort
Alex Shoop6737f9e0da66
diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.pyindex 668ba4c4b1f..2aaeed40bea 100644--- a/litellm/litellm_core_utils/litellm_logging.py+++ b/litellm/litellm_core_utils/litellm_logging.py@@ -26,7 +26,6 @@ from typing import (cast,)-from litellm._uuid import uuidfrom httpx import Responsefrom pydantic import BaseModel@@ -38,6 +37,7 @@ from litellm import (turn_off_message_logging,)from litellm._logging import _is_debugging_on, verbose_logger+from litellm._uuid import uuidfrom litellm.batches.batch_utils import _handle_completed_batchfrom litellm.caching.caching import DualCache, InMemoryCachefrom litellm.caching.caching_handler import LLMCachingHandlerdiff --git a/litellm/proxy/common_request_processing.py b/litellm/proxy/common_request_processing.pyindex a662015ee28..95c84b914b6 100644--- a/litellm/proxy/common_request_processing.py+++ b/litellm/proxy/common_request_processing.py@@ -14,7 +14,6 @@ from typing import (Union,)-from litellm._uuid import uuidimport httpximport orjsonfrom fastapi import HTTPException, Request, status@@ -22,6 +21,7 @@ from fastapi.responses import Response, StreamingResponseimport litellmfrom litellm._logging import verbose_proxy_logger+from litellm._uuid import uuidfrom litellm.constants import (DD_TRACER_STREAMING_CHUNK_YIELD_RESOURCE,STREAM_SSE_DATA_PREFIX,diff --git a/litellm/types/utils.py b/litellm/types/utils.pyindex dcfc0f66a1d..2ab8f844615 100644--- a/litellm/types/utils.py+++ b/litellm/types/utils.py@@ -13,7 +13,6 @@ from typing import (Union,)-from litellm._uuid import uuidfrom aiohttp import FormDatafrom openai._models import BaseModel as OpenAIObjectfrom openai.types.audio.transcription_create_params import FileTypes # type: ignore@@ -33,6 +32,7 @@ from pydantic import BaseModel, ConfigDict, Field, PrivateAttr, model_validatorfrom typing_extensions import Callable, Dict, Required, TypedDict, overrideimport litellm+from litellm._uuid import uuidfrom litellm.types.llms.base import (BaseLiteLLMOpenAIResponseObject,LiteLLMPydanticObjectBase,diff --git a/litellm/utils.py b/litellm/utils.pyindex 53a1710d685..3f6898194f9 100644--- a/litellm/utils.py+++ b/litellm/utils.py@@ -40,7 +40,6 @@ from os.path import abspath, dirname, joinimport aiohttpimport dotenv-from litellm._uuid import uuidimport httpximport openaiimport tiktoken@@ -59,12 +58,7 @@ import litellm.litellm_core_utils.audio_utils.utilsimport litellm.litellm_core_utils.json_validation_ruleimport litellm.llmsimport litellm.llms.gemini-# Import cached imports utilities-from litellm.litellm_core_utils.cached_imports import (- get_coroutine_checker,- get_litellm_logging_class,- get_set_callbacks,-)+from litellm._uuid import uuidfrom litellm.caching._internal_lru_cache import lru_cache_wrapperfrom litellm.caching.caching import DualCachefrom litellm.caching.caching_handler import CachingHandlerResponse, LLMCachingHandler@@ -228,7 +222,6 @@ from typing import (get_args,)-from openai import OpenAIError as OriginalErrorfrom litellm.litellm_core_utils.thread_pool_executor import executor