litellm/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
..
basic_proxy_startup_tests
batches_tests VertexAI non-jsonl file storage support (#9781) 2025-04-09 14:01:48 -07:00
code_coverage_tests Handle more gemini tool calling edge cases + support bedrock 'stable-image-core' (#10351) 2025-04-28 14:22:29 -07:00
documentation_tests
image_gen_tests [Bug Fix] Add Cost Tracking for gpt-image-1 when quality is unspecified (#10247) 2025-04-23 15:16:40 -07:00
litellm Schedule budget resets at expectable times (#10331) (#10333) 2025-04-29 20:59:44 -07:00
litellm_utils_tests Support checking provider /models endpoints on proxy /v1/models endpoint (#9958) 2025-04-14 23:23:20 -07:00
litellm-proxy-extras Prisma Migrate - support setting custom migration dir (#10336) 2025-04-26 12:05:06 -07:00
llm_responses_api_testing [Bug Fix] Responses API - fix for handling multiturn responses API sessions (#10415) 2025-04-29 17:22:47 -07:00
llm_translation test: override flaky test 2025-04-29 18:54:49 -07:00
load_tests test: update tests to new deployment model (#10142) 2025-04-18 14:22:12 -07:00
local_testing Update fireworks ai pricing (#10425) 2025-04-29 20:58:05 -07:00
logging_callback_tests [Feat] Add support for using Bedrock Knowledge Bases with LiteLLM /chat/completions requests (#10413) 2025-04-29 17:29:02 -07:00
mcp_tests test fixes 2025-03-29 18:34:58 -07:00
multi_instance_e2e_tests
old_proxy_tests/tests test: update tests to new deployment model (#10142) 2025-04-18 14:22:12 -07:00
openai_endpoints_tests # expect an error when getting the response again since 2025-04-25 09:42:35 -07:00
otel_tests Schedule budget resets at expectable times (#10331) (#10333) 2025-04-29 20:59:44 -07:00
pass_through_tests test: add more debug logs 2025-04-29 15:40:18 -07:00
pass_through_unit_tests [Feat] Pass through endpoints - ensure PassthroughStandardLoggingPayload is logged and contains method, url, request/response body (#10194) 2025-04-21 19:46:22 -07:00
proxy_admin_ui_tests UI (Keys Page) - Support cross filtering, filter by user id, filter by key hash (#10322) 2025-04-25 21:30:56 -07:00
proxy_security_tests
proxy_unit_tests Schedule budget resets at expectable times (#10331) (#10333) 2025-04-29 20:59:44 -07:00
router_unit_tests test_init_responses_api_endpoints 2025-04-24 21:43:59 -07:00
scim_tests [Feat SSO] Add LiteLLM SCIM Integration for Team and User management (#10072) 2025-04-16 19:21:47 -07:00
spend_tracking_tests test_long_term_spend_accuracy_with_bursts 2025-03-31 21:09:29 -07:00
store_model_in_db_tests fix(router.py): handle edge case where user sets 'model_group' inside… (#10191) 2025-04-21 16:17:45 -07:00
gettysburg.wav
large_text.py
openai_batch_completions.jsonl
README.MD
test_callbacks_on_proxy.py
test_config.py
test_debug_warning.py
test_end_users.py test: run test earlier to catch error 2025-03-27 23:08:52 -07:00
test_entrypoint.py
test_fallbacks.py
test_health.py
test_keys.py Support x-litellm-api-key header param + allow key at max budget to call non-llm api endpoints (#10392) 2025-04-29 18:57:57 -07:00
test_logging.conf
test_models.py Litellm UI improvements 04 26 2025 p1 (#10346) 2025-04-26 18:24:49 -07:00
test_openai_endpoints.py
test_organizations.py
test_passthrough_endpoints.py
test_ratelimit.py
test_spend_logs.py
test_team_logging.py
test_team_members.py
test_team.py
test_users.py

In total litellm runs 1000+ tests

[02/20/2025] Update:

To make it easier to contribute and map what behavior is tested,

we've started mapping the litellm directory in tests/litellm

This folder can only run mock tests.