Inability to correctly use Ollama-deployed models when using official Agent policy group nodes #38

Closed
opened 2026-02-16 10:17:50 -05:00 by yindo · 3 comments
Owner

Originally created by @Beeovan on GitHub (Mar 3, 2025).

I. Problem Description

When using the workflow (chatflow) of Dify version 1.0.0 and attempting to use the official Agent policy group nodes of Dify to call the models deployed by Ollama, the models cannot be used correctly. The workflow originally expected to effectively call the Ollama-deployed models through the Agent policy group nodes for conversation interaction. However, an error occurred during the actual execution, resulting in the inability to use the model to complete the corresponding tasks normally. But models of the same type can execute the policy nodes normally when using a provider other than Ollama. This problem still exists in the newly released Agent strategy plugin of version 0.0.9.

Image

Image

II. Error Message

Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for FunctionCallingParams\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"}
This error message indicates that there is a validation error in FunctionCallingParams. Specifically, the input of model.entity should be a valid dictionary or an instance of AIModelEntity, but the actual input is None.

III.Environment Information

Operating System: [WSL2 Ubuntu 22.04 LTS]
Dify Version: 1.0.0
Ollama Version: [Ollama 0.15.2]

IVSupplementary Instructions

The running status of the Ollama service has been checked, and it can normally respond to independent requests, indicating that the deployment and operation of Ollama itself are not problematic.
The model parameters of the Agent policy group nodes have been reconfigured, but the problem still persists.
I hope that the maintainers of the Dify project can help troubleshoot and solve this problem. Thank you very much! Please feel free to let me know if you need more information.

Originally created by @Beeovan on GitHub (Mar 3, 2025). ### **I. Problem Description** When using the workflow (chatflow) of Dify version 1.0.0 and attempting to use the official Agent policy group nodes of Dify to call the models deployed by Ollama, the models cannot be used correctly. The workflow originally expected to effectively call the Ollama-deployed models through the Agent policy group nodes for conversation interaction. However, an error occurred during the actual execution, resulting in the inability to use the model to complete the corresponding tasks normally. But models of the same type can execute the policy nodes normally when using a provider other than Ollama. This problem still exists in the newly released Agent strategy plugin of version 0.0.9. ![Image](https://github.com/user-attachments/assets/7e0097b8-5726-4695-a3c9-e7f0ca8db023) ![Image](https://github.com/user-attachments/assets/7ca4494d-aff2-44e5-91c6-db6e08c28f2a) ### **II. Error Message** Run failed: Failed to transform agent message: PluginInvokeError: {"args":{},"error_type":"ValidationError","message":"1 validation error for FunctionCallingParams\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"} This error message indicates that there is a validation error in FunctionCallingParams. Specifically, the input of model.entity should be a valid dictionary or an instance of AIModelEntity, but the actual input is None. ### **III.Environment Information** _Operating System: [WSL2 Ubuntu 22.04 LTS] Dify Version: 1.0.0 Ollama Version: [Ollama 0.15.2]_ ### **IVSupplementary Instructions** The running status of the Ollama service has been checked, and it can normally respond to independent requests, indicating that the deployment and operation of Ollama itself are not problematic. The model parameters of the Agent policy group nodes have been reconfigured, but the problem still persists. I hope that the maintainers of the Dify project can help troubleshoot and solve this problem. Thank you very much! Please feel free to let me know if you need more information.
yindo closed this issue 2026-02-16 10:17:50 -05:00
Author
Owner

@EcoleKeine commented on GitHub (Mar 4, 2025):

same problem
model: volcengine_maas + deepseek-v3

@EcoleKeine commented on GitHub (Mar 4, 2025): same problem model: volcengine_maas + deepseek-v3
Author
Owner

@leslie2046 commented on GitHub (Mar 22, 2025):

same in azure openai provider

@leslie2046 commented on GitHub (Mar 22, 2025): same in azure openai provider
Author
Owner

@leslie2046 commented on GitHub (Mar 22, 2025):

https://github.com/langgenius/dify-plugin-sdks/pull/45

@leslie2046 commented on GitHub (Mar 22, 2025): https://github.com/langgenius/dify-plugin-sdks/pull/45
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#38