From 54e2b98416765ae5bbccf72396de79433dda1638 Mon Sep 17 00:00:00 2001 From: lforst <8118419+lforst@users.noreply.github.com> Date: Fri, 25 Sep 2026 18:35:01 +0000 Subject: [PATCH 1/4] fix: Fix `reasoning_content` for openai compatible responses --- .../plugins/openai-plugin.test.ts | 102 ++++++++++++++++++ .../instrumentation/plugins/openai-plugin.ts | 15 ++- js/src/vendor-sdk-types/openai-common.ts | 2 + 3 files changed, 118 insertions(+), 1 deletion(-) diff --git a/js/src/instrumentation/plugins/openai-plugin.test.ts b/js/src/instrumentation/plugins/openai-plugin.test.ts index ddcb66e7d..127d102de 100644 --- a/js/src/instrumentation/plugins/openai-plugin.test.ts +++ b/js/src/instrumentation/plugins/openai-plugin.test.ts @@ -300,6 +300,108 @@ describe("parseMetricsFromUsage", () => { }); describe("aggregateChatCompletionChunks", () => { + describe("reasoning_content", () => { + it("concatenates reasoning separately from content for each choice", () => { + const chunks = [ + { + choices: [ + { + index: 1, + delta: { role: "assistant", reasoning_content: "Let " }, + }, + { + index: 0, + delta: { role: "assistant", reasoning_content: "Think " }, + }, + ], + }, + { + choices: [ + { index: 0, delta: { reasoning_content: "first.", content: "An" } }, + { + index: 1, + delta: { reasoning_content: "me think.", content: "Other" }, + }, + ], + }, + { + choices: [ + { + index: 1, + delta: { reasoning_content: null }, + finish_reason: "length", + }, + { index: 0, delta: { content: "swer" }, finish_reason: "stop" }, + ], + }, + { + choices: [], + usage: { prompt_tokens: 2, completion_tokens: 8, total_tokens: 10 }, + }, + ]; + const originalChunks = structuredClone(chunks); + + expect(aggregateChatCompletionChunks(chunks)).toEqual({ + output: [ + { + index: 0, + message: { + role: "assistant", + content: "Answer", + reasoning_content: "Think first.", + }, + logprobs: null, + finish_reason: "stop", + }, + { + index: 1, + message: { + role: "assistant", + content: "Other", + reasoning_content: "Let me think.", + }, + logprobs: null, + finish_reason: "length", + }, + ], + metrics: { prompt_tokens: 2, completion_tokens: 8, tokens: 10 }, + }); + expect(chunks).toEqual(originalChunks); + }); + + it.each([ + { fragments: [undefined, undefined], expected: undefined }, + { fragments: [null, undefined, null], expected: null }, + { fragments: ["", undefined, ""], expected: "" }, + { fragments: [null, "", null], expected: "" }, + { + fragments: [null, "Think", undefined, null, "", " more", null], + expected: "Think more", + }, + ])( + "preserves reasoning fragments $fragments as $expected", + ({ fragments, expected }) => { + const chunks = fragments.map((reasoning_content) => ({ + choices: [ + { + index: 0, + delta: + reasoning_content === undefined ? {} : { reasoning_content }, + }, + ], + })); + const { message } = aggregateChatCompletionChunks(chunks).output[0]; + + if (expected === undefined) { + expect(message).not.toHaveProperty("reasoning_content"); + } else { + expect(message).toHaveProperty("reasoning_content", expected); + } + expect(message.content).toBeUndefined(); + }, + ); + }); + describe("basic aggregation", () => { it("should aggregate simple text chunks", () => { const chunks = [ diff --git a/js/src/instrumentation/plugins/openai-plugin.ts b/js/src/instrumentation/plugins/openai-plugin.ts index dc0886c50..f36df9ed3 100644 --- a/js/src/instrumentation/plugins/openai-plugin.ts +++ b/js/src/instrumentation/plugins/openai-plugin.ts @@ -409,6 +409,7 @@ type AggregatedChatChoice = { index: number; role: string | undefined; content: string | undefined; + reasoning_content: string | null | undefined; refusal: string | undefined; audio: NonNullable | undefined; toolCallsByIndex: Map< @@ -424,6 +425,7 @@ function createAggregatedChatChoice(index: number): AggregatedChatChoice { index, role: undefined, content: undefined, + reasoning_content: undefined, refusal: undefined, audio: undefined, toolCallsByIndex: new Map(), @@ -442,6 +444,9 @@ function toChatChoice(choice: AggregatedChatChoice): OpenAIChatChoice { message: { role: choice.role, content: choice.content, + ...(choice.reasoning_content !== undefined + ? { reasoning_content: choice.reasoning_content } + : {}), ...(choice.refusal !== undefined ? { refusal: choice.refusal } : {}), ...(choice.audio !== undefined ? { audio: choice.audio } : {}), tool_calls: toolCalls.length > 0 ? toolCalls : undefined, @@ -453,7 +458,7 @@ function toChatChoice(choice: AggregatedChatChoice): OpenAIChatChoice { /** * Aggregate chat completion chunks into a single response. - * Combines role (first), content and audio transcripts (concatenated), + * Combines role (first), content, reasoning_content and audio transcripts (concatenated), * tool_calls (by index), finish_reason (last), and usage (last chunk). */ export function aggregateChatCompletionChunks( @@ -515,6 +520,14 @@ export function aggregateChatCompletionChunks( (aggregatedChoice.content || "") + delta.content; } + if (typeof delta.reasoning_content === "string") { + aggregatedChoice.reasoning_content = + (aggregatedChoice.reasoning_content ?? "") + delta.reasoning_content; + } else if (delta.reasoning_content === null) { + // Retain explicit nulls, but never discard text from earlier chunks. + aggregatedChoice.reasoning_content ??= null; + } + if (delta.refusal) { aggregatedChoice.refusal = (aggregatedChoice.refusal || "") + delta.refusal; diff --git a/js/src/vendor-sdk-types/openai-common.ts b/js/src/vendor-sdk-types/openai-common.ts index 6b7f1ef54..15cb745fb 100644 --- a/js/src/vendor-sdk-types/openai-common.ts +++ b/js/src/vendor-sdk-types/openai-common.ts @@ -98,6 +98,7 @@ interface OpenAIChatAudio { export interface OpenAIChatMessage { role?: string; content?: unknown; + reasoning_content?: string | null; refusal?: string; audio?: OpenAIChatAudio | null; tool_calls?: OpenAIChatToolCall[]; @@ -135,6 +136,7 @@ export interface OpenAIChatCompletion { interface OpenAIChatDelta { role?: string; content?: string; + reasoning_content?: string | null; refusal?: string; audio?: OpenAIChatAudio | null; tool_calls?: OpenAIChatToolCallDelta[]; From c687401837032acb1dadb4934c2717b3893880b0 Mon Sep 17 00:00:00 2001 From: lforst <8118419+lforst@users.noreply.github.com> Date: Mon, 28 Sep 2026 10:16:58 +0000 Subject: [PATCH 2/4] Update PR #2524 --- e2e/config/pr-comment-scenarios.json | 24 ++++ e2e/helpers/scenario-harness.ts | 3 + .../openai-v4-latest-reasoning.cassette.json | 110 ++++++++++++++++ .../openai-v4-reasoning.cassette.json | 108 ++++++++++++++++ .../openai-v5-latest-reasoning.cassette.json | 107 ++++++++++++++++ .../openai-v5-reasoning.cassette.json | 112 +++++++++++++++++ .../openai-v6-latest-reasoning.cassette.json | 117 ++++++++++++++++++ .../openai-v6-reasoning.cassette.json | 107 ++++++++++++++++ ...-latest-reasoning-auto-hook.span-tree.json | 66 ++++++++++ ...4-latest-reasoning-auto-hook.span-tree.txt | 54 ++++++++ ...v4-latest-reasoning-wrapped.span-tree.json | 66 ++++++++++ ...-v4-latest-reasoning-wrapped.span-tree.txt | 54 ++++++++ ...enai-v4-reasoning-auto-hook.span-tree.json | 66 ++++++++++ ...penai-v4-reasoning-auto-hook.span-tree.txt | 54 ++++++++ ...openai-v4-reasoning-wrapped.span-tree.json | 66 ++++++++++ .../openai-v4-reasoning-wrapped.span-tree.txt | 54 ++++++++ ...-latest-reasoning-auto-hook.span-tree.json | 66 ++++++++++ ...5-latest-reasoning-auto-hook.span-tree.txt | 54 ++++++++ ...v5-latest-reasoning-wrapped.span-tree.json | 66 ++++++++++ ...-v5-latest-reasoning-wrapped.span-tree.txt | 54 ++++++++ ...enai-v5-reasoning-auto-hook.span-tree.json | 66 ++++++++++ ...penai-v5-reasoning-auto-hook.span-tree.txt | 54 ++++++++ ...openai-v5-reasoning-wrapped.span-tree.json | 66 ++++++++++ .../openai-v5-reasoning-wrapped.span-tree.txt | 54 ++++++++ ...-latest-reasoning-auto-hook.span-tree.json | 66 ++++++++++ ...6-latest-reasoning-auto-hook.span-tree.txt | 54 ++++++++ ...v6-latest-reasoning-wrapped.span-tree.json | 66 ++++++++++ ...-v6-latest-reasoning-wrapped.span-tree.txt | 54 ++++++++ ...enai-v6-reasoning-auto-hook.span-tree.json | 66 ++++++++++ ...penai-v6-reasoning-auto-hook.span-tree.txt | 54 ++++++++ ...openai-v6-reasoning-wrapped.span-tree.json | 66 ++++++++++ .../openai-v6-reasoning-wrapped.span-tree.txt | 54 ++++++++ .../scenario.reasoning.mjs | 63 ++++++++++ .../openai-instrumentation/scenario.test.ts | 85 ++++++++++++- e2e/scripts/bump-e2e-versions.mjs | 1 + e2e/scripts/run-e2e-bump-docker.mjs | 1 + 36 files changed, 2277 insertions(+), 1 deletion(-) create mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest-reasoning.cassette.json create mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-reasoning.cassette.json create mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest-reasoning.cassette.json create mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-reasoning.cassette.json create mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest-reasoning.cassette.json create mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-reasoning.cassette.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.json create mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.txt create mode 100644 e2e/scenarios/openai-instrumentation/scenario.reasoning.mjs diff --git a/e2e/config/pr-comment-scenarios.json b/e2e/config/pr-comment-scenarios.json index 26b4ada1d..561820873 100644 --- a/e2e/config/pr-comment-scenarios.json +++ b/e2e/config/pr-comment-scenarios.json @@ -57,6 +57,30 @@ { "variantKey": "openai-v6-latest", "label": "v6 latest" + }, + { + "variantKey": "openai-v4-reasoning", + "label": "v4 pinned reasoning" + }, + { + "variantKey": "openai-v4-latest-reasoning", + "label": "v4 latest reasoning" + }, + { + "variantKey": "openai-v5-reasoning", + "label": "v5 pinned reasoning" + }, + { + "variantKey": "openai-v5-latest-reasoning", + "label": "v5 latest reasoning" + }, + { + "variantKey": "openai-v6-reasoning", + "label": "v6 pinned reasoning" + }, + { + "variantKey": "openai-v6-latest-reasoning", + "label": "v6 latest reasoning" } ] }, diff --git a/e2e/helpers/scenario-harness.ts b/e2e/helpers/scenario-harness.ts index b86753c4a..2a5d0fe67 100644 --- a/e2e/helpers/scenario-harness.ts +++ b/e2e/helpers/scenario-harness.ts @@ -306,6 +306,7 @@ function getCassetteServerRoutes(): CassetteServerRoute[] { { prefix: "/cohere", upstreamOrigin: "https://api.cohere.com" }, { prefix: "/cursor/v1", upstreamOrigin: "https://api.cursor.com/v1" }, { prefix: "/cursor", upstreamOrigin: "https://api2.cursor.sh" }, + { prefix: "/deepseek", upstreamOrigin: "https://api.deepseek.com" }, { prefix: "/google-generative-language", upstreamOrigin: "https://generativelanguage.googleapis.com", @@ -343,6 +344,7 @@ function getCassetteEnv(wiring: ActiveCassetteWiring): Record { COHERE_BASE_URL: `${serverUrl}/cohere`, COHERE_API_URL: `${serverUrl}/cohere`, CURSOR_BACKEND_URL: `${serverUrl}/cursor`, + DEEPSEEK_BASE_URL: `${serverUrl}/deepseek/v1`, GEMINI_BASE_URL: `${serverUrl}/google-generative-language`, GEMINI_NEXT_GEN_API_BASE_URL: `${serverUrl}/google-generative-language`, GOOGLE_GENERATIVE_AI_BASE_URL: `${serverUrl}/google-generative-language`, @@ -399,6 +401,7 @@ const CASSETTE_PROVIDER_KEYS: Array<{ }, { envVars: ["ELEVENLABS_API_KEY"], placeholder: "cassette-placeholder" }, { envVars: ["CURSOR_API_KEY"], placeholder: "key_cassette-placeholder" }, + { envVars: ["DEEPSEEK_API_KEY"], placeholder: "sk-cassette-placeholder" }, { envVars: ["GOOGLE_API_KEY", "GOOGLE_GENAI_API_KEY", "GEMINI_API_KEY"], placeholder: "cassette-placeholder", diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest-reasoning.cassette.json new file mode 100644 index 000000000..a6a47ea46 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest-reasoning.cassette.json @@ -0,0 +1,110 @@ +{ + "entries": [ + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:11:58.950Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" than\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Must\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":46,\"total_tokens\":97,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":42},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:11:58 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "ejJ3aV7m8QnSCau9fmnnZ6vkFKIo6zKo4XhiR1_BkxmTddMMPJSfsw==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "1cded484df907a92fe77bf6356af3257" + }, + "status": 200 + } + } + ], + "meta": { + "createdAt": "2026-09-25T06:11:57.881Z" + } +} diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-reasoning.cassette.json new file mode 100644 index 000000000..d5c2c6da1 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-reasoning.cassette.json @@ -0,0 +1,108 @@ +{ + "entries": [ + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:11:56.615Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Must\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" with\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":44,\"total_tokens\":95,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":40},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:11:55 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "_cxropRVmhG7Ba05C1BIFZZMpZ6s_a1hnV13pzRlD5T7A2v1aqzl1Q==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "564f13eece9f38e3d7624c67df41962c" + }, + "status": 200 + } + } + ], + "meta": { + "createdAt": "2026-09-25T06:11:55.186Z" + } +} diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest-reasoning.cassette.json new file mode 100644 index 000000000..e560d5f90 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest-reasoning.cassette.json @@ -0,0 +1,107 @@ +{ + "entries": [ + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:12:03.958Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":43,\"total_tokens\":94,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":39},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:12:03 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "GaCf5DKqaIy_0i-RVTaKX8LIcv8120u6GJtRpJx-6pjP8i7XoDO3nw==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "131154829fc0165548a944ee869baa87" + }, + "status": 200 + } + } + ], + "meta": { + "createdAt": "2026-09-25T06:12:02.734Z" + } +} diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-reasoning.cassette.json new file mode 100644 index 000000000..1acd856c8 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-reasoning.cassette.json @@ -0,0 +1,112 @@ +{ + "entries": [ + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:12:01.499Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":48,\"total_tokens\":99,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":44},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:12:00 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "rblnNFRyPwAveR1ngFgkEj9yQidwqaRrYkesFQant1sn9dRA_aePfQ==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "0e72f6edc3467947f6a7cf9d01018f7c" + }, + "status": 200 + } + } + ], + "meta": { + "createdAt": "2026-09-25T06:12:00.340Z" + } +} diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest-reasoning.cassette.json new file mode 100644 index 000000000..efac0ef2a --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest-reasoning.cassette.json @@ -0,0 +1,117 @@ +{ + "entries": [ + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:12:09.757Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" As\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" decimals\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\":\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" So\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Must\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":53,\"total_tokens\":104,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":49},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:12:09 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "aOPAgAFm2B4IFyadrPUDK9N1SCEHgtjtpxZbRZKErj_cCq8wuI5fFw==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "7c534367f4ebddf435f1a91380e87b7b" + }, + "status": 200 + } + } + ], + "meta": { + "createdAt": "2026-09-25T06:12:08.703Z" + } +} diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-reasoning.cassette.json new file mode 100644 index 000000000..6eea7aa37 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-reasoning.cassette.json @@ -0,0 +1,107 @@ +{ + "entries": [ + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:12:07.000Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":43,\"total_tokens\":94,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":39},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:12:06 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "piauLlLe7ZVysvk_9ldwbFRCBxgg54LgtR0lD-lgWi29D4b3kbVq7Q==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "3a583873b02ba7c9e16384c1371f41f1" + }, + "status": 200 + } + } + ], + "meta": { + "createdAt": "2026-09-25T06:12:05.564Z" + } +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.json new file mode 100644 index 000000000..2023c06ca --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 42, + "completion_tokens": 46, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 97 + } + } + ], + "metadata": { + "openaiSdkVersion": "4.104.0", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.txt new file mode 100644 index 000000000..83cdab9fb --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "4.104.0", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 42, + "completion_tokens": 46, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 97 + } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.json new file mode 100644 index 000000000..2023c06ca --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 42, + "completion_tokens": 46, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 97 + } + } + ], + "metadata": { + "openaiSdkVersion": "4.104.0", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.txt new file mode 100644 index 000000000..83cdab9fb --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "4.104.0", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 42, + "completion_tokens": 46, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 97 + } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.json new file mode 100644 index 000000000..6e795a0a6 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 40, + "completion_tokens": 44, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 95 + } + } + ], + "metadata": { + "openaiSdkVersion": "4.104.0", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.txt new file mode 100644 index 000000000..dbd32e487 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "4.104.0", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 40, + "completion_tokens": 44, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 95 + } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.json new file mode 100644 index 000000000..6e795a0a6 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 40, + "completion_tokens": 44, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 95 + } + } + ], + "metadata": { + "openaiSdkVersion": "4.104.0", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.txt new file mode 100644 index 000000000..dbd32e487 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "4.104.0", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 40, + "completion_tokens": 44, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 95 + } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.json new file mode 100644 index 000000000..452e673e0 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } + } + ], + "metadata": { + "openaiSdkVersion": "5.23.2", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.txt new file mode 100644 index 000000000..0d17e435a --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "5.23.2", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.json new file mode 100644 index 000000000..452e673e0 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } + } + ], + "metadata": { + "openaiSdkVersion": "5.23.2", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.txt new file mode 100644 index 000000000..0d17e435a --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "5.23.2", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.json new file mode 100644 index 000000000..97de8d804 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 44, + "completion_tokens": 48, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 99 + } + } + ], + "metadata": { + "openaiSdkVersion": "5.11.0", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.txt new file mode 100644 index 000000000..39aa2109b --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "5.11.0", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 44, + "completion_tokens": 48, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 99 + } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.json new file mode 100644 index 000000000..97de8d804 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 44, + "completion_tokens": 48, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 99 + } + } + ], + "metadata": { + "openaiSdkVersion": "5.11.0", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.txt new file mode 100644 index 000000000..39aa2109b --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "5.11.0", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 44, + "completion_tokens": 48, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 99 + } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.json new file mode 100644 index 000000000..161205fde --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 49, + "completion_tokens": 53, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 104 + } + } + ], + "metadata": { + "openaiSdkVersion": "6.49.0", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.txt new file mode 100644 index 000000000..df56800ad --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "6.49.0", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 49, + "completion_tokens": 53, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 104 + } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.json new file mode 100644 index 000000000..161205fde --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 49, + "completion_tokens": 53, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 104 + } + } + ], + "metadata": { + "openaiSdkVersion": "6.49.0", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.txt new file mode 100644 index 000000000..df56800ad --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "6.49.0", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 49, + "completion_tokens": 53, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 104 + } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.json new file mode 100644 index 000000000..23aefa9b9 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } + } + ], + "metadata": { + "openaiSdkVersion": "6.25.0", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.txt new file mode 100644 index 000000000..42abb0ab6 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "6.25.0", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.json new file mode 100644 index 000000000..23aefa9b9 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.json @@ -0,0 +1,66 @@ +{ + "span_tree": [ + { + "name": "openai-reasoning-root", + "type": "task", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } + } + ], + "metadata": { + "openaiSdkVersion": "6.25.0", + "scenario": "openai-instrumentation", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + } + ] +} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.txt new file mode 100644 index 000000000..42abb0ab6 --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.txt @@ -0,0 +1,54 @@ +span_tree: +└── openai-reasoning-root [task] + metadata: { + "openaiSdkVersion": "6.25.0", + "scenario": "openai-instrumentation", + "testRunId": "" + } + context: { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runTracedScenario", + "caller_lineno": 0 + } + └── Chat Completion [llm] + input: [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ] + output: [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", + "role": "assistant" + } + } + ] + metadata: { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + metrics: { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } diff --git a/e2e/scenarios/openai-instrumentation/scenario.reasoning.mjs b/e2e/scenarios/openai-instrumentation/scenario.reasoning.mjs new file mode 100644 index 000000000..e97cf568c --- /dev/null +++ b/e2e/scenarios/openai-instrumentation/scenario.reasoning.mjs @@ -0,0 +1,63 @@ +import { wrapOpenAI } from "braintrust"; +import { + getInstalledPackageVersion, + runMain, + runTracedScenario, +} from "../../helpers/provider-runtime.mjs"; + +const packageName = process.env.OPENAI_PACKAGE_NAME; +const { default: OpenAI } = await import(packageName); + +runMain(async () => { + const client = new OpenAI({ + apiKey: process.env.DEEPSEEK_API_KEY, + baseURL: process.env.DEEPSEEK_BASE_URL, + maxRetries: 0, + }); + const instrumented = + process.env.INSTRUMENTATION_MODE === "wrapped" + ? wrapOpenAI(client) + : client; + + await runTracedScenario({ + rootName: "openai-reasoning-root", + projectNameBase: "tmp-luca-openai-reasoning", + metadata: { + scenario: "openai-instrumentation", + openaiSdkVersion: await getInstalledPackageVersion( + import.meta.url, + packageName, + ), + }, + callback: async () => { + // Genuine DeepSeek recordings from PR #2522 (commit 43100efd0f2ee4fffe44b4e9a711aa6f66c71b0f). + // This is the plain OpenAI client with a custom baseURL reported in #2511. + const stream = await instrumented.chat.completions.create({ + model: "deepseek-flash", + messages: [ + { + role: "user", + content: + "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + }, + ], + thinking: { type: "enabled" }, + reasoning_effort: "low", + max_tokens: 2048, + stream: true, + stream_options: { include_usage: true }, + }); + const reasoning = []; + const content = []; + let usage; + for await (const chunk of stream) { + const delta = chunk.choices[0]?.delta; + if (delta?.reasoning_content) reasoning.push(delta.reasoning_content); + if (delta?.content) content.push(delta.content); + if (chunk.usage) usage = chunk.usage; + } + // Expectations come from what the application received, independently of tracing. + console.log(JSON.stringify({ reasoning, content, usage })); + }, + }); +}); diff --git a/e2e/scenarios/openai-instrumentation/scenario.test.ts b/e2e/scenarios/openai-instrumentation/scenario.test.ts index f4e0cfa39..0aa76c2be 100644 --- a/e2e/scenarios/openai-instrumentation/scenario.test.ts +++ b/e2e/scenarios/openai-instrumentation/scenario.test.ts @@ -1,10 +1,17 @@ -import { describe, it } from "vitest"; +import { describe, expect, it } from "vitest"; import { prepareScenarioDir, readInstalledPackageVersion, resolveScenarioDir, runNodeScenarioDir, + withScenarioHarness, } from "../../helpers/scenario-harness"; +import { resolveFileSnapshotPath } from "../../helpers/file-snapshot"; +import { matchSpanTreeSnapshot, spanTreeFields } from "../../helpers/span-tree"; +import { + findAllSpans, + spanInstrumentationName, +} from "../../helpers/trace-selectors"; import { defineOpenAIInstrumentationAssertions } from "./assertions"; const originalScenarioDir = resolveScenarioDir(import.meta.url); @@ -86,6 +93,82 @@ describe.concurrent("variants", () => { !scenario.disablePrivateFieldMethodsAssertion; describe.sequential(`openai sdk ${scenario.version}`, () => { + for (const mode of ["wrapped", "auto-hook"]) { + it( + `preserves DeepSeek streamed reasoning with ${mode} instrumentation`, + async () => { + await withScenarioHarness(async (harness) => { + const variantKey = `${scenario.snapshotName}-reasoning`; + const result = await harness.runNodeScenarioDir({ + entry: "scenario.reasoning.mjs", + env: { + OPENAI_PACKAGE_NAME: scenario.dependencyName, + INSTRUMENTATION_MODE: mode, + }, + nodeArgs: + mode === "auto-hook" + ? ["--import", "braintrust/hook.mjs"] + : [], + runContext: { variantKey, originalScenarioDir }, + scenarioDir, + timeoutMs: TIMEOUT_MS, + }); + const received: { + reasoning: string[]; + content: string[]; + usage: { + prompt_tokens: number; + completion_tokens: number; + total_tokens: number; + }; + } = JSON.parse(result.stdout); + expect(received.reasoning.length).toBeGreaterThan(1); + expect(received.content.join("").trim()).toBe("9.8"); + + const events = harness.events(); + const roots = findAllSpans(events, "openai-reasoning-root"); + const spans = findAllSpans(events, "Chat Completion"); + expect(roots).toHaveLength(1); + expect(spans).toHaveLength(1); + const span = spans[0]; + expect(span.span.parentIds).toEqual([roots[0].span.id]); + expect(spanInstrumentationName(span)).toBe("openai"); + expect(span.output).toMatchObject([ + { + index: 0, + finish_reason: "stop", + message: { + role: "assistant", + content: received.content.join(""), + }, + }, + ]); + expect(span.output).toMatchObject([ + { + message: { reasoning_content: received.reasoning.join("") }, + }, + ]); + expect(span.metrics).toMatchObject({ + prompt_tokens: received.usage.prompt_tokens, + completion_tokens: received.usage.completion_tokens, + tokens: received.usage.total_tokens, + }); + await matchSpanTreeSnapshot( + [...roots, ...spans].map((event) => ({ + event, + fields: { ...spanTreeFields(event), context: event.context }, + })), + resolveFileSnapshotPath( + import.meta.url, + `${variantKey}-${mode}.span-tree.json`, + ), + ); + }); + }, + TIMEOUT_MS, + ); + } + defineOpenAIInstrumentationAssertions({ assertPrivateFieldMethodsOperation, name: "wrapped instrumentation", diff --git a/e2e/scripts/bump-e2e-versions.mjs b/e2e/scripts/bump-e2e-versions.mjs index d7ed675a1..069c1981f 100644 --- a/e2e/scripts/bump-e2e-versions.mjs +++ b/e2e/scripts/bump-e2e-versions.mjs @@ -22,6 +22,7 @@ const INSTALL_SECRET_ENV_VARS = [ "COHERE_API_KEY", "ELEVENLABS_API_KEY", "CURSOR_API_KEY", + "DEEPSEEK_API_KEY", "GEMINI_API_KEY", "GH_TOKEN", "GITHUB_TOKEN", diff --git a/e2e/scripts/run-e2e-bump-docker.mjs b/e2e/scripts/run-e2e-bump-docker.mjs index 93b547b3d..84bcbabd5 100644 --- a/e2e/scripts/run-e2e-bump-docker.mjs +++ b/e2e/scripts/run-e2e-bump-docker.mjs @@ -38,6 +38,7 @@ const ALLOWED_ENV_KEYS = [ "COHERE_BASE_URL", "CURSOR_API_KEY", "CURSOR_BACKEND_URL", + "DEEPSEEK_API_KEY", "GEMINI_API_KEY", "GEMINI_BASE_URL", "GEMINI_NEXT_GEN_API_BASE_URL", From d64ae74a9fa133c539e5c739de2ab3d91fbad707 Mon Sep 17 00:00:00 2001 From: lforst <8118419+lforst@users.noreply.github.com> Date: Mon, 28 Sep 2026 10:25:15 +0000 Subject: [PATCH 3/4] Update PR #2524 --- e2e/config/pr-comment-scenarios.json | 24 ---- .../openai-v4-latest-reasoning.cassette.json | 110 ---------------- .../openai-v4-latest.cassette.json | 103 +++++++++++++++ .../openai-v4-reasoning.cassette.json | 108 ---------------- .../__cassettes__/openai-v4.cassette.json | 101 +++++++++++++++ .../openai-v5-latest-reasoning.cassette.json | 107 ---------------- .../openai-v5-latest.cassette.json | 100 +++++++++++++++ .../openai-v5-reasoning.cassette.json | 112 ----------------- .../__cassettes__/openai-v5.cassette.json | 105 ++++++++++++++++ .../openai-v6-latest-reasoning.cassette.json | 117 ------------------ .../openai-v6-latest.cassette.json | 110 ++++++++++++++++ .../openai-v6-reasoning.cassette.json | 107 ---------------- .../__cassettes__/openai-v6.cassette.json | 100 +++++++++++++++ .../openai-v4-auto-hook.span-tree.json | 78 ++++++++++++ .../openai-v4-auto-hook.span-tree.txt | 70 +++++++++++ .../openai-v4-latest-auto-hook.span-tree.json | 78 ++++++++++++ .../openai-v4-latest-auto-hook.span-tree.txt | 70 +++++++++++ ...-latest-reasoning-auto-hook.span-tree.json | 66 ---------- ...4-latest-reasoning-auto-hook.span-tree.txt | 54 -------- ...v4-latest-reasoning-wrapped.span-tree.json | 66 ---------- ...-v4-latest-reasoning-wrapped.span-tree.txt | 54 -------- .../openai-v4-latest-wrapped.span-tree.json | 78 ++++++++++++ .../openai-v4-latest-wrapped.span-tree.txt | 70 +++++++++++ ...enai-v4-reasoning-auto-hook.span-tree.json | 66 ---------- ...penai-v4-reasoning-auto-hook.span-tree.txt | 54 -------- ...openai-v4-reasoning-wrapped.span-tree.json | 66 ---------- .../openai-v4-reasoning-wrapped.span-tree.txt | 54 -------- .../openai-v4-wrapped.span-tree.json | 78 ++++++++++++ .../openai-v4-wrapped.span-tree.txt | 70 +++++++++++ .../openai-v5-auto-hook.span-tree.json | 78 ++++++++++++ .../openai-v5-auto-hook.span-tree.txt | 70 +++++++++++ .../openai-v5-latest-auto-hook.span-tree.json | 78 ++++++++++++ .../openai-v5-latest-auto-hook.span-tree.txt | 70 +++++++++++ ...-latest-reasoning-auto-hook.span-tree.json | 66 ---------- ...5-latest-reasoning-auto-hook.span-tree.txt | 54 -------- ...v5-latest-reasoning-wrapped.span-tree.json | 66 ---------- ...-v5-latest-reasoning-wrapped.span-tree.txt | 54 -------- .../openai-v5-latest-wrapped.span-tree.json | 78 ++++++++++++ .../openai-v5-latest-wrapped.span-tree.txt | 70 +++++++++++ ...enai-v5-reasoning-auto-hook.span-tree.json | 66 ---------- ...penai-v5-reasoning-auto-hook.span-tree.txt | 54 -------- ...openai-v5-reasoning-wrapped.span-tree.json | 66 ---------- .../openai-v5-reasoning-wrapped.span-tree.txt | 54 -------- .../openai-v5-wrapped.span-tree.json | 78 ++++++++++++ .../openai-v5-wrapped.span-tree.txt | 70 +++++++++++ .../openai-v6-auto-hook.span-tree.json | 78 ++++++++++++ .../openai-v6-auto-hook.span-tree.txt | 70 +++++++++++ .../openai-v6-latest-auto-hook.span-tree.json | 78 ++++++++++++ .../openai-v6-latest-auto-hook.span-tree.txt | 70 +++++++++++ ...-latest-reasoning-auto-hook.span-tree.json | 66 ---------- ...6-latest-reasoning-auto-hook.span-tree.txt | 54 -------- ...v6-latest-reasoning-wrapped.span-tree.json | 66 ---------- ...-v6-latest-reasoning-wrapped.span-tree.txt | 54 -------- .../openai-v6-latest-wrapped.span-tree.json | 78 ++++++++++++ .../openai-v6-latest-wrapped.span-tree.txt | 70 +++++++++++ ...enai-v6-reasoning-auto-hook.span-tree.json | 66 ---------- ...penai-v6-reasoning-auto-hook.span-tree.txt | 54 -------- ...openai-v6-reasoning-wrapped.span-tree.json | 66 ---------- .../openai-v6-reasoning-wrapped.span-tree.txt | 54 -------- .../openai-v6-wrapped.span-tree.json | 78 ++++++++++++ .../openai-v6-wrapped.span-tree.txt | 70 +++++++++++ .../openai-instrumentation/assertions.ts | 47 ++++++- .../openai-instrumentation/scenario.impl.mjs | 52 ++++++++ .../scenario.reasoning.mjs | 63 ---------- .../openai-instrumentation/scenario.test.ts | 85 +------------ 65 files changed, 2493 insertions(+), 2274 deletions(-) delete mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest-reasoning.cassette.json delete mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-reasoning.cassette.json delete mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest-reasoning.cassette.json delete mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-reasoning.cassette.json delete mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest-reasoning.cassette.json delete mode 100644 e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-reasoning.cassette.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.json delete mode 100644 e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.txt delete mode 100644 e2e/scenarios/openai-instrumentation/scenario.reasoning.mjs diff --git a/e2e/config/pr-comment-scenarios.json b/e2e/config/pr-comment-scenarios.json index 561820873..26b4ada1d 100644 --- a/e2e/config/pr-comment-scenarios.json +++ b/e2e/config/pr-comment-scenarios.json @@ -57,30 +57,6 @@ { "variantKey": "openai-v6-latest", "label": "v6 latest" - }, - { - "variantKey": "openai-v4-reasoning", - "label": "v4 pinned reasoning" - }, - { - "variantKey": "openai-v4-latest-reasoning", - "label": "v4 latest reasoning" - }, - { - "variantKey": "openai-v5-reasoning", - "label": "v5 pinned reasoning" - }, - { - "variantKey": "openai-v5-latest-reasoning", - "label": "v5 latest reasoning" - }, - { - "variantKey": "openai-v6-reasoning", - "label": "v6 pinned reasoning" - }, - { - "variantKey": "openai-v6-latest-reasoning", - "label": "v6 latest reasoning" } ] }, diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest-reasoning.cassette.json deleted file mode 100644 index a6a47ea46..000000000 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest-reasoning.cassette.json +++ /dev/null @@ -1,110 +0,0 @@ -{ - "entries": [ - { - "callIndex": 0, - "id": "631c45d386f59296", - "matchKey": "POST api.deepseek.com/v1/chat/completions", - "recordedAt": "2026-09-25T06:11:58.950Z", - "request": { - "body": { - "kind": "json", - "value": { - "max_tokens": 2048, - "messages": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "model": "deepseek-flash", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - }, - "headers": {}, - "method": "POST", - "url": "https://api.deepseek.com/v1/chat/completions" - }, - "response": { - "body": { - "chunks": [ - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" than\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Must\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":46,\"total_tokens\":97,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":42},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", - "data: [DONE]" - ], - "kind": "sse" - }, - "headers": { - "access-control-allow-credentials": "true", - "cache-control": "no-cache", - "content-type": "text/event-stream; charset=utf-8", - "date": "Fri, 25 Sep 2026 06:11:58 GMT", - "server": "elb", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "vary": "origin, access-control-request-method, access-control-request-headers", - "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", - "x-amz-cf-id": "ejJ3aV7m8QnSCau9fmnnZ6vkFKIo6zKo4XhiR1_BkxmTddMMPJSfsw==", - "x-amz-cf-pop": "SFO53-P10", - "x-cache": "Miss from cloudfront", - "x-content-type-options": "nosniff", - "x-ds-trace-id": "1cded484df907a92fe77bf6356af3257" - }, - "status": 200 - } - } - ], - "meta": { - "createdAt": "2026-09-25T06:11:57.881Z" - } -} diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest.cassette.json index 9089bdd22..10c51cd02 100644 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest.cassette.json +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-latest.cassette.json @@ -2358,6 +2358,109 @@ "status": 200, "statusText": "OK" } + }, + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:11:58.950Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" than\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Must\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"60b824d8-0782-43c5-a798-178172d649fa\",\"object\":\"chat.completion.chunk\",\"created\":1790316718,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":46,\"total_tokens\":97,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":42},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:11:58 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "ejJ3aV7m8QnSCau9fmnnZ6vkFKIo6zKo4XhiR1_BkxmTddMMPJSfsw==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "1cded484df907a92fe77bf6356af3257" + }, + "status": 200 + } } ], "meta": { diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-reasoning.cassette.json deleted file mode 100644 index d5c2c6da1..000000000 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4-reasoning.cassette.json +++ /dev/null @@ -1,108 +0,0 @@ -{ - "entries": [ - { - "callIndex": 0, - "id": "631c45d386f59296", - "matchKey": "POST api.deepseek.com/v1/chat/completions", - "recordedAt": "2026-09-25T06:11:56.615Z", - "request": { - "body": { - "kind": "json", - "value": { - "max_tokens": 2048, - "messages": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "model": "deepseek-flash", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - }, - "headers": {}, - "method": "POST", - "url": "https://api.deepseek.com/v1/chat/completions" - }, - "response": { - "body": { - "chunks": [ - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Must\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" with\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":44,\"total_tokens\":95,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":40},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", - "data: [DONE]" - ], - "kind": "sse" - }, - "headers": { - "access-control-allow-credentials": "true", - "cache-control": "no-cache", - "content-type": "text/event-stream; charset=utf-8", - "date": "Fri, 25 Sep 2026 06:11:55 GMT", - "server": "elb", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "vary": "origin, access-control-request-method, access-control-request-headers", - "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", - "x-amz-cf-id": "_cxropRVmhG7Ba05C1BIFZZMpZ6s_a1hnV13pzRlD5T7A2v1aqzl1Q==", - "x-amz-cf-pop": "SFO53-P10", - "x-cache": "Miss from cloudfront", - "x-content-type-options": "nosniff", - "x-ds-trace-id": "564f13eece9f38e3d7624c67df41962c" - }, - "status": 200 - } - } - ], - "meta": { - "createdAt": "2026-09-25T06:11:55.186Z" - } -} diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4.cassette.json index afb570ddd..b4537d598 100644 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4.cassette.json +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v4.cassette.json @@ -2391,6 +2391,107 @@ "status": 200, "statusText": "OK" } + }, + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:11:56.615Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Must\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" with\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"28e7d75f-6b20-49e8-bf78-400fdedf7c5e\",\"object\":\"chat.completion.chunk\",\"created\":1790316715,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":44,\"total_tokens\":95,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":40},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:11:55 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "_cxropRVmhG7Ba05C1BIFZZMpZ6s_a1hnV13pzRlD5T7A2v1aqzl1Q==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "564f13eece9f38e3d7624c67df41962c" + }, + "status": 200 + } } ], "meta": { diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest-reasoning.cassette.json deleted file mode 100644 index e560d5f90..000000000 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest-reasoning.cassette.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "entries": [ - { - "callIndex": 0, - "id": "631c45d386f59296", - "matchKey": "POST api.deepseek.com/v1/chat/completions", - "recordedAt": "2026-09-25T06:12:03.958Z", - "request": { - "body": { - "kind": "json", - "value": { - "max_tokens": 2048, - "messages": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "model": "deepseek-flash", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - }, - "headers": {}, - "method": "POST", - "url": "https://api.deepseek.com/v1/chat/completions" - }, - "response": { - "body": { - "chunks": [ - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":43,\"total_tokens\":94,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":39},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", - "data: [DONE]" - ], - "kind": "sse" - }, - "headers": { - "access-control-allow-credentials": "true", - "cache-control": "no-cache", - "content-type": "text/event-stream; charset=utf-8", - "date": "Fri, 25 Sep 2026 06:12:03 GMT", - "server": "elb", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "vary": "origin, access-control-request-method, access-control-request-headers", - "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", - "x-amz-cf-id": "GaCf5DKqaIy_0i-RVTaKX8LIcv8120u6GJtRpJx-6pjP8i7XoDO3nw==", - "x-amz-cf-pop": "SFO53-P10", - "x-cache": "Miss from cloudfront", - "x-content-type-options": "nosniff", - "x-ds-trace-id": "131154829fc0165548a944ee869baa87" - }, - "status": 200 - } - } - ], - "meta": { - "createdAt": "2026-09-25T06:12:02.734Z" - } -} diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest.cassette.json index b1fbaac03..89f8b0072 100644 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest.cassette.json +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-latest.cassette.json @@ -2477,6 +2477,106 @@ "status": 200, "statusText": "OK" } + }, + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:12:03.958Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"ed180268-cfcc-4645-9a70-0fc49d8e2a8c\",\"object\":\"chat.completion.chunk\",\"created\":1790316723,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":43,\"total_tokens\":94,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":39},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:12:03 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "GaCf5DKqaIy_0i-RVTaKX8LIcv8120u6GJtRpJx-6pjP8i7XoDO3nw==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "131154829fc0165548a944ee869baa87" + }, + "status": 200 + } } ], "meta": { diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-reasoning.cassette.json deleted file mode 100644 index 1acd856c8..000000000 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5-reasoning.cassette.json +++ /dev/null @@ -1,112 +0,0 @@ -{ - "entries": [ - { - "callIndex": 0, - "id": "631c45d386f59296", - "matchKey": "POST api.deepseek.com/v1/chat/completions", - "recordedAt": "2026-09-25T06:12:01.499Z", - "request": { - "body": { - "kind": "json", - "value": { - "max_tokens": 2048, - "messages": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "model": "deepseek-flash", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - }, - "headers": {}, - "method": "POST", - "url": "https://api.deepseek.com/v1/chat/completions" - }, - "response": { - "body": { - "chunks": [ - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":48,\"total_tokens\":99,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":44},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", - "data: [DONE]" - ], - "kind": "sse" - }, - "headers": { - "access-control-allow-credentials": "true", - "cache-control": "no-cache", - "content-type": "text/event-stream; charset=utf-8", - "date": "Fri, 25 Sep 2026 06:12:00 GMT", - "server": "elb", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "vary": "origin, access-control-request-method, access-control-request-headers", - "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", - "x-amz-cf-id": "rblnNFRyPwAveR1ngFgkEj9yQidwqaRrYkesFQant1sn9dRA_aePfQ==", - "x-amz-cf-pop": "SFO53-P10", - "x-cache": "Miss from cloudfront", - "x-content-type-options": "nosniff", - "x-ds-trace-id": "0e72f6edc3467947f6a7cf9d01018f7c" - }, - "status": 200 - } - } - ], - "meta": { - "createdAt": "2026-09-25T06:12:00.340Z" - } -} diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5.cassette.json index cf9b7ec96..ced700a8d 100644 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5.cassette.json +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v5.cassette.json @@ -2492,6 +2492,111 @@ "status": 200, "statusText": "OK" } + }, + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:12:01.499Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"a51841f3-ea00-42a9-ac89-d640dc10f623\",\"object\":\"chat.completion.chunk\",\"created\":1790316720,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":48,\"total_tokens\":99,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":44},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:12:00 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "rblnNFRyPwAveR1ngFgkEj9yQidwqaRrYkesFQant1sn9dRA_aePfQ==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "0e72f6edc3467947f6a7cf9d01018f7c" + }, + "status": 200 + } } ], "meta": { diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest-reasoning.cassette.json deleted file mode 100644 index efac0ef2a..000000000 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest-reasoning.cassette.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "entries": [ - { - "callIndex": 0, - "id": "631c45d386f59296", - "matchKey": "POST api.deepseek.com/v1/chat/completions", - "recordedAt": "2026-09-25T06:12:09.757Z", - "request": { - "body": { - "kind": "json", - "value": { - "max_tokens": 2048, - "messages": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "model": "deepseek-flash", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - }, - "headers": {}, - "method": "POST", - "url": "https://api.deepseek.com/v1/chat/completions" - }, - "response": { - "body": { - "chunks": [ - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" As\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" decimals\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\":\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" So\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Must\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":53,\"total_tokens\":104,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":49},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", - "data: [DONE]" - ], - "kind": "sse" - }, - "headers": { - "access-control-allow-credentials": "true", - "cache-control": "no-cache", - "content-type": "text/event-stream; charset=utf-8", - "date": "Fri, 25 Sep 2026 06:12:09 GMT", - "server": "elb", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "vary": "origin, access-control-request-method, access-control-request-headers", - "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", - "x-amz-cf-id": "aOPAgAFm2B4IFyadrPUDK9N1SCEHgtjtpxZbRZKErj_cCq8wuI5fFw==", - "x-amz-cf-pop": "SFO53-P10", - "x-cache": "Miss from cloudfront", - "x-content-type-options": "nosniff", - "x-ds-trace-id": "7c534367f4ebddf435f1a91380e87b7b" - }, - "status": 200 - } - } - ], - "meta": { - "createdAt": "2026-09-25T06:12:08.703Z" - } -} diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest.cassette.json index 16b0139f1..76c5e0ac3 100644 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest.cassette.json +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-latest.cassette.json @@ -2840,6 +2840,116 @@ "status": 200, "statusText": "OK" } + }, + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:12:09.757Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" As\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" decimals\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\":\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" So\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Must\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"994c977e-e442-4a5f-bde6-13ef09f6c375\",\"object\":\"chat.completion.chunk\",\"created\":1790316729,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":53,\"total_tokens\":104,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":49},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:12:09 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "aOPAgAFm2B4IFyadrPUDK9N1SCEHgtjtpxZbRZKErj_cCq8wuI5fFw==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "7c534367f4ebddf435f1a91380e87b7b" + }, + "status": 200 + } } ], "meta": { diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-reasoning.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-reasoning.cassette.json deleted file mode 100644 index 6eea7aa37..000000000 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6-reasoning.cassette.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "entries": [ - { - "callIndex": 0, - "id": "631c45d386f59296", - "matchKey": "POST api.deepseek.com/v1/chat/completions", - "recordedAt": "2026-09-25T06:12:07.000Z", - "request": { - "body": { - "kind": "json", - "value": { - "max_tokens": 2048, - "messages": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "model": "deepseek-flash", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - }, - "headers": {}, - "method": "POST", - "url": "https://api.deepseek.com/v1/chat/completions" - }, - "response": { - "body": { - "chunks": [ - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", - "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":43,\"total_tokens\":94,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":39},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", - "data: [DONE]" - ], - "kind": "sse" - }, - "headers": { - "access-control-allow-credentials": "true", - "cache-control": "no-cache", - "content-type": "text/event-stream; charset=utf-8", - "date": "Fri, 25 Sep 2026 06:12:06 GMT", - "server": "elb", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "vary": "origin, access-control-request-method, access-control-request-headers", - "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", - "x-amz-cf-id": "piauLlLe7ZVysvk_9ldwbFRCBxgg54LgtR0lD-lgWi29D4b3kbVq7Q==", - "x-amz-cf-pop": "SFO53-P10", - "x-cache": "Miss from cloudfront", - "x-content-type-options": "nosniff", - "x-ds-trace-id": "3a583873b02ba7c9e16384c1371f41f1" - }, - "status": 200 - } - } - ], - "meta": { - "createdAt": "2026-09-25T06:12:05.564Z" - } -} diff --git a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6.cassette.json b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6.cassette.json index f858ba2ba..8431aceea 100644 --- a/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6.cassette.json +++ b/e2e/scenarios/openai-instrumentation/__cassettes__/openai-v6.cassette.json @@ -2807,6 +2807,106 @@ "status": 200, "statusText": "OK" } + }, + { + "callIndex": 0, + "id": "631c45d386f59296", + "matchKey": "POST api.deepseek.com/v1/chat/completions", + "recordedAt": "2026-09-25T06:12:07.000Z", + "request": { + "body": { + "kind": "json", + "value": { + "max_tokens": 2048, + "messages": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "model": "deepseek-flash", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.deepseek.com/v1/chat/completions" + }, + "response": { + "body": { + "chunks": [ + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"reasoning_content\":\"\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"We\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Compare\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" vs\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"8\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" =\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"80\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" >\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" \"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"9\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\"11\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" Need\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" answer\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" only\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" greater\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\" number\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":null,\"reasoning_content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":null}],\"usage\":null}", + "data: {\"id\":\"1dd773d2-e371-4512-b864-65836766a74a\",\"object\":\"chat.completion.chunk\",\"created\":1790316725,\"model\":\"deepseek-flash\",\"system_fingerprint\":\"aeb56401ca74e127821c4f9126dcb669\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"\",\"reasoning_content\":null},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"usage\":{\"prompt_tokens\":51,\"completion_tokens\":43,\"total_tokens\":94,\"prompt_tokens_details\":{\"cached_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":39},\"prompt_cache_hit_tokens\":0,\"prompt_cache_miss_tokens\":51}}", + "data: [DONE]" + ], + "kind": "sse" + }, + "headers": { + "access-control-allow-credentials": "true", + "cache-control": "no-cache", + "content-type": "text/event-stream; charset=utf-8", + "date": "Fri, 25 Sep 2026 06:12:06 GMT", + "server": "elb", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "vary": "origin, access-control-request-method, access-control-request-headers", + "via": "1.1 230a4cabf962361d7a66119623a370ee.cloudfront.net (CloudFront)", + "x-amz-cf-id": "piauLlLe7ZVysvk_9ldwbFRCBxgg54LgtR0lD-lgWi29D4b3kbVq7Q==", + "x-amz-cf-pop": "SFO53-P10", + "x-cache": "Miss from cloudfront", + "x-content-type-options": "nosniff", + "x-ds-trace-id": "3a583873b02ba7c9e16384c1371f41f1" + }, + "status": 200 + } } ], "meta": { diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-auto-hook.span-tree.json index c331ce776..16261ec8b 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-auto-hook.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-auto-hook.span-tree.json @@ -267,6 +267,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 40, + "completion_tokens": 44, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 95 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", + "reasoningChunks": 40, + "usage": { + "completion_tokens": 44, + "completion_tokens_details": { + "reasoning_tokens": 40 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 95 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-auto-hook.span-tree.txt index 4e8bcd55b..13aa50424 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-auto-hook.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-auto-hook.span-tree.txt @@ -241,6 +241,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", +│ │ "reasoningChunks": 40, +│ │ "usage": { +│ │ "completion_tokens": 44, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 40 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 95 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 40, +│ │ "completion_tokens": 44, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 95 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-auto-hook.span-tree.json index 136d67580..9d9a8160a 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-auto-hook.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-auto-hook.span-tree.json @@ -267,6 +267,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 42, + "completion_tokens": 46, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 97 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", + "reasoningChunks": 42, + "usage": { + "completion_tokens": 46, + "completion_tokens_details": { + "reasoning_tokens": 42 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 97 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-auto-hook.span-tree.txt index f4a82aadd..0f771e6c4 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-auto-hook.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-auto-hook.span-tree.txt @@ -241,6 +241,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", +│ │ "reasoningChunks": 42, +│ │ "usage": { +│ │ "completion_tokens": 46, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 42 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 97 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 42, +│ │ "completion_tokens": 46, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 97 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.json deleted file mode 100644 index 2023c06ca..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 42, - "completion_tokens": 46, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 97 - } - } - ], - "metadata": { - "openaiSdkVersion": "4.104.0", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.txt deleted file mode 100644 index 83cdab9fb..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-auto-hook.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "4.104.0", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 42, - "completion_tokens": 46, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 97 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.json deleted file mode 100644 index 2023c06ca..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 42, - "completion_tokens": 46, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 97 - } - } - ], - "metadata": { - "openaiSdkVersion": "4.104.0", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.txt deleted file mode 100644 index 83cdab9fb..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-reasoning-wrapped.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "4.104.0", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 42, - "completion_tokens": 46, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 97 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-wrapped.span-tree.json index 65cc406d3..bff9fa7db 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-wrapped.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-wrapped.span-tree.json @@ -267,6 +267,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 42, + "completion_tokens": 46, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 97 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", + "reasoningChunks": 42, + "usage": { + "completion_tokens": 46, + "completion_tokens_details": { + "reasoning_tokens": 42 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 97 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-wrapped.span-tree.txt index 3cb8c33e6..bc646c33f 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-wrapped.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-latest-wrapped.span-tree.txt @@ -241,6 +241,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", +│ │ "reasoningChunks": 42, +│ │ "usage": { +│ │ "completion_tokens": 46, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 42 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 97 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. 9.8 = 9.80, greater than 9.11. Must answer greater number only.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 42, +│ │ "completion_tokens": 46, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 97 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.json deleted file mode 100644 index 6e795a0a6..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 40, - "completion_tokens": 44, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 95 - } - } - ], - "metadata": { - "openaiSdkVersion": "4.104.0", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.txt deleted file mode 100644 index dbd32e487..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-auto-hook.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "4.104.0", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 40, - "completion_tokens": 44, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 95 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.json deleted file mode 100644 index 6e795a0a6..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 40, - "completion_tokens": 44, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 95 - } - } - ], - "metadata": { - "openaiSdkVersion": "4.104.0", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.txt deleted file mode 100644 index dbd32e487..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-reasoning-wrapped.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "4.104.0", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 40, - "completion_tokens": 44, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 95 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-wrapped.span-tree.json index a6f62cd0c..361af4d20 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-wrapped.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-wrapped.span-tree.json @@ -267,6 +267,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 40, + "completion_tokens": 44, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 95 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", + "reasoningChunks": 40, + "usage": { + "completion_tokens": 44, + "completion_tokens_details": { + "reasoning_tokens": 40 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 95 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-wrapped.span-tree.txt index d8a544545..c2adc9695 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-wrapped.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v4-wrapped.span-tree.txt @@ -241,6 +241,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", +│ │ "reasoningChunks": 40, +│ │ "usage": { +│ │ "completion_tokens": 44, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 40 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 95 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Must answer with greater number only.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 40, +│ │ "completion_tokens": 44, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 95 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-auto-hook.span-tree.json index 1982b0dfc..41e4171d7 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-auto-hook.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-auto-hook.span-tree.json @@ -267,6 +267,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 44, + "completion_tokens": 48, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 99 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", + "reasoningChunks": 44, + "usage": { + "completion_tokens": 48, + "completion_tokens_details": { + "reasoning_tokens": 44 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 99 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-auto-hook.span-tree.txt index 113f537a3..c3b8c4bec 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-auto-hook.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-auto-hook.span-tree.txt @@ -241,6 +241,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", +│ │ "reasoningChunks": 44, +│ │ "usage": { +│ │ "completion_tokens": 48, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 44 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 99 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 44, +│ │ "completion_tokens": 48, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 99 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-auto-hook.span-tree.json index 4469bead6..20fc827d2 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-auto-hook.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-auto-hook.span-tree.json @@ -267,6 +267,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", + "reasoningChunks": 39, + "usage": { + "completion_tokens": 43, + "completion_tokens_details": { + "reasoning_tokens": 39 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 94 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-auto-hook.span-tree.txt index 8d4e83126..3f2e33a34 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-auto-hook.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-auto-hook.span-tree.txt @@ -241,6 +241,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", +│ │ "reasoningChunks": 39, +│ │ "usage": { +│ │ "completion_tokens": 43, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 39 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 94 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 39, +│ │ "completion_tokens": 43, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 94 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.json deleted file mode 100644 index 452e673e0..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 39, - "completion_tokens": 43, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 94 - } - } - ], - "metadata": { - "openaiSdkVersion": "5.23.2", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.txt deleted file mode 100644 index 0d17e435a..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-auto-hook.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "5.23.2", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 39, - "completion_tokens": 43, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 94 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.json deleted file mode 100644 index 452e673e0..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 39, - "completion_tokens": 43, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 94 - } - } - ], - "metadata": { - "openaiSdkVersion": "5.23.2", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.txt deleted file mode 100644 index 0d17e435a..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-reasoning-wrapped.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "5.23.2", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 39, - "completion_tokens": 43, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 94 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-wrapped.span-tree.json index 101e694f8..51b36311b 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-wrapped.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-wrapped.span-tree.json @@ -267,6 +267,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", + "reasoningChunks": 39, + "usage": { + "completion_tokens": 43, + "completion_tokens_details": { + "reasoning_tokens": 39 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 94 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-wrapped.span-tree.txt index 711b3ee8e..1d5c8fb49 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-wrapped.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-latest-wrapped.span-tree.txt @@ -241,6 +241,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", +│ │ "reasoningChunks": 39, +│ │ "usage": { +│ │ "completion_tokens": 43, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 39 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 94 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 39, +│ │ "completion_tokens": 43, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 94 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.json deleted file mode 100644 index 97de8d804..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 44, - "completion_tokens": 48, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 99 - } - } - ], - "metadata": { - "openaiSdkVersion": "5.11.0", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.txt deleted file mode 100644 index 39aa2109b..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-auto-hook.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "5.11.0", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 44, - "completion_tokens": 48, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 99 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.json deleted file mode 100644 index 97de8d804..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 44, - "completion_tokens": 48, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 99 - } - } - ], - "metadata": { - "openaiSdkVersion": "5.11.0", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.txt deleted file mode 100644 index 39aa2109b..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-reasoning-wrapped.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "5.11.0", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 44, - "completion_tokens": 48, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 99 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-wrapped.span-tree.json index bae06f5b9..57a0a6eee 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-wrapped.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-wrapped.span-tree.json @@ -267,6 +267,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 44, + "completion_tokens": 48, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 99 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", + "reasoningChunks": 44, + "usage": { + "completion_tokens": 48, + "completion_tokens_details": { + "reasoning_tokens": 44 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 99 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-wrapped.span-tree.txt index 5a7174357..a5a4b2163 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-wrapped.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v5-wrapped.span-tree.txt @@ -241,6 +241,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", +│ │ "reasoningChunks": 44, +│ │ "usage": { +│ │ "completion_tokens": 48, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 44 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 99 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Answer 9.8. Need only greater number.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 44, +│ │ "completion_tokens": 48, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 99 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-auto-hook.span-tree.json index b3aacaeef..3b478a0bf 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-auto-hook.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-auto-hook.span-tree.json @@ -412,6 +412,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", + "reasoningChunks": 39, + "usage": { + "completion_tokens": 43, + "completion_tokens_details": { + "reasoning_tokens": 39 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 94 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-auto-hook.span-tree.txt index f20e969cf..08ad6ad52 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-auto-hook.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-auto-hook.span-tree.txt @@ -370,6 +370,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", +│ │ "reasoningChunks": 39, +│ │ "usage": { +│ │ "completion_tokens": 43, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 39 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 94 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 39, +│ │ "completion_tokens": 43, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 94 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-auto-hook.span-tree.json index 8db316174..8df337673 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-auto-hook.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-auto-hook.span-tree.json @@ -412,6 +412,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 49, + "completion_tokens": 53, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 104 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", + "reasoningChunks": 49, + "usage": { + "completion_tokens": 53, + "completion_tokens_details": { + "reasoning_tokens": 49 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 104 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-auto-hook.span-tree.txt index 6da16735d..69428eb2f 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-auto-hook.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-auto-hook.span-tree.txt @@ -370,6 +370,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", +│ │ "reasoningChunks": 49, +│ │ "usage": { +│ │ "completion_tokens": 53, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 49 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 104 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 49, +│ │ "completion_tokens": 53, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 104 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.json deleted file mode 100644 index 161205fde..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 49, - "completion_tokens": 53, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 104 - } - } - ], - "metadata": { - "openaiSdkVersion": "6.49.0", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.txt deleted file mode 100644 index df56800ad..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-auto-hook.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "6.49.0", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 49, - "completion_tokens": 53, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 104 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.json deleted file mode 100644 index 161205fde..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 49, - "completion_tokens": 53, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 104 - } - } - ], - "metadata": { - "openaiSdkVersion": "6.49.0", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.txt deleted file mode 100644 index df56800ad..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-reasoning-wrapped.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "6.49.0", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 49, - "completion_tokens": 53, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 104 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-wrapped.span-tree.json index 956f4755b..f0cbfe07f 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-wrapped.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-wrapped.span-tree.json @@ -412,6 +412,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 49, + "completion_tokens": 53, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 104 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", + "reasoningChunks": 49, + "usage": { + "completion_tokens": 53, + "completion_tokens_details": { + "reasoning_tokens": 49 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 104 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-wrapped.span-tree.txt index 6f8a0cedc..166b06d0c 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-wrapped.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-latest-wrapped.span-tree.txt @@ -370,6 +370,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", +│ │ "reasoningChunks": 49, +│ │ "usage": { +│ │ "completion_tokens": 53, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 49 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 104 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Need compare 9.11 vs 9.8. As decimals: 9.8 = 9.80 > 9.11. So answer 9.8. Must only greater number.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 49, +│ │ "completion_tokens": 53, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 104 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.json deleted file mode 100644 index 23aefa9b9..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 39, - "completion_tokens": 43, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 94 - } - } - ], - "metadata": { - "openaiSdkVersion": "6.25.0", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.txt deleted file mode 100644 index 42abb0ab6..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-auto-hook.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "6.25.0", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 39, - "completion_tokens": 43, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 94 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.json deleted file mode 100644 index 23aefa9b9..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "span_tree": [ - { - "name": "openai-reasoning-root", - "type": "task", - "children": [ - { - "name": "Chat Completion", - "type": "llm", - "children": [], - "input": [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ], - "output": [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", - "role": "assistant" - } - } - ], - "metadata": { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - }, - "metrics": { - "completion_reasoning_tokens": 39, - "completion_tokens": 43, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 94 - } - } - ], - "metadata": { - "openaiSdkVersion": "6.25.0", - "scenario": "openai-instrumentation", - "testRunId": "" - }, - "context": { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - } - ] -} diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.txt deleted file mode 100644 index 42abb0ab6..000000000 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-reasoning-wrapped.span-tree.txt +++ /dev/null @@ -1,54 +0,0 @@ -span_tree: -└── openai-reasoning-root [task] - metadata: { - "openaiSdkVersion": "6.25.0", - "scenario": "openai-instrumentation", - "testRunId": "" - } - context: { - "caller_filename": "/e2e/helpers/provider-runtime.mjs", - "caller_functionname": "runTracedScenario", - "caller_lineno": 0 - } - └── Chat Completion [llm] - input: [ - { - "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - "role": "user" - } - ] - output: [ - { - "finish_reason": "stop", - "index": 0, - "logprobs": null, - "message": { - "content": "9.8", - "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", - "role": "assistant" - } - } - ] - metadata: { - "max_tokens": 2048, - "model": "deepseek-flash", - "provider": "openai", - "reasoning_effort": "low", - "stream": true, - "stream_options": { - "include_usage": true - }, - "thinking": { - "type": "enabled" - } - } - metrics: { - "completion_reasoning_tokens": 39, - "completion_tokens": 43, - "prompt_cache_hit_tokens": 0, - "prompt_cache_miss_tokens": 51, - "prompt_cached_tokens": 0, - "prompt_tokens": 51, - "time_to_first_token": 0, - "tokens": 94 - } diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-wrapped.span-tree.json b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-wrapped.span-tree.json index 1abf0933b..0fa917bbf 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-wrapped.span-tree.json +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-wrapped.span-tree.json @@ -412,6 +412,84 @@ "caller_lineno": 0 } }, + { + "name": "openai-stream-reasoning-operation", + "children": [ + { + "name": "Chat Completion", + "type": "llm", + "children": [], + "input": [ + { + "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + "role": "user" + } + ], + "output": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "9.8", + "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", + "role": "assistant" + } + } + ], + "metadata": { + "max_tokens": 2048, + "model": "deepseek-flash", + "provider": "openai", + "reasoning_effort": "low", + "stream": true, + "stream_options": { + "include_usage": true + }, + "thinking": { + "type": "enabled" + } + }, + "metrics": { + "completion_reasoning_tokens": 39, + "completion_tokens": 43, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_cached_tokens": 0, + "prompt_tokens": 51, + "time_to_first_token": 0, + "tokens": 94 + } + } + ], + "output": { + "content": "9.8", + "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", + "reasoningChunks": 39, + "usage": { + "completion_tokens": 43, + "completion_tokens_details": { + "reasoning_tokens": 39 + }, + "prompt_cache_hit_tokens": 0, + "prompt_cache_miss_tokens": 51, + "prompt_tokens": 51, + "prompt_tokens_details": { + "cached_tokens": 0 + }, + "total_tokens": 94 + } + }, + "metadata": { + "operation": "stream-reasoning", + "testRunId": "" + }, + "context": { + "caller_filename": "/e2e/helpers/provider-runtime.mjs", + "caller_functionname": "runOperation", + "caller_lineno": 0 + } + }, { "name": "openai-stream-audio-operation", "children": [ diff --git a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-wrapped.span-tree.txt b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-wrapped.span-tree.txt index 42f1186ed..1fb7107b2 100644 --- a/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-wrapped.span-tree.txt +++ b/e2e/scenarios/openai-instrumentation/__snapshots__/openai-v6-wrapped.span-tree.txt @@ -370,6 +370,76 @@ span_tree: │ │ "time_to_first_token": 0, │ │ "tokens": 13 │ │ } +│ ├── openai-stream-reasoning-operation +│ │ output: { +│ │ "content": "9.8", +│ │ "reasoning": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", +│ │ "reasoningChunks": 39, +│ │ "usage": { +│ │ "completion_tokens": 43, +│ │ "completion_tokens_details": { +│ │ "reasoning_tokens": 39 +│ │ }, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_tokens": 51, +│ │ "prompt_tokens_details": { +│ │ "cached_tokens": 0 +│ │ }, +│ │ "total_tokens": 94 +│ │ } +│ │ } +│ │ metadata: { +│ │ "operation": "stream-reasoning", +│ │ "testRunId": "" +│ │ } +│ │ context: { +│ │ "caller_filename": "/e2e/helpers/provider-runtime.mjs", +│ │ "caller_functionname": "runOperation", +│ │ "caller_lineno": 0 +│ │ } +│ │ └── Chat Completion [llm] +│ │ input: [ +│ │ { +│ │ "content": "Which is greater, 9.11 or 9.8? Answer with the greater number only.", +│ │ "role": "user" +│ │ } +│ │ ] +│ │ output: [ +│ │ { +│ │ "finish_reason": "stop", +│ │ "index": 0, +│ │ "logprobs": null, +│ │ "message": { +│ │ "content": "9.8", +│ │ "reasoning_content": "We need answer only greater number. Compare 9.11 vs 9.8. 9.8 = 9.80 > 9.11. Need answer only greater number.", +│ │ "role": "assistant" +│ │ } +│ │ } +│ │ ] +│ │ metadata: { +│ │ "max_tokens": 2048, +│ │ "model": "deepseek-flash", +│ │ "provider": "openai", +│ │ "reasoning_effort": "low", +│ │ "stream": true, +│ │ "stream_options": { +│ │ "include_usage": true +│ │ }, +│ │ "thinking": { +│ │ "type": "enabled" +│ │ } +│ │ } +│ │ metrics: { +│ │ "completion_reasoning_tokens": 39, +│ │ "completion_tokens": 43, +│ │ "prompt_cache_hit_tokens": 0, +│ │ "prompt_cache_miss_tokens": 51, +│ │ "prompt_cached_tokens": 0, +│ │ "prompt_tokens": 51, +│ │ "time_to_first_token": 0, +│ │ "tokens": 94 +│ │ } │ ├── openai-stream-audio-operation │ │ metadata: { │ │ "operation": "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/assertions.ts b/e2e/scenarios/openai-instrumentation/assertions.ts index 1f062fbb9..e160792f3 100644 --- a/e2e/scenarios/openai-instrumentation/assertions.ts +++ b/e2e/scenarios/openai-instrumentation/assertions.ts @@ -58,7 +58,10 @@ type OperationSpec = { operation: string; requiresResponsesCompact?: boolean; testName: string; - validate?: (span: CapturedLogEvent | undefined) => void; + validate?: ( + span: CapturedLogEvent | undefined, + operation: CapturedLogEvent | undefined, + ) => void; validateNested?: (spans: CapturedLogEvent[]) => void; }; @@ -291,6 +294,46 @@ const OPERATION_SPECS: readonly OperationSpec[] = [ testName: "captures trace for client.chat.completions.create({ stream: true })", }, + { + childNames: ["Chat Completion"], + expectsOutput: true, + expectsTimeToFirstToken: true, + name: "openai-stream-reasoning-operation", + operation: "stream-reasoning", + testName: + "preserves DeepSeek streamed reasoning separately from the answer", + validate: (span, operation) => { + const received = operation?.output as { + reasoning: string; + content: string; + reasoningChunks: number; + usage: { + prompt_tokens: number; + completion_tokens: number; + total_tokens: number; + }; + }; + expect(received.reasoningChunks).toBeGreaterThan(1); + expect(received.content.trim()).toBe("9.8"); + expect(span?.output).toMatchObject([ + { + index: 0, + finish_reason: "stop", + message: { role: "assistant", content: received.content }, + }, + ]); + expect(span?.output).toMatchObject([ + { + message: { reasoning_content: received.reasoning }, + }, + ]); + expect(span?.metrics).toMatchObject({ + prompt_tokens: received.usage.prompt_tokens, + completion_tokens: received.usage.completion_tokens, + tokens: received.usage.total_tokens, + }); + }, + }, { childNames: ["Chat Completion"], expectsOutput: true, @@ -1166,7 +1209,7 @@ export function defineOpenAIInstrumentationAssertions(options: { spec.validateNested?.(nested); } - spec.validate?.(span); + spec.validate?.(span, operation); }); } diff --git a/e2e/scenarios/openai-instrumentation/scenario.impl.mjs b/e2e/scenarios/openai-instrumentation/scenario.impl.mjs index 3d4865f21..d90b7119c 100644 --- a/e2e/scenarios/openai-instrumentation/scenario.impl.mjs +++ b/e2e/scenarios/openai-instrumentation/scenario.impl.mjs @@ -9,6 +9,7 @@ import { } from "../../helpers/provider-runtime.mjs"; import { completeOpenAIBatchTrace, + currentSpan, openaiBatchesRetrieveTraced, openaiFilesCreateTraced, } from "braintrust"; @@ -693,6 +694,57 @@ export async function runOpenAIInstrumentationScenario(options) { await collectAsync(chatStream); }); + await runOperation( + "openai-stream-reasoning-operation", + "stream-reasoning", + async () => { + const baseReasoningClient = new options.OpenAI({ + apiKey: process.env.DEEPSEEK_API_KEY, + baseURL: process.env.DEEPSEEK_BASE_URL, + maxRetries: 0, + }); + const reasoningClient = options.decorateClient + ? options.decorateClient(baseReasoningClient) + : baseReasoningClient; + // Genuine DeepSeek recordings from PR #2522 (commit 43100efd0f2ee4fffe44b4e9a711aa6f66c71b0f). + // Reproduce #2511 with the plain OpenAI client pointed at a custom baseURL. + const stream = await reasoningClient.chat.completions.create({ + model: "deepseek-flash", + messages: [ + { + role: "user", + content: + "Which is greater, 9.11 or 9.8? Answer with the greater number only.", + }, + ], + thinking: { type: "enabled" }, + reasoning_effort: "low", + max_tokens: 2048, + stream: true, + stream_options: { include_usage: true }, + }); + const reasoning = []; + const content = []; + let usage; + for await (const chunk of stream) { + const delta = chunk.choices[0]?.delta; + if (delta?.reasoning_content) + reasoning.push(delta.reasoning_content); + if (delta?.content) content.push(delta.content); + if (chunk.usage) usage = chunk.usage; + } + // Keep the application's result independent of the instrumentation's aggregation. + currentSpan().log({ + output: { + reasoning: reasoning.join(""), + content: content.join(""), + reasoningChunks: reasoning.length, + usage, + }, + }); + }, + ); + await runOperation( "openai-stream-audio-operation", "stream-audio", diff --git a/e2e/scenarios/openai-instrumentation/scenario.reasoning.mjs b/e2e/scenarios/openai-instrumentation/scenario.reasoning.mjs deleted file mode 100644 index e97cf568c..000000000 --- a/e2e/scenarios/openai-instrumentation/scenario.reasoning.mjs +++ /dev/null @@ -1,63 +0,0 @@ -import { wrapOpenAI } from "braintrust"; -import { - getInstalledPackageVersion, - runMain, - runTracedScenario, -} from "../../helpers/provider-runtime.mjs"; - -const packageName = process.env.OPENAI_PACKAGE_NAME; -const { default: OpenAI } = await import(packageName); - -runMain(async () => { - const client = new OpenAI({ - apiKey: process.env.DEEPSEEK_API_KEY, - baseURL: process.env.DEEPSEEK_BASE_URL, - maxRetries: 0, - }); - const instrumented = - process.env.INSTRUMENTATION_MODE === "wrapped" - ? wrapOpenAI(client) - : client; - - await runTracedScenario({ - rootName: "openai-reasoning-root", - projectNameBase: "tmp-luca-openai-reasoning", - metadata: { - scenario: "openai-instrumentation", - openaiSdkVersion: await getInstalledPackageVersion( - import.meta.url, - packageName, - ), - }, - callback: async () => { - // Genuine DeepSeek recordings from PR #2522 (commit 43100efd0f2ee4fffe44b4e9a711aa6f66c71b0f). - // This is the plain OpenAI client with a custom baseURL reported in #2511. - const stream = await instrumented.chat.completions.create({ - model: "deepseek-flash", - messages: [ - { - role: "user", - content: - "Which is greater, 9.11 or 9.8? Answer with the greater number only.", - }, - ], - thinking: { type: "enabled" }, - reasoning_effort: "low", - max_tokens: 2048, - stream: true, - stream_options: { include_usage: true }, - }); - const reasoning = []; - const content = []; - let usage; - for await (const chunk of stream) { - const delta = chunk.choices[0]?.delta; - if (delta?.reasoning_content) reasoning.push(delta.reasoning_content); - if (delta?.content) content.push(delta.content); - if (chunk.usage) usage = chunk.usage; - } - // Expectations come from what the application received, independently of tracing. - console.log(JSON.stringify({ reasoning, content, usage })); - }, - }); -}); diff --git a/e2e/scenarios/openai-instrumentation/scenario.test.ts b/e2e/scenarios/openai-instrumentation/scenario.test.ts index 0aa76c2be..f4e0cfa39 100644 --- a/e2e/scenarios/openai-instrumentation/scenario.test.ts +++ b/e2e/scenarios/openai-instrumentation/scenario.test.ts @@ -1,17 +1,10 @@ -import { describe, expect, it } from "vitest"; +import { describe, it } from "vitest"; import { prepareScenarioDir, readInstalledPackageVersion, resolveScenarioDir, runNodeScenarioDir, - withScenarioHarness, } from "../../helpers/scenario-harness"; -import { resolveFileSnapshotPath } from "../../helpers/file-snapshot"; -import { matchSpanTreeSnapshot, spanTreeFields } from "../../helpers/span-tree"; -import { - findAllSpans, - spanInstrumentationName, -} from "../../helpers/trace-selectors"; import { defineOpenAIInstrumentationAssertions } from "./assertions"; const originalScenarioDir = resolveScenarioDir(import.meta.url); @@ -93,82 +86,6 @@ describe.concurrent("variants", () => { !scenario.disablePrivateFieldMethodsAssertion; describe.sequential(`openai sdk ${scenario.version}`, () => { - for (const mode of ["wrapped", "auto-hook"]) { - it( - `preserves DeepSeek streamed reasoning with ${mode} instrumentation`, - async () => { - await withScenarioHarness(async (harness) => { - const variantKey = `${scenario.snapshotName}-reasoning`; - const result = await harness.runNodeScenarioDir({ - entry: "scenario.reasoning.mjs", - env: { - OPENAI_PACKAGE_NAME: scenario.dependencyName, - INSTRUMENTATION_MODE: mode, - }, - nodeArgs: - mode === "auto-hook" - ? ["--import", "braintrust/hook.mjs"] - : [], - runContext: { variantKey, originalScenarioDir }, - scenarioDir, - timeoutMs: TIMEOUT_MS, - }); - const received: { - reasoning: string[]; - content: string[]; - usage: { - prompt_tokens: number; - completion_tokens: number; - total_tokens: number; - }; - } = JSON.parse(result.stdout); - expect(received.reasoning.length).toBeGreaterThan(1); - expect(received.content.join("").trim()).toBe("9.8"); - - const events = harness.events(); - const roots = findAllSpans(events, "openai-reasoning-root"); - const spans = findAllSpans(events, "Chat Completion"); - expect(roots).toHaveLength(1); - expect(spans).toHaveLength(1); - const span = spans[0]; - expect(span.span.parentIds).toEqual([roots[0].span.id]); - expect(spanInstrumentationName(span)).toBe("openai"); - expect(span.output).toMatchObject([ - { - index: 0, - finish_reason: "stop", - message: { - role: "assistant", - content: received.content.join(""), - }, - }, - ]); - expect(span.output).toMatchObject([ - { - message: { reasoning_content: received.reasoning.join("") }, - }, - ]); - expect(span.metrics).toMatchObject({ - prompt_tokens: received.usage.prompt_tokens, - completion_tokens: received.usage.completion_tokens, - tokens: received.usage.total_tokens, - }); - await matchSpanTreeSnapshot( - [...roots, ...spans].map((event) => ({ - event, - fields: { ...spanTreeFields(event), context: event.context }, - })), - resolveFileSnapshotPath( - import.meta.url, - `${variantKey}-${mode}.span-tree.json`, - ), - ); - }); - }, - TIMEOUT_MS, - ); - } - defineOpenAIInstrumentationAssertions({ assertPrivateFieldMethodsOperation, name: "wrapped instrumentation", From b486f9015828b43249857d7ffd76d1171ac2baeb Mon Sep 17 00:00:00 2001 From: lforst <8118419+lforst@users.noreply.github.com> Date: Mon, 28 Sep 2026 10:50:45 +0000 Subject: [PATCH 4/4] Update PR #2524 --- .changeset/kind-parrots-burn.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/kind-parrots-burn.md diff --git a/.changeset/kind-parrots-burn.md b/.changeset/kind-parrots-burn.md new file mode 100644 index 000000000..3343131d3 --- /dev/null +++ b/.changeset/kind-parrots-burn.md @@ -0,0 +1,5 @@ +--- +"braintrust": patch +--- + +fix: Fix `reasoning_content` for openai compatible responses