The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix test_init_custom_logger_compatible_class_as_callback
Ishaan Jaff085194b11d41
diff --git a/litellm/integrations/cloudzero/cloudzero.py b/litellm/integrations/cloudzero/cloudzero.pyindex 727dabc0945..ab4ec234bf0 100644--- a/litellm/integrations/cloudzero/cloudzero.py+++ b/litellm/integrations/cloudzero/cloudzero.py@@ -6,10 +6,6 @@ import litellmfrom litellm._logging import verbose_loggerfrom litellm.integrations.custom_logger import CustomLogger-from .cz_stream_api import CloudZeroStreamer-from .database import LiteLLMDatabase-from .transform import CBFTransformer-if TYPE_CHECKING:from apscheduler.schedulers.asyncio import AsyncIOSchedulerelse:@@ -105,6 +101,9 @@ class CloudZeroLogger(CustomLogger):limit: Optional limit on number of records to exportoperation: CloudZero operation type ("replace_hourly" or "sum")"""+ from litellm.integrations.cloudzero.cz_stream_api import CloudZeroStreamer+ from litellm.integrations.cloudzero.database import LiteLLMDatabase+ from litellm.integrations.cloudzero.transform import CBFTransformertry:verbose_logger.debug("CloudZero Logger: Starting usage data export")@@ -163,6 +162,8 @@ class CloudZeroLogger(CustomLogger):Returns:dict: Contains usage_data, cbf_data, and summary statistics"""+ from litellm.integrations.cloudzero.database import LiteLLMDatabase+ from litellm.integrations.cloudzero.transform import CBFTransformertry:verbose_logger.debug("CloudZero Logger: Starting dry run export")diff --git a/litellm/litellm_core_utils/custom_logger_registry.py b/litellm/litellm_core_utils/custom_logger_registry.pyindex fd82ecdf2b2..af51fe9ab79 100644--- a/litellm/litellm_core_utils/custom_logger_registry.py+++ b/litellm/litellm_core_utils/custom_logger_registry.py@@ -38,6 +38,7 @@ try:from litellm_enterprise.integrations.prometheus import PrometheusLoggerexcept Exception:PrometheusLogger = None+from litellm.integrations.cloudzero.cloudzero import CloudZeroLoggerfrom litellm.integrations.dotprompt import DotpromptManagerfrom litellm.integrations.s3_v2 import S3Loggerfrom litellm.integrations.sqs import SQSLogger@@ -86,6 +87,7 @@ class CustomLoggerRegistry:"dynamic_rate_limiter": _PROXY_DynamicRateLimitHandler,"vector_store_pre_call_hook": VectorStorePreCallHook,"dotprompt": DotpromptManager,+ "cloudzero": CloudZeroLogger,}try: