mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
fix(utils.py): logging fixes
This commit is contained in:
parent
5f9ea8a94f
commit
61576fa6a9
2 changed files with 9 additions and 5 deletions
|
|
@ -566,7 +566,6 @@ async def user_api_key_auth(
|
|||
and (not general_settings.get("allow_user_auth", False))
|
||||
):
|
||||
# enters this block when allow_user_auth is set to False
|
||||
assert not general_settings.get("allow_user_auth", False)
|
||||
if route == "/key/info":
|
||||
# check if user can access this route
|
||||
query_params = request.query_params
|
||||
|
|
@ -3931,7 +3930,7 @@ def _has_user_setup_sso():
|
|||
"""
|
||||
microsoft_client_id = os.getenv("MICROSOFT_CLIENT_ID", None)
|
||||
google_client_id = os.getenv("GOOGLE_CLIENT_ID", None)
|
||||
ui_username = os.getenv("UI_USERNAME")
|
||||
ui_username = os.getenv("UI_USERNAME", None)
|
||||
|
||||
sso_setup = (
|
||||
(microsoft_client_id is not None)
|
||||
|
|
|
|||
|
|
@ -1982,8 +1982,8 @@ def client(original_function):
|
|||
for index in reversed(removed_async_items):
|
||||
litellm.failure_callback.pop(index)
|
||||
### DYNAMIC CALLBACKS ###
|
||||
dynamic_success_callbacks = []
|
||||
dynamic_async_success_callbacks = []
|
||||
dynamic_success_callbacks = None
|
||||
dynamic_async_success_callbacks = None
|
||||
if kwargs.get("success_callback", None) is not None and isinstance(
|
||||
kwargs["success_callback"], list
|
||||
):
|
||||
|
|
@ -1994,7 +1994,12 @@ def client(original_function):
|
|||
or callback == "dynamodb"
|
||||
or callback == "s3"
|
||||
):
|
||||
dynamic_async_success_callbacks.append(callback)
|
||||
if dynamic_async_success_callbacks is not None and isinstance(
|
||||
dynamic_async_success_callbacks, list
|
||||
):
|
||||
dynamic_async_success_callbacks.append(callback)
|
||||
else:
|
||||
dynamic_async_success_callbacks = [callback]
|
||||
removed_async_items.append(index)
|
||||
# Pop the async items from success_callback in reverse order to avoid index issues
|
||||
for index in reversed(removed_async_items):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue