diff --git a/litellm/__pycache__/main.cpython-311.pyc b/litellm/__pycache__/main.cpython-311.pyc index 2c5b0d3a41..5beb234ea4 100644 Binary files a/litellm/__pycache__/main.cpython-311.pyc and b/litellm/__pycache__/main.cpython-311.pyc differ diff --git a/litellm/__pycache__/utils.cpython-311.pyc b/litellm/__pycache__/utils.cpython-311.pyc index dee9000e5b..589af20d2e 100644 Binary files a/litellm/__pycache__/utils.cpython-311.pyc and b/litellm/__pycache__/utils.cpython-311.pyc differ diff --git a/litellm/main.py b/litellm/main.py index d376b2f253..d92124e71a 100644 --- a/litellm/main.py +++ b/litellm/main.py @@ -945,7 +945,7 @@ def embedding( try: response = None logging = litellm_logging_obj - logging.update_environment_variables(model=model, optional_params={}, litellm_params={"force_timeout": force_timeout, "azure": azure, "litellm_call_id": litellm_call_id, "logger_fn": logger_fn}) + logging.update_environment_variables(model=model, user="", optional_params={}, litellm_params={"force_timeout": force_timeout, "azure": azure, "litellm_call_id": litellm_call_id, "logger_fn": logger_fn}) if azure == True: # azure configs openai.api_type = "azure" diff --git a/litellm/tests/test_client.py b/litellm/tests/test_client.py index 499642c264..1da0a45546 100644 --- a/litellm/tests/test_client.py +++ b/litellm/tests/test_client.py @@ -12,7 +12,7 @@ import litellm from litellm import embedding, completion litellm.success_callback = ["posthog", "helicone"] -litellm.failure_callback = ["slack", "sentry", "posthog"] +litellm.failure_callback = ["sentry", "posthog"] litellm.set_verbose = True diff --git a/litellm/tests/test_embedding.py b/litellm/tests/test_embedding.py index 82f0c08ff3..cde73afc99 100644 --- a/litellm/tests/test_embedding.py +++ b/litellm/tests/test_embedding.py @@ -7,10 +7,8 @@ sys.path.insert( ) # Adds the parent directory to the system path import litellm from litellm import embedding, completion -from infisical import InfisicalClient litellm.set_verbose = True -# litellm.secret_manager_client = InfisicalClient(token=os.environ["INFISICAL_TOKEN"]) def test_openai_embedding(): diff --git a/litellm/tests/test_model_fallback.py b/litellm/tests/test_model_fallback.py index 82535f77a8..895588091e 100644 --- a/litellm/tests/test_model_fallback.py +++ b/litellm/tests/test_model_fallback.py @@ -11,7 +11,7 @@ import litellm from litellm import embedding, completion litellm.success_callback = ["posthog"] -litellm.failure_callback = ["slack", "sentry", "posthog"] +litellm.failure_callback = ["sentry", "posthog"] litellm.set_verbose = True diff --git a/litellm/utils.py b/litellm/utils.py index aae4d7f277..fe7564f718 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -438,12 +438,6 @@ def exception_logging( def client(original_function): global liteDebuggerClient, get_all_keys - def check_args(*args, **kwargs): - try: - model = args[0] if len(args) > 0 else kwargs["model"] - except: - raise ValueError("model param not passed in.") - def function_setup( start_time, *args, **kwargs ): # just run once to check if user wants to send their data anywhere - PostHog/Sentry/Slack/etc. @@ -494,8 +488,9 @@ def client(original_function): stream = True if "stream" in kwargs and kwargs["stream"] == True else False logging_obj = Logging(model=model, messages=messages, stream=stream, litellm_call_id=kwargs["litellm_call_id"], function_id=function_id, call_type=call_type, start_time=start_time) return logging_obj - except: # DO NOT BLOCK running the function because of this + except Exception as e: # DO NOT BLOCK running the function because of this print_verbose(f"[Non-Blocking] {traceback.format_exc()}; args - {args}; kwargs - {kwargs}") + print(e) pass def crash_reporting(*args, **kwargs): @@ -522,11 +517,10 @@ def client(original_function): result = None litellm_call_id = str(uuid.uuid4()) kwargs["litellm_call_id"] = litellm_call_id - # check_args(*args, **kwargs) - try: - model = args[0] if len(args) > 0 else kwargs["model"] - except: - raise ValueError("model param not passed in.") + # try: + # model = args[0] if len(args) > 0 else kwargs["model"] + # except: + # raise ValueError("model param not passed in.") try: logging_obj = function_setup(start_time, *args, **kwargs)