Model's API Key could not be set #10654

Closed
opened 2026-02-21 18:49:32 -05:00 by yindo · 0 comments
Owner

Originally created by @xueyezs on GitHub (Mar 12, 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.1

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

When using the Tongyi Qianwen plugin, I encountered an issue where the API key could not be set. I also tried the Deepseek model plugin, but the API key still could not be set. It's interesting that when I deployed with Docker, I initially encountered the same problem, but after a night, I was able to use it normally.

✔️ Expected Behavior

API Key is set up and used normally

Actual Behavior

Traceback (most recent call last):
  File "E:\dify1.0.1\.venv\Lib\site-packages\flask\app.py", line 917, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\dify1.0.1\.venv\Lib\site-packages\flask\app.py", line 902, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\dify1.0.1\.venv\Lib\site-packages\flask_restful\__init__.py", line 489, in wrapper
    resp = resource(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\dify1.0.1\.venv\Lib\site-packages\flask\views.py", line 110, in view
    return current_app.ensure_sync(self.dispatch_request)(**kwargs)  # type: ignore[no-any-return]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\dify1.0.1\.venv\Lib\site-packages\flask_restful\__init__.py", line 604, in dispatch_request
    resp = meth(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "E:\dify1.0.1\dify\api\controllers\console\wraps.py", line 187, in decorated
    return view(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "E:\dify1.0.1\dify\api\libs\login.py", line 94, in decorated_view
    return current_app.ensure_sync(func)(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\dify1.0.1\dify\api\controllers\console\wraps.py", line 30, in decorated
    return view(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "E:\dify1.0.1\dify\api\controllers\console\workspace\model_providers.py", line 102, in post
    model_provider_service.save_provider_credentials(
  File "E:\dify1.0.1\dify\api\services\model_provider_service.py", line 145, in save_provider_credentials
    provider_configuration.add_or_update_custom_credentials(credentials)
  File "E:\dify1.0.1\dify\api\core\entities\provider_configuration.py", line 257, in add_or_update_custom_credentials
    provider_record, credentials = self.custom_credentials_validate(credentials)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\dify1.0.1\dify\api\core\entities\provider_configuration.py", line 240, in custom_credentials_validate
    credentials = model_provider_factory.provider_credentials_validate(
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "E:\dify1.0.1\dify\api\core\model_runtime\model_providers\model_provider_factory.py", line 156, in provider_credentials_validate
    self.plugin_model_manager.validate_provider_credentials(
  File "E:\dify1.0.1\dify\api\core\plugin\manager\model.py", line 97, in validate_provider_credentials
    for resp in response:
                ^^^^^^^^
  File "E:\dify1.0.1\dify\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 "E:\dify1.0.1\dify\api\core\plugin\manager\base.py", line 223, in _handle_plugin_daemon_error
    raise PluginDaemonInternalServerError(description=message)
core.plugin.manager.exc.PluginDaemonInternalServerError: PluginDaemonInternalServerError: killed by timeout

Image

Image

Originally created by @xueyezs on GitHub (Mar 12, 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.1 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce When using the Tongyi Qianwen plugin, I encountered an issue where the API key could not be set. I also tried the Deepseek model plugin, but the API key still could not be set. It's interesting that when I deployed with Docker, I initially encountered the same problem, but after a night, I was able to use it normally. ### ✔️ Expected Behavior API Key is set up and used normally ### ❌ Actual Behavior ``` Traceback (most recent call last): File "E:\dify1.0.1\.venv\Lib\site-packages\flask\app.py", line 917, in full_dispatch_request rv = self.dispatch_request() ^^^^^^^^^^^^^^^^^^^^^^^ File "E:\dify1.0.1\.venv\Lib\site-packages\flask\app.py", line 902, in dispatch_request return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\dify1.0.1\.venv\Lib\site-packages\flask_restful\__init__.py", line 489, in wrapper resp = resource(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\dify1.0.1\.venv\Lib\site-packages\flask\views.py", line 110, in view return current_app.ensure_sync(self.dispatch_request)(**kwargs) # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\dify1.0.1\.venv\Lib\site-packages\flask_restful\__init__.py", line 604, in dispatch_request resp = meth(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "E:\dify1.0.1\dify\api\controllers\console\wraps.py", line 187, in decorated return view(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "E:\dify1.0.1\dify\api\libs\login.py", line 94, in decorated_view return current_app.ensure_sync(func)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\dify1.0.1\dify\api\controllers\console\wraps.py", line 30, in decorated return view(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "E:\dify1.0.1\dify\api\controllers\console\workspace\model_providers.py", line 102, in post model_provider_service.save_provider_credentials( File "E:\dify1.0.1\dify\api\services\model_provider_service.py", line 145, in save_provider_credentials provider_configuration.add_or_update_custom_credentials(credentials) File "E:\dify1.0.1\dify\api\core\entities\provider_configuration.py", line 257, in add_or_update_custom_credentials provider_record, credentials = self.custom_credentials_validate(credentials) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\dify1.0.1\dify\api\core\entities\provider_configuration.py", line 240, in custom_credentials_validate credentials = model_provider_factory.provider_credentials_validate( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\dify1.0.1\dify\api\core\model_runtime\model_providers\model_provider_factory.py", line 156, in provider_credentials_validate self.plugin_model_manager.validate_provider_credentials( File "E:\dify1.0.1\dify\api\core\plugin\manager\model.py", line 97, in validate_provider_credentials for resp in response: ^^^^^^^^ File "E:\dify1.0.1\dify\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 "E:\dify1.0.1\dify\api\core\plugin\manager\base.py", line 223, in _handle_plugin_daemon_error raise PluginDaemonInternalServerError(description=message) core.plugin.manager.exc.PluginDaemonInternalServerError: PluginDaemonInternalServerError: killed by timeout ``` ![Image](https://github.com/user-attachments/assets/7ec85f99-5860-44fd-8a99-b5afeb170d7c) ![Image](https://github.com/user-attachments/assets/3bac2ce7-2c1d-4418-a966-3085c5782591)
yindo added the 🌚 invalid🤔 cant-reproduce labels 2026-02-21 18:49:32 -05:00
yindo closed this issue 2026-02-21 18:49:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#10654