#17660: fix: skip embedding provider check in doctor when QMD backend is configured (#17263)
commands
size: XS
Cluster:
QMD Memory Management Fixes
## Problem
`openclaw doctor` falsely warns "Memory search is enabled but no embedding provider is configured" when `memory.backend` is set to `qmd`. QMD handles embeddings internally using its own model (e.g. embeddinggemma), so no OpenClaw-managed embedding provider (OpenAI/Gemini/Voyage/local modelPath) is needed.
## Fix
Skip the embedding provider check entirely when `cfg.memory?.backend === "qmd"`. QMD users don't need OpenClaw to manage embeddings.
## Checklist
- [x] Local validation: `oxlint` (type-aware) + `oxfmt` passed
- [x] Focused scope: Single check added to `doctor-memory-search.ts`
- [x] AI-assistance: AI-assisted for codebase exploration; manually verified
Fixes #17263
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR fixes a false warning in `openclaw doctor` where users with `memory.backend` set to `"qmd"` were incorrectly told "Memory search is enabled but no embedding provider is configured." Since QMD handles embeddings internally (e.g., via embeddinggemma), no OpenClaw-managed embedding provider is needed.
- Adds `cfg.memory?.backend === "qmd"` early-return check in the `provider === "local"` branch and the `provider === "auto"` fallback resolution in `doctor-memory-search.ts`
- No test coverage was added for the new QMD backend check; the existing test file uses `cfg = {} as OpenClawConfig` with no `memory` property, so the QMD paths are untested
- The explicit remote provider branch (`"openai"` / `"gemini"` / `"voyage"`, lines 48-66) is not guarded — QMD users who also explicitly set a remote embedding provider will still see API key warnings, though this is a less likely configuration
<h3>Confidence Score: 4/5</h3>
- This PR is safe to merge with minimal risk — it only adds early-return guards to a diagnostic command.
- The change is small, well-scoped, and logically correct for the two most common provider configurations (local and auto). It's a config-only diagnostic path with no side effects on runtime behavior. Deducting one point for the absence of test coverage for the new QMD paths.
- No files require special attention — the single changed file is a diagnostic helper with no runtime impact.
<sub>Last reviewed commit: 007c10e</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#20125: fix(doctor): skip memorySearch provider check when using QMD backend
by brandonwise · 2026-02-18
94.1%
#21471: fix: check QMD backend before memory search config
by lbo728 · 2026-02-20
91.0%
#13045: feat(doctor): add memory search embeddings provider health check
by asklee-klawd · 2026-02-10
83.2%
#21240: fix: GH#20607 prevent doctor from dropping custom config sections
by theognis1002 · 2026-02-19
81.8%
#11179: fix(memory): replace confusing "No API key" errors in memory tools ...
by liuxiaopai-ai · 2026-02-07
81.4%
#9149: Fix: Allow QMD backend to work without OpenAI auth
by vishaltandale00 · 2026-02-04
80.0%
#18546: fix(doctor): replace deprecated `auth add` command reference
by Phineas1500 · 2026-02-16
79.4%
#9624: fix(memory): resolve QMD search returning empty results [AI-assisted]
by kowshik24 · 2026-02-05
79.4%
#11364: fix(memory/qmd): prevent cascading failure when query fails or retu...
by blazerui · 2026-02-07
78.9%
#22327: fix(doctor): use gateway health status for memory search key check
by therk · 2026-02-21
78.1%