litellm/tests/litellm/proxy
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
..
auth Move UI to encrypted token usage (#10302) 2025-04-25 18:20:41 -07:00
common_utils Schedule budget resets at expectable times (#10331) (#10333) 2025-04-29 20:59:44 -07:00
db [Feat - Cost Tracking improvement] Track prompt caching metrics in DailyUserSpendTransactions (#10029) 2025-04-15 21:40:57 -07:00
experimental/mcp_server test tool registry 2025-03-20 22:03:56 -07:00
health_endpoints test_db_health_readiness_check_with_prisma_error 2025-03-26 20:56:39 -07:00
hooks Litellm UI qa 04 12 2025 p1 (#9955) 2025-04-12 19:30:48 -07:00
management_endpoints UI (Keys Page) - Support cross filtering, filter by user id, filter by key hash (#10322) 2025-04-25 21:30:56 -07:00
middleware test_no_auth_metrics_when_disabled 2025-04-04 21:02:29 -07:00
openai_files_endpoint Litellm add managed files db (#9930) 2025-04-12 08:24:46 -07:00
pass_through_endpoints Add new /vertex_ai/discovery route - enables calling AgentBuilder API routes (#10084) 2025-04-16 21:45:51 -07:00
spend_tracking [Feat] Responses API - Add session management support for non-openai models (#10321) 2025-04-25 23:24:24 -07:00
types_utils test fix post call rules (#9826) 2025-04-08 13:55:37 -07:00
ui_crud_endpoints [Feat - UI] - Allow setting Default Team setting when LiteLLM SSO auto creates teams (#9918) 2025-04-11 14:07:10 -07:00
test_caching_routes.py (bug fix) - Fix Cache Health Check for Redis when redis_version is float (#8979) 2025-03-04 21:26:18 -08:00
test_common_request_processing.py Add litellm call id passing to Aim guardrails on pre and post-hooks calls (#10021) 2025-04-16 07:41:28 -07:00
test_litellm_pre_call_utils.py test_get_enforced_params 2025-04-01 08:41:53 -07:00
test_proxy_cli.py (Bug fix) - running litellm proxy on wndows (#8735) 2025-02-25 15:19:19 -08:00
test_proxy_server.py [Security fix - CVE-2025-0330] - Leakage of Langfuse API keys in team exception handling (#9830) 2025-04-08 13:55:20 -07:00
test_route_llm_request.py fix(route_llm_request.py): move to using common router, even for clie… (#8966) 2025-03-03 22:57:08 -08:00