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 (#2837)

Yeuolybbea3a6b8447
diff --git a/api/controllers/console/app/app.py b/api/controllers/console/app/app.py
index fb697b6418a..ff974054155 100644
--- a/api/controllers/console/app/app.py
+++ b/api/controllers/console/app/app.py
@@ -245,6 +245,8 @@ class AppApi(Resource):
agent_mode = model_config.agent_mode_dict
# decrypt agent tool parameters if it's secret-input
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: