Workflow using lm studio error #231

Closed
opened 2026-02-16 10:18:32 -05:00 by yindo · 8 comments
Owner

Originally created by @shihuimin1012 on GitHub (Apr 27, 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.2.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I am using LM Studio to build a local large model (deepseek). After configuring LM Studio in Dify, I tested that the chat assistant can answer normally when selecting this model, but the workflow always selects this model and reports an error. The information is as follows

1 validation error for LLMNodeData model.mode Field required [type=missing, input_value={'provider': 'stvlynn/lms...': {'temperature': 0.7}}, input_type=dict] For further information visit https://errors.pydantic.dev/2.9/v/missing

Image

✔️ Expected Behavior

Normally used in workflow

Actual Behavior

No response

Originally created by @shihuimin1012 on GitHub (Apr 27, 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.2.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I am using LM Studio to build a local large model (deepseek). After configuring LM Studio in Dify, I tested that the chat assistant can answer normally when selecting this model, but the workflow always selects this model and reports an error. The information is as follows `1 validation error for LLMNodeData model.mode Field required [type=missing, input_value={'provider': 'stvlynn/lms...': {'temperature': 0.7}}, input_type=dict] For further information visit https://errors.pydantic.dev/2.9/v/missing` ![Image](https://github.com/user-attachments/assets/20ae183c-2b5c-4614-ba04-e570328af498) ### ✔️ Expected Behavior Normally used in workflow ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-16 10:18:32 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 27, 2025):

Hello @shihuimin1012! I'm Dosu, your friendly bot here to assist with bugs, questions, and becoming a contributor. I'm here to help while you wait for a human maintainer. Let's get into it! 🚀

To resolve the Pydantic validation error indicating a missing required field 'model.mode' in the 'LLMNodeData' model, ensure that the 'mode' parameter is included in your model configuration. This parameter specifies the operational mode of the model, which can be either 'completion' or 'chat', depending on your use case. Including this parameter should resolve the error and allow the model to function correctly. Additionally, verify that the model's credentials are initialized and that the model is supported and within quota limits, as these conditions can also affect the model's operation [1].

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] commented on GitHub (Apr 27, 2025): <!-- Greeting --> Hello @shihuimin1012! I'm [Dosu](https://dosu.dev), your friendly bot here to assist with bugs, questions, and becoming a contributor. I'm here to help while you wait for a human maintainer. Let's get into it! 🚀 <!-- Answer --> To resolve the Pydantic validation error indicating a missing required field 'model.mode' in the 'LLMNodeData' model, ensure that the 'mode' parameter is included in your model configuration. This parameter specifies the operational mode of the model, which can be either 'completion' or 'chat', depending on your use case. Including this parameter should resolve the error and allow the model to function correctly. Additionally, verify that the model's credentials are initialized and that the model is supported and within quota limits, as these conditions can also affect the model's operation <sup>[[1]](https://github.com/langgenius/dify/issues/16180)</sup>. <!-- 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/8290e500-23f1-43a3-a944-6bcf39fa6ac6?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/8290e500-23f1-43a3-a944-6bcf39fa6ac6?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/8290e500-23f1-43a3-a944-6bcf39fa6ac6?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/8290e500-23f1-43a3-a944-6bcf39fa6ac6?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8290e500-23f1-43a3-a944-6bcf39fa6ac6?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/8290e500-23f1-43a3-a944-6bcf39fa6ac6?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8290e500-23f1-43a3-a944-6bcf39fa6ac6?feedback_type=other)</sup>
Author
Owner

@shihuimin1012 commented on GitHub (Apr 27, 2025):

Image

已选择,还是报错。是否有人解决

@httkotori

@shihuimin1012 commented on GitHub (Apr 27, 2025): ![Image](https://github.com/user-attachments/assets/237f2a43-b262-4729-93f5-8275f26ca86c) 已选择,还是报错。是否有人解决 @httkotori
Author
Owner

@shawstar12 commented on GitHub (Apr 28, 2025):

@shihuimin1012 请问这个问题解决了吗?

@shawstar12 commented on GitHub (Apr 28, 2025): @shihuimin1012 请问这个问题解决了吗?
Author
Owner

@httkotori commented on GitHub (May 1, 2025):

请使用市场提供的插件OpenAI-API-compatible

@httkotori commented on GitHub (May 1, 2025): 请使用市场提供的插件OpenAI-API-compatible
Author
Owner

@mofahqc commented on GitHub (Aug 8, 2025):

请使用市场提供的插件OpenAI-API 兼容
when using OpenAI-API-compatible, it has this error

[openai_api_compatible] Error: req_id: 129b532178 PluginInvokeError: {"args":{},"error_type":"ValueError","message":"Unexpected endpoint or method. (POST /completions)"}

@mofahqc commented on GitHub (Aug 8, 2025): > 请使用市场提供的插件OpenAI-API 兼容 when using OpenAI-API-compatible, it has this error `[openai_api_compatible] Error: req_id: 129b532178 PluginInvokeError: {"args":{},"error_type":"ValueError","message":"Unexpected endpoint or method. (POST /completions)"}`
Author
Owner

@dosubot[bot] commented on GitHub (Aug 24, 2025):

Hi, @shihuimin1012. I'm Dosu, and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale.

Issue Summary:

  • You reported a validation error "missing required field 'model.mode'" when using a local large model (deepseek) from LM Studio in a Dify workflow.
  • The chat assistant works fine with the model, but the workflow triggers the validation error.
  • It was suggested to include the 'mode' parameter in the model configuration, but you confirmed the error persists after doing so.
  • Other users recommended using the "OpenAI-API-compatible" marketplace plugin, which led to a different error about an unexpected endpoint.
  • The issue remains unresolved with no further updates.

Next Steps:

  • Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here.
  • If I do not hear back within 5 days, this issue will be automatically closed.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 24, 2025): Hi, @shihuimin1012. I'm [Dosu](https://dosu.dev), and I'm helping the dify-official-plugins team manage their backlog and am marking this issue as stale. **Issue Summary:** - You reported a validation error "missing required field 'model.mode'" when using a local large model (deepseek) from LM Studio in a Dify workflow. - The chat assistant works fine with the model, but the workflow triggers the validation error. - It was suggested to include the 'mode' parameter in the model configuration, but you confirmed the error persists after doing so. - Other users recommended using the "OpenAI-API-compatible" marketplace plugin, which led to a different error about an unexpected endpoint. - The issue remains unresolved with no further updates. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of the dify-official-plugins repository by commenting here. - If I do not hear back within 5 days, this issue will be automatically closed. Thank you for your understanding and contribution!
Author
Owner

@shihuimin1012 commented on GitHub (Sep 1, 2025):

@shihuimin1012请问这个问题解决了吗?

我使用了OpenAI-API 解决了

但是出现了新的问题

@shihuimin1012 commented on GitHub (Sep 1, 2025): > [@shihuimin1012](https://github.com/shihuimin1012)请问这个问题解决了吗? 我使用了OpenAI-API 解决了 但是出现了新的问题
Author
Owner

@dosubot[bot] commented on GitHub (Sep 1, 2025):

@crazywoola The user shihuimin1012 mentioned they resolved the original issue using OpenAI-API but encountered a new problem afterward and would appreciate your assistance. Could you please take a look?

@dosubot[bot] commented on GitHub (Sep 1, 2025): @crazywoola The user shihuimin1012 mentioned they resolved the original issue using OpenAI-API but encountered a new problem afterward and would appreciate your assistance. Could you please take a look?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#231