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
fix: gpt-5 name-based config clearing from base chat path (#13949)
Idriss Sbaaouiff27ce86d6eb
diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.pyindex 8cbd8933c7..fb1353706d 100644--- a/rag/llm/chat_model.py+++ b/rag/llm/chat_model.py@@ -77,9 +77,6 @@ def _apply_model_family_policies(sanitized_kwargs["extra_body"] = {"enable_thinking": False}if backend == "base":- # GPT-5 and GPT-5.1 endpoints in this path have inconsistent generation-param support.- if "gpt-5" in model_name_lower:- sanitized_gen_conf = {}return sanitized_gen_conf, sanitized_kwargsif backend == "litellm":@@ -151,14 +148,11 @@ class Base(ABC):return LLMErrorCode.ERROR_GENERICdef _clean_conf(self, gen_conf):- model_name_lower = (self.model_name or "").lower()gen_conf, _ = _apply_model_family_policies(self.model_name,backend="base",gen_conf=gen_conf,)- if "gpt-5" in model_name_lower:- return gen_confif "max_tokens" in gen_conf:del gen_conf["max_tokens"]