Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

UN-2693 [Fix] Fixed wrong data coming in metadata api deployment (#1489)

vishnuszipstack4071ff4ed37b
diff --git a/backend/api_v2/api_deployment_views.py b/backend/api_v2/api_deployment_views.py
index 04154dd37..a2a49e998 100644
--- a/backend/api_v2/api_deployment_views.py
+++ b/backend/api_v2/api_deployment_views.py
@@ -126,6 +126,7 @@ class DeploymentExecution(views.APIView):
)
if not enable_highlight:
response.remove_result_metadata_keys(["highlight_data"])
+ response.remove_result_metadata_keys(["extracted_text"])
if not include_metadata:
response.remove_result_metadata_keys()
if not include_metrics:
diff --git a/backend/api_v2/deployment_helper.py b/backend/api_v2/deployment_helper.py
index bfaf97a4f..2c4fdb1ec 100644
--- a/backend/api_v2/deployment_helper.py
+++ b/backend/api_v2/deployment_helper.py
@@ -218,6 +218,7 @@ class DeploymentHelper(BaseAPIKeyValidator):
)
if not enable_highlight:
result.remove_result_metadata_keys(["highlight_data"])
+ result.remove_result_metadata_keys(["extracted_text"])
if not include_metadata:
result.remove_result_metadata_keys()
if not include_metrics:
diff --git a/backend/workflow_manager/endpoint_v2/destination.py b/backend/workflow_manager/endpoint_v2/destination.py
index 8bcd7bdfc..d50d49f90 100644
--- a/backend/workflow_manager/endpoint_v2/destination.py
+++ b/backend/workflow_manager/endpoint_v2/destination.py
@@ -562,17 +562,6 @@ class DestinationConnector(BaseConnector):
return self.parse_string(file_history.metadata)
else:
return None
-
- # Try to get metadata from tool execution result first
- try:
- tool_result = self.get_tool_execution_result(file_history)
- if isinstance(tool_result, dict) and "metadata" in tool_result:
- # Return the metadata from tool execution result (includes extracted_text)
- return tool_result.get("metadata", {})
- except Exception as e:
- logger.debug(f"Could not get metadata from tool result: {e}")
-
- # Fallback to workflow metadata if tool result metadata not available
metadata: dict[str, Any] = self.get_workflow_metadata()
return metadata