Skip to content

RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

feat(agent): expose thinking mode control per LLM node in Agent canvas (#16640)

AI-Martfe2f3b60a15d
diff --git a/agent/component/llm.py b/agent/component/llm.py
index 50a95743f0..ae0e300ced 100644
--- a/agent/component/llm.py
+++ b/agent/component/llm.py
@@ -78,6 +78,8 @@ class LLMParam(ComponentParamBase):
conf["presence_penalty"] = float(self.presence_penalty)
if float(self.frequency_penalty) > 0 and get_attr("frequencyPenaltyEnabled"):
conf["frequency_penalty"] = float(self.frequency_penalty)
+ if hasattr(self, "thinking") and self.thinking and self.thinking != "default":
+ conf["thinking"] = self.thinking
return conf