deepseek-chat tool call working not normal #7562

Closed
opened 2026-02-21 18:21:12 -05:00 by yindo · 2 comments
Owner

Originally created by @leslie2046 on GitHub (Jan 7, 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.14.2

Cloud or Self Hosted

Self Hosted (Source)

Steps to reproduce

  1. make a agent
  2. add a curenttime tool
  3. choose deepseek model based on openai_api_compatible provider or deepseek provider
  4. ask a quetion "what's the time now"

✔️ Expected Behavior

图片

Actual Behavior

Sometimes there is no answer from LLM after tool call, and sometimes there is a correct answer after 5 iterations tool calls

d1381ff68fc5afc4bd0db24e47c2346
图片

Originally created by @leslie2046 on GitHub (Jan 7, 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.14.2 ### Cloud or Self Hosted Self Hosted (Source) ### Steps to reproduce 1. make a agent 2. add a curenttime tool 3. choose deepseek model based on openai_api_compatible provider or deepseek provider 4. ask a quetion "what's the time now" ### ✔️ Expected Behavior ![图片](https://github.com/user-attachments/assets/5a6612f1-5e57-4250-9e96-11e31adbdc99) ### ❌ Actual Behavior Sometimes there is no answer from LLM after tool call, and sometimes there is a correct answer after 5 iterations tool calls ![d1381ff68fc5afc4bd0db24e47c2346](https://github.com/user-attachments/assets/f17dd1c7-cb4d-4fb5-9c97-87cd7c92a480) ![图片](https://github.com/user-attachments/assets/530e0398-719c-4a22-b7de-e02ef52dfe41)
yindo added the 🐞 bug🔨 feat:tools labels 2026-02-21 18:21:12 -05:00
yindo closed this issue 2026-02-21 18:21:13 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jan 7, 2025):

The issue you're experiencing with the deepseek-chat tool and the 'current_time' function seems to be related to how the tool is responding with multiple instances of "已使用 current_time" before providing the correct date or time. This behavior might be due to how the tool is integrated or how the deepseek model is handling the tool calls.

Here are a few things you might want to check or try:

  1. Tool Configuration: Ensure that the 'current_time' tool is correctly configured with the appropriate parameters, such as the desired time format and timezone. Misconfiguration might lead to unexpected behavior.

  2. Model Configuration: Verify the configuration settings for the deepseek model, such as temperature, top_p, and max_tokens, as these can affect how the model generates responses [1].

  3. Error Handling: Check if there are any error handling mechanisms in place that might be causing the tool to retry or respond multiple times. Dify provides features like retry on failure and error handling strategies that could be influencing the tool's behavior [2][3].

  4. Logs and Debugging: Utilize the logging capabilities of the Dify platform to observe the interactions and identify any anomalies in the tool's execution. This can help pinpoint where the issue might be occurring [4].

If these steps do not resolve the issue, it might be helpful to review the integration of the 'current_time' tool within the codebase to ensure there are no underlying bugs or misconfigurations.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@dosubot[bot] commented on GitHub (Jan 7, 2025): <!-- Answer --> The issue you're experiencing with the deepseek-chat tool and the 'current_time' function seems to be related to how the tool is responding with multiple instances of "已使用 current_time" before providing the correct date or time. This behavior might be due to how the tool is integrated or how the deepseek model is handling the tool calls. Here are a few things you might want to check or try: 1. **Tool Configuration**: Ensure that the 'current_time' tool is correctly configured with the appropriate parameters, such as the desired time format and timezone. Misconfiguration might lead to unexpected behavior. 2. **Model Configuration**: Verify the configuration settings for the deepseek model, such as temperature, top_p, and max_tokens, as these can affect how the model generates responses <sup>[[1]](https://github.com/langgenius/dify/blob/main/api/core/model_runtime/model_providers/deepseek/llm/deepseek-coder.yaml)</sup>. 3. **Error Handling**: Check if there are any error handling mechanisms in place that might be causing the tool to retry or respond multiple times. Dify provides features like retry on failure and error handling strategies that could be influencing the tool's behavior <sup>[[2]](https://github.com/langgenius/dify-docs/blob/main/zh_CN/guides/workflow/error-handling/error-type.md)</sup><sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/guides/workflow/node/tools.md)</sup>. 4. **Logs and Debugging**: Utilize the logging capabilities of the Dify platform to observe the interactions and identify any anomalies in the tool's execution. This can help pinpoint where the issue might be occurring <sup>[[4]](https://github.com/langgenius/dify-docs/blob/main/en/guides/annotation/logs.md)</sup>. If these steps do not resolve the issue, it might be helpful to review the integration of the 'current_time' tool within the codebase to ensure there are no underlying bugs or misconfigurations. <!-- 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/3e46ebc9-b969-43ad-95d2-868c38e3e51e?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/3e46ebc9-b969-43ad-95d2-868c38e3e51e?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/3e46ebc9-b969-43ad-95d2-868c38e3e51e?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/3e46ebc9-b969-43ad-95d2-868c38e3e51e?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/3e46ebc9-b969-43ad-95d2-868c38e3e51e?feedback_type=hallucination) | [Other](https://app.dosu.dev/response-feedback/3e46ebc9-b969-43ad-95d2-868c38e3e51e?feedback_type=other)</sup>
Author
Owner

@leslie2046 commented on GitHub (Jan 7, 2025):

https://github.com/deepseek-ai/DeepSeek-V3/issues/15

@leslie2046 commented on GitHub (Jan 7, 2025): https://github.com/deepseek-ai/DeepSeek-V3/issues/15
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#7562