Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

Revert "fix:deepseek tool call not working correctly" (#12463)

crazywoola6222179a5714
diff --git a/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py b/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py
index 2fd0c4ec1fb..734cf28b157 100644
--- a/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py
+++ b/api/core/model_runtime/model_providers/openai_api_compatible/llm/llm.py
@@ -377,10 +377,7 @@ class OAIAPICompatLargeLanguageModel(_CommonOaiApiCompat, LargeLanguageModel):
for tool in tools:
formatted_tools.append(helper.dump_model(PromptMessageFunction(function=tool)))
- if prompt_messages[-1].role.value == "tool":
- data["tools"] = None
- else:
- data["tools"] = formatted_tools
+ data["tools"] = formatted_tools
if stop:
data["stop"] = stop