Skip to content

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]

Generate unique IDs for litellm_call_id and function_id using UUID (#13468)

Ishaan Jaff6184e898b722
diff --git a/litellm/main.py b/litellm/main.py
index b18914a6cca..124652fcb5a 100644
--- a/litellm/main.py
+++ b/litellm/main.py
@@ -5514,9 +5514,9 @@ async def ahealth_check(
messages=[],
stream=False,
call_type="acompletion",
- litellm_call_id="1234",
+ litellm_call_id=str(uuid.uuid4()),
start_time=datetime.datetime.now(),
- function_id="1234",
+ function_id=str(uuid.uuid4()),
log_raw_request_response=True,
)
model_params["litellm_logging_obj"] = litellm_logging_obj