Skip to content

Commit f6ab4a6

Browse files
committed
fix(doctor): keep skipped local model diagnostics
1 parent 5808f2f commit f6ab4a6

2 files changed

Lines changed: 25 additions & 2 deletions

File tree

src/commands/doctor-memory-search.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,27 @@ describe("noteMemorySearchHealth", () => {
257257
expect(note).not.toHaveBeenCalled();
258258
});
259259

260+
it("warns when local provider skipped readiness but configured local model is missing", async () => {
261+
resolveMemorySearchConfig.mockReturnValue({
262+
provider: "local",
263+
local: { modelPath: "/definitely/missing/openclaw-memory-model.gguf" },
264+
remote: {},
265+
});
266+
267+
await noteMemorySearchHealth(cfg, {
268+
gatewayMemoryProbe: {
269+
checked: false,
270+
ready: false,
271+
error:
272+
"memory embedding readiness not checked; run `openclaw memory status --deep` to probe",
273+
skipped: true,
274+
},
275+
});
276+
277+
expect(note).toHaveBeenCalledTimes(1);
278+
expect(firstNoteMessage()).toContain('Memory search provider is set to "local"');
279+
});
280+
260281
it("warns when local provider readiness probe is inconclusive", async () => {
261282
resolveMemorySearchConfig.mockReturnValue({
262283
provider: "local",

src/commands/doctor-memory-search.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -472,10 +472,12 @@ export async function noteMemorySearchHealth(
472472
if (opts?.gatewayMemoryProbe?.checked && opts.gatewayMemoryProbe.ready) {
473473
return;
474474
}
475-
if (opts?.gatewayMemoryProbe?.skipped) {
475+
const hasExplicitLocalModel = hasLocalEmbeddings(resolved.local);
476+
const hasUnavailableConfiguredLocalModel =
477+
Boolean(normalizeOptionalString(resolved.local.modelPath)) && !hasExplicitLocalModel;
478+
if (opts?.gatewayMemoryProbe?.skipped && !hasUnavailableConfiguredLocalModel) {
476479
return;
477480
}
478-
const hasExplicitLocalModel = hasLocalEmbeddings(resolved.local);
479481
const detail = opts?.gatewayMemoryProbe?.error?.trim();
480482
note(
481483
[

0 commit comments

Comments
 (0)