mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-12 23:01:41 +00:00
fix(proxy): move rust control-plane endpoints into dedicated package
This commit is contained in:
parent
a3b404697b
commit
d1c371c337
7 changed files with 11 additions and 12 deletions
1
.github/workflows/test-unit-proxy-infra.yml
vendored
1
.github/workflows/test-unit-proxy-infra.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 (
|
||||
|
|
|
|||
1
litellm/proxy/rust_control_plane_endpoints/__init__.py
Normal file
1
litellm/proxy/rust_control_plane_endpoints/__init__.py
Normal file
|
|
@ -0,0 +1 @@
|
|||
"""Endpoints consumed by the Rust data-plane gateway."""
|
||||
|
|
@ -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,
|
||||
)
|
||||
|
||||
Loading…
Add table
Reference in a new issue