Skip to content

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

fix: sandbox config api method mismatch (#16031)

buua436ee1c503471ff
diff --git a/admin/server/services.py b/admin/server/services.py
index dc0a41c6c9..341dfafdaf 100644
--- a/admin/server/services.py
+++ b/admin/server/services.py
@@ -693,17 +693,17 @@ class SandboxMgr:
raise AdminException("Failed to create sandbox instance.")
try:
- # Simple test code that exercises provider wrapping via main().
+ # Keep the probe close to the original coverage, but avoid
+ # `sys` because the sandbox security analyzer blocks it.
test_code = """
import json
import math
-import sys
def main() -> dict:
- print("Python version:", sys.version)
- print("Platform:", sys.platform)
- print(f"2 + 2 = {2 + 2}")
+ left = 2
+ right = 2
+ print(f"2 + 2 = {left + right}")
print(f"JSON dump: {json.dumps({'test': 'data', 'value': 123})}")
print(f"Math.sqrt(16) = {math.sqrt(16)}")
print("TEST_PASSED")