forked from phoenix/litellm-mirror
fix(internal_user_endpoints.py): respect 'max_user_budget' for new internal user's
This commit is contained in:
parent
639f84d609
commit
b7e31638fd
2 changed files with 40 additions and 0 deletions
|
@ -87,6 +87,10 @@ async def new_user(
|
|||
"user" # only create a user, don't create key if 'auto_create_key' set to False
|
||||
)
|
||||
|
||||
if "max_budget" in data_json and data_json["max_budget"] is None:
|
||||
if litellm.max_user_budget is not None:
|
||||
data_json["max_budget"] = litellm.max_user_budget
|
||||
|
||||
response = await generate_key_helper_fn(request_type="user", **data_json)
|
||||
|
||||
# Admin UI Logic
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue