fix(vision): surface actual error reason instead of generic message
When vision_analyze_tool fails, the except block was returning a generic 'could not be analyzed' message that gave the agent no actionable information about the failure cause. Replace the generic message with the actual exception string so the agent can distinguish between backend errors, missing dependencies, network failures, and unsupported image paths. Also add an 'error' field to the failure response for structured error handling by callers. Fixes #1034
This commit is contained in:
@@ -354,6 +354,7 @@ async def vision_analyze_tool(
|
||||
# Prepare error response
|
||||
result = {
|
||||
"success": False,
|
||||
"error": error_msg,
|
||||
"analysis": analysis,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user