fix(deepseek): backfill v4 assistant reasoning replay

This commit is contained in:
Peter Steinberger
2026-04-28 10:07:15 +01:00
parent 0876ff481b
commit 62997f7fce
9 changed files with 176 additions and 15 deletions

View File

@@ -55,6 +55,7 @@ describe("venice provider plugin", () => {
},
],
},
{ role: "assistant", content: "done" },
],
};
(options as { onPayload?: (payload: Record<string, unknown>) => void })?.onPayload?.(payload);
@@ -87,6 +88,11 @@ describe("venice provider plugin", () => {
],
reasoning_content: "",
},
{
role: "assistant",
content: "done",
reasoning_content: "",
},
],
},
]);

View File

@@ -18,7 +18,7 @@ function ensureVeniceDeepSeekV4Replay(payload: Record<string, unknown>): void {
continue;
}
const record = message as Record<string, unknown>;
if (record.role === "assistant" && Array.isArray(record.tool_calls)) {
if (record.role === "assistant") {
record.reasoning_content ??= "";
}
}