From fd6c4dd3a2b0f58c2c416f9b7f30d5271cc15531 Mon Sep 17 00:00:00 2001 From: zhi Date: Thu, 26 Feb 2026 08:45:37 +0000 Subject: [PATCH] fix: remove gateway restart from installer, let user restart manually MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: installer called 'openclaw gateway restart' (async via systemd) then immediately validated model visibility — race condition caused validation to fail and rollback the correct config. Fix: remove restart + validation from script entirely. Script only writes config. User restarts gateway manually after install completes. Also fix CONFIG.example.json: contextWindow 4096->200000, maxTokens 64->8192 (OpenClaw requires minimum 16000 contextWindow). --- docs/CONFIG.example.json | 4 ++-- no-reply-api/package-lock.json | 12 ++++++++++++ scripts/install-whispergate-openclaw.mjs | 18 ++---------------- 3 files changed, 16 insertions(+), 18 deletions(-) create mode 100644 no-reply-api/package-lock.json diff --git a/docs/CONFIG.example.json b/docs/CONFIG.example.json index 0c887fb..d14f120 100644 --- a/docs/CONFIG.example.json +++ b/docs/CONFIG.example.json @@ -40,8 +40,8 @@ "reasoning": false, "input": ["text"], "cost": { "input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0 }, - "contextWindow": 4096, - "maxTokens": 64 + "contextWindow": 200000, + "maxTokens": 8192 } ] } diff --git a/no-reply-api/package-lock.json b/no-reply-api/package-lock.json new file mode 100644 index 0000000..3e29cb5 --- /dev/null +++ b/no-reply-api/package-lock.json @@ -0,0 +1,12 @@ +{ + "name": "whispergate-no-reply-api", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "whispergate-no-reply-api", + "version": "0.1.0" + } + } +} diff --git a/scripts/install-whispergate-openclaw.mjs b/scripts/install-whispergate-openclaw.mjs index 7cc3e7b..73d7ad9 100755 --- a/scripts/install-whispergate-openclaw.mjs +++ b/scripts/install-whispergate-openclaw.mjs @@ -45,18 +45,6 @@ function runOpenclaw(args, { allowFail = false } = {}) { } } -function validateNoReplyModelAvailable() { - const modelRef = `${NO_REPLY_PROVIDER_ID}/${NO_REPLY_MODEL_ID}`; - const list = runOpenclaw(["models", "list"], { allowFail: true }) || ""; - if (!list.includes(modelRef)) { - throw new Error(`post-install validation failed: model not listed: ${modelRef}`); - } - - const status = runOpenclaw(["models", "status", "--json"], { allowFail: true }) || ""; - if (!status.includes(NO_REPLY_PROVIDER_ID)) { - throw new Error(`post-install validation failed: provider not visible in models status: ${NO_REPLY_PROVIDER_ID}`); - } -} function getJson(pathKey) { const out = runOpenclaw(["config", "get", pathKey, "--json"], { allowFail: true }); @@ -174,17 +162,15 @@ if (mode === "install") { }; setJson(PATH_PROVIDERS, providers); - runOpenclaw(["gateway", "restart"]); - validateNoReplyModelAvailable(); - const after = { [PATH_PLUGINS_LOAD]: getJson(PATH_PLUGINS_LOAD), [PATH_PLUGIN_ENTRY]: getJson(PATH_PLUGIN_ENTRY), [PATH_PROVIDERS]: getJson(PATH_PROVIDERS), }; writeRecord("install", before, after); - console.log("[whispergate] install ok"); + console.log("[whispergate] install ok (config written)"); console.log(`[whispergate] record: ${RECORD_PATH}`); + console.log("[whispergate] >>> restart gateway to apply: openclaw gateway restart"); } catch (e) { fs.copyFileSync(BACKUP_PATH, OPENCLAW_CONFIG_PATH); console.error(`[whispergate] install failed; rollback complete: ${String(e)}`);