mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
feat - add remaining team budget gauge
This commit is contained in:
parent
944d95d636
commit
51157c148f
3 changed files with 104 additions and 11 deletions
|
@ -104,6 +104,11 @@ async def add_litellm_data_to_request(
|
|||
data["metadata"]["user_api_key_team_alias"] = getattr(
|
||||
user_api_key_dict, "team_alias", None
|
||||
)
|
||||
|
||||
# Team spend, budget - used by prometheus.py
|
||||
data["metadata"]["user_api_key_team_max_budget"] = user_api_key_dict.team_max_budget
|
||||
data["metadata"]["user_api_key_team_spend"] = user_api_key_dict.team_spend
|
||||
|
||||
data["metadata"]["user_api_key_metadata"] = user_api_key_dict.metadata
|
||||
_headers = dict(request.headers)
|
||||
_headers.pop(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue