BerriAI/litellm · error · ValueError
No active custom logger found for callback name: {callback_n
Error message
No active custom logger found for callback name: {callback_name} What it means
get_active_custom_logger_for_callback_name looks up the CustomLoggerRegistry class type for a callback name, then searches the currently active litellm.callbacks list for instances of that type. If zero instances are registered, it raises ValueError. This happens when config references a named callback (e.g. 'langfuse', 'openmeter') that was never activated — the class exists in the registry but no live logger object was added to litellm.callbacks.
Source
Thrown at litellm/litellm_core_utils/logging_callback_manager.py:478
def get_active_custom_logger_for_callback_name(
self,
callback_name: _custom_logger_compatible_callbacks_literal,
) -> CustomLogger | None:
"""
Get the active custom logger for a given callback name
"""
from litellm.litellm_core_utils.custom_logger_registry import (
CustomLoggerRegistry,
)
# get the custom logger class type
custom_logger_class_type: Final = CustomLoggerRegistry.get_class_type_for_custom_logger_name(callback_name)
# get the active custom logger
custom_logger: Final = self.get_custom_loggers_for_type(custom_logger_class_type)
if len(custom_logger) == 0:
raise ValueError(f"No active custom logger found for callback name: {callback_name}")
return custom_logger[0]
View on GitHub (pinned to 6c2dcb801b)
Solutions
- Install the integration package for the callback (e.g. pip install 'litellm[langfuse]') and set its required env variables, then restart so the logger activates.
- Verify activation at runtime: assert any(isinstance(c, ExpectedLoggerClass) for c in litellm.callbacks) before the lookup.
- Check the proxy/general settings logs for callback initialization errors that were swallowed earlier.
- If calling the API yourself, fall back gracefully when zero loggers are found.
Example fix
// before
from litellm.litellm_core_utils.logging_callback_manager import LoggingCallbackManager
logger = mgr.get_active_custom_logger_for_callback_name('langfuse')
# after
import litellm
loggers = [c for c in litellm.callbacks if type(c).__name__.lower().startswith('langfuse')]
logger = loggers[0] if loggers else None Defensive patterns
Strategy: validation
Validate before calling
import litellm
def callback_is_active(name: str) -> bool:
return any(type(c).__name__.lower().startswith(name.lower()) for c in litellm.callbacks) Try / catch
try:
logger = mgr.get_active_custom_logger_for_callback_name('langfuse')
except ValueError:
logger = None # observability optional; degrade gracefully Prevention
- Install integration extras and set required env vars before starting the proxy.
- Health-check callback activation at startup: assert litellm.callbacks is non-empty for each configured name.
- Watch startup logs for silent callback initialization failures.
When it happens
Trigger: Setting a config field like success_callback=['langfuse'] without the integration package installed or without litellm initializing the callback; referencing a callback name in proxy config.yaml while the corresponding env vars/credentials are missing so activation was skipped; calling get_active_custom_logger_for_callback_name manually before litellm.settings.callbacks is populated.
Common situations: Missing 'langfuse' pip package; proxy config lists a callback whose required env keys (e.g. LANGFUSE_PUBLIC_KEY) are absent so the logger never activates; ordering issues where the lookup runs before callback initialization; typos in callback names that silently map to a registry entry but never get instantiated.
Related errors
- Missing keys={missing_keys} in environment.
- LEVOAI_API_KEY environment variable is required for Levo int
- No valid endpoint found for Arize, please set 'ARIZE_ENDPOIN
- LOGFIRE_TOKEN not found in environment variables
- LANGTRACE_API_KEY not found in environment variables
AI-assisted analysis of BerriAI/litellm@6c2dcb801b (2026-08-15).
Data as JSON: /api/errors/ade14ae7927dc1be.
Report an issue: GitHub.