fix(openclaw): graceful startup without API key (#4669)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Chaithanya Kumar
2026-04-02 16:10:49 +05:30
committed by GitHub
co-authored by Claude Opus 4.6
parent 5e00d5c452
commit 6577ae7616
3 changed files with 23 additions and 8 deletions
+17
View File
@@ -94,6 +94,23 @@ const memoryPlugin = {
register(api: OpenClawPluginApi) {
const cfg = mem0ConfigSchema.parse(api.pluginConfig);
if (cfg.needsSetup) {
api.logger.warn(
"openclaw-mem0: API key not configured. Memory features are disabled.\n" +
" To set up, run:\n" +
' openclaw config set plugins.entries.openclaw-mem0.config.apiKey "m0-your-key"\n' +
" openclaw gateway restart\n" +
" Get your key at: https://app.mem0.ai/dashboard/api-keys"
);
api.registerService({
id: "openclaw-mem0",
start: () => { api.logger.info("openclaw-mem0: waiting for API key configuration"); },
stop: () => {},
});
return;
}
const provider = createProvider(cfg, api);
// Track current session ID for tool-level session scoping.