Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.
Python agentagentic-aiagentic-frameworkagentic-workflowaiautomationclaudedeepseekgenaigptllmlow-codemcpnextjsno-codeopenaipythonskillsworkflow
fix(tool): validate return type from _invoke method to ensure ToolInv… (#12079)
-LAN-7ae417b4b637
diff --git a/api/core/tools/tool/tool.py b/api/core/tools/tool/tool.pyindex 55f94d76196..4094207beb5 100644--- a/api/core/tools/tool/tool.py+++ b/api/core/tools/tool/tool.py@@ -222,6 +222,12 @@ class Tool(BaseModel, ABC):if not isinstance(result, list):result = [result]+ if not all(isinstance(message, ToolInvokeMessage) for message in result):+ raise ValueError(+ f"Invalid return type from {self.__class__.__name__}._invoke method. "+ "Expected ToolInvokeMessage or list of ToolInvokeMessage."+ )+return resultdef _transform_tool_parameters_type(self, tool_parameters: Mapping[str, Any]) -> dict[str, Any]: