From c6b0a6262bacc2f286c0b8d1484a85c1b4f6ea4c Mon Sep 17 00:00:00 2001 From: Sanchit Rk <0xsanchit@gmail.com> Date: Mon, 26 Oct 2026 18:39:07 +0530 Subject: [PATCH] test(aikit): build the expected tool call once in the cross-model thinking case Two calls to the fixture stamp different times when the clock ticks between them. Co-Authored-By: Claude Opus 5.5 --- packages/aikit/test/transform.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/aikit/test/transform.test.ts b/packages/aikit/test/transform.test.ts index 435b7b97..22c17a29 100644 --- a/packages/aikit/test/transform.test.ts +++ b/packages/aikit/test/transform.test.ts @@ -177,18 +177,19 @@ describe("Message.transformMessages", () => { }); it("does not send another model's readable thinking as text", () => { + const toolCall = makeCompletedToolCall("call-1"); const assistant = makeAssistantMessage(otherModel, { stopReason: "toolUse", parts: [ { type: "thinking", thinking: "Candidates: proxy, IPv6, TLS.", thinkingSignature: "reasoning_content" }, { type: "text", text: "Let me check the TLS versions." }, - makeCompletedToolCall("call-1"), + toolCall, ], }); expect(expectSingleAssistant(Message.transformMessages([assistant], sameModel)).parts).toEqual([ { type: "text", text: "Let me check the TLS versions." }, - makeCompletedToolCall("call-1"), + toolCall, ]); });