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
Feat/api tool custom timeout (#3420)
Yeuolyae1f3780f86b
diff --git a/api/.env.example b/api/.env.exampleindex bbcb7cf1ec1..b99864a9460 100644--- a/api/.env.example+++ b/api/.env.example@@ -149,3 +149,7 @@ TEMPLATE_TRANSFORM_MAX_LENGTH=80000CODE_MAX_STRING_ARRAY_LENGTH=30CODE_MAX_OBJECT_ARRAY_LENGTH=30CODE_MAX_NUMBER_ARRAY_LENGTH=1000++# API Tool configuration+API_TOOL_DEFAULT_CONNECT_TIMEOUT=10+API_TOOL_DEFAULT_READ_TIMEOUT=60diff --git a/api/core/tools/tool/api_tool.py b/api/core/tools/tool/api_tool.pyindex de3cd552d4b..4037ef627c4 100644--- a/api/core/tools/tool/api_tool.py+++ b/api/core/tools/tool/api_tool.py@@ -1,5 +1,6 @@import jsonfrom json import dumps+from os import getenvfrom typing import Any, Unionfrom urllib.parse import urlencode@@ -13,7 +14,10 @@ from core.tools.entities.user_entities import UserToolProviderfrom core.tools.errors import ToolInvokeError, ToolParameterValidationError, ToolProviderCredentialValidationErrorfrom core.tools.tool.tool import Tool-API_TOOL_DEFAULT_TIMEOUT = (10, 60)+API_TOOL_DEFAULT_TIMEOUT = (+ int(getenv('API_TOOL_DEFAULT_CONNECT_TIMEOUT', '10')),+ int(getenv('API_TOOL_DEFAULT_READ_TIMEOUT', '60'))+)class ApiTool(Tool):api_bundle: ApiBasedToolBundle