Skip to content

Commit 03e5c48

Browse files
committed
feat: update
1 parent aa5e115 commit 03e5c48

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

aperag/llm/litellm_logging.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ def setup_litellm_logging():
2525

2626
litellm.suppress_debug_info = True
2727
litellm.disable_streaming_logging = True
28-
logging.info("LiteLLM debug info suppression is enabled.")
28+
29+
# Disable callbacks to prevent LoggingWorker event loop issues in Celery tasks
30+
# See: https://github.com/BerriAI/litellm/issues/14521
31+
litellm.callbacks = []
32+
33+
logging.info("LiteLLM debug info suppression is enabled and callbacks are disabled.")
2934

3035
# Filter Pydantic serialization warnings globally
3136
import warnings

aperag/llm/litellm_track.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import logging
1616
from datetime import datetime
1717

18-
import litellm
1918
from litellm.integrations.custom_logger import CustomLogger
2019

2120
logger = logging.getLogger(__name__)
@@ -76,4 +75,7 @@ def log_post_api_call_for_completion(self, kwargs, response_obj, start_time, end
7675

7776

7877
def register_custom_llm_track():
79-
litellm.callbacks = [MyCustomHandler()]
78+
# Disabled to prevent LoggingWorker event loop issues in Celery tasks
79+
# See: https://github.com/BerriAI/litellm/issues/14521
80+
# litellm.callbacks = [MyCustomHandler()]
81+
pass

0 commit comments

Comments
 (0)