From f2b5e8c050ec0a5aea0848f8c77c7e3bf178d969 Mon Sep 17 00:00:00 2001 From: zhi Date: Mon, 9 Mar 2026 12:50:51 +0000 Subject: [PATCH] fix: add no-reply model to agents.defaults.models allowlist Changes: - Change default provider ID from 'dirigentway' to 'dirigent' - Add no-reply model to agents.defaults.models allowlist during install - Fix no-reply-api server default model name from 'dirigent-no-reply-v1' to 'no-reply' This fixes the issue where dirigent/no-reply model was not showing in 'openclaw models list' and was being rejected as 'not allowed'. --- no-reply-api/server.mjs | 2 +- scripts/install.mjs | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/no-reply-api/server.mjs b/no-reply-api/server.mjs index c04927a..da9dd70 100644 --- a/no-reply-api/server.mjs +++ b/no-reply-api/server.mjs @@ -1,7 +1,7 @@ import http from "node:http"; const port = Number(process.env.PORT || 8787); -const modelName = process.env.NO_REPLY_MODEL || "dirigent-no-reply-v1"; +const modelName = process.env.NO_REPLY_MODEL || "no-reply"; const authToken = process.env.AUTH_TOKEN || ""; function sendJson(res, status, payload) { diff --git a/scripts/install.mjs b/scripts/install.mjs index 4f70595..7478e94 100755 --- a/scripts/install.mjs +++ b/scripts/install.mjs @@ -81,7 +81,7 @@ const PLUGINS_DIR = path.join(OPENCLAW_DIR, "plugins"); const PLUGIN_INSTALL_DIR = path.join(PLUGINS_DIR, "dirigent"); const NO_REPLY_INSTALL_DIR = path.join(PLUGIN_INSTALL_DIR, "no-reply-api"); -const NO_REPLY_PROVIDER_ID = process.env.NO_REPLY_PROVIDER_ID || "dirigentway"; +const NO_REPLY_PROVIDER_ID = process.env.NO_REPLY_PROVIDER_ID || "dirigent"; const NO_REPLY_MODEL_ID = process.env.NO_REPLY_MODEL_ID || "no-reply"; const NO_REPLY_PORT = Number(process.env.NO_REPLY_PORT || argNoReplyPort); const NO_REPLY_BASE_URL = process.env.NO_REPLY_BASE_URL || `http://127.0.0.1:${NO_REPLY_PORT}/v1`; @@ -223,6 +223,11 @@ if (mode === "install") { }; setJson("models.providers", providers); + // Add no-reply model to agents.defaults.models allowlist + const agentsDefaultsModels = getJson("agents.defaults.models") || {}; + agentsDefaultsModels[`${NO_REPLY_PROVIDER_ID}/${NO_REPLY_MODEL_ID}`] = {}; + setJson("agents.defaults.models", agentsDefaultsModels); + step(6, 6, "enable plugin in allowlist"); const allow = getJson("plugins.allow") || []; if (!allow.includes("dirigent")) {