Skip to content

Commit 6d05d79

Browse files
committed
1 parent 96ecdb0 commit 6d05d79

1 file changed

Lines changed: 8 additions & 12 deletions

File tree

‎packages/ai/src/transports/openai-responses-compaction-replay.test.ts‎

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -928,19 +928,15 @@ describe("OpenAI Responses compaction replay", () => {
928928
expect(input.map((item) => item.type)).toEqual(["compaction", "message"]);
929929
});
930930

931-
it("replays when session and auth identities match", () => {
932-
const assistant = createOutput();
933-
assistant.providerReplay = compactionState(model, { replayIndex: 0 });
934-
935-
const input = convertResponsesMessages(
936-
model,
937-
{ messages: [assistant] },
938-
new Set(["openai"]),
939-
replayIdentity,
940-
);
931+
it.each(responseConverters)(
932+
"$name replays an empty checkpoint owner when request identities match",
933+
({ convert }) => {
934+
const assistant = createOutput();
935+
assistant.providerReplay = compactionState(model, { replayIndex: 0 });
941936

942-
expect(input.some((item) => item.type === "compaction")).toBe(true);
943-
});
937+
expect(convert({ messages: [assistant] }).map((item) => item.type)).toEqual(["compaction"]);
938+
},
939+
);
944940

945941
it.each(responseConverters)(
946942
"$name does not replay or prune across a different or missing request identity",

0 commit comments

Comments
 (0)