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.

889 B
Raw Blame

Eliminate separate database connection checkouts across AdaptiveRateLimitTracker (_ensure_estimates_loaded, get_stats, _update_estimate, reset_engine, and cleanup_old_data) by reusing in-scope thread-local sessions with savepoint (begin_nested()) isolation for writes and session.no_autoflush for reads, preventing SQLite database is locked deadlocks and preserving outer transaction atomicity under writer contention. Read sites can no longer autoflush the caller's pending ORM rows before the SELECT under a competing SQLite writer; write sites still detach pending state (including cascade="all, delete-orphan" children such as ResearchHistory.resources) before SAVEPOINT so a savepoint-entry flush cannot invalidate the outer transaction. The detach is exception-safe so a half-failed tracker write cannot leak detached caller objects into the outer transaction.