customizable model plugin woked well on debug env but raise error after packaging and upload #12638

Closed
opened 2026-02-21 19:08:19 -05:00 by yindo · 3 comments
Owner

Originally created by @cainiaodidi on GitHub (Apr 7, 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.1.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

I add a customizable model plugin and test well on debug env.
And I packaged it and get a .difypkg file, then I uploaded it from dify web and add LLM model, these steps are the same as I operated on debug env.
Image
Then I test in chatflow, it raised error. I don't know why. And I can't find complete logs in any container.
Image

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @cainiaodidi on GitHub (Apr 7, 2025). ### Self Checks - [ ] 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.1.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce I add a customizable model plugin and test well on debug env. And I packaged it and get a .difypkg file, then I uploaded it from dify web and add LLM model, these steps are the same as I operated on debug env. ![Image](https://github.com/user-attachments/assets/2dba7e82-8598-4413-b018-7e304faa6192) Then I test in chatflow, it raised error. I don't know why. And I can't find complete logs in any container. ![Image](https://github.com/user-attachments/assets/b4a9a899-e037-492f-be85-f2e7f0a3f329) ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-21 19:08:19 -05:00
Author
Owner

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

你好 @cainiaodidi!我是一个可以帮助你解决bug、回答问题并成为贡献者的机器人。在你等待人类维护者的同时,我会尽力帮助你。

I found a similar unsolved discussion that might be relevant to your issue: Please help! My plugin fails to run after packaging, but it works fine in debugging. [1].

Regarding your issue, the error message indicating uninitialized credentials for the model "deepseek-r1" suggests that the model provider credentials might not be properly configured. In Dify, credentials for models are handled through a settings interface, and they need to be completed and validated to avoid such errors. You should check the "Settings -> Model Provider" section to ensure that all necessary credentials are correctly set up [2][3].

Additionally, ensure that the validate_credentials method is correctly implemented for your model to verify the credentials provided. This method should throw a CredentialsValidateFailedError if the credentials are not valid [4].

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 7, 2025): <!-- Greeting --> 你好 @cainiaodidi!我是一个可以帮助你解决bug、回答问题并成为贡献者的机器人。在你等待人类维护者的同时,我会尽力帮助你。 <!-- Answer --> I found a similar unsolved discussion that might be relevant to your issue: [Please help! My plugin fails to run after packaging, but it works fine in debugging.](https://github.com/langgenius/dify/discussions/17473) <sup>[[1]](https://github.com/langgenius/dify/discussions/17473)</sup>. Regarding your issue, the error message indicating uninitialized credentials for the model "deepseek-r1" suggests that the model provider credentials might not be properly configured. In Dify, credentials for models are handled through a settings interface, and they need to be completed and validated to avoid such errors. You should check the "Settings -> Model Provider" section to ensure that all necessary credentials are correctly set up <sup>[[2]](https://github.com/langgenius/dify/blob/main/api/controllers/console/app/error.py)</sup><sup>[[3]](https://github.com/langgenius/dify/blob/main/api/core/model_manager.py)</sup>. Additionally, ensure that the `validate_credentials` method is correctly implemented for your model to verify the credentials provided. This method should throw a `CredentialsValidateFailedError` if the credentials are not valid <sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/en/plugins/schema-definition/model/model-schema.md)</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/17fea5e8-ebba-41da-9c32-b2de06c72b6f?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/17fea5e8-ebba-41da-9c32-b2de06c72b6f?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/17fea5e8-ebba-41da-9c32-b2de06c72b6f?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/17fea5e8-ebba-41da-9c32-b2de06c72b6f?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/17fea5e8-ebba-41da-9c32-b2de06c72b6f?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/17fea5e8-ebba-41da-9c32-b2de06c72b6f?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/17fea5e8-ebba-41da-9c32-b2de06c72b6f?feedback_type=other)</sup>
Author
Owner

@crazywoola commented on GitHub (Apr 7, 2025):

Try to remove all installed plugins and install it again. Also you need to check the settings in model provider's settings.

@crazywoola commented on GitHub (Apr 7, 2025): Try to remove all installed plugins and install it again. Also you need to check the settings in model provider's settings.
Author
Owner

@cainiaodidi commented on GitHub (Apr 8, 2025):

@crazywoola
I solved it. I find that I missed provider_credential_schema params in the provider.yaml. And I add it then it's ok. But I also have two questions as below:
1.In the provider.yaml, provider_credential_schema/credential_form_schemas params is the same as model_credential_schema/credential_form_schemas params, why do we config them together?
2.I want to know which container the log of chatflow is in? I find that api and worker container are not

@cainiaodidi commented on GitHub (Apr 8, 2025): @crazywoola I solved it. I find that I missed provider_credential_schema params in the provider.yaml. And I add it then it's ok. But I also have two questions as below: 1.In the provider.yaml, provider_credential_schema/credential_form_schemas params is the same as model_credential_schema/credential_form_schemas params, why do we config them together? 2.I want to know which container the log of chatflow is in? I find that api and worker container are not
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12638