test: add thought tag stripping test case

This commit is contained in:
Erik
2026-01-14 15:01:50 +01:00
committed by Peter Steinberger
parent 3b7d103758
commit 5c2eedc340

View File

@@ -423,6 +423,22 @@ File contents here`,
expect(result).toBe("The actual answer.");
});
it("strips thought tags", () => {
const msg: AssistantMessage = {
role: "assistant",
content: [
{
type: "text",
text: "<thought>Internal deliberation</thought>Final response.",
},
],
timestamp: Date.now(),
};
const result = extractAssistantText(msg);
expect(result).toBe("Final response.");
});
it("handles nested or multiple thinking blocks", () => {
const msg: AssistantMessage = {
role: "assistant",