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: Fix module import issues in CI tests

LearningCircuit13d6ecd656bf
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index 4fbaa44863..2e7f054933 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -36,7 +36,7 @@ jobs:
-e LDR_USE_FALLBACK_LLM=true \
-w /app \
ldr-test \
- sh -c "pip install --target=/install/.venv/lib/python3.12/site-packages pytest pytest-asyncio pytest-cov pytest-mock && python -m pytest -v \
+ sh -c "pip install --target=/install/.venv/lib/python3.12/site-packages pytest pytest-asyncio pytest-cov pytest-mock && PYTHONPATH=/app/src:$PYTHONPATH python -m pytest -v \
tests/test_settings_manager.py \
tests/test_google_pse.py \
tests/test_wikipedia_url_security.py \
@@ -78,7 +78,7 @@ jobs:
-v $PWD:/app \
-w /app \
ldr-test \
- sh -c "/install/.venv/bin/pip install pytest && /install/.venv/bin/pytest tests/infrastructure_tests/test_*.py -v"
+ sh -c "/install/.venv/bin/pip install pytest && PYTHONPATH=/app/src:$PYTHONPATH /install/.venv/bin/pytest tests/infrastructure_tests/test_*.py -v"
- name: Run JavaScript infrastructure tests
run: |
@@ -104,7 +104,7 @@ jobs:
-e LDR_USE_FALLBACK_LLM=true \
-w /app \
ldr-test \
- sh -c "/install/.venv/bin/pip install pytest playwright && cd tests && /install/.venv/bin/python run_all_tests.py ci --no-server-start"
+ sh -c "/install/.venv/bin/pip install pytest playwright && cd tests && PYTHONPATH=/app/src:$PYTHONPATH /install/.venv/bin/python run_all_tests.py ci --no-server-start"
# Full tests for PRs to main/dev branches and main branch pushes
full-tests:
@@ -175,7 +175,7 @@ jobs:
--network host \
-w /app \
ldr-test \
- sh -c "/install/.venv/bin/pip install pytest playwright && cd tests && /install/.venv/bin/python run_all_tests.py full"
+ sh -c "/install/.venv/bin/pip install pytest playwright && cd tests && PYTHONPATH=/app/src:$PYTHONPATH /install/.venv/bin/python run_all_tests.py full"
- name: Run JavaScript infrastructure tests
run: |
diff --git a/tests/test_llm/test_llm_integration.py b/tests/test_llm/test_llm_integration.py
index 1efad292f3..c414adb5fd 100644
--- a/tests/test_llm/test_llm_integration.py
+++ b/tests/test_llm/test_llm_integration.py
@@ -9,8 +9,8 @@ from langchain_core.messages import AIMessage, BaseMessage
from langchain_core.outputs import ChatGeneration, ChatResult
from pydantic import Field
-from src.local_deep_research.config.llm_config import get_llm
-from src.local_deep_research.llm import clear_llm_registry, register_llm
+from local_deep_research.config.llm_config import get_llm
+from local_deep_research.llm import clear_llm_registry, register_llm
class TestLLM(BaseChatModel):
@@ -151,14 +151,14 @@ def test_get_llm_falls_back_to_builtin(full_settings_snapshot):
def test_api_integration_with_custom_llm():
"""Test that API functions work with custom LLMs."""
- from src.local_deep_research.api import quick_summary
+ from local_deep_research.api import quick_summary
# Create a custom LLM
custom_llm = TestLLM(response_text="API test response")
# Mock the necessary components
with patch(
- "src.local_deep_research.api.research_functions._init_search_system"
+ "local_deep_research.api.research_functions._init_search_system"
) as mock_init:
# Create a mock search system
mock_system = MagicMock()