From df190d25b87ced96cce2d2940e0f2b770256856c Mon Sep 17 00:00:00 2001 From: AlexsanderHamir Date: Wed, 26 Nov 2025 16:16:13 -0800 Subject: [PATCH] Add deprecation notice to /spend/logs endpoint - Mark /spend/logs as deprecated in docstring - Direct users to use /spend/logs/v2 for paginated access - Warns about performance issues with non-paginated endpoint --- litellm/proxy/spend_tracking/spend_management_endpoints.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/litellm/proxy/spend_tracking/spend_management_endpoints.py b/litellm/proxy/spend_tracking/spend_management_endpoints.py index 608db6af9a..2d3fc023a3 100644 --- a/litellm/proxy/spend_tracking/spend_management_endpoints.py +++ b/litellm/proxy/spend_tracking/spend_management_endpoints.py @@ -1917,6 +1917,9 @@ async def view_spend_logs( # noqa: PLR0915 user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth), ): """ + [DEPRECATED] This endpoint is not paginated and can cause performance issues. + Please use `/spend/logs/v2` instead for paginated access to spend logs. + View all spend logs, if request_id is provided, only logs for that request_id will be returned When start_date and end_date are provided: