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(proxy): add datadog_llm_observability to /health/services allowed list (#19952)
michelligabrieledcf5f07e5e88
diff --git a/litellm/proxy/health_endpoints/_health_endpoints.py b/litellm/proxy/health_endpoints/_health_endpoints.pyindex d27e0036235..eddd64c36c7 100644--- a/litellm/proxy/health_endpoints/_health_endpoints.py+++ b/litellm/proxy/health_endpoints/_health_endpoints.py@@ -118,6 +118,7 @@ services = Union["email","braintrust","datadog",+ "datadog_llm_observability","generic_api","arize","sqs"@@ -190,6 +191,7 @@ async def health_services_endpoint( # noqa: PLR0915"custom_callback_api","langsmith","datadog",+ "datadog_llm_observability","generic_api","arize","sqs"diff --git a/tests/test_litellm/proxy/health_endpoints/test_health_endpoints.py b/tests/test_litellm/proxy/health_endpoints/test_health_endpoints.pyindex edfdd9e4065..d6393bc6414 100644--- a/tests/test_litellm/proxy/health_endpoints/test_health_endpoints.py+++ b/tests/test_litellm/proxy/health_endpoints/test_health_endpoints.py@@ -312,6 +312,43 @@ async def test_test_model_connection_loads_config_from_router():assert "result" in result+async def test_health_services_endpoint_datadog_llm_observability():+ """+ Verify that 'datadog_llm_observability' is accepted as a valid service+ by the /health/services endpoint and does not raise a 400 error.++ Regression test for: https://github.com/BerriAI/litellm/issues/XXXX+ The service was missing from the allowed services validation list.+ """+ from litellm.proxy.health_endpoints._health_endpoints import (+ health_services_endpoint,+ )++ # Mock datadog_llm_observability to be in success_callback so the generic branch handles it+ with patch("litellm.success_callback", ["datadog_llm_observability"]):+ result = await health_services_endpoint(+ service="datadog_llm_observability"+ )++ # Should not raise HTTPException(400) and should return success+ assert result["status"] == "success"+ assert "datadog_llm_observability" in result["message"]+++async def test_health_services_endpoint_rejects_unknown_service():+ """+ Verify that an unknown service name is rejected with a 400 error.+ """+ from litellm.proxy._types import ProxyException++ with pytest.raises(ProxyException):+ await health_services_endpoint(+ service="totally_unknown_service_xyz"+ )++@pytest.fixture(scope="function")def proxy_client(monkeypatch):"""