From 250b1a50d2b1663b4fff35f5bac0d53944c2f9b7 Mon Sep 17 00:00:00 2001 From: Yucheng He Date: Sun, 4 Oct 2026 03:17:29 -0700 Subject: [PATCH] style(proxy): trim the session promotion comment to the non-obvious why --- litellm/proxy/litellm_pre_call_utils.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/litellm/proxy/litellm_pre_call_utils.py b/litellm/proxy/litellm_pre_call_utils.py index 956448af70a..718d6cdc6c3 100644 --- a/litellm/proxy/litellm_pre_call_utils.py +++ b/litellm/proxy/litellm_pre_call_utils.py @@ -856,10 +856,8 @@ def apply_missing_session_id_policy( return caller_session_id: Final = _caller_trace_field(data, _metadata_variable_name, "session_id") if caller_session_id is not None: - # The caller supplied a usable session id, so generate/reject must not - # fire. Surface it on the root field as well: consumers that read - # ``litellm_session_id`` (router fallbacks, spend logs, sandbox reuse) - # otherwise see no session at all and mint a fresh uuid4 per request. + # Consumers that read the root field (router fallbacks, spend logs, + # sandbox reuse) otherwise see no session and mint a uuid4 per request. if not data.get("litellm_session_id"): data["litellm_session_id"] = caller_session_id # rebind-ok: data is an out-param return