What I Need Help With
All my chatflows were functioning normally, and suddenly the Agent node (FunctionCalling strategy) started failing consistently.
Every execution now breaks with the following error:
Failed to transform agent message:
req_id: 117bd56e42 PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for dict[str,any]\n Invalid JSON: expected value at line 1 column 1 [type=json_invalid, input_value='key not found', input_type=str]\n For further information visit https://errors.pydantic.dev/2.12/v/json_invalid"}
This happens consistently across different chatflows and is not related to any specific prompt or tool logic.
Environment Details
-
Dify Version: 1.12.1
-
Deployment Type: Dify Cloud
-
Models Used: GPT-4.1, GPT-4.1 Mini
-
Agent Strategy: FunctionCalling
Steps to Reproduce
-
Create a chatflow with an Agent node.
-
Configure the Agent to use:
-
FunctionCalling strategy
-
GPT-4.1 or GPT-4.1 Mini
-
-
Send any message to the agent.
Expected Behavior
The Agent node should process the message normally and return a valid response.
Actual Behavior
The Agent node fails immediately with a PluginInvokeError related to a ValidationError, indicating:
Invalid JSON: expected value at line 1 column 1
input_value='key not found'
The error suggests that the tool invocation result is being interpreted as invalid JSON.
Project Details
-
Project Type: Chatflow
-
Environment: Dify Cloud
-
Plan: Pro
-
Scope: Multiple chatflows affected
-
Impact: Blocking normal agent execution