From 812ff23c7dfe03e5d1cb06d33c9bb5676c8ef660 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 19 Nov 2024 15:24:11 -0800 Subject: [PATCH] feat - track custom_llm_provider in StandardLoggingPayload --- litellm/litellm_core_utils/litellm_logging.py | 2 ++ litellm/types/utils.py | 1 + 2 files changed, 3 insertions(+) diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index 69d6adca4..42dcca6db 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -2359,6 +2359,7 @@ def _init_custom_logger_compatible_class( # noqa: PLR0915 _in_memory_loggers.append(_mlflow_logger) return _mlflow_logger # type: ignore + def get_custom_logger_compatible_class( logging_integration: litellm._custom_logger_compatible_callbacks_literal, ) -> Optional[CustomLogger]: @@ -2850,6 +2851,7 @@ def get_standard_logging_object_payload( request_tags=request_tags, end_user=end_user_id or "", api_base=litellm_params.get("api_base", ""), + custom_llm_provider=litellm_params.get("custom_llm_provider", None), model_group=_model_group, model_id=_model_id, requester_ip_address=clean_metadata.get("requester_ip_address", None), diff --git a/litellm/types/utils.py b/litellm/types/utils.py index d02129681..ff5c11fd4 100644 --- a/litellm/types/utils.py +++ b/litellm/types/utils.py @@ -1542,6 +1542,7 @@ class StandardLoggingPayload(TypedDict): model_id: Optional[str] model_group: Optional[str] api_base: str + custom_llm_provider: Optional[str] metadata: StandardLoggingMetadata cache_hit: Optional[bool] cache_key: Optional[str]