mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 04:31:10 +00:00
* fix(active-memory): remove built-in fallback model * fix active-memory config schema fallback fields * fix failover decision external abort typing
25 lines
798 B
TypeScript
25 lines
798 B
TypeScript
import fs from "node:fs";
|
|
import { describe, expect, it } from "vitest";
|
|
import { validateJsonSchemaValue } from "../../src/plugins/schema-validator.js";
|
|
|
|
const manifest = JSON.parse(
|
|
fs.readFileSync(new URL("./openclaw.plugin.json", import.meta.url), "utf-8"),
|
|
) as { configSchema: Record<string, unknown> };
|
|
|
|
describe("active-memory manifest config schema", () => {
|
|
it("accepts modelFallback for CLI and config.patch flows", () => {
|
|
const result = validateJsonSchemaValue({
|
|
schema: manifest.configSchema,
|
|
cacheKey: "active-memory.manifest.model-fallback",
|
|
value: {
|
|
enabled: true,
|
|
agents: ["main"],
|
|
modelFallback: "google/gemini-3-flash",
|
|
modelFallbackPolicy: "resolved-only",
|
|
},
|
|
});
|
|
|
|
expect(result.ok).toBe(true);
|
|
});
|
|
});
|