dify 1.0.1 without network /chat-message return empty when using blank app chat. #82

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

Originally created by @yueru-mylove on GitHub (Mar 16, 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.1

Plugin version

openai_api_complatible 0.0.7

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. using openai_api_compatible plugin and connector to a deepseek model, without network, only specified website.
  2. create a blank app.
  3. chat
  4. then the chat-message api return 200 nut nothing.
  5. check the docker-api-1 container and got an error.
  6. reproduce in the internet env and it doesn't occured.

✔️ Error log

2025-03-16 10:19:39.965 ERROR [Thread-3 (_generate_worker)] [app_generator.py:243] - Unknown Error when generating
Traceback (most recent call last):
File "/app/api/core/app/apps/chat/app_generator.py", line 223, in _generate_worker
runner.run(
File "/app/api/core/app/apps/chat/app_runner.py", line 58, in run
self.get_pre_calculate_rest_tokens(
File "/app/api/core/app/apps/base_app_runner.py", line 86, in get_pre_calculate_rest_tokens
prompt_tokens = model_instance.get_llm_num_tokens(prompt_messages)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/model_manager.py", line 195, in get_llm_num_tokens
self._round_robin_invoke(
File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke
return function(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/model_runtime/model_providers/__base/large_language_model.py", line 299, in get_num_tokens
return plugin_model_manager.get_llm_num_tokens(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/api/core/plugin/manager/model.py", line 231, in get_llm_num_tokens
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 221, in _handle_plugin_daemon_error
raise PluginInvokeError(description=message)
core.plugin.manager.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"ConnectTimeout","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.ne
t', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by ConnectTimeoutError(\u003curllib3.connection.HTTPSConnection object at 0x7f83cdfb22a
0\u003e, 'Connection to openaipublic.blob.core.windows.net timed out. (connect timeout=None)'))"}
2025-03-16 10:19:39.971 ERROR [Dummy-2] [base_app_generate_response_converter.py:123] - {"args":{},"error_type":"ConnectTimeout","message":"HTTPSConnectionPool(host='openaip
ublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by ConnectTimeoutError(\u003curllib3.connection.HTTPSConnecti
on object at 0x7f83cdfb22a0\u003e, 'Connection to openaipublic.blob.core.windows.net timed out. (connect timeout=None)'))"}
2025-03-16 10:22:36.087 WARNING [Dummy-4] [version.py:37] - Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url:
/?current_version=1.0.1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f4d6e0448f0>: Failed to establish a new connection: [Errno 101] Netw
ork is unreachable')).

Originally created by @yueru-mylove on GitHub (Mar 16, 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.1 ### Plugin version openai_api_complatible 0.0.7 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1. using openai_api_compatible plugin and connector to a deepseek model, without network, only specified website. 2. create a blank app. 3. chat 4. then the chat-message api return 200 nut nothing. 5. check the docker-api-1 container and got an error. 6. reproduce in the internet env and it doesn't occured. ### ✔️ Error log 2025-03-16 10:19:39.965 ERROR [Thread-3 (_generate_worker)] [app_generator.py:243] - Unknown Error when generating Traceback (most recent call last): File "/app/api/core/app/apps/chat/app_generator.py", line 223, in _generate_worker runner.run( File "/app/api/core/app/apps/chat/app_runner.py", line 58, in run self.get_pre_calculate_rest_tokens( File "/app/api/core/app/apps/base_app_runner.py", line 86, in get_pre_calculate_rest_tokens prompt_tokens = model_instance.get_llm_num_tokens(prompt_messages) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/model_manager.py", line 195, in get_llm_num_tokens self._round_robin_invoke( File "/app/api/core/model_manager.py", line 370, in _round_robin_invoke return function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/model_runtime/model_providers/__base/large_language_model.py", line 299, in get_num_tokens return plugin_model_manager.get_llm_num_tokens( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/app/api/core/plugin/manager/model.py", line 231, in get_llm_num_tokens 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 221, in _handle_plugin_daemon_error raise PluginInvokeError(description=message) core.plugin.manager.exc.PluginInvokeError: PluginInvokeError: {"args":{},"error_type":"ConnectTimeout","message":"HTTPSConnectionPool(host='openaipublic.blob.core.windows.ne t', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by ConnectTimeoutError(\u003curllib3.connection.HTTPSConnection object at 0x7f83cdfb22a 0\u003e, 'Connection to openaipublic.blob.core.windows.net timed out. (connect timeout=None)'))"} 2025-03-16 10:19:39.971 ERROR [Dummy-2] [base_app_generate_response_converter.py:123] - {"args":{},"error_type":"ConnectTimeout","message":"HTTPSConnectionPool(host='openaip ublic.blob.core.windows.net', port=443): Max retries exceeded with url: /gpt-2/encodings/main/vocab.bpe (Caused by ConnectTimeoutError(\u003curllib3.connection.HTTPSConnecti on object at 0x7f83cdfb22a0\u003e, 'Connection to openaipublic.blob.core.windows.net timed out. (connect timeout=None)'))"} 2025-03-16 10:22:36.087 WARNING [Dummy-4] [version.py:37] - Check update version error: HTTPSConnectionPool(host='updates.dify.ai', port=443): Max retries exceeded with url: /?current_version=1.0.1 (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f4d6e0448f0>: Failed to establish a new connection: [Errno 101] Netw ork is unreachable')).
yindo added the bug label 2026-02-16 10:18:01 -05:00
yindo closed this issue 2026-02-16 10:18:01 -05:00
Author
Owner

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

Hi, @yueru-mylove. 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 that using Dify v1.0.1 with openai_api_compatible plugin 0.0.7 on a self-hosted Docker setup results in the chat-message API returning an empty response with a 200 status when offline.
  • The issue does not occur when internet access is available.
  • Error logs point to a failure in token calculation during generation, likely triggered by lack of network connectivity.
  • No further updates or troubleshooting steps have been provided since the 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, @yueru-mylove. 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 that using Dify v1.0.1 with openai_api_compatible plugin 0.0.7 on a self-hosted Docker setup results in the chat-message API returning an empty response with a 200 status when offline. - The issue does not occur when internet access is available. - Error logs point to a failure in token calculation during generation, likely triggered by lack of network connectivity. - No further updates or troubleshooting steps have been provided since the 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#82