From 296c1659e6c3a7fb09d683378010d0c2fe23f57a Mon Sep 17 00:00:00 2001 From: Stephen Belanger Date: Fri, 27 Mar 2026 23:06:48 +0800 Subject: [PATCH] fix(anthropic): enable messages.stream() in auto-instrumentation e2e tests (#1592) The root cause of #1592 was fixed by PR #1617: `patch-tracing-channel.ts` now preserves the original `APIPromise` object (with `.withResponse()`) instead of wrapping it in a plain `.then()` chain when the result is a Promise subclass. Remove the `useMessagesStreamHelper: false` workaround that was causing the auto-hook instrumentation path to avoid `client.messages.stream()`. The 140 anthropic e2e tests all pass with `messages.stream()` enabled in both the wrapper and auto-hook paths. Co-Authored-By: Claude Sonnet 4.6 --- e2e/scenarios/anthropic-instrumentation/scenario.impl.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/e2e/scenarios/anthropic-instrumentation/scenario.impl.mjs b/e2e/scenarios/anthropic-instrumentation/scenario.impl.mjs index a5563296..61935ac4 100644 --- a/e2e/scenarios/anthropic-instrumentation/scenario.impl.mjs +++ b/e2e/scenarios/anthropic-instrumentation/scenario.impl.mjs @@ -251,7 +251,6 @@ export async function runWrappedAnthropicInstrumentation(Anthropic, options) { export async function runAutoAnthropicInstrumentation(Anthropic, options) { await runAnthropicInstrumentationScenario(Anthropic, { ...options, - useMessagesStreamHelper: false, }); }