Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: BerriAI/litellm
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: main
Choose a base ref
...
head repository: ross-w/litellm
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Mar 31, 2025

  1. fix: enforce user budget limits when data not in cache

    Previously, when user data wasn't in the cache, the budget check in
    max_budget_limiter.py would be skipped entirely. This allowed users to
    exceed their budget limits if their data wasn't cached.
    
    This fix:
    - Modifies the async_pre_call_hook method to fetch user data from the
      database when it's not found in the cache
    - Adds proper error handling for database queries
    - Improves error messages to include more details about budget limits
    - Adds caching of database results to improve performance for future requests
    - Adds comprehensive tests to verify budget enforcement in various scenarios
    Ross Williamson authored and Ross Williamson committed Mar 31, 2025
    Configuration menu
    Copy the full SHA
    646ed79 View commit details
    Browse the repository at this point in the history
Loading