fix(memory): wire Ollama into doctor and tests

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
nico-hoff
2026-02-25 10:38:40 +01:00
committed by Gustavo Madeira Santana
parent 00317343e7
commit e4ef85e2df
3 changed files with 3 additions and 4 deletions

View File

@@ -255,7 +255,7 @@
"engines": {
"node": ">=22.12.0"
},
"packageManager": "pnpm@10.23.0",
"packageManager": "pnpm@10.30.2",
"pnpm": {
"minimumReleaseAge": 2880,
"overrides": {

View File

@@ -117,7 +117,7 @@ export async function noteMemorySearchHealth(
if (hasLocalEmbeddings(resolved.local)) {
return;
}
for (const provider of ["openai", "gemini", "voyage", "mistral"] as const) {
for (const provider of ["openai", "gemini", "voyage", "mistral", "ollama"] as const) {
if (hasRemoteApiKey || (await hasApiKeyForProvider(provider, cfg, agentDir))) {
return;
}
@@ -186,7 +186,7 @@ function hasLocalEmbeddings(local: { modelPath?: string }, useDefaultFallback =
}
async function hasApiKeyForProvider(
provider: "openai" | "gemini" | "voyage" | "mistral",
provider: "openai" | "gemini" | "voyage" | "mistral" | "ollama",
cfg: OpenClawConfig,
agentDir: string,
): Promise<boolean> {

View File

@@ -11,7 +11,6 @@ describe("embeddings-ollama", () => {
headers: { "content-type": "application/json" },
}),
);
// @ts-expect-error test override
globalThis.fetch = fetchMock;
const { provider } = await createOllamaEmbeddingProvider({