Skip to content

πŸ™Œ OpenHands: AI-Driven Development

fix(cli): filter out LiteLLM coroutine not awaited warning at shutdown (#9842)

llamantinodc2f5cd1b04f
diff --git a/openhands/cli/suppress_warnings.py b/openhands/cli/suppress_warnings.py
index cad360d22a..b57bb0b45b 100644
--- a/openhands/cli/suppress_warnings.py
+++ b/openhands/cli/suppress_warnings.py
@@ -42,6 +42,13 @@ def suppress_cli_warnings():
category=UserWarning,
)
+ # Suppress LiteLLM close_litellm_async_clients was never awaited warning
+ warnings.filterwarnings(
+ 'ignore',
+ message="coroutine 'close_litellm_async_clients' was never awaited",
+ category=RuntimeWarning,
+ )
+
# Apply warning suppressions when module is imported
suppress_cli_warnings()