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)