Update litellm/proxy/litellm_pre_call_utils.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Harshit Jain 2026-02-03 20:20:21 +05:30 committed by GitHub
parent bec6b6a2a9
commit 025d96eb84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: