Skip to content

Commit 61950f0

Browse files
committed
fix: correct false-green invoke-stream reasoning negative test
The "no thinking block when reasoning is absent" test for invoke-with-response-stream used Converse-style event filters (eventType "contentBlockDelta") instead of Anthropic-native filters (payload.type "content_block_delta"), making it pass vacuously.
1 parent 5ba48d7 commit 61950f0

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/__tests__/reasoning-all-providers.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -495,9 +495,8 @@ describe("POST /model/{id}/invoke-with-response-stream (reasoning streaming)", (
495495

496496
const thinkingDeltas = frames.filter(
497497
(f) =>
498-
f.eventType === "contentBlockDelta" &&
499-
(f.payload as { contentBlockDelta?: { delta?: { type?: string } } }).contentBlockDelta
500-
?.delta?.type === "thinking_delta",
498+
(f.payload as { type?: string }).type === "content_block_delta" &&
499+
(f.payload as { delta?: { type?: string } }).delta?.type === "thinking_delta",
501500
);
502501
expect(thinkingDeltas).toHaveLength(0);
503502
});

0 commit comments

Comments
 (0)