litellm/tests/otel_tests
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
..
test_e2e_budgeting.py (Testing) e2e testing for team budget enforcement checks (#7988) 2025-01-24 18:18:12 -08:00
test_e2e_model_access.py test string checked for model access control 2025-03-10 20:04:18 -07:00
test_guardrails.py (Feat) set guardrails per team (#7993) 2025-01-25 10:41:11 -08:00
test_key_logging_callbacks.py (feat) add /key/health endpoint to test key based logging (#6073) 2024-10-05 11:56:55 +05:30
test_model_info.py [Feat] Allow setting supports_vision for Custom OpenAI endpoints + Added testing (#5821) 2024-09-21 11:35:55 -07:00
test_moderations.py (docs + fix) Add docs on Moderations endpoint, Text Completion (#6947) 2024-11-27 16:30:48 -08:00
test_otel.py test(test_otel.py): fix test 2024-09-23 08:10:06 -07:00
test_prometheus.py Schedule budget resets at expectable times (#10331) (#10333) 2025-04-29 20:59:44 -07:00
test_rerank.py add /rerank test 2024-08-27 17:50:37 -07:00
test_team_member_permissions.py [Team Member permissions] - Fixes (#9945) 2025-04-12 11:17:51 -07:00
test_team_tag_routing.py [Feat] Allow setting supports_vision for Custom OpenAI endpoints + Added testing (#5821) 2024-09-21 11:35:55 -07:00