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: req changes
Harshit Jain218383f739e2
diff --git a/litellm/integrations/datadog/datadog_metrics.py b/litellm/integrations/datadog/datadog_metrics.pyindex a15918bc6df..a22efd66000 100644--- a/litellm/integrations/datadog/datadog_metrics.py+++ b/litellm/integrations/datadog/datadog_metrics.py@@ -150,6 +150,7 @@ class DatadogMetricsLogger(CustomBatchLogger):"type": 1, # count"points": [{"timestamp": timestamp, "value": 1.0}],"tags": tags,+ "interval": self.flush_interval,}self.log_queue.append(series_count)diff --git a/litellm/proxy/health_endpoints/_health_endpoints.py b/litellm/proxy/health_endpoints/_health_endpoints.pyindex 83891c90e14..f37eb344d35 100644--- a/litellm/proxy/health_endpoints/_health_endpoints.py+++ b/litellm/proxy/health_endpoints/_health_endpoints.py@@ -285,8 +285,17 @@ async def health_services_endpoint( # noqa: PLR0915from litellm.integrations.datadog.datadog_metrics import (DatadogMetricsLogger,)+ from litellm.litellm_core_utils.litellm_logging import (+ get_custom_logger_compatible_class,+ )- datadog_metrics_logger = DatadogMetricsLogger(start_periodic_flush=False)+ datadog_metrics_logger = get_custom_logger_compatible_class(+ "datadog_metrics"+ )+ if datadog_metrics_logger is None:+ datadog_metrics_logger = DatadogMetricsLogger(+ start_periodic_flush=False+ )response = await datadog_metrics_logger.async_health_check()return {"status": response["status"],diff --git a/litellm/types/integrations/datadog_metrics.py b/litellm/types/integrations/datadog_metrics.pyindex 7269a77cc25..4c980cdee6d 100644--- a/litellm/types/integrations/datadog_metrics.py+++ b/litellm/types/integrations/datadog_metrics.py@@ -1,4 +1,4 @@-from typing import List+from typing import List, Optionalfrom typing_extensions import TypedDict@@ -8,11 +8,12 @@ class DatadogMetricPoint(TypedDict):value: float # The metric value-class DatadogMetricSeries(TypedDict):+class DatadogMetricSeries(TypedDict, total=False):metric: strtype: int # 0=unspecified, 1=count, 2=rate, 3=gaugepoints: List[DatadogMetricPoint]tags: List[str]+ interval: Optional[int] # Required for count (type=1) and rate (type=2) metricsclass DatadogMetricsPayload(TypedDict):