OpenViking icon indicating copy to clipboard operation
OpenViking copied to clipboard

[Feature]: Make auto-recall timeout configurable (OpenClaw plugin)

Open hhspiny opened this issue 5 months ago • 1 comments

Problem Statement

The auto-recall pipeline in auto-recall.ts has AUTO_RECALL_TIMEOUT_MS = 5_000 hardcoded. Under load, the OV /find endpoint can take 15–20s. When recall exceeds 5s, the Promise-level timeout silently aborts with AbortError: This operation was aborted — memory context is silently discarded. Users must patch the compiled dist file, which gets overwritten on every plugin update.

Proposed Solution

Add autoRecallTimeoutMs to the plugin config:

Copy { "config": { "baseUrl": "http://127.0.0.1:1933", "timeoutMs": 120000, "autoRecallTimeoutMs": 60000 // NEW: defaults to 5000 } } The constant is derisked by falling back to the current 5,000ms when unset:

Copy const timeoutMs = pluginConfig?.autoRecallTimeoutMs ?? AUTO_RECALL_TIMEOUT_MS_DEFAULT;

Alternatives Considered

No response

Feature Area

Core (Client/Engine)

Use Case

Local reranking model can take more than 5s to execute → every recall silently fails → agent loses cross-session memory continuity. Remote embedding model can take more than 5s to execute → every recall silently fails → agent loses cross-session memory continuity.

Example API (Optional)


Additional Context

Two-layer architecture: Promise timeout (autoRecallTimeoutMs) must be < HTTP timeout (timeoutMs). Patch in use at scale:

Copy sed -i 's/AUTO_RECALL_TIMEOUT_MS = 5_000;/AUTO_RECALL_TIMEOUT_MS = 60_000;/'
~/.openclaw/extensions/openviking/dist/auto-recall.js

Contribution

  • [x] I am willing to contribute to implementing this feature

hhspiny avatar Jun 13 '26 01:06 hhspiny

已修复,这个问题和之前的 #2391 是同类需求,已由 #2448 合入:

  • #2391
  • #2448

当前 main 已支持 autoRecallTimeoutMs,默认仍为 5000ms;需要慢速本地 embedding/rerank 时可以在 OpenClaw plugin 配置里调大这个值。

另外 OpenViking 下周会发一个新版本,把近期 OpenClaw plugin 修复一并带出去。@qin-ctx FYI

Mijamind719 avatar Jun 13 '26 09:06 Mijamind719