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.

920 B
Raw Blame
"""Shared database fixture for persisted research-report regressions."""

import pytest
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from sqlalchemy.pool import StaticPool

from local_deep_research.database.models import Base, ResearchHistory


@pytest.fixture
def report_db():
    engine = create_engine(
        "sqlite:///:memory:",
        connect_args={"check_same_thread": False},
        poolclass=StaticPool,
    )
    try:
        Base.metadata.create_all(engine)
        with Session(engine) as db:
            db.add(
                ResearchHistory(
                    id="report-errors",
                    query="test query",
                    mode="quick",
                    status="in_progress",
                    created_at="2026-10-06T00:00:00+00:00",
                )
            )
            db.commit()
            yield db
    finally:
        engine.dispose()