After the plug-in is migrated and installed after the upgrade 1.0.0 is completed, error 404 is reported in the model call log #9490

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

Originally created by @auxpd 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 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.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

Calling the model normally in the chat assistant (Anthropic) ,I tried reinstalling the module again and the problem was not resolved

✔️ Expected Behavior

After migration, the model can be used normally (agent、chat bot)

Actual Behavior

Now the page response ends directly, and the background log gives an error:

2025-03-06 06:20:25.196 ERROR [Thread-89 (_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":"NotFoundError","message":"404 page not found"}
2025-03-06 06:20:25.200 DEBUG [Dummy-88] [based_generate_task_pipeline.py:45] - error: PluginInvokeError: {"args":{},"error_type":"NotFoundError","message":"404 page not found"}
2025-03-06 06:20:25.210 ERROR [Dummy-88] [base_app_generate_response_converter.py:123] - {"args":{},"error_type":"NotFoundError","message":"404 page not found"}
Originally created by @auxpd 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 [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.0 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce Calling the model normally in the chat assistant (Anthropic) ,I tried reinstalling the module again and the problem was not resolved ### ✔️ Expected Behavior After migration, the model can be used normally (agent、chat bot) ### ❌ Actual Behavior Now the page response ends directly, and the background log gives an error: ``` 2025-03-06 06:20:25.196 ERROR [Thread-89 (_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":"NotFoundError","message":"404 page not found"} 2025-03-06 06:20:25.200 DEBUG [Dummy-88] [based_generate_task_pipeline.py:45] - error: PluginInvokeError: {"args":{},"error_type":"NotFoundError","message":"404 page not found"} 2025-03-06 06:20:25.210 ERROR [Dummy-88] [base_app_generate_response_converter.py:123] - {"args":{},"error_type":"NotFoundError","message":"404 page not found"} ```
yindo added the 🐞 bugstale labels 2026-02-21 18:35:20 -05:00
yindo closed this issue 2026-02-21 18:35:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#9490