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: stop linking FAILED documents to Library collection (#2640)

LearningCircuit696b572a895f
diff --git a/src/local_deep_research/research_library/services/download_service.py b/src/local_deep_research/research_library/services/download_service.py
index 0013ce02fe..b3d2824738 100644
--- a/src/local_deep_research/research_library/services/download_service.py
+++ b/src/local_deep_research/research_library/services/download_service.py
@@ -1714,13 +1714,6 @@ class DownloadService:
f"Recorded failed text extraction for document {doc.id}: {error}"
)
else:
- # Defense-in-depth: don't create Library entries for non-downloadable URLs
- if not is_downloadable_url(resource.url):
- logger.debug(
- f"Skipping Library entry for non-downloadable: {resource.url}"
- )
- return
-
# Create a new Document for failed extraction
# This enables tracking failures and retry capability
source_type_id = get_source_type_id(
@@ -1752,19 +1745,6 @@ class DownloadService:
)
session.add(doc)
- # Link to Library collection
- library_collection = (
- session.query(Collection).filter_by(name="Library").first()
- )
- if library_collection:
- doc_collection = DocumentCollection(
- document_id=doc_id,
- collection_id=library_collection.id,
- indexed=False,
- chunk_count=0,
- )
- session.add(doc_collection)
-
logger.info(
f"Created failed document {doc_id} for resource {resource.id}: {error}"
)