From 025d96eb846c6ba5c097dd5cc600609a7af339e7 Mon Sep 17 00:00:00 2001 From: Harshit Jain <48647625+Harshit28j@users.noreply.github.com> Date: Tue, 3 Feb 2026 20:20:21 +0530 Subject: [PATCH] Update litellm/proxy/litellm_pre_call_utils.py Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com> --- litellm/proxy/litellm_pre_call_utils.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/litellm/proxy/litellm_pre_call_utils.py b/litellm/proxy/litellm_pre_call_utils.py index 641ac3d481f..361e50aaf21 100644 --- a/litellm/proxy/litellm_pre_call_utils.py +++ b/litellm/proxy/litellm_pre_call_utils.py @@ -1016,6 +1016,15 @@ async def add_litellm_data_to_request( # noqa: PLR0915 "user_api_key_model_max_budget" ] = user_api_key_dict.model_max_budget + # User spend, budget - used by prometheus.py + # Follow same pattern as team and API key budgets + data[_metadata_variable_name][ + "user_api_key_user_spend" + ] = user_api_key_dict.user_spend + data[_metadata_variable_name][ + "user_api_key_user_max_budget" + ] = user_api_key_dict.user_max_budget + # Extract allowed access groups for router filtering (GitHub issue #18333) # This allows the router to filter deployments based on team's access groups if llm_router is not None: