~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.
Python academiaanthropicarxivbravedeep-researchencryptionhome-automationhomeserverlocallocal-deep-researchlocal-llmmistralollamaopenaipubmedresearchresearch-toolretrieval-augmented-generationsearxngself-hosted
refactor: decouple rate limiting from CI environment detection
LearningCircuit1d78bcf200e7
diff --git a/.github/workflows/api-tests.yml b/.github/workflows/api-tests.ymlindex a53de56192..70551b238e 100644--- a/.github/workflows/api-tests.yml+++ b/.github/workflows/api-tests.yml@@ -67,6 +67,7 @@ jobs:- name: Start server for API unit testsrun: |export LDR_USE_FALLBACK_LLM=true+ export DISABLE_RATE_LIMITING=trueexport PYTHONPATH=$PWD/src:$PYTHONPATHecho "Starting server for API unit tests..."pdm run python -m local_deep_research.web.app 2>&1 | tee server.log &@@ -146,6 +147,7 @@ jobs:# Try running the server directly with Python to see the errorecho "Attempting direct Python startup..."+ export DISABLE_RATE_LIMITING=truepdm run python -m local_deep_research.web.app 2>&1 | tee server_direct.log &DIRECT_PID=$!sleep 2diff --git a/.github/workflows/critical-ui-tests.yml b/.github/workflows/critical-ui-tests.ymlindex 7e61a31776..7dab56eb99 100644--- a/.github/workflows/critical-ui-tests.yml+++ b/.github/workflows/critical-ui-tests.yml@@ -87,7 +87,7 @@ jobs:env:FLASK_ENV: testingTEST_ENV: true- CI: true+ DISABLE_RATE_LIMITING: trueSECRET_KEY: test-secret-key-for-cirun: |mkdir -p data/encrypted_databasesdiff --git a/.github/workflows/extended-ui-tests.yml b/.github/workflows/extended-ui-tests.ymlindex 51b11abd18..5384db081f 100644--- a/.github/workflows/extended-ui-tests.yml+++ b/.github/workflows/extended-ui-tests.yml@@ -59,7 +59,7 @@ jobs:- name: Start serverrun: |export LDR_USE_FALLBACK_LLM=true- export CI=true+ export DISABLE_RATE_LIMITING=trueexport PYTHONPATH=$PWD/src:$PYTHONPATHpdm run python -m local_deep_research.web.app &echo $! > server.piddiff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.ymlindex 3c2f36b6a1..7c8b08c8a2 100644--- a/.github/workflows/ui-tests.yml+++ b/.github/workflows/ui-tests.yml@@ -66,7 +66,7 @@ jobs:- name: Start application serverrun: |export LDR_USE_FALLBACK_LLM=true- export CI=true+ export DISABLE_RATE_LIMITING=trueexport PYTHONPATH=$PWD/src:$PYTHONPATHecho "Starting web server..."pdm run python -m local_deep_research.web.app 2>&1 | tee server.log &diff --git a/src/local_deep_research/settings/env_registry.py b/src/local_deep_research/settings/env_registry.pyindex 7cadfbffff..d1d5c41818 100644--- a/src/local_deep_research/settings/env_registry.py+++ b/src/local_deep_research/settings/env_registry.py@@ -79,31 +79,23 @@ def is_rate_limiting_enabled() -> bool:True if rate limiting should be enabled, False otherwiseLogic:- - If ENABLE_RATE_LIMITING=true, always enable (even in CI)- - If in CI without the flag, disable- - If not in CI, enable+ - If DISABLE_RATE_LIMITING=true, disable rate limiting+ - Otherwise, enable rate limiting (default)++ Note:+ This function intentionally does NOT check CI environment.+ Rate limiting control should be explicit via the dedicated flag."""import osfrom loguru import logger- enable_flag = os.environ.get("ENABLE_RATE_LIMITING", "").lower()- ci_env = os.environ.get("CI", "false").lower()-- # Debug logging to understand what's happening- logger.debug(- f"Rate limiting check: CI={ci_env}, ENABLE_RATE_LIMITING={enable_flag}"- )-- if enable_flag == "true":- logger.debug("Rate limiting ENABLED due to ENABLE_RATE_LIMITING=true")- return True+ disable_flag = os.environ.get("DISABLE_RATE_LIMITING", "").lower()- is_ci = ci_env in ("true", "1", "yes")- if is_ci:- logger.debug("Rate limiting DISABLED due to CI environment")+ if disable_flag in ("true", "1", "yes"):+ logger.debug("Rate limiting DISABLED due to DISABLE_RATE_LIMITING=true")return False- logger.debug("Rate limiting ENABLED (not in CI)")+ logger.debug("Rate limiting ENABLED (default)")return True