mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 13:10:43 +00:00
fix: allow memory flush model override
This commit is contained in:
@@ -134,6 +134,24 @@ describe("buildMemoryFlushPlan", () => {
|
||||
).toBeNull();
|
||||
});
|
||||
|
||||
it("carries configured memory flush model override", () => {
|
||||
const plan = buildMemoryFlushPlan({
|
||||
cfg: {
|
||||
agents: {
|
||||
defaults: {
|
||||
compaction: {
|
||||
memoryFlush: {
|
||||
model: "ollama/qwen3:8b",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(plan?.model).toBe("ollama/qwen3:8b");
|
||||
});
|
||||
|
||||
it("falls back to defaults when numeric values are invalid", () => {
|
||||
const plan = buildMemoryFlushPlan({
|
||||
cfg: {
|
||||
|
||||
@@ -132,6 +132,7 @@ export function buildMemoryFlushPlan(
|
||||
softThresholdTokens,
|
||||
forceFlushTranscriptBytes,
|
||||
reserveTokensFloor,
|
||||
model: defaults?.model?.trim() || undefined,
|
||||
prompt: appendCurrentTimeLine(promptBase.replaceAll("YYYY-MM-DD", dateStamp), timeLine),
|
||||
systemPrompt: systemPrompt.replaceAll("YYYY-MM-DD", dateStamp),
|
||||
relativePath,
|
||||
|
||||
Reference in New Issue
Block a user