Repository navigation
test(budgets): age the monthly window past any calendar month so the reset test passes on the 31st - #49372
Merged
Conversation
…reset test passes on the 31st Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
yucheng-berri
approved these changes
Oct 31, 2026
ryan-crabbe-berri
enabled auto-merge (squash)
October 31, 2026 01:45
ryan-crabbe-berri
deleted the
litellm_fix_month_end_budget_window_test
branch
October 31, 2026 01:57
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4 of 6 tasks
7 tasks done
6 tasks done
2 of 6 tasks
DeoLeung
pushed a commit
to aiyou178/litellm
that referenced
this pull request
Nov 5, 2026
…reset test passes on the 31st (BerriAI#49372) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> (cherry picked from commit 5029d02)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The monthly budget reset test failed on the 31st of every month because it aged the window by a fixed 30 days while the limiter measures a calendar month. The test now ages the window past the longest calendar month and computes the expected reset time the way the limiter does
Details
TLDR
Problem this solves:
test_user_model_budget_window_resets_when_the_period_elapsesfails on every 31stbudget_reset_atassumed 30-day months tooHow it solves it:
budget_window_seconds, the limiter's own calendar mathPre-Submission checklist
Screenshots / Proof of Fix
E2E exception at 79283ab. Test-only change, no product code touched, so a live proxy run proves nothing extra. The clock was faked with
faketimeto hit month endsType
✅ Test
Caveats (if any)
Low
Link to Devin session: https://app.devin.ai/sessions/7df8c116a866458db64eb92ff28900fe
Open in Devin Desktop: https://app.devin.ai/desktop/session/7df8c116a866458db64eb92ff28900fe?variant=devin
Requested by: @ryan-crabbe-berri