litellm/litellm/proxy/common_utils
Krish Dholakia 290e2528cd
Schedule budget resets at expectable times (#10331) (#10333)
* Schedule budget resets at expectable times (#10331)

* Enhance budget reset functionality with timezone support and standardized reset times

- Added `get_next_standardized_reset_time` function to calculate budget reset times based on specified durations and timezones.
- Introduced `timezone_utils.py` to manage timezone retrieval and budget reset time calculations.
- Updated budget reset logic in `reset_budget_job.py`, `internal_user_endpoints.py`, `key_management_endpoints.py`, and `team_endpoints.py` to utilize the new timezone-aware reset time calculations.
- Added unit tests for the new reset time functionality in `test_duration_parser.py`.
- Updated `.gitignore` to include `test.py` and made minor formatting adjustments in `docker-compose.yml` for consistency.

* Fixed linting

* Fix for mypy

* Fixed testcase for reset

* fix(duration_parser.py): move off zoneinfo - doesn't work with python 3.8

* test: update test

* refactor: improve budget reset time calculation and update related tests for accuracy

* clean up imports in team_endpoints.py

* test: update budget remaining hours assertions to reflect new reset time logic

* build(model_prices_and_context_window.json): update model

---------

Co-authored-by: Prathamesh Saraf <pratamesh1867@gmail.com>
2025-04-29 20:59:44 -07:00
..
html_forms [Feat SSO] Debug route - allow admins to debug SSO JWT fields (#9835) 2025-04-09 15:29:35 -07:00
admin_ui_utils.py [UI Polish] - Polish login screen (#9778) 2025-04-05 14:56:03 -07:00
callback_utils.py allow requiring auth for /metrics endpoint 2025-04-04 17:35:02 -07:00
debug_utils.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
encrypt_decrypt_utils.py Move UI to encrypted token usage (#10302) 2025-04-25 18:20:41 -07:00
http_parsing_utils.py [Bug Fix] Timestamp Granularities are not properly passed to whisper in Azure (#10299) 2025-04-24 18:57:11 -07:00
load_config_utils.py (code quality) run ruff rule to ban unused imports (#7313) 2024-12-19 12:33:42 -08:00
openai_endpoint_utils.py (feat) /batches Add support for using /batches endpoints in OAI format (#7402) 2024-12-24 16:58:05 -08:00
proxy_state.py (feat) UI - Disable Usage Tab once SpendLogs is 1M+ Rows (#7208) 2024-12-12 18:43:17 -08:00
reset_budget_job.py Schedule budget resets at expectable times (#10331) (#10333) 2025-04-29 20:59:44 -07:00
swagger_utils.py show all error types on swagger 2024-08-29 18:50:41 -07:00
timezone_utils.py Schedule budget resets at expectable times (#10331) (#10333) 2025-04-29 20:59:44 -07:00