From 76146880dc71850e5949af35afd869f19f40b6c1 Mon Sep 17 00:00:00 2001 From: Souravrajvi0 <144546710+Souravrajvi0@users.noreply.github.com> Date: Tue, 11 Aug 2026 05:43:27 +0000 Subject: [PATCH] fix(logging): restore request_tags and tighten system_prompt typing --- litellm/litellm_core_utils/litellm_logging.py | 12 ++++++------ litellm/types/utils.py | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index 1da03c1db4e..622086bf466 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -4716,12 +4716,12 @@ class StandardLoggingPayloadSetup: if kwargs is None: return None - if kwargs.get("system_instructions") is not None: - return kwargs.get("system_instructions") - if kwargs.get("instructions") is not None: - return kwargs.get("instructions") - if kwargs.get("system") is not None: - return kwargs.get("system") + for key in ("system_instructions", "instructions", "system"): + value = kwargs.get(key) + if value is None: + continue + if isinstance(value, (str, list, dict)): + return value return None @staticmethod diff --git a/litellm/types/utils.py b/litellm/types/utils.py index c9bb7bb1dc3..a03c5b48111 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -3155,6 +3155,7 @@ class StandardLoggingPayload(TypedDict): cache_hit: bool | None cache_key: str | None saved_cache_cost: float + request_tags: list end_user: str | None requester_ip_address: str | None user_agent: str | None