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
Use fastuuid for litellm_call_id (#14346)
Arseny Boykov29309f767c08
diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.pyindex 4c95d0053fc..6a203748c97 100644--- a/litellm/litellm_core_utils/litellm_logging.py+++ b/litellm/litellm_core_utils/litellm_logging.py@@ -10,7 +10,7 @@ import subprocessimport sysimport timeimport traceback-import uuid+import fastuuid as uuidfrom datetime import datetime as dt_objectfrom functools import lru_cachefrom typing import (@@ -1714,9 +1714,12 @@ class Logging(LiteLLMLoggingBaseClass):response_obj=result,start_time=start_time,end_time=end_time,- litellm_call_id=litellm_params.get(- "litellm_call_id", str(uuid.uuid4())- ),+ litellm_call_id=current_call_id+ if (+ current_call_id := litellm_params.get("litellm_call_id")+ )+ is not None+ else str(uuid.uuid4()),print_verbose=print_verbose,)if callback == "wandb" and weightsBiasesLogger is not None: