RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.
Go agent-harnessagent-native-databaseagentic-aiagentic-retrievalagentic-searchaiai-agentscontext-enginecontext-engineeringcontext-managementharness-engineeringknowledge-compilationragretrieval-augmented-generationretrieval-harnesssearch-harness
refactor:re order logics in clean_gen_conf (#12391)
Stephen Hu6f2fc2f1cbfb
diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.pyindex e1451c00d0..a9e3c1ab7c 100644--- a/rag/llm/chat_model.py+++ b/rag/llm/chat_model.py@@ -100,6 +100,12 @@ class Base(ABC):return LLMErrorCode.ERROR_GENERICdef _clean_conf(self, gen_conf):+ model_name_lower = (self.model_name or "").lower()+ # gpt-5 and gpt-5.1 endpoints have inconsistent parameter support, clear custom generation params to prevent unexpected issues+ if "gpt-5" in model_name_lower:+ gen_conf = {}+ return gen_conf+if "max_tokens" in gen_conf:del gen_conf["max_tokens"]@@ -127,12 +133,6 @@ class Base(ABC):}gen_conf = {k: v for k, v in gen_conf.items() if k in allowed_conf}-- model_name_lower = (self.model_name or "").lower()- # gpt-5 and gpt-5.1 endpoints have inconsistent parameter support, clear custom generation params to prevent unexpected issues- if "gpt-5" in model_name_lower:- gen_conf = {}-return gen_confasync def _async_chat_streamly(self, history, gen_conf, **kwargs):