feat: make rerank timeout configurable via rerankTimeoutMs#356
Open
jlin53882 wants to merge 2 commits intoCortexReach:masterfrom
Open
feat: make rerank timeout configurable via rerankTimeoutMs#356jlin53882 wants to merge 2 commits intoCortexReach:masterfrom
jlin53882 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. |
Collaborator
|
…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
Contributor
Author
|
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! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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