From 50a0b1d91dd0abfa96e151bbe48ac2c8b4c69e8a Mon Sep 17 00:00:00 2001 From: Robert Brennan Date: Wed, 1 Jan 2025 17:00:18 -0500 Subject: [PATCH] fix llm err handling (#5958) --- openhands/controller/agent_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openhands/controller/agent_controller.py b/openhands/controller/agent_controller.py index 569d37a9be62..d4fd9178b390 100644 --- a/openhands/controller/agent_controller.py +++ b/openhands/controller/agent_controller.py @@ -208,7 +208,7 @@ async def _step_with_exception_handling(self): reported = RuntimeError( 'There was an unexpected error while running the agent.' ) - if isinstance(e, litellm.LLMError): + if isinstance(e, litellm.AuthenticationError): reported = e await self._react_to_exception(reported)