Skip to content

Commit 9ccde18

Browse files
test(mimo): assert tool_call_end event on tool_calls finish_reason
1 parent 68a7745 commit 9ccde18

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/api/providers/__tests__/mimo.spec.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1050,6 +1050,11 @@ describe("MimoHandler", () => {
10501050
expect(toolChunks).toHaveLength(1)
10511051
expect(toolChunks[0].id).toBe("call_read")
10521052
expect(toolChunks[0].name).toBe("read_file")
1053+
1054+
// finish_reason "tool_calls" flushes the active tool call as a tool_call_end event.
1055+
const endChunks = chunks.filter((c) => c.type === "tool_call_end")
1056+
expect(endChunks).toHaveLength(1)
1057+
expect(endChunks[0].id).toBe("call_read")
10531058
})
10541059

10551060
it("should handle stream with no usage in final chunk", async () => {

0 commit comments

Comments
 (0)