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
refactor(e2e): move budgets and spend_tracking suites under quota_management
mateo-berrid37daf0b9f7b
diff --git a/tests/e2e/CLAUDE.md b/tests/e2e/CLAUDE.mdindex 5b23e15b5e2..88992038cb7 100644--- a/tests/e2e/CLAUDE.md+++ b/tests/e2e/CLAUDE.md@@ -11,8 +11,7 @@ Each subdirectory under `tests/e2e/` is one suite, scoped to an endpoint family- `embeddings/` - the `/embeddings` endpoint across providers- `batches/` - the `/batches` endpoint (placeholder until the first test lands)- `realtime/` - realtime websocket sessions, including the pipecat audio path-- `budgets/` - budget definition, enforcement, and reset windows (key, team, tag, soft, multi-window)-- `spend_tracking/` - spend logging and cost attribution on `/spend/*`+- `quota_management/` - quota enforcement and accounting, one subfolder per behavior: `budgets/` (budget definition, enforcement, and reset windows: key, team, tag, soft, multi-window) and `spend_tracking/` (spend logging and cost attribution on `/spend/*`)- `management/` - key/team/user/organization management routes: create/update/delete persistence via the info routes, team membership, and llm-only-key route denials; also the dashboard UI behavior on top of them, driven through the proxy-served UI at /ui with playwright (optional dep behind importorskip)- `logging/` - logging-integration delivery (datadog and friends)- `security/` - secret handling and log-leak protectiondiff --git a/tests/e2e/conftest.py b/tests/e2e/conftest.pyindex 4c4c8fe735b..08df334d4b8 100644--- a/tests/e2e/conftest.py+++ b/tests/e2e/conftest.py@@ -95,7 +95,7 @@ def pytest_sessionfinish(session: pytest.Session, exitstatus: int) -> None:path."""if not session.stash.get(_E2E_TEST_RAN, False):return- spend_dir = str(Path(__file__).parent / "spend_tracking")+ spend_dir = str(Path(__file__).parent / "quota_management" / "spend_tracking")sys.path.insert(0, spend_dir)try:from spend_e2e_client import reset_spend_logs # pyright: ignorediff --git a/tests/e2e/pytest.ini b/tests/e2e/pytest.iniindex 7799f6b16a2..d3b2193226b 100644--- a/tests/e2e/pytest.ini+++ b/tests/e2e/pytest.ini@@ -1,6 +1,6 @@[pytest]# Config when any e2e suite under tests/e2e/ is run directly, e.g.-# uv run pytest tests/e2e/spend_tracking/ -v+# uv run pytest tests/e2e/quota_management/spend_tracking/ -v# The e2e marker is also registered in conftest.py for runs rooted elsewhere.addopts = --strict-markers --strict-configmarkers =diff --git a/tests/e2e/budgets/BUDGET_CODE_MATRIX.md b/tests/e2e/quota_management/budgets/BUDGET_CODE_MATRIX.mdsimilarity index 100%rename from tests/e2e/budgets/BUDGET_CODE_MATRIX.mdrename to tests/e2e/quota_management/budgets/BUDGET_CODE_MATRIX.mddiff --git a/tests/e2e/budgets/BUDGET_TEST_COVERAGE_MATRIX.md b/tests/e2e/quota_management/budgets/BUDGET_TEST_COVERAGE_MATRIX.mdsimilarity index 98%rename from tests/e2e/budgets/BUDGET_TEST_COVERAGE_MATRIX.mdrename to tests/e2e/quota_management/budgets/BUDGET_TEST_COVERAGE_MATRIX.mdindex 62bfc1fdd41..7ff920a8d6d 100644--- a/tests/e2e/budgets/BUDGET_TEST_COVERAGE_MATRIX.md+++ b/tests/e2e/quota_management/budgets/BUDGET_TEST_COVERAGE_MATRIX.md@@ -12,7 +12,7 @@ Pre-existing live coverage outside this suite:- `tests/local_testing/test_router_budget_limiter.py` - provider / tag / deploymentbudgets at the router.-This suite (`tests/e2e/budgets/`) adds the missing live coverage and runs+This suite (`tests/e2e/quota_management/budgets/`) adds the missing live coverage and runson the shared lifecycle (every entity it creates is deleted on teardown).---diff --git a/tests/e2e/budgets/budget_client.py b/tests/e2e/quota_management/budgets/budget_client.pysimilarity index 100%rename from tests/e2e/budgets/budget_client.pyrename to tests/e2e/quota_management/budgets/budget_client.pydiff --git a/tests/e2e/budgets/conftest.py b/tests/e2e/quota_management/budgets/conftest.pysimilarity index 100%rename from tests/e2e/budgets/conftest.pyrename to tests/e2e/quota_management/budgets/conftest.pydiff --git a/tests/e2e/budgets/test_budget_crud_e2e.py b/tests/e2e/quota_management/budgets/test_budget_crud_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_budget_crud_e2e.pyrename to tests/e2e/quota_management/budgets/test_budget_crud_e2e.pydiff --git a/tests/e2e/budgets/test_budget_enforcement_e2e.py b/tests/e2e/quota_management/budgets/test_budget_enforcement_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_budget_enforcement_e2e.pyrename to tests/e2e/quota_management/budgets/test_budget_enforcement_e2e.pydiff --git a/tests/e2e/budgets/test_budget_fallback_e2e.py b/tests/e2e/quota_management/budgets/test_budget_fallback_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_budget_fallback_e2e.pyrename to tests/e2e/quota_management/budgets/test_budget_fallback_e2e.pydiff --git a/tests/e2e/budgets/test_budget_reset_advances_e2e.py b/tests/e2e/quota_management/budgets/test_budget_reset_advances_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_budget_reset_advances_e2e.pyrename to tests/e2e/quota_management/budgets/test_budget_reset_advances_e2e.pydiff --git a/tests/e2e/budgets/test_budget_reset_e2e.py b/tests/e2e/quota_management/budgets/test_budget_reset_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_budget_reset_e2e.pyrename to tests/e2e/quota_management/budgets/test_budget_reset_e2e.pydiff --git a/tests/e2e/budgets/test_model_max_budget_e2e.py b/tests/e2e/quota_management/budgets/test_model_max_budget_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_model_max_budget_e2e.pyrename to tests/e2e/quota_management/budgets/test_model_max_budget_e2e.pydiff --git a/tests/e2e/budgets/test_multi_window_budget_e2e.py b/tests/e2e/quota_management/budgets/test_multi_window_budget_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_multi_window_budget_e2e.pyrename to tests/e2e/quota_management/budgets/test_multi_window_budget_e2e.pydiff --git a/tests/e2e/budgets/test_soft_budget_e2e.py b/tests/e2e/quota_management/budgets/test_soft_budget_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_soft_budget_e2e.pyrename to tests/e2e/quota_management/budgets/test_soft_budget_e2e.pydiff --git a/tests/e2e/budgets/test_spend_counter_reseed_e2e.py b/tests/e2e/quota_management/budgets/test_spend_counter_reseed_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_spend_counter_reseed_e2e.pyrename to tests/e2e/quota_management/budgets/test_spend_counter_reseed_e2e.pydiff --git a/tests/e2e/budgets/test_tag_budget_e2e.py b/tests/e2e/quota_management/budgets/test_tag_budget_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_tag_budget_e2e.pyrename to tests/e2e/quota_management/budgets/test_tag_budget_e2e.pydiff --git a/tests/e2e/budgets/test_team_member_budget_e2e.py b/tests/e2e/quota_management/budgets/test_team_member_budget_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_team_member_budget_e2e.pyrename to tests/e2e/quota_management/budgets/test_team_member_budget_e2e.pydiff --git a/tests/e2e/budgets/test_team_member_budget_reset_e2e.py b/tests/e2e/quota_management/budgets/test_team_member_budget_reset_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_team_member_budget_reset_e2e.pyrename to tests/e2e/quota_management/budgets/test_team_member_budget_reset_e2e.pydiff --git a/tests/e2e/budgets/test_team_multi_window_budget_e2e.py b/tests/e2e/quota_management/budgets/test_team_multi_window_budget_e2e.pysimilarity index 100%rename from tests/e2e/budgets/test_team_multi_window_budget_e2e.pyrename to tests/e2e/quota_management/budgets/test_team_multi_window_budget_e2e.pydiff --git a/tests/e2e/spend_tracking/SPEND_TRACKING_COVERAGE_MATRIX.md b/tests/e2e/quota_management/spend_tracking/SPEND_TRACKING_COVERAGE_MATRIX.mdsimilarity index 100%rename from tests/e2e/spend_tracking/SPEND_TRACKING_COVERAGE_MATRIX.mdrename to tests/e2e/quota_management/spend_tracking/SPEND_TRACKING_COVERAGE_MATRIX.mddiff --git a/tests/e2e/spend_tracking/conftest.py b/tests/e2e/quota_management/spend_tracking/conftest.pysimilarity index 100%rename from tests/e2e/spend_tracking/conftest.pyrename to tests/e2e/quota_management/spend_tracking/conftest.pydiff --git a/tests/e2e/spend_tracking/spend_e2e_client.py b/tests/e2e/quota_management/spend_tracking/spend_e2e_client.pysimilarity index 100%rename from tests/e2e/spend_tracking/spend_e2e_client.pyrename to tests/e2e/quota_management/spend_tracking/spend_e2e_client.pydiff --git a/tests/e2e/spend_tracking/test_spend_routes.py b/tests/e2e/quota_management/spend_tracking/test_spend_routes.pysimilarity index 100%rename from tests/e2e/spend_tracking/test_spend_routes.pyrename to tests/e2e/quota_management/spend_tracking/test_spend_routes.pydiff --git a/tests/e2e/spend_tracking/test_spend_tracking_e2e.py b/tests/e2e/quota_management/spend_tracking/test_spend_tracking_e2e.pysimilarity index 100%rename from tests/e2e/spend_tracking/test_spend_tracking_e2e.pyrename to tests/e2e/quota_management/spend_tracking/test_spend_tracking_e2e.py