litellm/tests/test_litellm/proxy/spend_tracking
mateo-berri 8ccbd82bd2 fix: authorize custom-logger spend payload against its own owner
The custom-logger detail branch reads the payload from cold storage, which is
written independently of the spend-log table and can outlive its row. The DB
owner pre-check then has nothing to verify for an id lookup that matches no row,
so a foreign tenant's stored payload could be returned. Authorize the returned
payload against the owner recorded inside it (metadata user/team id), failing
closed when none is recorded. Also fold the three identical 403 raises into one
helper.
2026-09-01 12:13:26 -07:00
..
test_budget_reservation.py fix(proxy): match OpenAI on empty input and skip budget reservation for token counting 2026-08-31 12:25:45 -07:00
test_budget_reservation_redis_failure.py fix(register_model): preserve built-in cache pricing when registering custom overrides under unmapped keys (#30044) 2026-06-10 12:11:03 -07:00
test_cloudzero_endpoints.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_compression_savings.py feat(spend): track prompt compression saved tokens in daily spend aggregates (#33810) 2026-07-18 17:47:54 -07:00
test_ptu_feature_flag.py feat(ptu): gate PTU flat-cost attribution behind an opt-in env var (#36138) 2026-08-10 12:23:20 -07:00
test_ptu_flat_cost_rollup.py test(ptu): drop the assertion on the flag removed upstream 2026-08-23 10:02:41 +00:00
test_savings.py fix(tests): derive the no-cache-read-rate savings baseline from the model map 2026-08-29 19:35:10 -07:00
test_spend_log_error_logger.py feat(spend-logs): opt-in suppression of stack traces in spend-tracking error logs 2026-05-02 00:44:34 +00:00
test_spend_management_endpoints.py fix: authorize custom-logger spend payload against its own owner 2026-09-01 12:13:26 -07:00
test_spend_query_optimization.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_spend_tracking_utils.py fix(spend_logs): store litellm_call_id and match it in request_id lookups 2026-08-31 21:37:27 -07:00