Skip to content

armgit / dify

Public Imported from GitHub
0

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.

Fix/compatible to old tool config (#2839)

Yeuolyf29280ba5c4b
diff --git a/api/controllers/console/app/model_config.py b/api/controllers/console/app/model_config.py
index 436f8c14478..2095bb6bea4 100644
--- a/api/controllers/console/app/model_config.py
+++ b/api/controllers/console/app/model_config.py
@@ -52,6 +52,9 @@ class ModelConfigResource(Resource):
masked_parameter_map = {}
tool_map = {}
for tool in agent_mode.get('tools') or []:
+ if not isinstance(tool, dict) or len(tool.keys()) <= 3:
+ continue
+
agent_tool_entity = AgentToolEntity(**tool)
# get tool
try: