Skip to content

[Fix] Use user budget instead of key budget when creating new team - #16074

Merged
3 commits merged into
mainfrom
litellm_session_key_fix
Nov 12, 2025
Merged

3 commits merged into
mainfrom
litellm_session_key_fix

Conversation

@yuneng-jiang

@yuneng-jiang yuneng-jiang commented Oct 29, 2025 •

Copy link
Copy Markdown
Contributor

[Fix] Use user budget instead of key budget when creating new team

Relevant issues

When creating a new team the logic used max_budget which is the key's max budget. This created issues when an org admin with a UI session token tried to create a team with a budget greater than 10 because the UI session token's budget has a hard coded limit of 10. Instead we check against the user's budget which this PR implements

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have Added testing in the tests/litellm/ directory, Adding at least 1 test is a hard requirement - see details
  • I have added a screenshot of my new test passing locally
  • My PR passes all unit tests on make test-unit
  • My PR's scope is as isolated as possible, it only solves 1 specific problem

Type

🐛 Bug Fix
✅ Test

Changes

##Screenshot
Screenshot 2025-10-30 at 10 52 09 AM

@CLAassistant

CLAassistant commented Oct 29, 2025 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@vercel

vercel Bot commented Oct 29, 2025 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
litellm Error Error Nov 11, 2025 11:01pm

@ishaan-jaff ishaan-jaff left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks wrong

@yuneng-jiang yuneng-jiang changed the title [Fix] Use end user budget instead of key budget when creating new team [Fix] Use user budget instead of key budget when creating new team Nov 11, 2025
@ghost
ghost merged commit ba674f2 into main Nov 12, 2025
35 of 53 checks passed
@ghost
ghost deleted the litellm_session_key_fix branch November 12, 2025 02:55
fzowl pushed a commit to fzowl/litellm that referenced this pull request Jun 24, 2026
…erriAI#16074)

* Use end user budget instead of key budget when creating new team

* Fixed implementation to use user's max budget from the UserTable instead of EndUserTable
This pull request was closed.

This branch had an error being deployed

1 failed deployment
Preview — b8edbef1 Deployed Nov 11, 2025 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants