Agent Zero AI framework
fix: reset retry counter on handled exceptions and add text to vision tool results
frdelf9743cb736a7
diff --git a/plugins/_error_retry/extensions/python/agent_Agent_handle_exception_end/_80_retry_critical_exception.py b/plugins/_error_retry/extensions/python/agent_Agent_handle_exception_end/_80_retry_critical_exception.pyindex 599fcf986..6e01d551e 100644--- a/plugins/_error_retry/extensions/python/agent_Agent_handle_exception_end/_80_retry_critical_exception.py+++ b/plugins/_error_retry/extensions/python/agent_Agent_handle_exception_end/_80_retry_critical_exception.py@@ -16,9 +16,11 @@ class RetryCriticalException(Extension):exception = data.get("exception")if not exception:+ self.agent.set_data(DATA_NAME_COUNTER, 0) # reset counter if exception has been handledreturnif isinstance(exception, (HandledException, RepairableException)):+ self.agent.set_data(DATA_NAME_COUNTER, 0) # reset counter if exception has been handledreturnmax_retries = 1diff --git a/tools/vision_load.py b/tools/vision_load.pyindex 6bbd8bb9c..840f70162 100644--- a/tools/vision_load.py+++ b/tools/vision_load.py@@ -56,6 +56,7 @@ class VisionLoad(Tool):# build image data messages for LLMs, or error messagecontent = []if self.images_dict:+ self.agent.hist_add_tool_result(self.name, f"Processed {len(self.images_dict)} images") # some model providers break when they get have images in message history without textfor path, image in self.images_dict.items():if image:content.append(