v1.0.0-beta.1 agent doesn't work with OpenAI-API-compatible plugin in workflow #7875

Closed
opened 2026-02-21 18:22:48 -05:00 by yindo · 5 comments
Owner

Originally created by @wl102 on GitHub (Jan 23, 2025).

Self Checks

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

Dify version

1.0.0-beta.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

error log

[NodeRunStartedEvent]
Node ID: 1737517673139
Node Title: Agent-情报分析
Type: agent

[NodeRunFailedEvent]
Node ID: 1737517673139
Node Title: Agent-情报分析
Type: agent
Error: 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"}
Inputs: {'instruction': '你是有用的助手,负责查询安全情报信息,你可以使用工具获取外部知识,保证答案的真实、准确性。\n\n\n## 指令\n1. 根据给定的相关信息,查询安全情报信息,如果文本存在多个相关信息,则多次调用工具,并返回一个总结。\n2. 如果查询结果为空,则返回 "没有查询到相关信息"。\n3. 结果使用中文回答,不要输出任何无关的信息。', 'maximum_iterations': '2', 'model': {'mode': 'chat', 'model': 'deepseek-chat', 'model_type': 'llm', 'provider': 'langgenius/openai_api_compatible/openai_api_compatible', 'type': 'model-selector', 'completion_params': {}}, 'query': "查询['10.45.111.68', '10.45.136.7', '8.8.8.8', '10.45.136.6', '10.45.136.3', '10.45.136.4']、['v.beahh.com']、[]、[]的情报信息。", 'tools': [{'enabled': True, 'extra': {'description': ''}, 'parameters': {'ip': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_ip_report'}, {'enabled': True, 'extra': {'description': ''}, 'parameters': {'domain': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_domain_report'}, {'enabled': True, 'extra': {'description': ''}, 'parameters': {'hash': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_filehash_report'}, {'enabled': True, 'extra': {'description': ''}, 'parameters': {'url': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_url_report'}]}
Process Data:
Outputs:

[GraphRunFailedEvent] reason: 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"}
2025-01-24 03:08:57,224.224 INFO [Thread-41241 (process_request_thread)] [_internal.py:97] - 172.18.0.10 - - [24/Jan/2025 03:08:57] "POST /console/api/apps/593d6ab0-13c8-4577-9ddd-e2b1c32ca68a/workflows/draft HTTP/1.1" 200 -

model setting

Image

agent node

agent_strategy_name: function_calling
agent_strategy_provider_name: langgenius/agent/agent

extra

it work when i use langgenius/deepseek plugin.

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @wl102 on GitHub (Jan 23, 2025). ### Self Checks - [x] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [x] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [x] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [x] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [x] Please do not modify this template :) and fill in all the required fields. ### Dify version 1.0.0-beta.1 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce ## error log [NodeRunStartedEvent] Node ID: 1737517673139 Node Title: Agent-情报分析 Type: agent [NodeRunFailedEvent] Node ID: 1737517673139 Node Title: Agent-情报分析 Type: agent Error: 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"} Inputs: {'instruction': '你是有用的助手,负责查询安全情报信息,你可以使用工具获取外部知识,保证答案的真实、准确性。\n\n\n## 指令\n1. 根据给定的相关信息,查询安全情报信息,如果文本存在多个相关信息,则多次调用工具,并返回一个总结。\n2. 如果查询结果为空,则返回 "没有查询到相关信息"。\n3. 结果使用中文回答,不要输出任何无关的信息。', 'maximum_iterations': '2', 'model': {'mode': 'chat', 'model': 'deepseek-chat', 'model_type': 'llm', 'provider': 'langgenius/openai_api_compatible/openai_api_compatible', 'type': 'model-selector', 'completion_params': {}}, 'query': "查询['10.45.111.68', '10.45.136.7', '8.8.8.8', '10.45.136.6', '10.45.136.3', '10.45.136.4']、['v.beahh.com']、[]、[]的情报信息。", 'tools': [{'enabled': True, 'extra': {'description': ''}, 'parameters': {'ip': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_ip_report'}, {'enabled': True, 'extra': {'description': ''}, 'parameters': {'domain': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_domain_report'}, {'enabled': True, 'extra': {'description': ''}, 'parameters': {'hash': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_filehash_report'}, {'enabled': True, 'extra': {'description': ''}, 'parameters': {'url': ''}, 'provider_name': '/virustotal/virustotal', 'tool_name': 'get_url_report'}]} Process Data: Outputs: [GraphRunFailedEvent] reason: 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"} 2025-01-24 03:08:57,224.224 INFO [Thread-41241 (process_request_thread)] [_internal.py:97] - 172.18.0.10 - - [24/Jan/2025 03:08:57] "POST /console/api/apps/593d6ab0-13c8-4577-9ddd-e2b1c32ca68a/workflows/draft HTTP/1.1" 200 - ## model setting ![Image](https://github.com/user-attachments/assets/b6d16b06-18d8-47a6-a475-3c330e6a78e0) ## agent node agent_strategy_name: function_calling agent_strategy_provider_name: langgenius/agent/agent ## extra it work when i use langgenius/deepseek plugin. ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo added the 🐞 bug label 2026-02-21 18:22:48 -05:00
yindo closed this issue 2026-02-21 18:22:48 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 23, 2025):

@wl102 Hello there! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together!

I found a similar unsolved discussion titled "Agent node in workflow run status fails" which might be related to your issue [1].

The error you're encountering, "ValidationError" for FunctionCallingParams, suggests that the model parameter is not being correctly recognized as a valid dictionary or instance of AIModelEntity. This could be due to incorrect configuration or missing details in the model setup.

To address this, ensure that the model parameter in your FunctionCallingParams is correctly structured and includes all necessary fields. The model should be an instance of AgentModelConfig, which is required for the FunctionCallingParams in Dify [2]. Double-check the configuration form for the OpenAI API-compatible service to ensure all fields are correctly filled out, especially the model type and API endpoint.

If the issue persists, consider comparing the configuration with the one that works using the langgenius/deepseek plugin, as it might provide insights into what might be missing or misconfigured in the current setup.

To continue talking to Dosu, mention @dosu.


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

@dosubot[bot] commented on GitHub (Jan 23, 2025): <!-- Greeting --> @wl102 Hello there! I'm here to help you with any bugs, questions, or contributions. Let's tackle this issue together! <!-- Answer --> I found a similar unsolved discussion titled "Agent node in workflow run status fails" which might be related to your issue <sup>[[1]](https://github.com/langgenius/dify/discussions/12764)</sup>. The error you're encountering, "ValidationError" for `FunctionCallingParams`, suggests that the `model` parameter is not being correctly recognized as a valid dictionary or instance of `AIModelEntity`. This could be due to incorrect configuration or missing details in the model setup. To address this, ensure that the `model` parameter in your `FunctionCallingParams` is correctly structured and includes all necessary fields. The `model` should be an instance of `AgentModelConfig`, which is required for the `FunctionCallingParams` in Dify <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/en/plugins/schema-definition/agent.md)</sup>. Double-check the configuration form for the OpenAI API-compatible service to ensure all fields are correctly filled out, especially the model type and API endpoint. If the issue persists, consider comparing the configuration with the one that works using the `langgenius/deepseek` plugin, as it might provide insights into what might be missing or misconfigured in the current setup. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/dd3e960f-0466-46cb-9588-9018ae1ff407?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/dd3e960f-0466-46cb-9588-9018ae1ff407?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/dd3e960f-0466-46cb-9588-9018ae1ff407?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/dd3e960f-0466-46cb-9588-9018ae1ff407?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/dd3e960f-0466-46cb-9588-9018ae1ff407?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/dd3e960f-0466-46cb-9588-9018ae1ff407?feedback_type=other)</sup>
Author
Owner

@CracKerMe commented on GitHub (Jan 26, 2025):

deepseek 有已经开发好的模型适配商,设置里面使用对应的模型供应商填写 api 即可

@CracKerMe commented on GitHub (Jan 26, 2025): deepseek 有已经开发好的模型适配商,设置里面使用对应的模型供应商填写 api 即可
Author
Owner

@dosubot[bot] commented on GitHub (Feb 26, 2025):

Hi, @wl102. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary

  • A bug was reported in the v1.0.0-beta.1 version of the Dify agent with an OpenAI-API-compatible plugin in Docker.
  • The issue involved a validation error with the FunctionCallingParams.
  • It was suggested that the error might be due to incorrect configuration of the model parameter.
  • The issue appears to be resolved by correcting the configuration as per AgentModelConfig requirements.

Next Steps

  • Please confirm if this issue is still relevant to the latest version of the Dify repository. If so, you can keep the discussion open by commenting here.
  • If there are no further updates, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Feb 26, 2025): Hi, @wl102. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary** - A bug was reported in the v1.0.0-beta.1 version of the Dify agent with an OpenAI-API-compatible plugin in Docker. - The issue involved a validation error with the `FunctionCallingParams`. - It was suggested that the error might be due to incorrect configuration of the `model` parameter. - The issue appears to be resolved by correcting the configuration as per `AgentModelConfig` requirements. **Next Steps** - Please confirm if this issue is still relevant to the latest version of the Dify repository. If so, you can keep the discussion open by commenting here. - If there are no further updates, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Author
Owner

@k359792067 commented on GitHub (Mar 10, 2025):

@wl102 same problem with openai-api-compatible, is it resolved now?

@k359792067 commented on GitHub (Mar 10, 2025): @wl102 same problem with openai-api-compatible, is it resolved now?
Author
Owner

@wl102 commented on GitHub (Mar 11, 2025):

@wl102 same problem with openai-api-compatible, is it resolved now?
Unfortunately, it wasn't resolved.

@wl102 commented on GitHub (Mar 11, 2025): > [@wl102](https://github.com/wl102) same problem with openai-api-compatible, is it resolved now? Unfortunately, it wasn't resolved.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7875