diff --git a/src/commands/doctor-memory-search.test.ts b/src/commands/doctor-memory-search.test.ts index 623c82c98b8d..831f41292c68 100644 --- a/src/commands/doctor-memory-search.test.ts +++ b/src/commands/doctor-memory-search.test.ts @@ -266,6 +266,38 @@ describe("noteMemorySearchHealth", () => { expect(note).not.toHaveBeenCalled(); }); + it("does not warn or request NONE_API_KEY for intentional FTS-only mode", async () => { + resolveMemorySearchConfig.mockReturnValue({ + provider: "none", + fallback: "none", + local: {}, + remote: {}, + }); + + await noteMemorySearchHealth(cfg, {}); + + expect(note).not.toHaveBeenCalled(); + expect(resolveApiKeyForProvider).not.toHaveBeenCalled(); + }); + + it("still reports a missing memory backend in intentional FTS-only mode", async () => { + resolveMemorySearchConfig.mockReturnValue({ + provider: "none", + fallback: "none", + local: {}, + remote: {}, + }); + resolveActiveMemoryBackendConfig.mockReturnValue(null); + + await noteMemorySearchHealth(cfg, {}); + + expect(note).toHaveBeenCalledWith( + "No active memory plugin is registered for the current config.", + "Memory search", + ); + expect(resolveApiKeyForProvider).not.toHaveBeenCalled(); + }); + it("reports last-known llama.cpp runtime facts from the gateway", async () => { resolveMemorySearchConfig.mockReturnValue({ provider: "local", diff --git a/src/commands/doctor-memory-search.ts b/src/commands/doctor-memory-search.ts index e1dee1ab709f..8543b73dd975 100644 --- a/src/commands/doctor-memory-search.ts +++ b/src/commands/doctor-memory-search.ts @@ -548,6 +548,10 @@ export async function noteMemorySearchHealth( return; } + if (provider === "none") { + return; + } + if (provider === "local") { const suggestedRemoteProvider = resolveSuggestedRemoteMemoryProvider(); const runtimeFacts = opts?.gatewayMemoryProbe?.runtimeFacts;