dify icon indicating copy to clipboard operation
dify copied to clipboard

agent node can not use tools because error occurs

Open ChengSongyang opened this issue 9 months ago • 5 comments

Self Checks

  • [x] This is only for bug report, if you would like to ask a question, please head to Discussions.
  • [x] I have searched for existing issues search for existing issues, including closed ones.
  • [x] I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • [x] Please do not modify this template :) and fill in all the required fields.

Dify version

1.0.0 and 1.0.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

when i try to create a simple agent node, the same error always occurs:

Image

✔️ Expected Behavior

invoke tools successfully

❌ Actual Behavior

Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for ReActParams\nmodel.entity\n Input should be a valid dictionary or instance of AIModelEntity [type=model_type, input_value=None, input_type=NoneType]\n For further information visit https://errors.pydantic.dev/2.8/v/model_type"}

ChengSongyang avatar Mar 12 '25 15:03 ChengSongyang

I found similar discussions that might be relevant to your issue:

  1. Agent node in workflow run status fails. - This discussion is currently unsolved and might provide insights into similar issues with agent nodes [1].

  2. Error reported when running an agent in a workflow. - Another unsolved discussion that could be related to the error you're encountering [2].

For the specific validation error you're facing with the FunctionCallingParams\model.entity, switching from the qwen2.5-72b-instruct model to the Deepseek model might resolve the issue. This change has been suggested to prevent validation errors while maintaining the same workflow configuration [3].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Mar 12 '25 15:03 dosubot[bot]

I found similar discussions that might be relevant to your issue:

  1. Agent node in workflow run status fails. - This discussion is currently unsolved and might provide insights into similar issues with agent nodes [1].
  2. Error reported when running an agent in a workflow. - Another unsolved discussion that could be related to the error you're encountering [2].

For the specific validation error you're facing with the FunctionCallingParams\model.entity, switching from the qwen2.5-72b-instruct model to the Deepseek model might resolve the issue. This change has been suggested to prevent validation errors while maintaining the same workflow configuration [3].

To continue talking to Dosu, mention @dosu.

Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosu deepseek v3 also have this problem, no matter i use any llm model, this error always occurs

ChengSongyang avatar Mar 12 '25 15:03 ChengSongyang

The validation error you're encountering with FunctionCallingParams\model.entity suggests that the input should be a valid dictionary or an instance of AIModelEntity. This issue can occur if the model configuration is not compatible with the expected input type. To resolve this, ensure that the model is correctly configured as an AIModelEntity. You can follow these steps to configure it properly:

  1. Define the Model Identifier: Set the model field with a string that identifies the model, such as gpt-3.5-turbo.

  2. Specify the Model Type: Choose the appropriate model_type from the available options like llm, text-embedding, etc.

  3. Configure Model Properties: Set the model_properties object with relevant properties based on the model type.

  4. Ensure Compatibility: Verify that the model you are using is compatible with the workflow configuration and does not trigger validation errors.

If the issue persists across different models, it might be worth checking if there are any specific configuration settings or updates required for the models you are using.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

dosubot[bot] avatar Mar 12 '25 15:03 dosubot[bot]

I got the same error when creating an agent node in chatflow with model gemma-2, provider openai compatible.

thanhENC avatar Apr 01 '25 10:04 thanhENC

got same error too, any updates for this issue?

raye-deng avatar Apr 08 '25 14:04 raye-deng

Could you please provider your agent plugin's version? Maybe update the plugin's version could solve the issue

Nov1c444 avatar Apr 18 '25 06:04 Nov1c444

when i update dify to 1.1.3, this error no longer exists

ChengSongyang avatar Apr 18 '25 06:04 ChengSongyang

when i update dify to 1.1.3, this error no longer exists Image Could you please show me the plugin's version, you could update the plugin's version and try it again if it's possible.

Nov1c444 avatar Apr 18 '25 06:04 Nov1c444