Skip to content

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

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.py
index 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_kwargs
if backend == "litellm":
@@ -151,14 +148,11 @@ class Base(ABC):
return LLMErrorCode.ERROR_GENERIC
def _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_conf
if "max_tokens" in gen_conf:
del gen_conf["max_tokens"]