From 388a9f509484f557f44e4d21addcfef46aab1340 Mon Sep 17 00:00:00 2001 From: sjhddh Date: Thu, 26 Mar 2026 18:12:08 +0000 Subject: [PATCH] fix: truncate long response IDs in get_logging_id to prevent S3 filename too long errors (#24628) --- litellm/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/utils.py b/litellm/utils.py index 5a9dccc089e..22648580f07 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -7678,7 +7678,7 @@ def print_args_passed_to_litellm(original_function, args, kwargs): def get_logging_id(start_time, response_obj): try: response_id = ( - "time-" + start_time.strftime("%H-%M-%S-%f") + "_" + response_obj.get("id") + "time-" + start_time.strftime("%H-%M-%S-%f") + "_" + str(response_obj.get("id"))[:150] if response_obj.get("id") else "" ) return response_id except Exception: