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.

chore(rag): follow-up nits from ORM typing review (#5329) (#5586)

LearningCircuit2a2d127b8683
diff --git a/src/local_deep_research/research_library/services/library_rag_service.py b/src/local_deep_research/research_library/services/library_rag_service.py
index 7a5b14b72c..58af5d6479 100644
--- a/src/local_deep_research/research_library/services/library_rag_service.py
+++ b/src/local_deep_research/research_library/services/library_rag_service.py
@@ -18,7 +18,7 @@ from datetime import datetime, UTC
import numpy as np
from pathlib import Path
-from typing import Any, Callable, Dict, List, Optional, Set, Tuple, cast
+from typing import Any, Callable, Dict, List, Optional, Set, Tuple
from concurrent.futures import ThreadPoolExecutor, as_completed, CancelledError
from langchain_core.documents import Document as LangchainDocument
@@ -3036,7 +3036,7 @@ class LibraryRAGService:
collection_id, collection_name, reset_stale_state=False
)
live_ids = set(vindex.live_ids())
- rag_index_id = cast(int, self.rag_index_record.id)
+ rag_index_id = self.rag_index_record.id
with get_user_db_session(
self.username, self.db_password
) as session:
diff --git a/tests/research_library/services/test_library_rag_service_coverage.py b/tests/research_library/services/test_library_rag_service_coverage.py
index e9763266f2..fd59e779bd 100644
--- a/tests/research_library/services/test_library_rag_service_coverage.py
+++ b/tests/research_library/services/test_library_rag_service_coverage.py
@@ -225,7 +225,7 @@ class TestGetOrCreateRagIndex:
svc._get_or_create_rag_index("coll-status")
created_index = mock_session.add.call_args.args[0]
- assert type(created_index.status) is RAGIndexStatus
+ assert created_index.status is RAGIndexStatus.ACTIVE
@patch(f"{_MOD}.get_cache_directory")
@patch(f"{_MOD}.get_user_db_session")