fix(embed): fast-fail + auto-restart Ollama on solved-search hang

Embeddings timeout was 120s, causing multi-minute hangs when Ollama was
down during F4/F6/F7 solved-search. Now: connect_timeout=5s across all
HTTP clients (REST + Ollama), read_timeout reduced to 30s for embeddings,
and OllamaEmbeddings auto-restarts the server on ConnectionError before
degrading gracefully.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 19:49:55 +02:00
co-authored by Claude Opus 4.6
parent 893ad99594
commit 1e4bc11418
5 changed files with 65 additions and 9 deletions
+1 -1
View File
@@ -51,7 +51,7 @@ def test_run_query_payload_and_rows(monkeypatch):
assert c["url"] == "https://h/dwh/rpc/run_query"
assert c["json"] == {"query_text": "SELECT 1 AS x"}
assert c["headers"]["X-API-Key"] == "dwh_k"
assert c["timeout"] == 30
assert c["timeout"] == (5, 30)
def test_explain_query_maps_lines(monkeypatch):