mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-24 00:52:24 +00:00
fix(gateway): expose /api/event_logging/batch on the gateway allowlist (#42572)
* fix(gateway): expose /api/event_logging/batch on the gateway allowlist Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix(gateway): route /api/event_logging to gateway pods in helm and terraform Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * test(proxy): stop max_budget leaking between proxy_server and native_compaction tests Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: kerry <kerry@berri.ai> Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
e30f9f578c
commit
bbc702cd8b
6 changed files with 11 additions and 9 deletions
|
|
@ -131,6 +131,7 @@ GATEWAY_EXACT_PATHS: frozenset[str] = frozenset(
|
|||
"/redoc",
|
||||
"/test",
|
||||
"/debug/memory/summary",
|
||||
"/api/event_logging/batch",
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@
|
|||
"/v1/fine-tuning" "/fine-tuning" "/v1/responses" "/responses" "/v1/threads" "/threads"
|
||||
"/v1/assistants" "/assistants" "/v1/vector_stores" "/vector_stores" "/v1/indexes"
|
||||
"/v1/models" "/models" "/openai" "/engines"
|
||||
"/v1/messages" "/messages" "/v1/skills" "/v1/a2a" "/a2a"
|
||||
"/v1/messages" "/messages" "/v1/skills" "/v1/a2a" "/a2a" "/api/event_logging"
|
||||
"/v1/rerank" "/v2/rerank" "/rerank" "/v1/ocr" "/ocr" "/v1/rag" "/rag"
|
||||
"/v1/video" "/v1/videos" "/video" "/videos" "/v1/search" "/search"
|
||||
"/v1/containers" "/containers" "/v1/evals" "/v1/memory" "/queue/chat"
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ locals {
|
|||
"/v1/models*", "/models*",
|
||||
"/openai/*", "/engines/*",
|
||||
"/v1/messages*", "/messages*",
|
||||
"/v1/skills/*", "/v1/a2a/*",
|
||||
"/v1/skills/*", "/v1/a2a/*", "/api/event_logging*",
|
||||
"/v1/rerank*", "/v2/rerank*", "/rerank*",
|
||||
"/v1/ocr*", "/ocr*",
|
||||
"/v1/rag/*", "/rag/*",
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ locals {
|
|||
"/v1/models*", "/models*",
|
||||
"/openai/*", "/engines/*",
|
||||
"/v1/messages*", "/messages*",
|
||||
"/v1/skills/*", "/v1/a2a/*",
|
||||
"/v1/skills/*", "/v1/a2a/*", "/api/event_logging*",
|
||||
"/v1/rerank*", "/v2/rerank*", "/rerank*",
|
||||
"/v1/ocr*", "/ocr*",
|
||||
"/v1/rag/*", "/rag/*",
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ async def test_real_proxy_child_auth_privacy_and_body_policy(
|
|||
monkeypatch.setattr(litellm, "max_budget", 0)
|
||||
monkeypatch.setattr(proxy_server.app, "dependency_overrides", {})
|
||||
monkeypatch.setattr(proxy_server, "master_key", "sk-master-fixture")
|
||||
monkeypatch.setattr(litellm, "max_budget", 0.0)
|
||||
monkeypatch.setattr(proxy_server, "prisma_client", object())
|
||||
monkeypatch.setattr(proxy_server, "user_api_key_cache", cache)
|
||||
monkeypatch.setattr(proxy_server, "llm_router", None)
|
||||
|
|
|
|||
|
|
@ -3200,7 +3200,7 @@ def test_normalize_datetime_for_sorting():
|
|||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_add_proxy_budget_to_db_only_creates_user_no_keys():
|
||||
async def test_add_proxy_budget_to_db_only_creates_user_no_keys(monkeypatch: pytest.MonkeyPatch):
|
||||
"""
|
||||
Test that _add_proxy_budget_to_db only creates a user and no keys are added.
|
||||
|
||||
|
|
@ -3218,8 +3218,8 @@ async def test_add_proxy_budget_to_db_only_creates_user_no_keys():
|
|||
from litellm.proxy.proxy_server import ProxyStartupEvent
|
||||
|
||||
# Set up required litellm settings
|
||||
litellm.budget_duration = "30d"
|
||||
litellm.max_budget = 100.0
|
||||
monkeypatch.setattr(litellm, "budget_duration", "30d")
|
||||
monkeypatch.setattr(litellm, "max_budget", 100.0)
|
||||
|
||||
litellm_proxy_budget_name = "litellm-proxy-budget"
|
||||
|
||||
|
|
@ -3258,7 +3258,7 @@ async def test_add_proxy_budget_to_db_only_creates_user_no_keys():
|
|||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_add_proxy_budget_to_db_backfills_budget_reset_at():
|
||||
async def test_add_proxy_budget_to_db_backfills_budget_reset_at(monkeypatch: pytest.MonkeyPatch):
|
||||
"""
|
||||
Test that _upsert_proxy_budget_with_reset_at_backfill issues a conditional
|
||||
update_many with `WHERE budget_reset_at IS NULL` to backfill the column on
|
||||
|
|
@ -3276,8 +3276,8 @@ async def test_add_proxy_budget_to_db_backfills_budget_reset_at():
|
|||
import litellm
|
||||
from litellm.proxy.proxy_server import ProxyStartupEvent
|
||||
|
||||
litellm.budget_duration = "30d"
|
||||
litellm.max_budget = 100.0
|
||||
monkeypatch.setattr(litellm, "budget_duration", "30d")
|
||||
monkeypatch.setattr(litellm, "max_budget", 100.0)
|
||||
litellm_proxy_budget_name = "litellm-proxy-budget"
|
||||
|
||||
mock_prisma = MagicMock()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue