fix: use fastuuid helper (#14903)

* fix: use fastuuid helper across the codebase

First batch of changes, simple drop in replacement.

* second batch of changes

* fixed: script mistake on helper file
This commit is contained in:
Alexsander Hamir
2025-09-25 15:47:01 -07:00
committed by GitHub
parent ab5fb704c2
commit eaa04cd8ce
159 changed files with 204 additions and 207 deletions
@@ -5,7 +5,7 @@ import os
import litellm
from litellm import Router
from dotenv import load_dotenv
import uuid
from litellm._uuid import uuid
load_dotenv()
@@ -12,7 +12,7 @@ sys.path.insert(
import litellm
from litellm import Router
from dotenv import load_dotenv
import uuid
from litellm._uuid import uuid
load_dotenv()
@@ -12,7 +12,7 @@ sys.path.insert(
import litellm
from litellm import Router
from dotenv import load_dotenv
import uuid
from litellm._uuid import uuid
load_dotenv()
@@ -9,7 +9,7 @@ Callback to log events to a Generic API Endpoint
import asyncio
import os
import traceback
import uuid
from litellm._uuid import uuid
from typing import Dict, List, Optional, Union
import litellm
@@ -2,7 +2,7 @@
Polls LiteLLM_ManagedObjectTable to check if the batch job is complete, and if the cost has been tracked.
"""
import uuid
from litellm._uuid import uuid
from datetime import datetime
from typing import TYPE_CHECKING, Optional, cast
@@ -4,7 +4,7 @@
import asyncio
import base64
import json
import uuid
from litellm._uuid import uuid
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Union, cast
from fastapi import HTTPException
+2 -2
View File
@@ -168,7 +168,7 @@ class QdrantSemanticCache(BaseCache):
def set_cache(self, key, value, **kwargs):
print_verbose(f"qdrant semantic-cache set_cache, kwargs: {kwargs}")
import uuid
from litellm._uuid import uuid
# get the prompt
messages = kwargs["messages"]
@@ -279,7 +279,7 @@ class QdrantSemanticCache(BaseCache):
pass
async def async_set_cache(self, key, value, **kwargs):
import uuid
from litellm._uuid import uuid
from litellm.proxy.proxy_server import llm_model_list, llm_router
@@ -2,7 +2,7 @@ import asyncio
import json
import os
import time
import uuid
from litellm._uuid import uuid
from datetime import datetime, timedelta
from typing import List, Optional
+1 -1
View File
@@ -17,7 +17,7 @@ import asyncio
import datetime
import os
import traceback
import uuid
from litellm._uuid import uuid
from datetime import datetime as datetimeObj
from typing import Any, Dict, List, Optional, Union
@@ -9,7 +9,7 @@ API Reference: https://docs.datadoghq.com/llm_observability/setup/api/?tab=examp
import asyncio
import json
import os
import uuid
from litellm._uuid import uuid
from datetime import datetime
from typing import Any, Dict, List, Literal, Optional, Union
+1 -1
View File
@@ -1,5 +1,5 @@
import os
import uuid
from litellm._uuid import uuid
from litellm.integrations.custom_logger import CustomLogger
from litellm.integrations.deepeval.api import Api, Endpoints, HttpMethods
from litellm.integrations.deepeval.types import (
+1 -1
View File
@@ -3,7 +3,7 @@
import os
import traceback
import uuid
from litellm._uuid import uuid
from typing import Any
import litellm
@@ -1,7 +1,7 @@
import asyncio
import json
import os
import uuid
from litellm._uuid import uuid
from datetime import datetime, timedelta, timezone
from typing import TYPE_CHECKING, Any, Dict, List, Optional
from urllib.parse import quote
+1 -1
View File
@@ -3,7 +3,7 @@
import json
import os
import uuid
from litellm._uuid import uuid
from typing import Literal, Optional
import httpx
+1 -1
View File
@@ -5,7 +5,7 @@ import os
import random
import traceback
import types
import uuid
from litellm._uuid import uuid
from datetime import datetime, timezone
from typing import Any, Dict, List, Optional
+1 -1
View File
@@ -2,7 +2,7 @@
# This file contains the LiteralAILogger class which is used to log steps to the LiteralAI observability platform.
import asyncio
import os
import uuid
from litellm._uuid import uuid
from typing import List, Optional
import httpx
+1 -1
View File
@@ -3,7 +3,7 @@
import os
import traceback
import uuid
from litellm._uuid import uuid
from enum import Enum
from typing import Any, Dict, NamedTuple
+1 -1
View File
@@ -11,7 +11,7 @@ For batching specific details see CustomBatchLogger class
import asyncio
import os
import uuid
from litellm._uuid import uuid
from typing import Any, Dict, Optional
+1 -1
View File
@@ -1,4 +1,4 @@
import uuid
from litellm._uuid import uuid
from typing import Optional
import litellm
@@ -2,7 +2,7 @@ import asyncio
import json
import time
import traceback
import uuid
from litellm._uuid import uuid
from typing import Dict, Iterable, List, Literal, Optional, Tuple, Union
import litellm
@@ -2,7 +2,7 @@ import copy
import json
import mimetypes
import re
import uuid
from litellm._uuid import uuid
import xml.etree.ElementTree as ET
from enum import Enum
from typing import Any, List, Optional, Tuple, cast, overload
@@ -5,7 +5,7 @@ import json
import threading
import time
import traceback
import uuid
from litellm._uuid import uuid
from typing import Any, Callable, Dict, List, Optional, Union, cast
import httpx
@@ -2,7 +2,7 @@
## Translates OpenAI call to Anthropic `/v1/messages` format
import json
import traceback
import uuid
from litellm._uuid import uuid
from collections import deque
from typing import TYPE_CHECKING, Any, AsyncIterator, Iterator, Literal, Optional
@@ -458,7 +458,7 @@ class LiteLLMAnthropicMessagesAdapter:
Literal["text", "tool_use"],
"ContentBlockContentBlockDict",
]:
import uuid
from litellm._uuid import uuid
from litellm.types.llms.anthropic import TextBlock, ToolUseBlock
+1 -1
View File
@@ -1,4 +1,4 @@
import uuid
from litellm._uuid import uuid
from typing import Any, Coroutine, Optional, Union
from openai import AsyncAzureOpenAI, AzureOpenAI
@@ -5,7 +5,7 @@ https://docs.aws.amazon.com/bedrock/latest/APIReference/API_agent-runtime_Invoke
"""
import base64
import json
import uuid
from litellm._uuid import uuid
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
import httpx
+1 -1
View File
@@ -7,7 +7,7 @@ import json
import time
import types
import urllib.parse
import uuid
from litellm._uuid import uuid
from functools import partial
from typing import (
Any,
+1 -1
View File
@@ -802,7 +802,7 @@ class CommonBatchFilesUtils:
Tuple of (bucket_name, object_key)
"""
import time
import uuid
from litellm._uuid import uuid
# Get bucket name
bucket_name = (
+1 -1
View File
@@ -1,7 +1,7 @@
import json
import os
import time
import uuid
from litellm._uuid import uuid
from typing import Any, Dict, List, Optional, Tuple, Union
from httpx import Headers, Response
@@ -4,7 +4,7 @@ Translates from Cohere's `/v1/rerank` input format to Bedrock's `/rerank` input
Why separate file? Make it easy to see how transformation works
"""
import uuid
from litellm._uuid import uuid
from typing import List, Optional, Union
from litellm.types.llms.bedrock import (
@@ -2,7 +2,7 @@
Translate between Cohere's `/rerank` format and Deepinfra's `/rerank` format.
"""
import uuid
from litellm._uuid import uuid
from typing import Any, Dict, List, Optional, Union
import httpx
@@ -1,5 +1,5 @@
import json
import uuid
from litellm._uuid import uuid
from typing import Any, List, Literal, Optional, Tuple, Union, cast
import httpx
@@ -3,7 +3,7 @@ This file contains the transformation logic for the Gemini realtime API.
"""
import json
import uuid
from litellm._uuid import uuid
from typing import Any, Dict, List, Optional, Union, cast
from litellm import verbose_logger
@@ -2,7 +2,7 @@
Transformation logic for Hosted VLLM rerank
"""
import uuid
from litellm._uuid import uuid
from typing import Any, Dict, List, Optional, Union
from litellm.types.rerank import (
@@ -1,5 +1,5 @@
import os
import uuid
from litellm._uuid import uuid
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
import httpx
@@ -4,7 +4,7 @@ Transformation logic from Cohere's /v1/rerank format to Infinity's `/v1/rerank`
Why separate file? Make it easy to see how transformation works
"""
import uuid
from litellm._uuid import uuid
from typing import List, Optional
import httpx
@@ -6,7 +6,7 @@ Why separate file? Make it easy to see how transformation works
Docs - https://jina.ai/reranker
"""
import uuid
from litellm._uuid import uuid
from typing import Any, Dict, List, Optional, Tuple, Union
from httpx import URL, Response
+1 -1
View File
@@ -1,6 +1,6 @@
import json
import time
import uuid
from litellm._uuid import uuid
from typing import (
TYPE_CHECKING,
Any,
@@ -1,6 +1,6 @@
import json
import time
import uuid
from litellm._uuid import uuid
from typing import TYPE_CHECKING, Any, AsyncIterator, Iterator, List, Optional, Union
from httpx._models import Headers, Response
+1 -1
View File
@@ -1,6 +1,6 @@
import json
import time
import uuid
from litellm._uuid import uuid
from typing import Any, List, Optional, Union
import aiohttp
@@ -4,7 +4,7 @@ Transformation logic from Cohere's /v1/rerank format to Together AI's `/v1/rera
Why separate file? Make it easy to see how transformation works
"""
import uuid
from litellm._uuid import uuid
from typing import List, Optional
from litellm.types.rerank import (
@@ -1,4 +1,4 @@
import uuid
from litellm._uuid import uuid
from typing import Dict
from litellm.llms.vertex_ai.common_utils import (
@@ -1,7 +1,7 @@
import json
import os
import time
import uuid
from litellm._uuid import uuid
from typing import Any, Dict, List, Optional, Tuple, Union
from httpx import Headers, Response
@@ -3,7 +3,7 @@
## Initial implementation - covers gemini + image gen calls
import json
import time
import uuid
from litellm._uuid import uuid
from copy import deepcopy
from functools import partial
from typing import (
+1 -1
View File
@@ -17,7 +17,7 @@ import random
import sys
import time
import traceback
import uuid
from litellm._uuid import uuid
from concurrent import futures
from concurrent.futures import FIRST_COMPLETED, ThreadPoolExecutor, wait
from copy import deepcopy
+1 -1
View File
@@ -1,4 +1,4 @@
import uuid
from litellm._uuid import uuid
from typing import Any, Dict, Iterable, List, Optional, Set, Union
from litellm._logging import verbose_proxy_logger
+1 -1
View File
@@ -1,6 +1,6 @@
import enum
import json
import uuid
from litellm._uuid import uuid
from datetime import datetime
from typing import (
TYPE_CHECKING,
+1 -1
View File
@@ -336,7 +336,7 @@ def _handle_team_assignment(base_url: str, api_key: str, user_id: str) -> None:
@click.pass_context
def login(ctx: click.Context):
"""Login to LiteLLM proxy using SSO authentication"""
import uuid
from litellm._uuid import uuid
from litellm.constants import LITELLM_CLI_SOURCE_IDENTIFIER
from litellm.proxy.client.cli.interface import show_commands
@@ -1,5 +1,5 @@
import asyncio
import uuid
from litellm._uuid import uuid
from typing import TYPE_CHECKING, Any, Optional
from litellm._logging import verbose_proxy_logger
@@ -5,7 +5,7 @@ PANW Prisma AIRS Built-in Guardrail for LiteLLM
"""
import os
import uuid
from litellm._uuid import uuid
from typing import TYPE_CHECKING, Any, Dict, List, Literal, Optional, Type, cast
from fastapi import HTTPException
@@ -10,7 +10,7 @@
import asyncio
import json
import uuid
from litellm._uuid import uuid
from datetime import datetime
from typing import (
Any,
@@ -2,7 +2,7 @@
import importlib
import os
import uuid
from litellm._uuid import uuid
from datetime import datetime, timezone
from typing import Dict, List, Optional, Type, cast
@@ -1,6 +1,6 @@
import asyncio
import json
import uuid
from litellm._uuid import uuid
from datetime import datetime, timezone
from typing import Any, List, Optional
@@ -3,7 +3,7 @@ Hooks that are triggered when a litellm user event occurs
"""
import asyncio
import uuid
from litellm._uuid import uuid
from datetime import datetime, timezone
from typing import Optional
@@ -14,7 +14,7 @@ These are members of a Team on LiteLLM
import asyncio
import json
import traceback
import uuid
from litellm._uuid import uuid
from datetime import datetime, timezone
from typing import Any, Dict, List, Optional, Union, cast
@@ -14,7 +14,7 @@ import copy
import json
import secrets
import traceback
import uuid
from litellm._uuid import uuid
from datetime import datetime, timedelta, timezone
from typing import List, Literal, Optional, Tuple, cast
@@ -13,7 +13,7 @@ model/{model_id}/update - PATCH endpoint for model update.
import asyncio
import datetime
import json
import uuid
from litellm._uuid import uuid
from typing import Dict, List, Literal, Optional, Tuple, Union, cast
from fastapi import APIRouter, Depends, HTTPException, Request, status
@@ -11,7 +11,7 @@ Endpoints for /organization operations
#### ORGANIZATION MANAGEMENT ####
import uuid
from litellm._uuid import uuid
from typing import List, Optional, Tuple
from fastapi import APIRouter, Depends, HTTPException, Request, status
@@ -4,7 +4,7 @@
This is an enterprise feature and requires a premium license.
"""
import uuid
from litellm._uuid import uuid
from typing import Any, Dict, List, Optional, Set, Tuple
from fastapi import (
@@ -12,7 +12,7 @@ All /team management endpoints
import asyncio
import json
import traceback
import uuid
from litellm._uuid import uuid
from datetime import datetime, timezone
from typing import Any, Dict, List, Optional, Tuple, Union, cast
+1 -1
View File
@@ -10,7 +10,7 @@ Has all /sso/* routes
import asyncio
import os
import uuid
from litellm._uuid import uuid
from copy import deepcopy
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union, cast
@@ -3,7 +3,7 @@ Functions to create audit logs for LiteLLM Proxy
"""
import json
import uuid
from litellm._uuid import uuid
from datetime import datetime, timezone
import litellm
@@ -4,7 +4,7 @@ organizations, teams, and keys.
"""
import json
import uuid
from litellm._uuid import uuid
from typing import Dict, Optional, Union
from litellm._logging import verbose_proxy_logger
+1 -1
View File
@@ -1,6 +1,6 @@
# What is this?
## Helper utils for the management endpoints (keys/users/teams)
import uuid
from litellm._uuid import uuid
from datetime import datetime
from functools import wraps
from typing import Optional, Tuple
@@ -3,7 +3,7 @@ import asyncio
import copy
import json
import traceback
import uuid
from litellm._uuid import uuid
from base64 import b64encode
from datetime import datetime
from typing import Dict, List, Optional, Tuple, Union
@@ -922,7 +922,7 @@ def create_pass_through_route(
cost_per_request: Optional[float] = None,
):
# check if target is an adapter.py or a url
import uuid
from litellm._uuid import uuid
from litellm.proxy.types_utils.utils import get_instance_fn
@@ -1123,7 +1123,7 @@ async def initialize_pass_through_endpoints(
Returns:
None
"""
import uuid
from litellm._uuid import uuid
verbose_proxy_logger.debug("initializing pass through endpoints")
from litellm.proxy._types import CommonProxyErrors, LiteLLMRoutes
@@ -1366,7 +1366,7 @@ async def create_pass_through_endpoints(
"""
Create new pass-through endpoint
"""
import uuid
from litellm._uuid import uuid
from litellm.proxy.proxy_server import (
get_config_general_settings,
+1 -1
View File
@@ -9,7 +9,7 @@ import subprocess
import sys
import time
import traceback
import uuid
from litellm._uuid import uuid
import warnings
from datetime import datetime, timedelta
from typing import (
@@ -370,7 +370,7 @@ def _get_session_id_for_spend_log(
This ensures each spend log is associated with a unique session id.
"""
import uuid
from litellm._uuid import uuid
if (
standard_logging_payload is not None
@@ -671,7 +671,7 @@ async def upload_logo(file: UploadFile = File(...)):
os.makedirs(upload_dir, exist_ok=True)
# Generate unique filename
import uuid
from litellm._uuid import uuid
unique_filename = f"logo_{uuid.uuid4().hex}{file_extension}"
file_path = os.path.join(upload_dir, unique_filename)
+1 -1
View File
@@ -1308,7 +1308,7 @@ class ProxyLogging:
"litellm_logging_obj", None
)
if litellm_logging_obj is None:
import uuid
from litellm._uuid import uuid
request_data["litellm_call_id"] = str(uuid.uuid4())
user_api_key_logged_metadata = (
+1 -1
View File
@@ -211,7 +211,7 @@ async def aresponses_api_with_mcp(
# Handle MCP streaming if requested
if stream and mcp_tools_with_litellm_proxy:
# Generate MCP discovery events using the already processed tools
import uuid
from litellm._uuid import uuid
from litellm.responses.mcp.mcp_streaming_iterator import (
create_mcp_list_tools_events,
@@ -630,7 +630,7 @@ class LiteLLM_Proxy_MCP_Handler:
Returns:
List of MCP tool execution events for streaming
"""
import uuid
from litellm._uuid import uuid
from litellm.responses.mcp.mcp_streaming_iterator import create_mcp_call_events
@@ -714,7 +714,7 @@ class LiteLLM_Proxy_MCP_Handler:
"""Add custom output elements to the final response for MCP tool execution."""
# Import the required classes for creating output items
import json
import uuid
from litellm._uuid import uuid
from litellm.types.responses.main import GenericResponseOutputItem, OutputText
@@ -1,4 +1,4 @@
import uuid
from litellm._uuid import uuid
from typing import (
TYPE_CHECKING,
Any,
@@ -444,9 +444,6 @@ class MCPEnhancedStreamingIterator(BaseResponsesAPIStreamingIterator):
"""Generate tool execution events and execute tools"""
if not self.collected_response:
return
import uuid
from litellm.responses.mcp.litellm_proxy_mcp_handler import (
LiteLLM_Proxy_MCP_Handler,
)
+1 -1
View File
@@ -17,7 +17,7 @@ import logging
import threading
import time
import traceback
import uuid
from litellm._uuid import uuid
from collections import defaultdict
from functools import lru_cache
from typing import (
@@ -215,7 +215,7 @@ class AWSSecretsManagerV2(BaseAWSLLM, BaseSecretManager):
optional_params: Additional AWS parameters
timeout: Request timeout
"""
import uuid
from litellm._uuid import uuid
# Prepare the request data
data = {"Name": secret_name, "SecretString": secret_value}
+1 -1
View File
@@ -4,7 +4,7 @@ litellm.Router Types - includes RouterConfig, UpdateRouterConfig, ModelInfo etc
import datetime
import enum
import uuid
from litellm._uuid import uuid
from dataclasses import dataclass
from typing import Any, Dict, List, Literal, Optional, Tuple, Union, get_type_hints
+1 -1
View File
@@ -1,5 +1,5 @@
import enum
import uuid
from litellm._uuid import uuid
from typing import List, Optional
from pydantic import BaseModel, Field
@@ -6,7 +6,7 @@ sys.path.insert(0, os.path.abspath("../.."))
import asyncio
import logging
import uuid
from litellm._uuid import uuid
from datetime import datetime, timedelta, timezone
from unittest.mock import MagicMock, call, patch
@@ -6,7 +6,7 @@ import os
import sys
import time
import traceback
import uuid
from litellm._uuid import uuid
from datetime import datetime
import pytest
@@ -28,7 +28,7 @@ from typing import Optional
from unittest.mock import MagicMock, patch
import pytest
import uuid
from litellm._uuid import uuid
import json
from litellm.secret_managers.aws_secret_manager_v2 import AWSSecretsManagerV2
+1 -1
View File
@@ -13,7 +13,7 @@ sys.path.insert(
from unittest.mock import patch, MagicMock
import logging
from litellm._logging import verbose_logger
import uuid
from litellm._uuid import uuid
verbose_logger.setLevel(logging.DEBUG)
@@ -2,7 +2,7 @@ import os
import sys
import time
import traceback
import uuid
from litellm._uuid import uuid
from dotenv import load_dotenv
import json
@@ -5,7 +5,7 @@ import sys
from typing import Any, Dict, List
from unittest.mock import MagicMock, Mock, patch
import os
import uuid
from litellm._uuid import uuid
import time
import base64
@@ -5,7 +5,7 @@ import sys
from typing import Any, Dict, List
from unittest.mock import MagicMock, Mock, patch
import os
import uuid
from litellm._uuid import uuid
sys.path.insert(
0, os.path.abspath("../..")
+1 -1
View File
@@ -5,7 +5,7 @@ import sys
from typing import Any, Dict, List
from unittest.mock import MagicMock, Mock, patch
import os
import uuid
from litellm._uuid import uuid
import time
import base64
import inspect
+1 -1
View File
@@ -4,7 +4,7 @@ import os
import sys
import time
import traceback
import uuid
from litellm._uuid import uuid
from dotenv import load_dotenv
@@ -1,7 +1,7 @@
import sys, os
import traceback
import json
import uuid
from litellm._uuid import uuid
from dotenv import load_dotenv
from fastapi import Request
from datetime import datetime
@@ -72,7 +72,7 @@ async def test_add_new_model(prisma_client):
await litellm.proxy.proxy_server.prisma_client.connect()
from litellm.proxy.proxy_server import user_api_key_cache
import uuid
from litellm._uuid import uuid
_new_model_id = f"local-test-{uuid.uuid4().hex}"
@@ -121,7 +121,7 @@ async def test_add_update_model(prisma_client):
await litellm.proxy.proxy_server.prisma_client.connect()
from litellm.proxy.proxy_server import user_api_key_cache
import uuid
from litellm._uuid import uuid
_new_model_id = f"local-test-{uuid.uuid4().hex}"
@@ -230,7 +230,7 @@ async def test_add_team_model_to_db(prisma_client):
from litellm.proxy.management_endpoints.model_management_endpoints import (
_add_team_model_to_db,
)
import uuid
from litellm._uuid import uuid
new_team = await _create_new_team(prisma_client)
team_id = new_team.team_id
+5 -5
View File
@@ -212,7 +212,7 @@ def create_async_task(**completion_kwargs):
@pytest.mark.flaky(retries=12, delay=2)
async def test_langfuse_logging_without_request_response(stream, langfuse_client):
try:
import uuid
from litellm._uuid import uuid
_unique_trace_name = f"litellm-test-{str(uuid.uuid4())}"
litellm.set_verbose = True
@@ -276,7 +276,7 @@ async def test_langfuse_logging_audio_transcriptions(langfuse_client):
"""
Test that creates a trace with masked input and output
"""
import uuid
from litellm._uuid import uuid
_unique_trace_name = f"litellm-test-{str(uuid.uuid4())}"
litellm.set_verbose = True
@@ -314,7 +314,7 @@ async def test_langfuse_masked_input_output(langfuse_client):
"""
Test that creates a trace with masked input and output
"""
import uuid
from litellm._uuid import uuid
for mask_value in [True, False]:
_unique_trace_name = f"litellm-test-{str(uuid.uuid4())}"
@@ -364,7 +364,7 @@ async def test_aaalangfuse_logging_metadata(langfuse_client):
Release is just set for the trace
Tags is just set for the trace
"""
import uuid
from litellm._uuid import uuid
litellm.set_verbose = True
litellm.success_callback = ["langfuse"]
@@ -939,7 +939,7 @@ def test_aaalangfuse_dynamic_logging():
Covers the team-logging scenario.
"""
import uuid
from litellm._uuid import uuid
import langfuse
@@ -2489,7 +2489,7 @@ def mock_gemini_list_request(*args, **kwargs):
return mock_response
import uuid
from litellm._uuid import uuid
@pytest.mark.parametrize(
+1 -1
View File
@@ -7,7 +7,7 @@ import random
import sys
import time
import traceback
import uuid
from litellm._uuid import uuid
from dotenv import load_dotenv
+8 -8
View File
@@ -2,7 +2,7 @@ import os
import sys
import time
import traceback
import uuid
from litellm._uuid import uuid
from dotenv import load_dotenv
@@ -659,7 +659,7 @@ async def test_embedding_caching_base_64():
host=os.environ["REDIS_HOST"],
port=os.environ["REDIS_PORT"],
)
import uuid
from litellm._uuid import uuid
inputs = [
f"{uuid.uuid4()} hello this is ishaan",
@@ -788,7 +788,7 @@ async def test_redis_batch_cache_write():
- read from client
"""
litellm.set_verbose = True
import uuid
from litellm._uuid import uuid
messages = [
{"role": "user", "content": f"write a one sentence poem about: {uuid.uuid4()}"},
@@ -1479,7 +1479,7 @@ async def test_cache_control_overrides():
)
print("Testing cache override")
litellm.set_verbose = True
import uuid
from litellm._uuid import uuid
unique_num = str(uuid.uuid4())
@@ -1527,7 +1527,7 @@ def test_sync_cache_control_overrides():
)
print("Testing cache override")
litellm.set_verbose = True
import uuid
from litellm._uuid import uuid
unique_num = str(uuid.uuid4())
@@ -2050,7 +2050,7 @@ async def test_redis_proxy_batch_redis_get_cache():
user_api_key_cache = DualCache()
import uuid
from litellm._uuid import uuid
batch_redis_get_obj.in_memory_cache = user_api_key_cache.in_memory_cache
@@ -2493,7 +2493,7 @@ def test_redis_caching_multiple_namespaces():
The same request with different namespaces should not be cached under the same key
"""
import uuid
from litellm._uuid import uuid
from unittest.mock import patch, MagicMock
import litellm
from litellm.caching import Cache
@@ -2639,7 +2639,7 @@ def test_caching_with_reasoning_content():
Test that reasoning content is cached
"""
import uuid
from litellm._uuid import uuid
messages = [{"role": "user", "content": f"what is litellm? {uuid.uuid4()}"}]
litellm.cache = Cache()
+1 -1
View File
@@ -2,7 +2,7 @@ import os
import sys
import time
import traceback
import uuid
from litellm._uuid import uuid
from dotenv import load_dotenv
@@ -6,7 +6,7 @@ import os
import sys
import time
import traceback
import uuid
from litellm._uuid import uuid
from datetime import datetime
import pytest
+1 -1
View File
@@ -2,7 +2,7 @@ import os
import sys
import time
import traceback
import uuid
from litellm._uuid import uuid
from dotenv import load_dotenv
@@ -6,7 +6,7 @@ import random
import sys
import time
import traceback
import uuid
from litellm._uuid import uuid
from datetime import datetime
from typing import Optional, Tuple
+1 -1
View File
@@ -8,7 +8,7 @@ import asyncio
import json
import logging
import tempfile
import uuid
from litellm._uuid import uuid
from datetime import datetime
import pytest
@@ -97,7 +97,7 @@ def create_async_task(**completion_kwargs):
reason="Authentication missing for openai",
)
async def test_helicone_logging_metadata():
import uuid
from litellm._uuid import uuid
litellm.success_callback = ["helicone"]
+1 -1
View File
@@ -6,7 +6,7 @@ sys.path.insert(0, os.path.abspath("../.."))
import asyncio
import logging
import uuid
from litellm._uuid import uuid
import pytest
+1 -1
View File
@@ -13,7 +13,7 @@
# from concurrent.futures import ThreadPoolExecutor
# from collections import defaultdict
# from dotenv import load_dotenv
# import uuid
# from litellm._uuid import uuid
# import tracemalloc
# import objgraph
@@ -1,6 +1,6 @@
import os
import sys
import uuid
from litellm._uuid import uuid
from functools import partial
from typing import Optional
+1 -1
View File
@@ -96,7 +96,7 @@ def test_router_timeouts():
@pytest.mark.asyncio
async def test_router_timeouts_bedrock():
import uuid
from litellm._uuid import uuid
import openai

Some files were not shown because too many files have changed in this diff Show More