diff --git a/litellm/main.py b/litellm/main.py index 63649844a..dfe6c5f31 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -10,6 +10,7 @@ import os, openai, sys, json, inspect, uuid, datetime, threading from typing import Any, Literal, Union from functools import partial + import dotenv, traceback, random, asyncio, time, contextvars from copy import deepcopy import httpx diff --git a/proxy_server_config.yaml b/proxy_server_config.yaml index 4b454f5bd..83bcc0626 100644 --- a/proxy_server_config.yaml +++ b/proxy_server_config.yaml @@ -42,8 +42,8 @@ litellm_settings: request_timeout: 600 general_settings: master_key: sk-1234 # [OPTIONAL] Only use this if you to require all calls to contain this key (Authorization: Bearer sk-1234) - proxy_budget_rescheduler_min_time: 10 - proxy_budget_rescheduler_max_time: 12 + proxy_budget_rescheduler_min_time: 60 + proxy_budget_rescheduler_max_time: 64 # database_url: "postgresql://:@:/" # [OPTIONAL] use for token-based auth to proxy environment_variables: diff --git a/tests/test_keys.py b/tests/test_keys.py index 413c24bc1..cba960aca 100644 --- a/tests/test_keys.py +++ b/tests/test_keys.py @@ -461,8 +461,8 @@ async def test_key_with_budgets(): reset_at_init_value = key_info["info"]["budget_reset_at"] reset_at_new_value = None i = 0 - await asyncio.sleep(20) for i in range(3): + await asyncio.sleep(70) key_info = await retry_request( get_key_info, session=session, get_key=key, call_key=key ) diff --git a/tests/test_users.py b/tests/test_users.py index 898274467..cccc6dd4c 100644 --- a/tests/test_users.py +++ b/tests/test_users.py @@ -126,7 +126,7 @@ async def test_users_budgets_reset(): i = 0 reset_at_new_value = None while i < 3: - await asyncio.sleep(15) + await asyncio.sleep(70) user_info = await get_user_info( session=session, get_user=get_user, call_user=key )