Use fastuuid for litellm_call_id (#14346)

(cherry picked from commit 201806401ff12564fb6065b69cd8af347ed7c8e6)
This commit is contained in:
Arseny Boykov 2025-09-09 20:21:31 +02:00 committed by GitHub
parent 285b14bd69
commit 29309f767c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -10,7 +10,7 @@ import subprocess
import sys
import time
import traceback
import uuid
import fastuuid as uuid
from datetime import datetime as dt_object
from functools import lru_cache
from 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: