[Feature request] Make LLM rerank timeout configurable
Problem
The LLM rerank timeout is hardcoded to 5 seconds (RERANK_TIMEOUT_MS = 5000 in src/store/orama-store.ts). This causes frequent "LLM rerank failed or timed out, using original order" messages when the LLM API is slow or under load.
Context
- The timeout was reduced from 10s to 5s (per code comment: "was 10s")
- Reranking is best-effort — on timeout it falls back to original order
- Users with slower LLM APIs or higher latency environments cannot adjust
Request
Make the rerank timeout configurable via:
- Environment variable (e.g.,
MEMORIX_RERANK_TIMEOUT_MS) - Or memorix.yml config option
Thanks for opening this. We agree rerank timeout should be configurable, and we plan to address this in the next release. We’re treating this together with the wider LLM timeout family so the final fix is coherent instead of exposing only one timeout in isolation.
Fixed rerank timeout is now configurable via MEMORIX_RERANK_TIMEOUT_MS env var (default 5000ms). Set it higher for slow LLM APIs.