fix: rename generation model setting to ollama_llm_model to avoid OLLAMA_MODEL env collision

The deployed container sets OLLAMA_MODEL=nomic-embed-text for embeddings,
which shadowed the generation-model setting and broke Phase 0 keyword
extraction and Phase 4 LLM re-ranking on every request. The setting is now
ollama_llm_model (env: OLLAMA_LLM_MODEL, default gemma4:e2b), startup logs
the resolved generation model, and Phase 0/Phase 4 LLM calls are wrapped in
a 12s asyncio.wait_for with graceful fallback so a hung call cannot gate
retrieval for the full 120s client timeout.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-14 09:57:57 +02:00
co-authored by Claude Fable 5
parent d0e712760d
commit 94482bcb59
8 changed files with 51 additions and 16 deletions
+2 -1
View File
@@ -142,7 +142,7 @@ async def health(settings: Settings = Depends(get_settings)) -> HealthResponse:
},
"ollama": {
"url": settings.ollama_url,
"model": settings.ollama_model,
"model": settings.ollama_llm_model,
"healthy": service_health.get("ollama", False)
}
}
@@ -412,6 +412,7 @@ async def startup_event():
logger.info(f"Wiki.js: {settings.wikijs_url}")
logger.info(f"SearXNG: {settings.searxng_url}")
logger.info(f"Ollama: {settings.ollama_url}")
logger.info(f"Ollama generation model: {settings.ollama_llm_model} (embedding model: {settings.ollama_embedding_model})")
# Initialize all service clients
await startup_clients()