fix(logging): Prevent LiteLLM logs from leaking through root logger (#11356)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Graham Neubig
2025-10-17 08:19:22 -07:00
committed by GitHub
parent d82972e126
commit 9bd0566e4e
2 changed files with 67 additions and 0 deletions

View File

@@ -583,6 +583,23 @@ def get_uvicorn_json_log_config() -> dict:
'level': 'INFO',
'propagate': False,
},
# Suppress LiteLLM loggers to prevent them from leaking through root logger
# This is necessary because logging.config.dictConfig() resets the .disabled flag
'LiteLLM': {
'handlers': [],
'level': 'CRITICAL',
'propagate': False,
},
'LiteLLM Router': {
'handlers': [],
'level': 'CRITICAL',
'propagate': False,
},
'LiteLLM Proxy': {
'handlers': [],
'level': 'CRITICAL',
'propagate': False,
},
},
'root': {'level': 'INFO', 'handlers': ['default']},
}