fix(router.py): introducing usage-based-routing

This commit is contained in:
Krrish Dholakia 2023-11-17 17:56:09 -08:00
parent a6a862dc5a
commit 478bd7def6
3 changed files with 133 additions and 130 deletions

View file

@ -1069,16 +1069,6 @@ def client(original_function):
try:
global callback_list, add_breadcrumb, user_logger_fn, Logging
function_id = kwargs["id"] if "id" in kwargs else None
if litellm.client_session is None:
litellm.client_session = httpx.Client(
limits=httpx.Limits(max_connections=100, max_keepalive_connections=20),
timeout = None
)
if litellm.aclient_session is None:
litellm.aclient_session = httpx.AsyncClient(
limits=httpx.Limits(max_connections=100, max_keepalive_connections=20),
timeout = None
)
if litellm.use_client or ("use_client" in kwargs and kwargs["use_client"] == True):
print_verbose(f"litedebugger initialized")
if "lite_debugger" not in litellm.input_callback: