mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
fix(memory): retry required embedding provider setup
This commit is contained in:
@@ -1597,6 +1597,10 @@ describe("memory index", () => {
|
||||
await expect(manager.sync({ reason: "test" })).rejects.toThrow(
|
||||
/Memory sync unavailable: embedding provider "openai" is configured but unavailable\./,
|
||||
);
|
||||
forceNoProvider = false;
|
||||
await manager.sync({ reason: "test", force: true });
|
||||
const results = await manager.search("Alpha");
|
||||
expect(results.length).toBeGreaterThan(0);
|
||||
} finally {
|
||||
await manager.close?.();
|
||||
}
|
||||
|
||||
@@ -440,7 +440,9 @@ export class MemoryIndexManager extends MemoryManagerEmbeddingOps implements Mem
|
||||
|
||||
protected assertRequiredProviderAvailable(operation: "search" | "sync"): void {
|
||||
if (this.isRequiredProviderUnavailable()) {
|
||||
throw this.buildRequiredProviderUnavailableError(operation);
|
||||
const error = this.buildRequiredProviderUnavailableError(operation);
|
||||
this.resetProviderInitializationForRetry();
|
||||
throw error;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user