From c5c5a4e260923301328e2d9b51180aef3855c930 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 28 Oct 2026 11:25:47 +0100 Subject: [PATCH 1/2] test(e2e): Fix optional Anthropic and OpenAI decisions apps The Anthropic SDK 1.x targets API version 2026-10-21, which removed `temperature` from message params, so the latest variant no longer compiles. The OpenAI decisions test still expected the Vercel AI origin from before #25602. Co-Authored-By: Claude Opus 5.5 --- .../test-applications/node-anthropic-send-to-sentry/src/app.ts | 3 --- .../node-anthropic-send-to-sentry/tests/send-to-sentry.test.ts | 2 +- .../tests/send-to-sentry.test.ts | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/src/app.ts b/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/src/app.ts index 469545162364..693f1ef4f3b3 100644 --- a/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/src/app.ts +++ b/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/src/app.ts @@ -89,7 +89,6 @@ app.get('/chat', async (_req, res, next) => { const message = await client.messages.create({ model: MODEL, max_tokens: 32, - temperature: 0, system: SYSTEM, messages: [{ role: 'user', content: CHAT_PROMPT }], }); @@ -105,7 +104,6 @@ app.get('/chat-stream', async (_req, res, next) => { const stream = await client.messages.create({ model: MODEL, max_tokens: 32, - temperature: 0, system: SYSTEM, messages: [{ role: 'user', content: CHAT_PROMPT }], stream: true, @@ -131,7 +129,6 @@ app.get('/stream-helper', async (_req, res, next) => { .stream({ model: MODEL, max_tokens: 32, - temperature: 0, system: SYSTEM, messages: [{ role: 'user', content: CHAT_PROMPT }], }) diff --git a/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/tests/send-to-sentry.test.ts b/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/tests/send-to-sentry.test.ts index 44831a6d1a59..4352f9cc83f1 100644 --- a/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/tests/send-to-sentry.test.ts +++ b/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/tests/send-to-sentry.test.ts @@ -96,7 +96,7 @@ test('Sends a message to Sentry as a gen_ai.chat span under the request span', a expectModelCallAttributes(span, attributes); expect(attributes['gen_ai.usage.input_tokens']).toBeGreaterThan(0); - expect(attributes['gen_ai.request.temperature']).toBe(0); + expect(attributes['gen_ai.request.max_tokens']).toBe(32); expect(attributes['gen_ai.response.streaming']).toBeUndefined(); expectRecordedConversation(attributes); diff --git a/dev-packages/e2e-tests/test-applications/node-openai-decisions-send-to-sentry/tests/send-to-sentry.test.ts b/dev-packages/e2e-tests/test-applications/node-openai-decisions-send-to-sentry/tests/send-to-sentry.test.ts index 7b0ae9c56e8f..f15dec0a9e8d 100644 --- a/dev-packages/e2e-tests/test-applications/node-openai-decisions-send-to-sentry/tests/send-to-sentry.test.ts +++ b/dev-packages/e2e-tests/test-applications/node-openai-decisions-send-to-sentry/tests/send-to-sentry.test.ts @@ -178,7 +178,7 @@ test('records a Vercel AI decision with the confidence of its answers', async ({ 'span.name': `decide ${MODEL}`, [SEARCH_SPAN__OP]: GEN_AI_DECIDE, [SEARCH_SPAN__STATUS]: 'ok', - [SEARCH_ORIGIN]: 'auto.vercelai.channel', + [SEARCH_ORIGIN]: 'auto.ai.vercelai', [SEARCH_GEN_AI__OPERATION__NAME]: 'decide', [SEARCH_GEN_AI__PROVIDER__NAME]: 'openai.decision', [SEARCH_GEN_AI__REQUEST__MODEL]: MODEL, From 7c1bebc219c9f14d895c393e908dabe8642be9b5 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 28 Oct 2026 12:51:56 +0100 Subject: [PATCH 2/2] test(e2e): Drop gen_ai.request.max_tokens assertion from Anthropic app The attribute is sent but not returned by the Sentry API for the span. Request params stay covered by node-integration-tests. Co-Authored-By: Claude Opus 5.5 --- .../node-anthropic-send-to-sentry/tests/send-to-sentry.test.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/tests/send-to-sentry.test.ts b/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/tests/send-to-sentry.test.ts index 4352f9cc83f1..e7a135c2368c 100644 --- a/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/tests/send-to-sentry.test.ts +++ b/dev-packages/e2e-tests/test-applications/node-anthropic-send-to-sentry/tests/send-to-sentry.test.ts @@ -96,7 +96,6 @@ test('Sends a message to Sentry as a gen_ai.chat span under the request span', a expectModelCallAttributes(span, attributes); expect(attributes['gen_ai.usage.input_tokens']).toBeGreaterThan(0); - expect(attributes['gen_ai.request.max_tokens']).toBe(32); expect(attributes['gen_ai.response.streaming']).toBeUndefined(); expectRecordedConversation(attributes);