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