Skip to content

Commit 60e05b1

Browse files
committed
Fix anthropic test - finish_reason not null
1 parent cc49765 commit 60e05b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/instrumentation-anthropic/test/content-block-mapper.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ describe("formatOutputMessage", () => {
516516
assert.strictEqual(result[0].finish_reason, "some_unknown_reason");
517517
});
518518

519-
it("omits finish_reason when stopReason is null", () => {
519+
it("sets finish_reason to empty string when stopReason is null", () => {
520520
const result = JSON.parse(
521521
formatOutputMessage(
522522
fixtures.outputMessages.text_only,
@@ -526,7 +526,7 @@ describe("formatOutputMessage", () => {
526526
mapAnthropicContentBlock,
527527
),
528528
);
529-
assert.strictEqual(result[0].finish_reason, undefined);
529+
assert.strictEqual(result[0].finish_reason, "");
530530
});
531531

532532
it("formats tool_use output as ToolCallRequestPart", () => {

0 commit comments

Comments
 (0)