DeepSeek model cannot be stopped manually #13

Closed
opened 2026-02-16 10:17:45 -05:00 by yindo · 8 comments
Owner

Originally created by @NieRonghua on GitHub (Feb 24, 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

0.15.3

Cloud or Self Hosted

Cloud

Steps to reproduce

step1:
Chat
Image

step2:
Stop conversation

Image

step3:
The conversation was still answered

✔️ Expected Behavior

No response

Actual Behavior

No response

Originally created by @NieRonghua on GitHub (Feb 24, 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 0.15.3 ### Cloud or Self Hosted Cloud ### Steps to reproduce step1: Chat <img width="885" alt="Image" src="https://github.com/user-attachments/assets/97773d6d-35dc-44cc-8aeb-630972c307a9" /> step2: Stop conversation <img width="884" alt="Image" src="https://github.com/user-attachments/assets/73e9020a-67ad-4378-884b-72b9e95b2a2f" /> step3: The conversation was still answered ### ✔️ Expected Behavior _No response_ ### ❌ Actual Behavior _No response_
yindo closed this issue 2026-02-16 10:17:45 -05:00
Author
Owner

@NieRonghua commented on GitHub (Feb 24, 2025):

step3

Image
@NieRonghua commented on GitHub (Feb 24, 2025): step3 <img width="858" alt="Image" src="https://github.com/user-attachments/assets/95e3e3d9-2b21-418e-9566-c7c37ce0835d" />
Author
Owner

@dosubot[bot] commented on GitHub (Feb 24, 2025):

To manually stop a conversation in the DeepSeek-Reasoner chat interface, you can use the handleStop function. This function is designed to stop the chat by setting the responding state to false and aborting any ongoing requests. Here is the relevant code snippet:

const handleStop = useCallback(() => {
  hasStopResponded.current = true
  handleResponding(false)
  if (stopChat && taskIdRef.current)
    stopChat(taskIdRef.current)
  if (conversationMessagesAbortControllerRef.current)
    conversationMessagesAbortControllerRef.current.abort()
  if (suggestedQuestionsAbortControllerRef.current)
    suggestedQuestionsAbortControllerRef.current.abort()
}, [stopChat, handleResponding])

This function will:

  1. Set hasStopResponded.current to true to indicate that a stop has been requested.
  2. Call handleResponding(false) to update the responding state.
  3. If a stopChat function and a taskId are available, it will call stopChat(taskIdRef.current).
  4. Abort any ongoing requests using conversationMessagesAbortControllerRef.current.abort() and suggestedQuestionsAbortControllerRef.current.abort().

Additionally, in the chat interface, there is a button to stop responding, which is conditionally rendered when isResponding is true and noStopResponding is false. You can click this button to stop the conversation:

{
  !noStopResponding && isResponding && (
    <div className='flex justify-center mb-2'>
      <Button onClick={onStopResponding}>
        <StopCircle className='mr-[5px] w-3.5 h-3.5 text-gray-500' />
        <span className='text-xs text-gray-500 font-normal'>{t('appDebug.operation.stopResponding')}</span>
      </Button>
    </div>
  )
}

Ensure that the onStopResponding function is properly implemented to handle the stop action [1][2].

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 (Feb 24, 2025): <!-- Answer --> To manually stop a conversation in the DeepSeek-Reasoner chat interface, you can use the `handleStop` function. This function is designed to stop the chat by setting the responding state to false and aborting any ongoing requests. Here is the relevant code snippet: ```ts const handleStop = useCallback(() => { hasStopResponded.current = true handleResponding(false) if (stopChat && taskIdRef.current) stopChat(taskIdRef.current) if (conversationMessagesAbortControllerRef.current) conversationMessagesAbortControllerRef.current.abort() if (suggestedQuestionsAbortControllerRef.current) suggestedQuestionsAbortControllerRef.current.abort() }, [stopChat, handleResponding]) ``` This function will: 1. Set `hasStopResponded.current` to `true` to indicate that a stop has been requested. 2. Call `handleResponding(false)` to update the responding state. 3. If a `stopChat` function and a `taskId` are available, it will call `stopChat(taskIdRef.current)`. 4. Abort any ongoing requests using `conversationMessagesAbortControllerRef.current.abort()` and `suggestedQuestionsAbortControllerRef.current.abort()`. Additionally, in the chat interface, there is a button to stop responding, which is conditionally rendered when `isResponding` is true and `noStopResponding` is false. You can click this button to stop the conversation: ```tsx { !noStopResponding && isResponding && ( <div className='flex justify-center mb-2'> <Button onClick={onStopResponding}> <StopCircle className='mr-[5px] w-3.5 h-3.5 text-gray-500' /> <span className='text-xs text-gray-500 font-normal'>{t('appDebug.operation.stopResponding')}</span> </Button> </div> ) } ``` Ensure that the `onStopResponding` function is properly implemented to handle the stop action <sup>[[1]](https://github.com/langgenius/dify/blob/main/web/app/components/base/chat/chat/hooks.ts)</sup><sup>[[2]](https://github.com/langgenius/dify/blob/main/web/app/components/base/chat/chat/index.tsx)</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/817f085e-96fc-4c77-80c9-15a92444bcc5?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/817f085e-96fc-4c77-80c9-15a92444bcc5?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/817f085e-96fc-4c77-80c9-15a92444bcc5?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/817f085e-96fc-4c77-80c9-15a92444bcc5?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/817f085e-96fc-4c77-80c9-15a92444bcc5?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/817f085e-96fc-4c77-80c9-15a92444bcc5?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/817f085e-96fc-4c77-80c9-15a92444bcc5?feedback_type=other)</sup>
Author
Owner

@mu-dan commented on GitHub (Feb 26, 2025):

其实停止回答,根本就没有作用,只要你问问题了,你本地的模型已经开始对话了,根本就没办法停止,哪怕在页面中你看不到输出,但是本地的资源该占用的还是会被占用,所以目前停止回答没有左右,希望后续版本会被优化吧

@mu-dan commented on GitHub (Feb 26, 2025): 其实停止回答,根本就没有作用,只要你问问题了,你本地的模型已经开始对话了,根本就没办法停止,哪怕在页面中你看不到输出,但是本地的资源该占用的还是会被占用,所以目前停止回答没有左右,希望后续版本会被优化吧
Author
Owner

@soulzzz commented on GitHub (Mar 5, 2025):

@dosu Does the stop button not call the handleStop function?

@soulzzz commented on GitHub (Mar 5, 2025): @dosu Does the stop button not call the handleStop function?
Author
Owner

@soulzzz commented on GitHub (Apr 2, 2025):

https://github.com/langgenius/dify/discussions/17261
try this ,it solved my issue. @NieRonghua

@soulzzz commented on GitHub (Apr 2, 2025): https://github.com/langgenius/dify/discussions/17261 try this ,it solved my issue. @NieRonghua
Author
Owner

@dosubot[bot] commented on GitHub (May 3, 2025):

Hi, @NieRonghua. I'm Dosu, and I'm helping the Dify team manage their backlog. I'm marking this issue as stale.

Issue Summary:

  • You reported a bug in Dify version 0.15.3 where the manual stop function for conversations is not working.
  • I explained the handleStop function, which should abort ongoing requests to stop conversations.
  • Mu-dan noted that the stop function currently has no effect.
  • Soulzzz questioned the implementation and suggested a discussion link for a similar issue.

Next Steps:

  • Please let us know if this issue is still relevant to the latest version of Dify. If so, you can keep the discussion open by commenting here.
  • If there is no further activity, this issue will be automatically closed in 15 days.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (May 3, 2025): Hi, @NieRonghua. I'm [Dosu](https://dosu.dev), and I'm helping the Dify team manage their backlog. I'm marking this issue as stale. **Issue Summary:** - You reported a bug in Dify version 0.15.3 where the manual stop function for conversations is not working. - I explained the `handleStop` function, which should abort ongoing requests to stop conversations. - Mu-dan noted that the stop function currently has no effect. - Soulzzz questioned the implementation and suggested a discussion link for a similar issue. **Next Steps:** - Please let us know if this issue is still relevant to the latest version of Dify. If so, you can keep the discussion open by commenting here. - If there is no further activity, this issue will be automatically closed in 15 days. Thank you for your understanding and contribution!
Author
Owner

@alterxyz commented on GitHub (Jun 16, 2025):

DeepSeek 0.0.5

https://marketplace.dify.ai/plugins/langgenius/deepseek

@alterxyz commented on GitHub (Jun 16, 2025): DeepSeek 0.0.5 https://marketplace.dify.ai/plugins/langgenius/deepseek
Author
Owner

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

Hi, @NieRonghua. 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 in Dify v0.15.3 (Cloud), the DeepSeek model cannot be manually stopped during conversations.
  • Attempts to stop the model fail as it continues responding despite using the stop button.
  • The intended handleStop function and UI stop button exist but currently have no effect once the local model starts responding.
  • A related discussion was shared that helped resolve a similar issue, but this specific problem remains unresolved.
  • The issue is currently marked stale pending confirmation if it still occurs in newer versions.

Next Steps:

  • Please confirm if this issue persists in the latest version of the dify-official-plugins repository by commenting below.
  • If I do not receive a response within 5 days, I will automatically close this issue.

Thank you for your understanding and contribution!

@dosubot[bot] commented on GitHub (Aug 21, 2025): Hi, @NieRonghua. 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 in Dify v0.15.3 (Cloud), the DeepSeek model cannot be manually stopped during conversations. - Attempts to stop the model fail as it continues responding despite using the stop button. - The intended `handleStop` function and UI stop button exist but currently have no effect once the local model starts responding. - A related discussion was shared that helped resolve a similar issue, but this specific problem remains unresolved. - The issue is currently marked stale pending confirmation if it still occurs in newer versions. Next Steps: - Please confirm if this issue persists in the latest version of the dify-official-plugins repository by commenting below. - If I do not receive a response 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#13