Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: increase MAX_RESPONSE_SIZE from 10MB to 500MB (#2997)

LearningCircuita57aa7bce2cc
diff --git a/src/local_deep_research/security/safe_requests.py b/src/local_deep_research/security/safe_requests.py
index c91b4cd883..9fa0384d3f 100644
--- a/src/local_deep_research/security/safe_requests.py
+++ b/src/local_deep_research/security/safe_requests.py
@@ -16,8 +16,10 @@ from . import ssrf_validator
# Default timeout for all HTTP requests (prevents hanging)
DEFAULT_TIMEOUT = 30 # seconds
-# Maximum response size to prevent memory exhaustion (10MB)
-MAX_RESPONSE_SIZE = 10 * 1024 * 1024
+# Maximum response size to prevent memory exhaustion (1GB)
+# Set high to accommodate large documents (annual reports, PDFs, datasets).
+# This is a local research tool — users intentionally download these files.
+MAX_RESPONSE_SIZE = 1024 * 1024 * 1024
# HTTP status codes that indicate a redirect
_REDIRECT_STATUS_CODES = frozenset({301, 302, 303, 307, 308})
diff --git a/tests/security/test_safe_requests.py b/tests/security/test_safe_requests.py
index 5a8b7f6135..bcdff41911 100644
--- a/tests/security/test_safe_requests.py
+++ b/tests/security/test_safe_requests.py
@@ -580,6 +580,6 @@ class TestConstants:
assert isinstance(DEFAULT_TIMEOUT, int)
def test_max_response_size_reasonable(self):
- """MAX_RESPONSE_SIZE should be a reasonable value (10MB)."""
- assert MAX_RESPONSE_SIZE == 10 * 1024 * 1024 # 10MB
+ """MAX_RESPONSE_SIZE should be a reasonable value (1GB)."""
+ assert MAX_RESPONSE_SIZE == 1024 * 1024 * 1024 # 1GB
assert isinstance(MAX_RESPONSE_SIZE, int)