feat: make rerank timeout configurable via rerankTimeoutMs#356
feat: make rerank timeout configurable via rerankTimeoutMs#356jlin53882 wants to merge 2 commits intoCortexReach:masterfrom
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
…in finally Reviewer: rwmjhb (CortexReach) 1. Schema completeness: add rerankTimeoutMs to openclaw.plugin.json retrieval schema and index.ts PluginConfig.retrieval 2. Timeout cleanup: move clearTimeout into finally block so timer is always cleared even on fast failure paths 3. Also update warning message to show actual configured timeout value Closes CortexReach#346
|
Hi @rwmjhb, thanks for the detailed review! Both issues have been addressed: 1. Schema completeness ✅
2. Timeout cleanup in finally ✅ Updated push — the branch \eat/rerank-timeout-configurable\ now contains all fixes. Thanks! |
|
Hi, I noticed the current default for |
feat: make rerank timeout configurable via rerankTimeoutMs
Summary
Add a configurable
rerankTimeoutMsparameter toRetrievalConfigso that users running local/CPU-based rerank servers can adjust the timeout without patching source code. Closes #346.Changes (4 lines across 1 file)
1.
src/retriever.ts—RetrievalConfiginterface2.
src/retriever.ts—DEFAULT_RETRIEVAL_CONFIG3.
src/retriever.ts—rerankResults()method4.
src/retriever.ts— Warning messageUsage Example
{ "plugins": { "entries": { "memory-lancedb-pro": { "config": { "retrieval": { "rerankTimeoutMs": 120000 } } } } } }Local Model Example (BAAI/bge-reranker-base via reranker_server.py)
{ "plugins": { "entries": { "memory-lancedb-pro": { "config": { "retrieval": { "rerank": "cross-encoder", "rerankProvider": "siliconflow", "rerankEndpoint": "http://127.0.0.1:18799/v1/rerank", "rerankTimeoutMs": 120000 } } } } } }Backward Compatibility
5000msis identical to the current hardcoded behaviorrerankTimeoutMssee no changeIssue
Closes #346