Skip to content

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

Speed up ragflow server (#14894)

Wang Qif3b3596c2961
diff --git a/api/ragflow_server.py b/api/ragflow_server.py
index af4720218f..5c850092f3 100644
--- a/api/ragflow_server.py
+++ b/api/ragflow_server.py
@@ -19,8 +19,13 @@ print("Start RAGFlow server...")
import time
start_ts = time.time()
-import logging
import os
+
+# LiteLLM fetches a model cost map from GitHub during import unless this is set.
+# The API server should not block startup on external network access.
+os.environ.setdefault("LITELLM_LOCAL_MODEL_COST_MAP", "True")
+
+import logging
import signal
import sys
import threading