Adding model for openAI-API-compatible failed #40

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

Originally created by @AltarIbnL on GitHub (Mar 6, 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 Dify issues & Dify Official Plugins, 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

Plugin version

0.0.7

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

docker-compose up -d

✔️ Error log

When I adding my self-deployment model with OpenAI-API-compatible, It return error. However,the same configuration is work in dify version 0.15.3

my model configuration:

Image

in frontend

Image

in backend

2025-03-06 04:55:54.721 ERROR [Dummy-5] [models.py:162] - Failed to save model credentials, tenant_id: 3e534c77-8307-4ca9-aa55-542a347b0c0a, model: /root/data/llm/Qwen2.5-7B-Instruct/, model_type: llm
Traceback (most recent call last):
  File "/app/api/controllers/console/workspace/models.py", line 154, in post
    model_provider_service.save_model_credentials(
  File "/app/api/services/model_provider_service.py", line 237, in save_model_credentials
    provider_configuration.add_or_update_custom_model_credentials(
  File "/app/api/core/entities/provider_configuration.py", line 406, in add_or_update_custom_model_credentials
    provider_model_record, credentials = self.custom_model_credentials_validate(model_type, model, credentials)
                                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/core/entities/provider_configuration.py", line 386, in custom_model_credentials_validate
    credentials = model_provider_factory.model_credentials_validate(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/api/core/model_runtime/model_providers/model_provider_factory.py", line 190, in model_credentials_validate
    self.plugin_model_manager.validate_model_credentials(
  File "/app/api/core/plugin/manager/model.py", line 137, in validate_model_credentials
    for resp in response:
                ^^^^^^^^
  File "/app/api/core/plugin/manager/base.py", line 189, in _request_with_plugin_daemon_response_stream
    self._handle_plugin_daemon_error(error.error_type, error.message)
  File "/app/api/core/plugin/manager/base.py", line 219, in _handle_plugin_daemon_error
    raise CredentialsValidateFailedError(error_object.get("message"))
core.model_runtime.errors.validate.CredentialsValidateFailedError: An error occurred during credentials validation: HTTPConnectionPool(host='10.208.0.146', port=3000): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7dc9f3a23410>: Failed to establish a new connection: [Errno 111] Connection refused'))


Originally created by @AltarIbnL on GitHub (Mar 6, 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 [Dify issues](https://github.com/langgenius/dify/issues) & [Dify Official Plugins](https://github.com/langgenius/dify-official-plugins/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 ### Plugin version 0.0.7 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce docker-compose up -d ### ✔️ Error log When I adding my self-deployment model with OpenAI-API-compatible, It return error. However,the same configuration is work in dify version 0.15.3 my model configuration: <img width="444" alt="Image" src="https://github.com/user-attachments/assets/c5a9576c-4f21-43b9-bee9-26c969f38911" /> in frontend <img width="376" alt="Image" src="https://github.com/user-attachments/assets/81457092-a241-4abf-a398-02ab5e0647f5" /> in backend ```bash 2025-03-06 04:55:54.721 ERROR [Dummy-5] [models.py:162] - Failed to save model credentials, tenant_id: 3e534c77-8307-4ca9-aa55-542a347b0c0a, model: /root/data/llm/Qwen2.5-7B-Instruct/, model_type: llm Traceback (most recent call last): File "/app/api/controllers/console/workspace/models.py", line 154, in post model_provider_service.save_model_credentials( File "/app/api/services/model_provider_service.py", line 237, in save_model_credentials provider_configuration.add_or_update_custom_model_credentials( File "/app/api/core/entities/provider_configuration.py", line 406, in add_or_update_custom_model_credentials provider_model_record, credentials = self.custom_model_credentials_validate(model_type, model, credentials) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/entities/provider_configuration.py", line 386, in custom_model_credentials_validate credentials = model_provider_factory.model_credentials_validate( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/model_runtime/model_providers/model_provider_factory.py", line 190, in model_credentials_validate self.plugin_model_manager.validate_model_credentials( File "/app/api/core/plugin/manager/model.py", line 137, in validate_model_credentials for resp in response: ^^^^^^^^ File "/app/api/core/plugin/manager/base.py", line 189, in _request_with_plugin_daemon_response_stream self._handle_plugin_daemon_error(error.error_type, error.message) File "/app/api/core/plugin/manager/base.py", line 219, in _handle_plugin_daemon_error raise CredentialsValidateFailedError(error_object.get("message")) core.model_runtime.errors.validate.CredentialsValidateFailedError: An error occurred during credentials validation: HTTPConnectionPool(host='10.208.0.146', port=3000): Max retries exceeded with url: /v1/chat/completions (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7dc9f3a23410>: Failed to establish a new connection: [Errno 111] Connection refused')) ```
yindo added the bug label 2026-02-16 10:17:50 -05:00
yindo closed this issue 2026-02-16 10:17:50 -05:00
Author
Owner

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

Hi, @AltarIbnL. 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 an error in Dify v1.0.0 (plugin 0.0.7) when trying to add a self-deployed OpenAI-API-compatible model via Docker.
  • This setup previously worked in version 0.15.3 but now fails with backend logs showing a failure to save model credentials.
  • You provided configuration details and error logs to help with troubleshooting.
  • There has been no further activity or responses on this issue since your initial report.

Next Steps:

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

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 16, 2025): Hi, @AltarIbnL. 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 an error in Dify v1.0.0 (plugin 0.0.7) when trying to add a self-deployed OpenAI-API-compatible model via Docker. - This setup previously worked in version 0.15.3 but now fails with backend logs showing a failure to save model credentials. - You provided configuration details and error logs to help with troubleshooting. - There has been no further activity or responses on this issue since your initial report. **Next Steps:** - Please let me know if this issue is still relevant with the latest version of dify-official-plugins by commenting here to keep the discussion open. - If I do not hear back within 5 days, I will automatically close this issue. Thank you for your understanding and contribution!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify-official-plugins#40