fix: allow S3 callback health test

This commit is contained in:
Genmin 2026-04-30 10:33:24 -07:00
parent 3583ac1159
commit cdc630c4f8
2 changed files with 19 additions and 0 deletions

View file

@ -126,6 +126,7 @@ services = Union[
"datadog_llm_observability",
"generic_api",
"arize",
"s3",
"sqs",
],
str,
@ -200,6 +201,7 @@ async def health_services_endpoint( # noqa: PLR0915
"datadog_llm_observability",
"generic_api",
"arize",
"s3",
"sqs",
]:
raise HTTPException(

View file

@ -0,0 +1,17 @@
from unittest.mock import AsyncMock, patch
import pytest
from litellm.proxy.health_endpoints._health_endpoints import health_services_endpoint
@pytest.mark.asyncio
async def test_health_services_endpoint_accepts_s3_callback():
with (
patch("litellm.success_callback", ["s3"]),
patch("litellm.acompletion", new=AsyncMock(return_value={})),
):
result = await health_services_endpoint(service="s3")
assert result["status"] == "success"
assert "s3" in result["message"]