Commit e654c9f4 authored by Your Name's avatar Your Name

Fix litellm debug mode check to use runtime global_debug

parent c52d2e2b
......@@ -751,15 +751,12 @@ default_litellm_backend: Optional[LiteLLMBackend] = None
# Turn on litellm debug mode if global debug is enabled
def _setup_litellm_debug():
"""Turn on litellm debug mode if global debug is enabled."""
global global_debug
try:
# Import global_args from coderai
import sys
import os
# Try to get global_args from the coderai module
# Check if global_debug is True in coderai module at runtime
if 'coderai' in sys.modules:
from coderai import global_debug as coderai_debug
if coderai_debug:
from coderai import global_debug
if global_debug:
import litellm
litellm._turn_on_debug()
print("DEBUG litellm: Debug mode enabled")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment