diff --git a/.github/workflows/test-unit-proxy-infra.yml b/.github/workflows/test-unit-proxy-infra.yml index 2681400e8b7..ba955998e59 100644 --- a/.github/workflows/test-unit-proxy-infra.yml +++ b/.github/workflows/test-unit-proxy-infra.yml @@ -30,6 +30,7 @@ jobs: tests/test_litellm/proxy/experimental tests/test_litellm/proxy/common_utils tests/test_litellm/proxy/logging_endpoints + tests/test_litellm/proxy/rust_control_plane_endpoints tests/test_litellm/proxy/test_*.py workers: 2 reruns: 2 diff --git a/codecov.yaml b/codecov.yaml index f5acdd39136..3baea13e2d3 100644 --- a/codecov.yaml +++ b/codecov.yaml @@ -3,9 +3,6 @@ codecov: notify: wait_for_ci: false # post as soon as expected uploads arrive, don't wait on CI -ignore: - - "litellm-rust/**" - # Uploads are flagged per workflow/shard (GHA) or "circleci". carryforward makes # a re-upload of a flag replace its prior session instead of accumulating a # conflicting one, and lets a commit reuse a flag from its parent when that flag diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py index 50db86c59ef..4864213b288 100644 --- a/litellm/proxy/proxy_server.py +++ b/litellm/proxy/proxy_server.py @@ -346,7 +346,7 @@ from litellm.proxy.hooks.prompt_injection_detection import ( from litellm.proxy.hooks.proxy_track_cost_callback import _ProxyDBLogger from litellm.proxy.image_endpoints.endpoints import router as image_router from litellm.proxy.litellm_pre_call_utils import add_litellm_data_to_request -from litellm.proxy.logging_endpoints.callback_logs_endpoints import ( +from litellm.proxy.rust_control_plane_endpoints.callback_logs_endpoints import ( rust_control_plane_router, ) from litellm.proxy.management_endpoints.budget_management_endpoints import ( diff --git a/litellm/proxy/rust_control_plane_endpoints/__init__.py b/litellm/proxy/rust_control_plane_endpoints/__init__.py new file mode 100644 index 00000000000..a0c012b158b --- /dev/null +++ b/litellm/proxy/rust_control_plane_endpoints/__init__.py @@ -0,0 +1 @@ +"""Endpoints consumed by the Rust data-plane gateway.""" diff --git a/litellm/proxy/logging_endpoints/callback_logs_endpoints.py b/litellm/proxy/rust_control_plane_endpoints/callback_logs_endpoints.py similarity index 100% rename from litellm/proxy/logging_endpoints/callback_logs_endpoints.py rename to litellm/proxy/rust_control_plane_endpoints/callback_logs_endpoints.py diff --git a/tests/test_litellm/proxy/rust_control_plane_endpoints/__init__.py b/tests/test_litellm/proxy/rust_control_plane_endpoints/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/test_litellm/proxy/logging_endpoints/test_callback_logs_endpoints.py b/tests/test_litellm/proxy/rust_control_plane_endpoints/test_callback_logs_endpoints.py similarity index 95% rename from tests/test_litellm/proxy/logging_endpoints/test_callback_logs_endpoints.py rename to tests/test_litellm/proxy/rust_control_plane_endpoints/test_callback_logs_endpoints.py index c65b1e220e3..b3b547432a9 100644 --- a/tests/test_litellm/proxy/logging_endpoints/test_callback_logs_endpoints.py +++ b/tests/test_litellm/proxy/rust_control_plane_endpoints/test_callback_logs_endpoints.py @@ -7,7 +7,7 @@ from fastapi import HTTPException, Request from litellm.litellm_core_utils.litellm_logging import Logging as LiteLLMLogging from litellm.proxy._types import LitellmUserRoles, ProxyException, UserAPIKeyAuth -from litellm.proxy.logging_endpoints.callback_logs_endpoints import ( +from litellm.proxy.rust_control_plane_endpoints.callback_logs_endpoints import ( CallbackLogsReplayer, DATA_PLANE_KEY_ENV_VAR, DATA_PLANE_KEY_HEADER, @@ -149,7 +149,7 @@ async def test_verify_key_returns_model_dump(monkeypatch): return expected_auth monkeypatch.setattr( - "litellm.proxy.logging_endpoints.callback_logs_endpoints.user_api_key_auth", + "litellm.proxy.rust_control_plane_endpoints.callback_logs_endpoints.user_api_key_auth", fake_user_api_key_auth, ) @@ -178,7 +178,7 @@ async def test_verify_key_omits_model_when_absent(monkeypatch): return UserAPIKeyAuth(api_key="hashed-key") monkeypatch.setattr( - "litellm.proxy.logging_endpoints.callback_logs_endpoints.user_api_key_auth", + "litellm.proxy.rust_control_plane_endpoints.callback_logs_endpoints.user_api_key_auth", fake_user_api_key_auth, ) @@ -198,7 +198,7 @@ async def test_verify_key_does_not_double_prefix_existing_bearer(monkeypatch): return UserAPIKeyAuth(api_key="hashed-key") monkeypatch.setattr( - "litellm.proxy.logging_endpoints.callback_logs_endpoints.user_api_key_auth", + "litellm.proxy.rust_control_plane_endpoints.callback_logs_endpoints.user_api_key_auth", fake_user_api_key_auth, ) @@ -220,7 +220,7 @@ async def test_verify_key_401_on_proxy_exception(monkeypatch): ) monkeypatch.setattr( - "litellm.proxy.logging_endpoints.callback_logs_endpoints.user_api_key_auth", + "litellm.proxy.rust_control_plane_endpoints.callback_logs_endpoints.user_api_key_auth", fake_user_api_key_auth, ) @@ -237,7 +237,7 @@ async def test_verify_key_401_on_http_exception(monkeypatch): raise HTTPException(status_code=403, detail="forbidden internals") monkeypatch.setattr( - "litellm.proxy.logging_endpoints.callback_logs_endpoints.user_api_key_auth", + "litellm.proxy.rust_control_plane_endpoints.callback_logs_endpoints.user_api_key_auth", fake_user_api_key_auth, ) @@ -256,7 +256,7 @@ async def test_verify_key_propagates_http_5xx(monkeypatch): raise HTTPException(status_code=503, detail="db unavailable") monkeypatch.setattr( - "litellm.proxy.logging_endpoints.callback_logs_endpoints.user_api_key_auth", + "litellm.proxy.rust_control_plane_endpoints.callback_logs_endpoints.user_api_key_auth", fake_user_api_key_auth, ) @@ -275,7 +275,7 @@ async def test_verify_key_propagates_proxy_5xx(monkeypatch): ) monkeypatch.setattr( - "litellm.proxy.logging_endpoints.callback_logs_endpoints.user_api_key_auth", + "litellm.proxy.rust_control_plane_endpoints.callback_logs_endpoints.user_api_key_auth", fake_user_api_key_auth, )