From f3b76f1a02ce60dec0858b0741f47d03b7b95359 Mon Sep 17 00:00:00 2001 From: yucheng Date: Thu, 10 Sep 2026 01:11:32 +0000 Subject: [PATCH] refactor(proxy): drop docstrings that restate callback inventory helpers Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/litellm_core_utils/logging_callback_manager.py | 1 - litellm/proxy/proxy_server.py | 7 ++----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/litellm/litellm_core_utils/logging_callback_manager.py b/litellm/litellm_core_utils/logging_callback_manager.py index 0e78d5d4192..31523c9309d 100644 --- a/litellm/litellm_core_utils/logging_callback_manager.py +++ b/litellm/litellm_core_utils/logging_callback_manager.py @@ -442,7 +442,6 @@ class LoggingCallbackManager: return result def get_callback_objects(self) -> tuple[tuple[str, CustomLogger | Callable], ...]: - """Every non-string active callback paired with the name `get_callbacks_by_type` reports it under.""" return tuple( (self._get_callback_string(callback), callback) for callback in self._get_all_callbacks() diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 7943ab984df..65fb2e30d02 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -17572,7 +17572,6 @@ def _callback_module_name(callback: CustomLogger | Callable[..., object]) -> str def _is_litellm_internal_callback(callback_name: str, callback: CustomLogger | Callable[..., object]) -> bool: - """Hooks litellm registers on its own (router, proxy, service logging) are not user logging callbacks.""" from litellm.litellm_core_utils.custom_logger_registry import CustomLoggerRegistry module_owner: Final = _callback_module_name(callback).partition(".")[0] @@ -17585,9 +17584,8 @@ def _is_litellm_internal_callback(callback_name: str, callback: CustomLogger | C def _is_instance_of_configured_callback( callback_name: str, callback: CustomLogger | Callable[..., object], configured_classes: tuple[type, ...] ) -> bool: - """A configured string callback is replaced at init by an instance that may only be identifiable by class - (`logfire` initializes a bare `OpenTelemetry`). An instance that names itself (`arize`, `weave_otel`) is - matched by name instead, so a configured OTel-family callback does not hide its YAML-configured siblings.""" + """Self-naming OTel-family instances (`arize`, `weave_otel`) match by name, so a configured `logfire` (a bare + `OpenTelemetry`) does not hide YAML-configured siblings of the same class.""" from litellm.litellm_core_utils.custom_logger_registry import CustomLoggerRegistry class_derived_name: Final = CustomLoggerRegistry.get_callback_str_from_class_type(type(callback)) @@ -17595,7 +17593,6 @@ def _is_instance_of_configured_callback( def _hidden_runtime_callback_names(configured_callback_names: frozenset[str]) -> frozenset[str]: - """Return runtime callback names that are internal hooks, guardrails, or instances of a configured callback.""" from litellm.litellm_core_utils.custom_logger_registry import CustomLoggerRegistry configured_classes: Final = tuple(