Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Creating a user with model_max_budget does not return the specified model_max_budget in the reponse #7047

Closed
mirodrr2 opened this issue Dec 5, 2024 · 1 comment · Fixed by #8228
Assignees
Labels
bug Something isn't working

Comments

@mirodrr2
Copy link

mirodrr2 commented Dec 5, 2024

What happened?

In the below "Relevant log output", you can see model_max_budget":{} in the response, even though I specified "model_max_budget": {"anthropic.claude-3-5-sonnet-20240620-v1:0": 1.0, "anthropic.claude-3-haiku-20240307-v1:0": 1.0} in the request

The problem is here, where we are not returning all of the parameters when creating our NewUserResponse.

It seems several other fields like model_rpm_limit and model_tpm_limit are missing as well.

Relevant log output

curl -X POST https://<YourProxyEndpoint>/user/new \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <YourApiKey>" \
-d '{
     "user_email": "new_user@example.com",
     "user_role": "internal_user",
     "model_max_budget":  {"anthropic.claude-3-5-sonnet-20240620-v1:0": 1.0, "anthropic.claude-3-haiku-20240307-v1:0": 1.0}
 }'

{"key_alias":null,"duration":null,"models":[],"spend":0.0,"max_budget":1000.0,"user_id":"b7e5ee23-2708-4aa4-a27d-16bb05cc4057","team_id":null,"max_parallel_requests":null,"metadata":{},"tpm_limit":null,"rpm_limit":null,"budget_duration":"1mo","allowed_cache_controls":[],"soft_budget":null,"config":{},"permissions":{},"model_max_budget":{},"send_invite_email":null,"model_rpm_limit":null,"model_tpm_limit":null,"guardrails":null,"blocked":null,"aliases":{},"key":"<YourNewKey>","key_name":null,"expires":null,"token_id":null,"user_email":"new_user@example.com","user_role":"internal_user","teams":null,"user_alias":null}

Are you a ML Ops Team?

No

What LiteLLM version are you on ?

v1.53.1

Twitter / LinkedIn details

No response

@mirodrr2 mirodrr2 added the bug Something isn't working label Dec 5, 2024
@krrishdholakia
Copy link
Contributor

able to repro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants