From 84fc21e0c4eec8ee1489d967ab9a22abf2f1f033 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 1 Jul 2026 13:23:53 +0200 Subject: [PATCH 1/9] feat(ai-sdk): Add Workflow Agent instrumentation --- e2e/helpers/provider-runtime.mjs | 42 +- e2e/helpers/scenario-runtime.ts | 37 +- ...14b9154707117acf2e6a8637b8c57a8db961b0.bin | 1 - ...64c1ad41fd7d47fe63606d39e6da1e58f3a0bc.bin | 1 + .../__cassettes__/ai-sdk-v7.cassette.json | 1949 +++++++++++------ .../ai-sdk-v3-auto-hook.span-tree.json | 46 +- .../ai-sdk-v3-auto-hook.span-tree.txt | 46 +- .../ai-sdk-v3-wrapped.span-tree.json | 46 +- .../ai-sdk-v3-wrapped.span-tree.txt | 46 +- .../ai-sdk-v4-auto-hook.span-tree.json | 36 +- .../ai-sdk-v4-auto-hook.span-tree.txt | 36 +- .../ai-sdk-v4-wrapped.span-tree.json | 36 +- .../ai-sdk-v4-wrapped.span-tree.txt | 36 +- .../ai-sdk-v5-auto-hook.span-tree.json | 666 ++---- .../ai-sdk-v5-auto-hook.span-tree.txt | 898 +++----- .../ai-sdk-v5-wrapped.span-tree.json | 382 +--- .../ai-sdk-v5-wrapped.span-tree.txt | 382 +--- .../ai-sdk-v6-auto-hook.span-tree.json | 765 ++----- .../ai-sdk-v6-auto-hook.span-tree.txt | 1073 +++------ .../ai-sdk-v6-wrapped.span-tree.json | 422 +--- .../ai-sdk-v6-wrapped.span-tree.txt | 422 +--- .../ai-sdk-v7-auto-hook.span-tree.json | 1053 ++++++++- .../ai-sdk-v7-auto-hook.span-tree.txt | 1192 +++++++++- .../ai-sdk-v7-explicit.span-tree.json | 1248 ++++++++++- .../ai-sdk-v7-explicit.span-tree.txt | 1413 ++++++++++-- .../ai-sdk-instrumentation/assertions.ts | 88 +- .../ai-sdk-instrumentation/package.json | 4 + .../ai-sdk-instrumentation/pnpm-lock.yaml | 99 + .../scenario.ai-sdk-v7-explicit.mjs | 38 + .../scenario.ai-sdk-v7.mjs | 8 + .../ai-sdk-instrumentation/scenario.impl.mjs | 59 +- .../ai-sdk-instrumentation/scenario.test.ts | 2 + .../auto-instrumentations/configs/ai-sdk.ts | 12 + .../instrumentation/core/channel-tracing.ts | 51 + .../plugins/ai-sdk-channels.ts | 9 + .../plugins/ai-sdk-plugin.streaming.test.ts | 357 ++- .../plugins/ai-sdk-plugin.test.ts | 90 + .../instrumentation/plugins/ai-sdk-plugin.ts | 807 ++++++- .../plugins/ai-sdk-v7-telemetry.test.ts | 386 +++- js/src/vendor-sdk-types/ai-sdk-common.ts | 14 +- .../vendor-sdk-types/ai-sdk-v7-telemetry.ts | 25 +- js/src/vendor-sdk-types/ai-sdk.ts | 4 + js/src/wrappers/ai-sdk/ai-sdk.ts | 77 +- js/src/wrappers/ai-sdk/telemetry.ts | 510 ++++- .../wrappers/ai-sdk/workflow-agent-context.ts | 33 + 45 files changed, 9441 insertions(+), 5506 deletions(-) delete mode 100644 e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.blobs/831ef4f50b23e36798adeddf0314b9154707117acf2e6a8637b8c57a8db961b0.bin create mode 100644 e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.blobs/9a14a7a518e93b520c904dd30764c1ad41fd7d47fe63606d39e6da1e58f3a0bc.bin create mode 100644 e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7-explicit.mjs create mode 100644 js/src/wrappers/ai-sdk/workflow-agent-context.ts diff --git a/e2e/helpers/provider-runtime.mjs b/e2e/helpers/provider-runtime.mjs index 1f63898d1..e14119a20 100644 --- a/e2e/helpers/provider-runtime.mjs +++ b/e2e/helpers/provider-runtime.mjs @@ -75,11 +75,43 @@ export async function runTracedScenario(options) { } export async function getInstalledPackageVersion(importMetaUrl, packageName) { - let currentDir = path.dirname( - require.resolve(packageName, { - paths: [path.dirname(fileURLToPath(importMetaUrl))], - }), - ); + let currentDir; + + try { + currentDir = path.dirname( + require.resolve(packageName, { + paths: [path.dirname(fileURLToPath(importMetaUrl))], + }), + ); + } catch { + currentDir = path.dirname(fileURLToPath(importMetaUrl)); + + while (true) { + const manifestPath = path.join( + currentDir, + "node_modules", + ...packageName.split("/"), + "package.json", + ); + + try { + const manifest = JSON.parse(await fs.readFile(manifestPath, "utf8")); + if (manifest && typeof manifest.version === "string") { + return manifest.version; + } + } catch { + // Keep walking upward until we find the package root. + } + + const parentDir = path.dirname(currentDir); + if (parentDir === currentDir) { + break; + } + currentDir = parentDir; + } + + throw new Error(`Could not resolve installed version for ${packageName}`); + } while (true) { const manifestPath = path.join(currentDir, "package.json"); diff --git a/e2e/helpers/scenario-runtime.ts b/e2e/helpers/scenario-runtime.ts index 82e799669..eeadea2f1 100644 --- a/e2e/helpers/scenario-runtime.ts +++ b/e2e/helpers/scenario-runtime.ts @@ -2,6 +2,7 @@ import { spawn } from "node:child_process"; import { promises as fs } from "node:fs"; import { createRequire } from "node:module"; import * as path from "node:path"; +import { fileURLToPath } from "node:url"; import { BasicTracerProvider } from "@opentelemetry/sdk-trace-base"; export interface SubprocessResult { @@ -121,7 +122,41 @@ export async function getInstalledPackageVersion( packageName: string, ): Promise { const require = createRequire(importMetaUrl); - let currentDir = path.dirname(require.resolve(packageName)); + let currentDir: string; + + try { + currentDir = path.dirname(require.resolve(packageName)); + } catch { + currentDir = path.dirname(fileURLToPath(importMetaUrl)); + + while (true) { + const manifestPath = path.join( + currentDir, + "node_modules", + ...packageName.split("/"), + "package.json", + ); + + try { + const manifestRaw = await fs.readFile(manifestPath, "utf8"); + const manifest = JSON.parse(manifestRaw) as { version?: string }; + + if (typeof manifest.version === "string") { + return manifest.version; + } + } catch { + // Keep walking upward until we find the package root. + } + + const parentDir = path.dirname(currentDir); + if (parentDir === currentDir) { + break; + } + currentDir = parentDir; + } + + throw new Error(`Could not resolve installed version for ${packageName}`); + } while (true) { const manifestPath = path.join(currentDir, "package.json"); diff --git a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.blobs/831ef4f50b23e36798adeddf0314b9154707117acf2e6a8637b8c57a8db961b0.bin b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.blobs/831ef4f50b23e36798adeddf0314b9154707117acf2e6a8637b8c57a8db961b0.bin deleted file mode 100644 index f6c2605ca..000000000 --- a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.blobs/831ef4f50b23e36798adeddf0314b9154707117acf2e6a8637b8c57a8db961b0.bin +++ /dev/null @@ -1 +0,0 @@ -{"object":"list","data":[{"object":"embedding","embedding":[-0.029693603515625,0.006252288818359375,-0.03509521484375,0.00760650634765625,-0.002857208251953125,-0.015716552734375,-0.0035533905029296875,0.0014905929565429688,-0.001220703125,0.007617950439453125,0.0274810791015625,-0.020660400390625,0.005039215087890625,0.016448974609375,-0.005931854248046875,0.04437255859375,0.0294647216796875,0.049285888671875,0.06573486328125,0.0092010498046875,-0.0160369873046875,-0.0011644363403320312,-0.00426483154296875,0.00943756103515625,0.032257080078125,-0.01113128662109375,0.0194549560546875,0.0390625,-0.002246856689453125,0.055999755859375,0.038482666015625,-0.01031494140625,-0.005443572998046875,-0.00653839111328125,0.020355224609375,-0.052734375,-0.0214080810546875,-0.03033447265625,0.01270294189453125,0.04833984375,-0.0067596435546875,-0.04791259765625,-0.0226287841796875,0.060546875,-0.01763916015625,-0.0248260498046875,-0.0186309814453125,-0.01374053955078125,0.0143890380859375,-0.00994110107421875,0.0458984375,-0.00934600830078125,-0.00284576416015625,0.0162200927734375,-0.0178070068359375,0.022735595703125,0.04669189453125,0.0190277099609375,0.01433563232421875,0.018402099609375,0.033172607421875,-0.013519287109375,0.0382080078125,-0.0172576904296875,-0.004840850830078125,0.036041259765625,-0.034332275390625,0.0274200439453125,0.0180816650390625,0.023193359375,0.008941650390625,0.07293701171875,-0.00952911376953125,0.0172882080078125,0.044097900390625,0.0311737060546875,0.02508544921875,0.05303955078125,0.0002739429473876953,-0.0177459716796875,0.00775146484375,0.035797119140625,0.00970458984375,-0.00867462158203125,-0.01093292236328125,-0.02435302734375,0.002471923828125,0.01416778564453125,-0.0041351318359375,-0.0293426513671875,-0.004817962646484375,-0.00484466552734375,-0.03558349609375,0.042144775390625,-0.0162506103515625,-0.017669677734375,0.01189422607421875,-0.0347900390625,-0.03802490234375,0.01824951171875,0.05499267578125,-0.020904541015625,-0.0087890625,0.041473388671875,0.01337432861328125,0.00963592529296875,0.02972412109375,-0.0006489753723144531,0.0144805908203125,-0.041778564453125,-0.051483154296875,0.0189971923828125,0.01248931884765625,0.016510009765625,-0.039306640625,0.0159759521484375,0.02313232421875,-0.01395416259765625,0.02362060546875,-0.0051116943359375,0.00428009033203125,0.0137786865234375,-0.051483154296875,0.0226287841796875,0.0196533203125,-0.016510009765625,0.00733184814453125,-0.0027942657470703125,0.005496978759765625,-0.04425048828125,0.00412750244140625,-0.0296630859375,0.021026611328125,0.043426513671875,0.037017822265625,-0.027252197265625,0.027069091796875,-0.01202392578125,0.0011720657348632812,0.01387786865234375,-0.010009765625,0.0201263427734375,0.0112457275390625,0.05078125,-0.01611328125,-0.0538330078125,-0.035980224609375,0.029815673828125,0.0479736328125,-0.04315185546875,0.01546478271484375,-0.038665771484375,0.02508544921875,0.0067138671875,0.0283355712890625,-0.062225341796875,0.004871368408203125,0.031341552734375,0.0310516357421875,0.0228118896484375,-0.045257568359375,0.042327880859375,-0.01229095458984375,-0.01806640625,-0.003322601318359375,0.01143646240234375,0.0025177001953125,-0.013397216796875,-0.002910614013671875,0.0264892578125,-0.0269775390625,0.0020904541015625,0.0540771484375,0.05462646484375,0.0157012939453125,-0.019805908203125,0.025634765625,0.047607421875,-0.0276947021484375,0.0106048583984375,-0.0244140625,0.0160369873046875,0.03216552734375,-0.005123138427734375,-0.00482940673828125,0.023162841796875,0.0021572113037109375,-0.0310516357421875,-0.0006508827209472656,0.051422119140625,0.06304931640625,-0.0350341796875,0.039398193359375,0.0007729530334472656,-0.06353759765625,-0.00445556640625,0.0120391845703125,-0.03558349609375,0.00997161865234375,-0.0082855224609375,-0.055755615234375,0.053863525390625,-0.021087646484375,0.01529693603515625,-0.00685882568359375,-0.013031005859375,-0.0257568359375,-0.053955078125,0.0595703125,0.00995635986328125,-0.0035991668701171875,-0.00554656982421875,-0.005092620849609375,-0.008697509765625,0.016326904296875,-0.00875091552734375,-0.020843505859375,0.036407470703125,0.0665283203125,-0.0186920166015625,0.0217132568359375,0.01473236083984375,0.032257080078125,0.0025196075439453125,-0.0372314453125,0.043365478515625,0.053741455078125,-0.014495849609375,-0.033843994140625,-0.0021514892578125,0.0008454322814941406,0.000759124755859375,-0.04510498046875,-0.01324462890625,-0.0218353271484375,-0.0264892578125,0.007175445556640625,-0.0186920166015625,-0.06329345703125,0.01430511474609375,-0.0178985595703125,0.0283050537109375,0.0084686279296875,-0.01349639892578125,0.005268096923828125,-0.0137176513671875,0.0196380615234375,0.03411865234375,-0.032562255859375,0.0189208984375,0.0325927734375,-0.0010929107666015625,-0.0022258758544921875,-0.0187530517578125,-0.00879669189453125,0.0276641845703125,0.0017147064208984375,-0.0003955364227294922,-0.049041748046875,-0.0006108283996582031,-0.01500701904296875,0.00524139404296875,0.00431060791015625,-0.00516510009765625,0.0095977783203125,0.00943756103515625,-0.00948333740234375,0.0108489990234375,-0.0250091552734375,-0.055145263671875,0.06256103515625,-0.007354736328125,0.000530242919921875,0.0321044921875,-0.0182952880859375,0.00975799560546875,-0.013671875,0.0005946159362792969,-0.0080718994140625,-0.01395416259765625,-0.0242462158203125,0.01947021484375,-0.0340576171875,-0.0036830902099609375,-0.017578125,-0.0211029052734375,0.039031982421875,0.054351806640625,0.004619598388671875,0.0367431640625,-0.006916046142578125,0.00891876220703125,-0.00592803955078125,0.019744873046875,-0.03875732421875,-0.006404876708984375,0.0278778076171875,0.007274627685546875,0.00289154052734375,0.01007080078125,0.0191802978515625,-0.04583740234375,-0.0018024444580078125,0.00919342041015625,-0.048614501953125,0.0784912109375,-0.00893402099609375,0.0280303955078125,0.03485107421875,0.0017671585083007812,-0.046875,-0.0160064697265625,0.04437255859375,-0.11090087890625,-0.0017719268798828125,0.0016231536865234375,-0.00923919677734375,0.040283203125,0.00966644287109375,0.00212860107421875,-0.0004906654357910156,-0.011383056640625,-0.0209503173828125,0.0019969940185546875,-0.013519287109375,0.0089569091796875,0.0301361083984375,0.03253173828125,-0.0049896240234375,0.0010986328125,0.00025844573974609375,-0.0194549560546875,0.007305145263671875,0.044342041015625,-0.01424407958984375,-0.0249481201171875,0.01165771484375,0.0249786376953125,0.037811279296875,-0.0050506591796875,-0.008819580078125,-0.01113128662109375,-0.0104522705078125,0.0156707763671875,-0.011810302734375,0.0013675689697265625,0.02374267578125,0.032135009765625,-0.01096343994140625,-0.036041259765625,-0.03466796875,-0.03729248046875,-0.0243682861328125,0.0292205810546875,-0.0302581787109375,0.002567291259765625,0.07830810546875,0.046844482421875,-0.041168212890625,0.00487518310546875,-0.029144287109375,-0.04193115234375,-0.033203125,-0.039031982421875,-0.06695556640625,0.0243072509765625,-0.0086822509765625,0.01177215576171875,-0.0221710205078125,0.045623779296875,-0.017974853515625,-0.0101165771484375,0.0523681640625,-0.05157470703125,0.00490570068359375,-0.0380859375,-0.03460693359375,0.0114593505859375,-0.0052642822265625,-0.057708740234375,-0.053863525390625,0.039703369140625,0.0263671875,-0.055816650390625,0.01544952392578125,0.032012939453125,0.003353118896484375,-0.06689453125,-0.0166168212890625,-0.0134124755859375,-0.0120697021484375,0.017791748046875,0.0113677978515625,0.0274810791015625,-0.0161285400390625,-0.021453857421875,0.0243682861328125,0.00009119510650634766,-0.052886962890625,-0.01444244384765625,-0.027374267578125,-0.0139923095703125,-0.0167236328125,-0.022918701171875,0.019317626953125,0.0340576171875,-0.016937255859375,-0.00797271728515625,-0.00978851318359375,-0.04583740234375,0.00009036064147949219,-0.080078125,0.034454345703125,-0.00510406494140625,0.007190704345703125,0.010528564453125,0.058929443359375,-0.046600341796875,0.011810302734375,0.00418853759765625,0.023712158203125,-0.00968170166015625,0.019256591796875,-0.0217132568359375,-0.0181884765625,0.006565093994140625,-0.0206298828125,-0.0345458984375,0.0195770263671875,-0.014678955078125,0.0228271484375,-0.05865478515625,0.0019989013671875,-0.036651611328125,-0.00382232666015625,0.0005340576171875,0.0016489028930664062,-0.01276397705078125,-0.022735595703125,-0.0012254714965820312,0.051910400390625,-0.024139404296875,0.003009796142578125,-0.011444091796875,-0.04400634765625,-0.026519775390625,0.04541015625,0.041473388671875,0.00965118408203125,0.01297760009765625,-0.0284576416015625,0.01171875,-0.0008630752563476562,-0.0239105224609375,0.002323150634765625,0.043121337890625,0.00373077392578125,0.0648193359375,0.0159149169921875,-0.047821044921875,0.02655029296875,0.07342529296875,-0.0037059783935546875,0.04779052734375,0.0294036865234375,0.0010004043579101562,0.0294036865234375,0.03125,-0.0283966064453125,-0.014495849609375,-0.0279388427734375,0.005413055419921875,0.021881103515625,0.04620361328125,0.01143646240234375,0.0186309814453125,-0.0533447265625,0.04168701171875,-0.03326416015625,-0.037200927734375,-0.023651123046875,0.02337646484375,-0.01325225830078125,-0.013092041015625,-0.0784912109375,-0.01152801513671875,0.0182952880859375,0.005504608154296875,-0.036407470703125,0.007091522216796875,-0.0030059814453125,-0.01953125,0.00966644287109375,-0.004993438720703125,0.0205230712890625,-0.00522613525390625,-0.04156494140625,-0.04498291015625,0.01451873779296875,0.0031909942626953125,-0.008697509765625,0.01085662841796875,0.0232391357421875,0.042266845703125,0.0282745361328125,0.070556640625,-0.003322601318359375,0.007259368896484375,-0.002223968505859375,-0.01983642578125,0.0287933349609375,0.0018215179443359375,-0.00756072998046875,-0.004375457763671875,-0.01457977294921875,-0.0015707015991210938,-0.01076507568359375,0.04107666015625,-0.0244293212890625,0.013641357421875,0.01038360595703125,0.043792724609375,-0.007076263427734375,0.0005197525024414062,0.0233154296875,0.006282806396484375,-0.033599853515625,-0.0100555419921875,0.0182037353515625,-0.0311279296875,0.0347900390625,-0.01318359375,-0.0082550048828125,0.00899505615234375,0.007293701171875,-0.0240936279296875,-0.005283355712890625,0.034210205078125,0.00798797607421875,0.0299072265625,0.0267333984375,0.011688232421875,-0.029754638671875,0.003299713134765625,-0.020965576171875,0.0014324188232421875,0.038543701171875,-0.0197601318359375,-0.0178680419921875,-0.026702880859375,-0.0011472702026367188,0.0136260986328125,-0.04693603515625,-0.0115966796875,0.01268768310546875,-0.0287933349609375,0.00980377197265625,-0.000942230224609375,-0.00209808349609375,0.00921630859375,-0.00817108154296875,0.07098388671875,0.0019855499267578125,0.006877899169921875,0.036224365234375,0.0418701171875,0.0191497802734375,-0.0103912353515625,-0.02496337890625,-0.0196533203125,0.009368896484375,0.037017822265625,-0.0185089111328125,0.0099029541015625,0.038604736328125,-0.0120391845703125,-0.0031795501708984375,-0.0017566680908203125,-0.01244354248046875,0.04595947265625,-0.0019779205322265625,0.0175018310546875,0.028289794921875,-0.00925445556640625,-0.0213165283203125,-0.00818634033203125,-0.0027599334716796875,-0.001918792724609375,-0.01007080078125,-0.0255126953125,0.030364990234375,0.001514434814453125,-0.0030727386474609375,-0.0011396408081054688,0.03668212890625,0.017181396484375,-0.043914794921875,-0.04083251953125,-0.036041259765625,0.0023784637451171875,-0.019744873046875,-0.0014486312866210938,-0.00992584228515625,-0.01213836669921875,0.0254058837890625,0.00476837158203125,0.053253173828125,-0.01454925537109375,0.00110626220703125,-0.017120361328125,0.0077362060546875,-0.0311126708984375,0.01331329345703125,-0.0035762786865234375,0.004894256591796875,0.00015103816986083984,-0.0110931396484375,0.023590087890625,-0.00012946128845214844,0.0221710205078125,0.00262451171875,0.031707763671875,-0.037384033203125,0.0060882568359375,-0.01454925537109375,0.0531005859375,0.018890380859375,0.00891876220703125,0.01534271240234375,-0.0279693603515625,0.035369873046875,-0.00714874267578125,0.044097900390625,0.00286865234375,0.0017747879028320312,-0.0233612060546875,-0.0465087890625,-0.01438140869140625,0.00331878662109375,-0.025909423828125,0.01485443115234375,0.02691650390625,0.06268310546875,-0.019073486328125,0.01108551025390625,0.00832366943359375,0.0255889892578125,0.051361083984375,0.037872314453125,-0.03045654296875,0.0132293701171875,0.0017871856689453125,-0.0162811279296875,0.01015472412109375,0.006267547607421875,0.0528564453125,-0.011962890625,0.01557159423828125,-0.042022705078125,0.01412200927734375,-0.01214599609375,-0.0003833770751953125,0.0243377685546875,-0.0321044921875,-0.005100250244140625,0.0157012939453125,0.01959228515625,0.04827880859375,0.0272979736328125,0.01120758056640625,-0.02294921875,-0.024078369140625,-0.00682830810546875,0.01287841796875,0.037445068359375,-0.03387451171875,0.0242919921875,-0.0185699462890625,-0.032012939453125,0.0247344970703125,-0.044097900390625,0.027008056640625,-0.042205810546875,0.00775146484375,-0.01312255859375,0.0207672119140625,-0.04705810546875,-0.00002086162567138672,0.00946807861328125,-0.022796630859375,-0.001911163330078125,-0.017822265625,-0.022918701171875,0.02947998046875,0.0144805908203125,-0.048858642578125,0.02301025390625,0.0194244384765625,0.0165863037109375,0.061981201171875,-0.01277923583984375,-0.0180206298828125,-0.0389404296875,-0.025390625,-0.00925445556640625,0.017822265625,-0.017486572265625,-0.0123291015625,-0.0086517333984375,0.0148468017578125,-0.0228271484375,-0.042999267578125,-0.04510498046875,-0.0075225830078125,0.007099151611328125,-0.0009489059448242188,-0.0082244873046875,0.00585174560546875,0.027618408203125,-0.006977081298828125,-0.00044655799865722656,-0.01319122314453125,-0.01983642578125,0.0007576942443847656,-0.0027294158935546875,-0.02001953125,-0.010162353515625,0.00470733642578125,0.013427734375,-0.0140838623046875,-0.03204345703125,-0.036102294921875,-0.0203094482421875,0.037139892578125,0.0091552734375,0.022613525390625,-0.00959014892578125,0.0222930908203125,-0.05511474609375,0.01125335693359375,0.0017213821411132812,-0.009918212890625,-0.01071929931640625,-0.0038814544677734375,0.0085296630859375,0.054962158203125,-0.0198516845703125,-0.0285491943359375,-0.03131103515625,-0.010528564453125,-0.00775146484375,0.002780914306640625,0.00933074951171875,-0.00494384765625,0.02655029296875,-0.0091094970703125,0.037994384765625,0.021575927734375,-0.0247802734375,-0.03839111328125,0.02630615234375,0.035675048828125,-0.016693115234375,-0.0201416015625,0.0300750732421875,-0.0182952880859375,-0.00444793701171875,0.002124786376953125,-0.00836181640625,-0.010009765625,-0.006195068359375,0.011871337890625,-0.043060302734375,0.0030670166015625,0.062255859375,0.026275634765625,-0.03021240234375,-0.006267547607421875,-0.01654052734375,-0.01441192626953125,0.0283660888671875,-0.01087188720703125,0.0156402587890625,0.01531982421875,-0.01348876953125,-0.0278167724609375,0.05560302734375,-0.044525146484375,-0.019622802734375,-0.002971649169921875,-0.0102081298828125,0.0030956268310546875,-0.0214080810546875,-0.0106964111328125,-0.0023326873779296875,-0.0257568359375,0.034820556640625,-0.004199981689453125,-0.006397247314453125,-0.0191802978515625,0.0171051025390625,0.003627777099609375,-0.0168914794921875,0.007293701171875,0.05279541015625,0.0255126953125,0.0025959014892578125,0.0182952880859375,-0.01070404052734375,-0.0017757415771484375,0.0000616908073425293,-0.0401611328125,-0.0014514923095703125,0.008209228515625,0.011566162109375,-0.01113128662109375,-0.0065460205078125,-0.047698974609375,0.037322998046875,0.022247314453125,0.0218963623046875,-0.006984710693359375,0.004993438720703125,-0.06488037109375,0.0343017578125,-0.03314208984375,0.02899169921875,0.0101776123046875,0.0004622936248779297,0.00783538818359375,-0.035736083984375,0.01192474365234375,0.011444091796875,0.00446319580078125,0.0164947509765625,0.0293426513671875,-0.010101318359375,-0.00659942626953125,-0.0218353271484375,0.006134033203125,-0.026092529296875,0.057525634765625,0.008331298828125,-0.054351806640625,0.006420135498046875,-0.01384735107421875,0.0032749176025390625,-0.00943756103515625,0.00666046142578125,0.00923919677734375,-0.03973388671875,0.0173187255859375,-0.020294189453125,0.0189971923828125,-0.0526123046875,0.037689208984375,-0.019134521484375,0.036712646484375,0.0257720947265625,-0.028289794921875,-0.0215301513671875,-0.0013914108276367188,0.0299530029296875,-0.048980712890625,-0.00582122802734375,-0.044769287109375,-0.02301025390625,-0.04052734375,-0.005565643310546875,0.055328369140625,-0.016143798828125,-0.00376129150390625,0.0190277099609375,0.00807952880859375,0.005237579345703125,0.0297088623046875,0.01401519775390625,0.017242431640625,0.01528167724609375,-0.050567626953125,-3.874301910400391e-6,-0.00545501708984375,0.026947021484375,0.0048980712890625,-0.0352783203125,-0.0018253326416015625,-0.0186920166015625,-0.0036602020263671875,0.01751708984375,0.0295867919921875,-0.009674072265625,-0.015380859375,0.0238037109375,0.019775390625,-0.0159149169921875,-0.00209808349609375,0.006374359130859375,0.004749298095703125,0.0152587890625,-0.06591796875,-0.043914794921875,0.0220489501953125,0.040130615234375,0.00868988037109375,0.0225067138671875,-0.008697509765625,-0.032073974609375,-0.0084075927734375,-0.0214080810546875,-0.001522064208984375,-0.004085540771484375,-0.04107666015625,-0.018890380859375,0.022857666015625,0.0699462890625,-0.03497314453125,0.0250091552734375,0.0292205810546875,-0.008758544921875,0.03369140625,-0.0214996337890625,0.034942626953125,-0.004695892333984375,-0.035858154296875,0.0088653564453125,-0.0101470947265625,-0.005767822265625,0.004047393798828125,0.0003993511199951172,-0.006076812744140625,0.013458251953125,0.0292205810546875,-0.01467132568359375,0.0034465789794921875,-0.01081085205078125,0.01300811767578125,-0.00955963134765625,0.001434326171875,0.01392364501953125,0.01541900634765625,0.035400390625,-0.0010480880737304688,0.0052642822265625,0.0246124267578125,-0.00414276123046875,-0.0174102783203125,0.0157318115234375,-0.01537322998046875,0.041259765625,0.02301025390625,0.024200439453125,-0.0196075439453125,-0.006893157958984375,-0.01448822021484375,0.0259552001953125,-0.01004791259765625,0.002593994140625,0.0282440185546875,-0.004119873046875,-0.007381439208984375,0.021270751953125,0.0098724365234375,0.018951416015625,-0.0098724365234375,-0.0199737548828125,-0.0013942718505859375,0.023101806640625,0.0037441253662109375,0.0250091552734375,0.0294189453125,-0.016815185546875,-0.0148468017578125,0.006320953369140625,0.05792236328125,-0.021697998046875,-0.038055419921875,0.026947021484375,-0.00004357099533081055,0.0264892578125,0.0128173828125,-0.0010890960693359375,0.01422882080078125,-0.01125335693359375,-0.01617431640625,-0.03173828125,-0.0277862548828125,-0.004199981689453125,0.03680419921875,-0.017669677734375,0.01030731201171875,-0.01233673095703125,-0.00849151611328125,0.029876708984375,-0.032806396484375,0.00913238525390625,-0.00605010986328125,0.006114959716796875,0.0222320556640625,0.033050537109375,-0.03460693359375,-0.0234375,-0.0027942657470703125,0.01120758056640625,-0.01033782958984375,-0.020233154296875,-0.0245208740234375,0.0301513671875,0.0260162353515625,-0.039886474609375,-0.013214111328125,0.0019626617431640625,-0.0294189453125,-0.017486572265625,-0.0009965896606445312,-0.0186767578125,0.0027828216552734375,0.036102294921875,0.00815582275390625,-0.009796142578125,-0.009979248046875,-0.0166015625,0.00576019287109375,-0.017669677734375,-0.027862548828125,0.0159759521484375,-0.0150604248046875,-0.0180816650390625,-0.019073486328125,0.0224456787109375,-0.009857177734375,-0.0100555419921875,0.003284454345703125,-0.04827880859375,0.045318603515625,-0.033782958984375,0.0164337158203125,0.00742340087890625,-0.02081298828125,0.00969696044921875,0.0006995201110839844,0.00843048095703125,0.0035457611083984375,-0.00695037841796875,-0.005512237548828125,0.00899505615234375,0.021026611328125,0.037628173828125,-0.0006351470947265625,0.053497314453125,-0.026580810546875,-0.045989990234375,0.002155303955078125,-0.04168701171875,-0.00646209716796875,-0.00945281982421875,-0.02001953125,-0.046600341796875,-0.018341064453125,-0.0034542083740234375,0.0109100341796875,0.03955078125,-0.01140594482421875,0.0157012939453125,-0.016571044921875,0.03289794921875,0.00975799560546875,-0.0246734619140625,-0.0183868408203125,-0.02294921875,0.03326416015625,-0.02099609375,0.014892578125,-0.01061248779296875,-0.00032973289489746094,0.007068634033203125,0.0217132568359375,-0.0255126953125,0.041534423828125,0.0280914306640625,0.04107666015625,0.02001953125,-0.00707244873046875,0.07147216796875,0.0264434814453125,-0.056488037109375,-0.0211639404296875,0.025787353515625,-0.0496826171875,-0.02508544921875,-0.03546142578125,0.01421356201171875,0.04412841796875,-0.0217742919921875,-0.0106048583984375,0.049835205078125,0.005687713623046875,-0.00865936279296875,0.01120758056640625,0.006267547607421875,0.0091400146484375,0.042327880859375,-0.0245361328125,-0.0028095245361328125,-0.0108184814453125,0.01107025146484375,0.0009617805480957031,-0.0189056396484375,0.006519317626953125,-0.038421630859375,0.0018253326416015625,-0.015289306640625,0.038909912109375,0.0306549072265625,-0.002887725830078125,-0.02459716796875,0.013275146484375,0.01399993896484375,-0.0029888153076171875,-0.01131439208984375,0.021453857421875,0.019866943359375,-0.019927978515625,0.01288604736328125,0.019500732421875,0.00716400146484375,0.0232391357421875,-0.0166778564453125,-0.020965576171875,-0.023590087890625,0.0217742919921875,0.031494140625,0.0254669189453125,-0.0089111328125,-0.017486572265625,-0.015960693359375,-0.007175445556640625,-0.01690673828125,-0.01319122314453125,-0.005855560302734375,0.05218505859375,0.043731689453125,-0.0145721435546875,-0.008575439453125,0.049713134765625,0.017242431640625,-0.033447265625,0.0213775634765625,0.043060302734375,-0.0217437744140625,0.0210113525390625,-0.00208282470703125,0.005641937255859375,0.0066986083984375,-0.026519775390625,0.01898193359375,0.01500701904296875,-0.044464111328125,0.0249786376953125,0.0226593017578125,0.0257720947265625,-0.00914764404296875,0.00954437255859375,0.049560546875,0.01800537109375,-0.0193023681640625,-0.00379180908203125,0.04083251953125,-0.0159912109375,-0.028472900390625,-0.0355224609375,0.02520751953125,0.03948974609375,0.01552581787109375,0.016937255859375,-0.005840301513671875,0.01023101806640625,-0.0285797119140625,-0.0302581787109375,0.029205322265625,0.036102294921875,0.0211334228515625,0.0272216796875,0.050262451171875,-0.005649566650390625,-0.0144805908203125,0.0008845329284667969,0.0250701904296875,-0.0008416175842285156,-0.011688232421875,0.0114898681640625,-0.0256500244140625,0.005138397216796875,0.00832366943359375,-0.039093017578125,-0.038848876953125,-0.0104522705078125,-0.02667236328125,0.0276031494140625,0.0250244140625,0.0006175041198730469,0.007038116455078125,-0.0219268798828125,0.022247314453125,0.0108184814453125,0.0062103271484375,0.05853271484375,0.0042724609375,0.0249481201171875,-0.0247344970703125,-0.006622314453125,-0.03411865234375,0.0112457275390625,-0.037078857421875,-0.018524169921875,0.0032291412353515625,-0.03143310546875,-0.00916290283203125,0.017852783203125,0.034027099609375,-0.01361846923828125,-0.00972747802734375,0.031585693359375,-0.0253448486328125,-0.0010271072387695312,-0.01215362548828125,-0.0281524658203125,-0.007396697998046875,-0.004039764404296875,0.035125732421875,0.01322174072265625,-0.0194854736328125,0.0142364501953125,-0.04754638671875,-0.019622802734375,-0.0193023681640625,0.0257568359375,0.00856781005859375,0.0276336669921875,-0.00754547119140625,-0.01280975341796875,-0.043914794921875,0.0018911361694335938,0.03936767578125,-0.0222625732421875,0.03350830078125,-0.0005059242248535156,0.03570556640625,-0.00714874267578125,-0.00952911376953125,-0.03997802734375,0.027496337890625,0.0147552490234375,-0.00455474853515625,0.006282806396484375,-0.0196075439453125,-0.01361846923828125,-0.021392822265625,0.0007505416870117188,-0.017974853515625,0.0064544677734375,-0.0028285980224609375,-0.0016756057739257812,-0.009918212890625,0.010009765625,0.046142578125,-0.01959228515625,-0.01221466064453125,0.0243377685546875,0.01666259765625,0.002071380615234375,-0.017242431640625,0.050506591796875,0.03045654296875,0.0288238525390625,-0.01258087158203125,0.007537841796875,0.005657196044921875,-0.01055145263671875,0.05718994140625,0.0073699951171875,0.0086517333984375,-0.0091400146484375,0.045623779296875,-0.00679779052734375,0.042266845703125,-0.01152801513671875,0.006084442138671875,-0.00603485107421875,0.0257110595703125,0.006839752197265625,-0.0239715576171875,-0.0007081031799316406,-0.01235198974609375,-0.00844573974609375,-0.02984619140625,-0.042572021484375,-0.00992584228515625,-0.0260772705078125,0.0233154296875,-0.0022182464599609375,0.025390625,0.025390625,-0.006938934326171875,0.0275115966796875,-0.0104827880859375,0.01390838623046875,-0.016876220703125,-0.020599365234375,0.04547119140625,-0.00899505615234375,-0.0156402587890625,-0.020294189453125,-0.01065826416015625,-0.0218353271484375,-0.01171875,-0.01436614990234375,-0.054779052734375,0.0189056396484375,-0.051483154296875,-0.046722412109375,0.01300048828125,0.0203857421875,-0.0005512237548828125,0.01059722900390625,0.019805908203125,0.0034618377685546875,0.00009673833847045898,0.019744873046875,-0.05584716796875,0.03558349609375,-0.0254058837890625,-0.04217529296875,-0.0294036865234375,-0.00960540771484375,-0.01404571533203125,0.0033588409423828125,-0.00876617431640625,-0.0003409385681152344,-0.016815185546875,0.019744873046875,0.00672149658203125,-0.045257568359375,0.022125244140625,-0.05731201171875,-0.0246429443359375,0.0352783203125,-0.034637451171875,-0.011383056640625,0.049713134765625,0.004161834716796875,0.01076507568359375,-0.01325225830078125,-0.03765869140625,0.0001271963119506836,-0.01235198974609375,-0.0184783935546875,-0.0095062255859375,0.016448974609375,0.0056915283203125,-0.036956787109375,0.0230560302734375,-0.028228759765625,-0.008148193359375,-0.0260772705078125,0.0123291015625,-0.034393310546875,-0.033599853515625,0.0210113525390625,-0.01261138916015625,-0.0113677978515625,-0.018096923828125,0.020172119140625,-0.0027294158935546875,-0.0033130645751953125,-0.0301971435546875,0.0157470703125,-0.032562255859375,0.053466796875,-0.0010614395141601562,0.0064544677734375,-0.043731689453125,0.0095062255859375,0.0012807846069335938,-0.00567626953125,0.00836181640625,-0.0024127960205078125,0.0023937225341796875,0.01412200927734375,0.050567626953125,-0.0023021697998046875,0.02734375,-0.03729248046875,-0.008758544921875,0.0017147064208984375,-0.0084228515625,0.0184783935546875,0.027557373046875,0.036773681640625,-0.03021240234375,-0.01244354248046875,0.00040340423583984375,-0.00030803680419921875,0.017578125,0.004215240478515625,0.006160736083984375,-0.0084686279296875,-0.027923583984375,0.0236053466796875,0.0095672607421875,-0.00843048095703125,0.0011854171752929688,-0.01306915283203125,-0.0256805419921875,-0.0226898193359375,0.0019893646240234375,-0.0257568359375,0.01043701171875,-0.004833221435546875,0.00861358642578125,0.03741455078125,0.01023101806640625,0.02008056640625,0.0498046875,0.03436279296875,0.003940582275390625,0.03369140625,-0.00649261474609375,0.0019855499267578125,0.00975799560546875,-0.01123809814453125,-0.01116180419921875,-0.027801513671875,0.003082275390625,0.006183624267578125,-0.0030803680419921875,-0.00018668174743652344,-0.0131988525390625,0.0095367431640625,-0.0174102783203125,-0.01776123046875,-0.05194091796875,0.0261383056640625,-0.0247039794921875,0.00560760498046875,-0.0200042724609375,-0.004375457763671875,-0.0006608963012695312,-0.0038776397705078125,-0.0026187896728515625,0.037506103515625,0.019805908203125,0.012481689453125,0.0277252197265625,-0.0310211181640625,-0.007778167724609375,-0.00533294677734375,0.00830078125,-0.005252838134765625,0.019805908203125,-0.014739990234375,0.00870513916015625,0.0014009475708007812,-0.0139617919921875,0.0243377685546875,-0.0016222000122070312,0.042144775390625,-0.00211334228515625,0.012298583984375,0.031341552734375,0.0250396728515625,-0.0260162353515625,-0.0260009765625,0.0006937980651855469,-0.01934814453125,0.01016998291015625,0.0159759521484375,-0.0167236328125,0.0163726806640625,0.0251922607421875,0.0005245208740234375,0.0158538818359375,-0.0015630722045898438,-0.023529052734375,-0.028656005859375,0.0273895263671875,0.017669677734375,0.00554656982421875,-0.003910064697265625,-0.0145111083984375,-0.0003292560577392578,0.007663726806640625,-0.0272216796875,0.0036525726318359375,-0.0101470947265625,-0.00982666015625,0.045654296875,0.0185699462890625,0.01513671875,0.0307159423828125,-0.022735595703125,0.00028443336486816406,-0.003429412841796875,-0.0244293212890625,-0.022064208984375,-0.006580352783203125,-0.00789642333984375,0.02294921875,0.020782470703125,0.0019483566284179688,-0.00928497314453125,-0.0092010498046875,-0.0171051025390625,-0.0182952880859375,0.0223846435546875,0.007068634033203125,0.016998291015625,0.03106689453125,0.0020160675048828125,-0.04119873046875,-0.00293731689453125,-0.0229949951171875,0.031829833984375,0.0133819580078125,0.0265045166015625,-0.037139892578125,-0.00786590576171875,0.01837158203125,-0.033721923828125,-0.034423828125,0.01537322998046875,-0.01531982421875,-0.0061187744140625,0.0005688667297363281,-0.0278167724609375,0.00412750244140625,-0.004215240478515625],"index":0},{"object":"embedding","embedding":[-0.0276031494140625,0.00597381591796875,-0.00803375244140625,0.0107421875,-0.0203094482421875,0.00571441650390625,-0.004535675048828125,0.034271240234375,-0.020416259765625,0.0070648193359375,-0.01284027099609375,-0.022735595703125,0.046966552734375,0.017547607421875,0.00891876220703125,0.0158538818359375,-0.0012454986572265625,0.0281219482421875,0.01419830322265625,0.03753662109375,0.01611328125,-0.006336212158203125,0.009033203125,0.0296630859375,0.038299560546875,-0.0033283233642578125,0.01250457763671875,-0.04534912109375,-0.01479339599609375,-0.034698486328125,0.0210418701171875,-0.021209716796875,0.04254150390625,0.003894805908203125,-0.01396942138671875,-0.016357421875,-0.00847625732421875,0.00850677490234375,0.004974365234375,0.01058197021484375,-0.0204620361328125,-0.045684814453125,-0.033203125,0.044097900390625,-0.06219482421875,0.00858306884765625,-0.03961181640625,-0.00615692138671875,-0.01317596435546875,-0.01239013671875,0.064208984375,-0.0032596588134765625,0.015838623046875,-0.041259765625,0.02593994140625,-0.0015211105346679688,-0.0215301513671875,0.0364990234375,0.02471923828125,0.036102294921875,0.056060791015625,-0.0002894401550292969,0.01459503173828125,-0.006664276123046875,-0.0408935546875,-0.01519012451171875,0.022308349609375,0.0236358642578125,0.01490020751953125,-0.056549072265625,0.047393798828125,0.0408935546875,0.014404296875,0.007427215576171875,0.012176513671875,0.0548095703125,0.0391845703125,0.04571533203125,0.0325927734375,-0.01346588134765625,0.005523681640625,0.022369384765625,0.01055908203125,-0.01812744140625,-0.0068359375,-0.0369873046875,0.033172607421875,0.014434814453125,0.007022857666015625,-0.0106201171875,-0.048828125,-0.03778076171875,-0.002582550048828125,0.0831298828125,0.0033130645751953125,-0.0294342041015625,-0.0186767578125,-0.0026187896728515625,-0.04736328125,0.0066375732421875,0.0616455078125,-0.025787353515625,0.044830322265625,0.01568603515625,0.0242462158203125,-0.024200439453125,0.032196044921875,0.00853729248046875,0.0103759765625,0.0253448486328125,-0.045166015625,0.04205322265625,0.053558349609375,-0.0186614990234375,-0.0565185546875,0.0183563232421875,0.0167999267578125,-0.004268646240234375,-0.028106689453125,0.0264434814453125,-0.00801849365234375,0.027435302734375,-0.0307464599609375,0.0098419189453125,0.00359344482421875,-0.0158843994140625,0.0207672119140625,0.002166748046875,-0.0220489501953125,-0.00519561767578125,0.02496337890625,0.01253509521484375,0.0031414031982421875,0.01505279541015625,0.0193939208984375,0.0055389404296875,-0.034820556640625,0.046173095703125,-0.00794219970703125,-0.01151275634765625,-0.01084136962890625,0.01491546630859375,0.0168609619140625,0.037506103515625,-0.0452880859375,0.034820556640625,-0.0304412841796875,0.0350341796875,0.043121337890625,-0.002010345458984375,0.0035190582275390625,-0.0028095245361328125,0.019317626953125,-0.0168914794921875,0.01343536376953125,-0.056549072265625,0.0017986297607421875,0.0811767578125,-0.003940582275390625,-0.00823211669921875,-0.032440185546875,0.02142333984375,0.0100250244140625,0.0125579833984375,-0.04705810546875,0.0035190582275390625,-0.01117706298828125,0.005069732666015625,-0.0033931732177734375,-0.047271728515625,-0.0169830322265625,0.0322265625,-0.00872039794921875,0.049346923828125,-0.050933837890625,0.0124969482421875,0.0302581787109375,0.01433563232421875,-0.00771331787109375,0.041259765625,0.0137939453125,0.026885986328125,-0.0135345458984375,0.0035533905029296875,-0.0178070068359375,0.019073486328125,0.0022182464599609375,-0.00925445556640625,-0.0201263427734375,0.07403564453125,-0.008026123046875,-0.0289306640625,0.032196044921875,-0.0293731689453125,-0.0237579345703125,-0.0050811767578125,0.0372314453125,-0.05950927734375,0.046417236328125,0.003631591796875,0.00437164306640625,0.004947662353515625,-0.0115203857421875,0.0260772705078125,-0.02734375,-0.001964569091796875,-0.0155792236328125,-0.022918701171875,0.024139404296875,0.0288848876953125,0.0026493072509765625,-0.0185699462890625,-0.049346923828125,-0.0295867919921875,-0.0014190673828125,0.005260467529296875,-0.03277587890625,0.019989013671875,0.0635986328125,0.0128173828125,0.00568389892578125,0.009490966796875,0.04803466796875,-0.05755615234375,0.012939453125,0.0275421142578125,0.045196533203125,-0.00989532470703125,-0.039825439453125,-0.0203704833984375,-0.0084381103515625,-0.017242431640625,-0.00969696044921875,-0.034576416015625,0.002094268798828125,-0.0002903938293457031,-0.0095062255859375,-0.0193328857421875,-0.038482666015625,-0.04608154296875,-0.041656494140625,-0.0027523040771484375,0.08740234375,-0.04534912109375,-0.0081634521484375,-0.0137176513671875,0.0037288665771484375,0.035369873046875,-0.026123046875,0.0289459228515625,-0.041046142578125,-0.0124969482421875,0.01531982421875,-0.01312255859375,0.004993438720703125,-0.0030841827392578125,-0.0216827392578125,0.0179901123046875,-0.01256561279296875,-0.0228424072265625,-0.032623291015625,-0.0276031494140625,-0.0092620849609375,-0.003574371337890625,-0.020599365234375,0.004932403564453125,0.0023651123046875,0.005558013916015625,-0.0579833984375,-0.07427978515625,0.019500732421875,0.01287078857421875,0.03228759765625,0.00010305643081665039,-0.0528564453125,-0.0162811279296875,0.02203369140625,-0.01386260986328125,0.009368896484375,-0.0013399124145507812,-0.007289886474609375,0.01465606689453125,-0.0185394287109375,-0.0306854248046875,0.0230255126953125,-0.0309600830078125,-0.0294952392578125,0.053253173828125,0.0099639892578125,0.03338623046875,0.0345458984375,0.0102081298828125,0.00933837890625,0.0263214111328125,0.035552978515625,0.007167816162109375,0.032318115234375,-0.009063720703125,-0.057647705078125,0.006927490234375,0.033294677734375,-0.059051513671875,0.0204010009765625,-0.01143646240234375,-0.037750244140625,0.07305908203125,-0.0447998046875,0.042205810546875,0.006656646728515625,0.0243988037109375,-0.052886962890625,-0.052642822265625,0.0237579345703125,-0.090087890625,0.00047206878662109375,-0.007904052734375,-0.00682830810546875,-0.00757598876953125,0.01348114013671875,-0.01218414306640625,-0.0159149169921875,-0.033233642578125,-0.0460205078125,0.0107421875,0.0004703998565673828,0.050048828125,0.033538818359375,0.034271240234375,0.037139892578125,0.01200103759765625,0.0206298828125,-0.0119476318359375,0.023529052734375,0.04534912109375,0.03216552734375,-0.0233001708984375,0.0289764404296875,0.04193115234375,0.0293121337890625,-0.0103607177734375,0.0228424072265625,0.00884246826171875,-0.0086822509765625,0.0014495849609375,0.00827789306640625,0.0345458984375,0.00958251953125,-0.004055023193359375,-0.0007348060607910156,-0.02435302734375,-0.03717041015625,-0.004734039306640625,-0.03466796875,0.0205841064453125,0.018890380859375,0.0091705322265625,0.04296875,0.04083251953125,-0.03790283203125,0.019195556640625,0.0205230712890625,-0.026397705078125,0.0092620849609375,0.005062103271484375,0.0029201507568359375,0.0018939971923828125,-0.035308837890625,0.00981903076171875,-0.01357269287109375,0.01153564453125,-0.021514892578125,-0.03814697265625,0.0235748291015625,0.003353118896484375,-0.005977630615234375,-0.015625,0.0157470703125,0.0299072265625,0.00589752197265625,-0.042877197265625,-0.052459716796875,0.03753662109375,-0.0068511962890625,-0.06939697265625,-0.03204345703125,0.00659942626953125,-0.000720977783203125,-0.042205810546875,-0.05816650390625,-0.0187835693359375,-0.0204315185546875,0.02191162109375,0.00772857666015625,0.0102081298828125,-0.0243988037109375,-0.033416748046875,-0.00809478759765625,0.02899169921875,-0.07745361328125,-0.007110595703125,-0.01751708984375,-0.046966552734375,-0.0169219970703125,-0.01519012451171875,-0.0072784423828125,0.0032634735107421875,-0.0076751708984375,0.029052734375,0.0090484619140625,-0.0455322265625,-0.01087188720703125,-0.020294189453125,0.010406494140625,0.01546478271484375,-0.01690673828125,0.0146331787109375,-0.0400390625,0.00225830078125,0.03106689453125,-0.019287109375,0.056854248046875,-0.010498046875,-0.03253173828125,-0.04217529296875,0.01922607421875,-0.02008056640625,0.0160675048828125,0.038238525390625,0.002979278564453125,-0.051025390625,0.014556884765625,-0.05303955078125,-0.01377105712890625,-0.004703521728515625,-0.023681640625,-0.0145263671875,0.02276611328125,0.0077667236328125,0.0145416259765625,-0.0057830810546875,-0.003337860107421875,-0.024200439453125,0.0242919921875,0.02471923828125,-0.03900146484375,0.03192138671875,-0.0171966552734375,0.03240966796875,0.0148773193359375,0.00237274169921875,-0.0178985595703125,-0.01192474365234375,0.00039839744567871094,-0.0318603515625,0.006153106689453125,0.0263824462890625,0.06695556640625,0.0784912109375,0.01401519775390625,-0.027587890625,-0.005825042724609375,0.043609619140625,-0.0007381439208984375,0.044097900390625,0.0015621185302734375,0.0040740966796875,-0.027618408203125,0.017333984375,-0.004596710205078125,-0.031036376953125,0.004589080810546875,0.052978515625,0.0032215118408203125,0.00415802001953125,-0.00023043155670166016,0.03289794921875,-0.0177459716796875,-0.0152740478515625,0.035552978515625,-0.060302734375,0.00489044189453125,0.06109619140625,0.0124969482421875,-0.0511474609375,-0.045257568359375,-0.037445068359375,0.00988006591796875,-0.0498046875,-0.0379638671875,-0.0509033203125,0.00611114501953125,0.0122222900390625,0.034576416015625,-0.006237030029296875,0.02734375,-0.0089263916015625,-0.0455322265625,-0.0258331298828125,-0.0015459060668945312,0.00824737548828125,-0.0248260498046875,-0.0024738311767578125,0.043975830078125,0.0440673828125,0.053924560546875,0.0224151611328125,-0.0574951171875,0.005802154541015625,-0.0028018951416015625,-0.05908203125,0.00731658935546875,-0.0215911865234375,-0.009613037109375,-0.01343536376953125,-0.025604248046875,0.0108489990234375,0.0216064453125,0.049835205078125,-0.04559326171875,0.0194244384765625,0.0219573974609375,0.01154327392578125,-0.0047454833984375,-0.00589752197265625,-0.005725860595703125,0.01023101806640625,-0.031829833984375,-0.0032711029052734375,0.00762939453125,-0.02392578125,0.026275634765625,-0.001926422119140625,-0.0022792816162109375,-0.048828125,-0.0203094482421875,-0.038482666015625,0.019378662109375,0.032257080078125,-0.0257415771484375,-0.006542205810546875,0.038055419921875,0.026702880859375,-0.02911376953125,0.0148162841796875,-0.0256805419921875,0.01059722900390625,0.00872802734375,0.00007730722427368164,0.0036029815673828125,-0.005950927734375,0.0228729248046875,-0.00560760498046875,-0.01403045654296875,-0.00518798828125,0.0011968612670898438,-0.01314544677734375,0.03326416015625,0.0178375244140625,0.0077056884765625,-0.0102081298828125,-0.005580902099609375,0.046295166015625,-0.0292205810546875,-0.00012922286987304688,0.0005135536193847656,0.05389404296875,-0.0100555419921875,-0.005802154541015625,-0.0060882568359375,-0.015716552734375,0.01111602783203125,0.00830078125,0.0138397216796875,0.0232086181640625,-0.016326904296875,0.01274871826171875,0.0034236907958984375,-0.006916046142578125,0.009765625,0.06097412109375,-0.02593994140625,-0.0008983612060546875,0.028472900390625,-0.0026950836181640625,0.0165252685546875,-0.01338958740234375,0.0007648468017578125,0.0028228759765625,-0.005645751953125,-0.0202789306640625,0.036834716796875,-0.0149383544921875,0.040252685546875,0.00836944580078125,0.05181884765625,-0.0013103485107421875,-0.026123046875,-0.0226898193359375,-0.040496826171875,0.0161590576171875,-0.001983642578125,-0.0086669921875,0.01175689697265625,-0.005279541015625,0.0322265625,-0.0063934326171875,0.05731201171875,-0.0180511474609375,-0.0137176513671875,-0.019989013671875,-0.0234832763671875,-0.024078369140625,-0.0029697418212890625,-0.00921630859375,-0.01413726806640625,0.0108489990234375,-0.00902557373046875,0.006130218505859375,0.0008502006530761719,0.033782958984375,0.026397705078125,-0.008544921875,0.00743865966796875,0.0015745162963867188,-0.0093231201171875,0.03179931640625,-0.0017852783203125,-0.0190582275390625,0.007465362548828125,0.0032482147216796875,0.024993896484375,-0.0036163330078125,0.0440673828125,-0.02838134765625,0.004364013671875,-0.01554107666015625,-0.023681640625,0.01129913330078125,-0.00461578369140625,-0.032379150390625,-0.004634857177734375,0.0036449432373046875,0.045501708984375,-0.05303955078125,0.04205322265625,0.00907135009765625,0.00019252300262451172,0.049835205078125,-0.00553131103515625,-0.0020427703857421875,0.01045989990234375,-0.01311492919921875,-0.0063934326171875,-0.002849578857421875,-0.006103515625,0.02093505859375,-0.033111572265625,0.0269927978515625,-0.030029296875,-0.006832122802734375,-0.007781982421875,0.019287109375,0.0135498046875,-0.0235748291015625,0.009979248046875,0.0107421875,0.00989532470703125,0.0242919921875,-0.0396728515625,-0.01157379150390625,-0.004062652587890625,0.0011358261108398438,0.0224151611328125,-0.045196533203125,0.061798095703125,-0.0137939453125,0.0178680419921875,-0.0243682861328125,-0.053436279296875,-0.0001188516616821289,-0.01342010498046875,0.01372528076171875,-0.032135009765625,0.0009021759033203125,0.02294921875,0.0011987686157226562,-0.0117340087890625,-0.0088043212890625,0.0107421875,0.007022857666015625,-0.0149993896484375,-0.00006276369094848633,-0.0035610198974609375,0.046722412109375,0.0281524658203125,-0.031982421875,0.038116455078125,0.016021728515625,-0.017547607421875,0.0002999305725097656,0.0076446533203125,-0.005260467529296875,-0.04449462890625,-0.06036376953125,-0.007236480712890625,-0.0160064697265625,-0.01947021484375,-0.0009965896606445312,-0.020050048828125,-0.0083770751953125,-0.008544921875,0.0139923095703125,-0.038299560546875,-0.0174102783203125,0.02191162109375,-0.0310821533203125,0.0272216796875,0.022918701171875,0.0269012451171875,0.0096435546875,0.0179290771484375,-0.00760650634765625,-0.0271148681640625,-0.002658843994140625,0.01462554931640625,0.01145172119140625,0.01336669921875,0.0216522216796875,-0.00574493408203125,-0.05145263671875,0.0312042236328125,0.0036773681640625,-0.03875732421875,0.0286712646484375,0.0169525146484375,0.0439453125,-0.0006585121154785156,-0.031097412109375,-0.0377197265625,-0.01554107666015625,-0.01540374755859375,-0.03076171875,-0.013031005859375,0.01372528076171875,-0.0198974609375,0.0125885009765625,0.0120697021484375,-0.01312255859375,-0.03253173828125,-0.002483367919921875,0.0014448165893554688,0.004062652587890625,0.015777587890625,-0.018707275390625,-0.0019121170043945312,-0.004669189453125,0.020751953125,-0.00811004638671875,0.00421905517578125,0.0033588409423828125,-0.0222625732421875,0.0266265869140625,0.0225830078125,0.0021076202392578125,0.01229095458984375,-0.0023136138916015625,-0.06585693359375,-0.01076507568359375,0.035858154296875,0.01264190673828125,-0.0219879150390625,-0.032073974609375,-0.00490570068359375,-0.0100250244140625,0.0826416015625,0.0053253173828125,0.0005230903625488281,0.035736083984375,-0.019500732421875,-0.042694091796875,0.032623291015625,-0.035308837890625,-0.0250244140625,0.0097503662109375,-0.02301025390625,-0.0045928955078125,0.0229034423828125,-0.0251312255859375,0.0155181884765625,-0.0258941650390625,-0.0335693359375,0.01032257080078125,-0.0186920166015625,-0.0225830078125,-0.0084075927734375,0.01499176025390625,0.0214080810546875,-0.0048675537109375,-0.0277557373046875,0.009033203125,0.0193328857421875,0.00020241737365722656,-0.0176239013671875,-0.01540374755859375,-0.0036296844482421875,-0.03961181640625,0.01319122314453125,-0.007770538330078125,-0.0460205078125,-0.0165557861328125,0.01187896728515625,0.0054779052734375,-0.020660400390625,0.002349853515625,0.020416259765625,-0.03082275390625,0.01512908935546875,-0.04327392578125,0.0176239013671875,0.0093841552734375,0.005889892578125,-0.006572723388671875,-0.024627685546875,-0.02886962890625,0.032989501953125,-0.04425048828125,-0.0017108917236328125,-0.0052642822265625,0.036468505859375,-0.0151519775390625,-0.025299072265625,-0.006500244140625,-0.012237548828125,0.0201263427734375,0.0263824462890625,0.011566162109375,0.004077911376953125,0.01311492919921875,-0.01325225830078125,0.0098724365234375,-0.026123046875,0.0400390625,-0.0068511962890625,-0.0592041015625,-0.00904083251953125,-0.0005679130554199219,0.008056640625,-0.03570556640625,-0.02740478515625,0.0081024169921875,0.002285003662109375,-0.0293731689453125,-0.0282135009765625,0.0018987655639648438,-0.0127716064453125,-0.007289886474609375,0.037811279296875,0.058502197265625,-0.0026416778564453125,-0.031280517578125,-0.01031494140625,-0.00966644287109375,0.033050537109375,-0.0304107666015625,0.0169525146484375,-0.026702880859375,0.0096588134765625,-0.002239227294921875,0.025848388671875,-0.001529693603515625,-0.0220794677734375,-0.0116424560546875,0.0321044921875,0.003749847412109375,0.0025787353515625,0.027069091796875,0.012420654296875,-0.05731201171875,0.042236328125,-0.06341552734375,0.0052337646484375,0.0190582275390625,0.0199432373046875,-0.0017642974853515625,-0.01026153564453125,-0.03973388671875,-0.0263214111328125,0.00750732421875,0.029327392578125,0.0281982421875,-0.037200927734375,0.02557373046875,0.0061798095703125,-0.007366180419921875,0.01904296875,0.012481689453125,0.01418304443359375,0.00960540771484375,0.022369384765625,0.0073699951171875,-0.022918701171875,0.00786590576171875,0.023468017578125,0.0230865478515625,0.00366973876953125,0.0239715576171875,-0.0282745361328125,0.0208587646484375,-0.001316070556640625,0.01399993896484375,-0.008636474609375,-0.01316070556640625,-0.0102996826171875,-0.0011873245239257812,0.010772705078125,-0.006557464599609375,-0.01389312744140625,0.023834228515625,-0.00524139404296875,0.042755126953125,-0.02825927734375,0.0273895263671875,-0.04132080078125,0.01416778564453125,-0.0166015625,-0.020355224609375,-0.031829833984375,-0.002521514892578125,0.0004220008850097656,0.0027408599853515625,0.0166015625,-0.0048980712890625,-0.006336212158203125,-0.01264190673828125,0.0292816162109375,0.0011386871337890625,-0.0036182403564453125,0.004474639892578125,-0.0030689239501953125,0.022796630859375,0.032989501953125,-0.020111083984375,0.004695892333984375,0.0222015380859375,0.0181427001953125,-0.0297088623046875,0.0419921875,0.01457977294921875,0.04180908203125,-0.00559234619140625,-0.0282745361328125,-0.0222930908203125,0.025177001953125,-0.0075531005859375,0.0120849609375,-0.021759033203125,0.007068634033203125,-0.01403045654296875,0.03204345703125,0.035919189453125,0.0263519287109375,-0.0113677978515625,0.00518035888671875,-0.040802001953125,-0.00799560546875,-0.00795745849609375,-0.022979736328125,-0.028228759765625,0.0010633468627929688,0.018585205078125,0.0163421630859375,-0.006229400634765625,-0.02667236328125,0.016448974609375,-0.034088134765625,-0.01308441162109375,-0.0262298583984375,0.013671875,0.01611328125,0.031585693359375,-0.004398345947265625,0.043853759765625,0.0025730133056640625,-0.03375244140625,0.0170745849609375,0.005588531494140625,-0.0233612060546875,0.032806396484375,-0.032928466796875,-0.01263427734375,-0.05047607421875,-0.017852783203125,0.0002999305725097656,-0.0172119140625,0.028839111328125,-0.00940704345703125,-0.021514892578125,-0.03314208984375,0.00450897216796875,0.004913330078125,-0.011505126953125,-0.017730712890625,0.00522613525390625,-0.01044464111328125,-0.0056304931640625,-0.025726318359375,-0.01030731201171875,0.000141143798828125,-0.0177459716796875,0.0199432373046875,0.02783203125,0.0006208419799804688,0.0256195068359375,-0.009857177734375,-0.03076171875,0.021697998046875,0.0760498046875,0.057769775390625,-0.033111572265625,0.045074462890625,0.0137481689453125,0.0119476318359375,0.007106781005859375,-0.01214599609375,0.0283966064453125,0.03729248046875,0.0010881423950195312,0.0081634521484375,0.026947021484375,0.020111083984375,-0.00656890869140625,0.0257415771484375,-0.049652099609375,0.042572021484375,0.00981903076171875,0.01548004150390625,0.05078125,-0.035064697265625,0.0182037353515625,0.00782012939453125,-0.008026123046875,-0.0006632804870605469,0.009490966796875,-0.0030040740966796875,-0.01499176025390625,0.0266571044921875,0.0247344970703125,0.0284271240234375,0.0367431640625,-0.0239105224609375,0.003936767578125,0.0025005340576171875,-0.01422119140625,-0.0006680488586425781,-0.04022216796875,-0.036407470703125,-0.0313720703125,0.01030731201171875,0.00152587890625,-0.03411865234375,0.01300048828125,-0.01727294921875,-0.00595855712890625,-0.01374053955078125,0.0113983154296875,-0.036163330078125,-0.035980224609375,-0.0013408660888671875,0.005481719970703125,0.032470703125,-0.019287109375,0.05072021484375,-0.0094451904296875,0.0292510986328125,0.01641845703125,0.020355224609375,-0.01404571533203125,0.0276031494140625,0.0101165771484375,-0.000055849552154541016,-0.01464080810546875,0.04168701171875,0.02850341796875,-0.0265045166015625,-0.044952392578125,-0.0309295654296875,-0.00738525390625,-0.017669677734375,-0.006511688232421875,-0.0291595458984375,0.00968170166015625,0.054901123046875,-0.0020694732666015625,-0.0131072998046875,0.004180908203125,0.0062408447265625,-0.0245513916015625,-0.0102996826171875,0.003307342529296875,-0.022308349609375,0.0165252685546875,0.004009246826171875,-0.017547607421875,0.042083740234375,0.023406982421875,-0.049591064453125,0.0033702850341796875,0.007068634033203125,-0.01305389404296875,0.012542724609375,-0.01103973388671875,-0.002765655517578125,0.0638427734375,0.0129547119140625,0.0255126953125,0.041229248046875,-0.01519012451171875,-0.01953125,0.00821685791015625,-0.00949859619140625,0.03448486328125,-0.00882720947265625,-0.005035400390625,0.0193023681640625,0.017669677734375,-0.01288604736328125,0.0092620849609375,-0.001102447509765625,0.0027484893798828125,0.0172576904296875,-0.0173797607421875,0.0006561279296875,0.0438232421875,-0.01629638671875,0.03375244140625,-0.005008697509765625,-0.03082275390625,-0.0254364013671875,0.01029205322265625,0.0418701171875,-0.002864837646484375,-0.00262451171875,-0.007106781005859375,0.057281494140625,0.04241943359375,-0.003719329833984375,-0.0233917236328125,0.06158447265625,-0.036956787109375,-0.022796630859375,-0.0003299713134765625,0.0163726806640625,0.0269927978515625,-0.05517578125,0.0013637542724609375,0.0146026611328125,0.026336669921875,0.00457763671875,-0.0062255859375,0.0114593505859375,-0.0207672119140625,0.0204010009765625,0.013824462890625,-0.00006508827209472656,-0.0250701904296875,0.033966064453125,0.038238525390625,0.00429534912109375,-0.040496826171875,-0.0310821533203125,0.05224609375,0.01543426513671875,0.0025196075439453125,0.016632080078125,-0.00516510009765625,0.0249481201171875,-0.046234130859375,-0.01171112060546875,0.004306793212890625,0.0120849609375,0.05364990234375,0.01523590087890625,-0.0060577392578125,-0.0860595703125,-0.02093505859375,0.007965087890625,0.002246856689453125,0.011627197265625,0.004337310791015625,-0.034210205078125,-0.00942230224609375,-0.00809478759765625,0.0418701171875,-0.0021762847900390625,-0.05126953125,-0.017822265625,-0.0088653564453125,-0.034759521484375,-0.00539398193359375,0.03582763671875,0.0277252197265625,-0.0007104873657226562,0.023345947265625,0.003570556640625,0.0065155029296875,0.03973388671875,0.0066070556640625,-0.00890350341796875,0.008331298828125,-0.01509857177734375,-0.0193328857421875,0.0176849365234375,-0.0128021240234375,-0.0254669189453125,-0.0193634033203125,-0.01556396484375,-0.008270263671875,0.0179290771484375,-0.017730712890625,0.0276641845703125,-0.0269317626953125,-0.0040740966796875,-0.01464080810546875,-0.0004687309265136719,-0.01187896728515625,0.02880859375,-0.015289306640625,-0.01275634765625,0.02294921875,0.005645751953125,-0.0229034423828125,-0.0176849365234375,-0.0158538818359375,0.01227569580078125,-0.030303955078125,0.01039886474609375,0.021759033203125,-0.00572967529296875,0.040069580078125,-0.0193634033203125,-0.048492431640625,0.0482177734375,-0.0116729736328125,0.01151275634765625,0.019927978515625,-0.0080413818359375,0.012481689453125,-0.00482940673828125,-0.0125885009765625,-0.01361083984375,-0.026336669921875,0.02716064453125,0.017547607421875,0.0019931793212890625,-0.01479339599609375,-0.0135040283203125,-0.0224609375,-0.00421905517578125,-0.03338623046875,-0.0140838623046875,-0.0137939453125,0.01397705078125,-0.03765869140625,0.03204345703125,-0.009429931640625,0.021820068359375,0.00443267822265625,0.030487060546875,-0.0003521442413330078,0.0120849609375,-0.031829833984375,0.04547119140625,-0.002704620361328125,-0.003231048583984375,-0.00853729248046875,-0.006988525390625,-0.01605224609375,-0.00402069091796875,0.0294342041015625,0.004398345947265625,0.025848388671875,-0.0026416778564453125,0.0090789794921875,-0.009490966796875,0.00983428955078125,-0.03662109375,-0.0072021484375,0.00507354736328125,-0.01128387451171875,0.032745361328125,0.0028171539306640625,0.026947021484375,0.00811004638671875,-0.01096343994140625,-0.01165771484375,-0.029266357421875,0.0060272216796875,-0.001102447509765625,-0.029144287109375,-0.0201263427734375,0.0225677490234375,0.0213165283203125,-0.0133514404296875,0.048126220703125,-0.0189971923828125,-0.05853271484375,-0.033477783203125,-0.01446533203125,0.0288848876953125,-0.041259765625,-0.0548095703125,-0.00940704345703125,-0.019622802734375,0.0047454833984375,-0.03509521484375,-0.0226287841796875,-0.029327392578125,0.038238525390625,-0.0027751922607421875,-0.04779052734375,0.0355224609375,0.01447296142578125,0.01421356201171875,0.0055084228515625,0.00298309326171875,-0.0176849365234375,0.001338958740234375,0.0012731552124023438,-0.0428466796875,0.007808685302734375,-0.00771331787109375,-0.001007080078125,-0.0056610107421875,-0.00719451904296875,-0.0259857177734375,0.0235595703125,-0.009765625,0.0062408447265625,0.01438140869140625,0.031494140625,0.009490966796875,-0.012786865234375,0.01421356201171875,-0.047027587890625,-0.00366973876953125,0.0308685302734375,-0.007366180419921875,0.01947021484375,0.0205535888671875,0.0004658699035644531,0.0263214111328125,-0.0004673004150390625,0.01404571533203125,0.01611328125,0.01396942138671875,-0.00716400146484375,-0.018646240234375,0.005725860595703125,-0.00864410400390625,-0.0033550262451171875,0.016357421875,0.0027599334716796875,0.00913238525390625,-0.00743865966796875,0.028839111328125,0.00261688232421875,-0.0049591064453125,0.0197601318359375,-0.0244140625,0.00262451171875,-0.010162353515625,-0.0005154609680175781,0.0023860931396484375,-0.018707275390625,-0.0283050537109375,0.0301055908203125,-0.013946533203125,0.06622314453125,-0.0226898193359375,-0.0244140625,-0.0277557373046875,-0.006786346435546875,0.0005354881286621094,-0.019744873046875,-0.03582763671875,-0.03375244140625,-0.028839111328125,0.035552978515625,0.05462646484375,0.0040130615234375,0.004924774169921875,-0.0191192626953125,0.0024280548095703125,0.021270751953125,-0.0120391845703125,0.0282135009765625,0.0045166015625,0.01332855224609375,0.040191650390625,-0.00826263427734375,0.004730224609375,0.004833221435546875,0.01386260986328125,0.0293121337890625,0.0205841064453125,0.002429962158203125,-0.029022216796875,-0.0312042236328125,-0.007904052734375,0.03839111328125,-0.0035552978515625,0.00200653076171875,-0.0019817352294921875,-0.0010461807250976562,0.0187530517578125,-0.0204925537109375,0.0140228271484375,-0.0243988037109375,-0.0190582275390625,-0.0021038055419921875,-0.00801849365234375,-0.0094451904296875,0.0718994140625,-0.0038661956787109375,0.0158538818359375,0.0325927734375,0.0006241798400878906,0.0567626953125,-0.00885772705078125,-0.0037822723388671875,-0.00995635986328125,-0.0227508544921875,0.002719879150390625,0.0049285888671875,-0.02093505859375,-0.037384033203125,-0.033782958984375,-0.0181884765625,-0.03558349609375,0.003993988037109375,0.0037841796875,-0.0110931396484375,-0.0149078369140625,-0.005252838134765625,-0.0200653076171875,0.0199127197265625,-0.0299072265625,-0.03515625,-0.0101470947265625,0.00557708740234375,-0.006252288818359375,0.01523590087890625,0.01593017578125,-0.00553131103515625,-0.023193359375,0.00457763671875,-0.0380859375,-0.009307861328125,0.03179931640625,-0.00745391845703125,0.004055023193359375,0.0033588409423828125,0.0258941650390625,0.01256561279296875,0.005893707275390625,0.012420654296875,0.007610321044921875,-0.03399658203125,0.0008511543273925781,0.00971221923828125,-0.026519775390625,-0.04150390625,0.00804901123046875,-0.0062713623046875,-0.002960205078125,0.005809783935546875,0.004833221435546875,0.002658843994140625,0.0105743408203125,0.0217437744140625,-0.0191802978515625,0.018096923828125,-0.028228759765625,-0.050537109375,-0.0137939453125,0.0014362335205078125,-0.01470947265625,0.000049054622650146484,-0.0226898193359375,-0.0350341796875,-0.004940032958984375,0.0094451904296875,0.033660888671875,-0.0206298828125,0.0065460205078125,0.046783447265625,-0.00516510009765625,0.01416778564453125,0.0308685302734375,-0.0294647216796875,-0.036895751953125,-0.0298614501953125,0.03973388671875,0.015869140625,0.0122528076171875,0.00885009765625,0.0193023681640625,0.0175933837890625,-0.0258941650390625,-0.005615234375,-0.0237884521484375,-0.013885498046875,-0.01120758056640625,0.031402587890625,0.006366729736328125,0.00010627508163452148,0.0699462890625,0.01125335693359375,-0.018798828125,-0.00640106201171875,-0.01247406005859375,-0.01401519775390625,0.0006556510925292969,0.0053863525390625,-0.0233917236328125,-0.0540771484375,0.02117919921875,0.01708984375,-0.018707275390625,0.01007843017578125,0.009033203125,-0.017974853515625,-0.0224609375,-0.01107025146484375,-0.0188446044921875,0.0070648193359375],"index":1},{"object":"embedding","embedding":[-0.109375,-0.041168212890625,-0.00209808349609375,0.0236663818359375,-0.031402587890625,0.01515960693359375,-0.00433349609375,0.003223419189453125,-0.0031375885009765625,-0.03753662109375,0.0133056640625,0.0272216796875,0.0340576171875,-0.0050506591796875,0.01294708251953125,0.041778564453125,-0.0038242340087890625,0.050750732421875,0.019744873046875,0.00460052490234375,-0.0187835693359375,0.031707763671875,-0.00287628173828125,-0.00405120849609375,0.05450439453125,-0.037109375,-0.0191497802734375,0.02001953125,0.012451171875,-0.0321044921875,-0.00786590576171875,-0.036407470703125,0.0053863525390625,0.0006589889526367188,-0.0269012451171875,-0.0019702911376953125,0.042266845703125,-0.0302276611328125,0.006134033203125,0.0036334991455078125,-0.0274200439453125,-0.0114288330078125,-0.006626129150390625,0.082275390625,-0.03704833984375,0.0020542144775390625,-0.016204833984375,0.039764404296875,-0.0162353515625,-0.017486572265625,0.0228729248046875,-0.02874755859375,0.0213470458984375,0.0036716461181640625,-0.01520538330078125,-0.00858306884765625,0.082275390625,-0.0196075439453125,0.00635528564453125,0.006847381591796875,0.007328033447265625,-0.00823974609375,0.0274200439453125,-0.0010509490966796875,0.005878448486328125,0.0355224609375,0.0254669189453125,0.054931640625,0.04034423828125,-0.010284423828125,0.0228118896484375,0.06689453125,0.0032176971435546875,0.061492919921875,0.003978729248046875,0.0599365234375,-0.00018668174743652344,0.0155181884765625,0.0263671875,0.0152740478515625,-0.003875732421875,0.00428009033203125,0.03509521484375,-0.0008482933044433594,0.0279388427734375,-0.0244598388671875,0.02374267578125,0.0247039794921875,0.0273590087890625,-0.0491943359375,-0.005619049072265625,0.01155853271484375,0.01197052001953125,0.040130615234375,0.017913818359375,0.01593017578125,0.0155181884765625,-0.018035888671875,-0.0693359375,0.001392364501953125,0.030792236328125,-0.038665771484375,-0.0020198822021484375,0.018707275390625,0.004955291748046875,-0.0245819091796875,0.01145172119140625,0.0162506103515625,0.024261474609375,0.02923583984375,-0.032257080078125,-0.00864410400390625,0.0015535354614257812,-0.006103515625,-0.053924560546875,0.0042572021484375,-0.01531219482421875,-0.0294342041015625,0.03948974609375,-0.00182342529296875,-0.0267181396484375,0.03955078125,0.01093292236328125,0.0005817413330078125,0.003528594970703125,0.018035888671875,-0.00980377197265625,0.00978851318359375,0.0012912750244140625,-0.008331298828125,0.049285888671875,0.0355224609375,0.0168609619140625,0.014495849609375,-0.0003895759582519531,0.00012755393981933594,-0.0097503662109375,0.020477294921875,0.01129150390625,0.032806396484375,0.01004791259765625,-0.0125885009765625,0.0114593505859375,0.044586181640625,0.0032100677490234375,-0.01395416259765625,-0.00208282470703125,0.031280517578125,0.02313232421875,0.0166778564453125,-0.0094451904296875,-0.0135345458984375,0.032562255859375,-0.0269012451171875,-0.02923583984375,-0.0017242431640625,-0.01273345947265625,0.07257080078125,0.01476287841796875,0.048126220703125,-0.04498291015625,0.042144775390625,0.034454345703125,0.01214599609375,-0.033050537109375,-0.028594970703125,-0.0303497314453125,-0.00139617919921875,-0.0008273124694824219,-0.0216217041015625,-0.039642333984375,0.0188140869140625,0.010284423828125,0.060791015625,0.01503753662109375,-0.033935546875,0.007648468017578125,0.015411376953125,-0.048095703125,0.0330810546875,-0.00743865966796875,0.05645751953125,0.02081298828125,-0.0450439453125,-0.020538330078125,0.03472900390625,-0.00972747802734375,-0.02435302734375,-0.034149169921875,0.01300811767578125,0.016448974609375,-0.0345458984375,0.01364898681640625,0.0286407470703125,-0.01548004150390625,0.0196990966796875,-0.03045654296875,0.005924224853515625,0.06927490234375,-0.021026611328125,0.0015935897827148438,-0.0247802734375,-0.0006380081176757812,-0.00962066650390625,-0.01468658447265625,-0.0439453125,0.005985260009765625,-0.0003972053527832031,0.040679931640625,0.0224761962890625,-0.038818359375,-0.036346435546875,-0.021240234375,-0.0288238525390625,0.038482666015625,0.0239715576171875,-0.005756378173828125,0.058746337890625,0.049285888671875,-0.018890380859375,-0.005542755126953125,0.0188446044921875,0.022613525390625,-0.022247314453125,0.01313018798828125,0.0011758804321289062,-0.013671875,-0.010467529296875,-0.0276031494140625,0.004062652587890625,-0.0277862548828125,-0.0002111196517944336,0.0022411346435546875,-0.015380859375,-0.0426025390625,-0.040863037109375,0.0023517608642578125,0.009765625,-0.050750732421875,-0.0189361572265625,-0.01273345947265625,-0.02825927734375,0.06005859375,0.048614501953125,-0.03021240234375,-0.0079193115234375,0.033538818359375,0.0244140625,-0.006313323974609375,0.07568359375,-0.045166015625,-0.041168212890625,-0.004741668701171875,-0.0202178955078125,0.005764007568359375,0.0030269622802734375,-0.031280517578125,0.0028591156005859375,0.0015001296997070312,-0.033203125,-0.038299560546875,-0.01739501953125,-0.01483154296875,-0.0091552734375,-0.07476806640625,-0.01548004150390625,0.014617919921875,0.0382080078125,-0.0166473388671875,-0.04852294921875,-0.0270233154296875,0.0196990966796875,0.0216827392578125,0.0241851806640625,-0.06103515625,-0.00942230224609375,0.0213623046875,-0.0279083251953125,0.02764892578125,0.020538330078125,-0.0038509368896484375,-0.057403564453125,0.0033779144287109375,0.0150146484375,-0.028045654296875,-0.01387786865234375,-0.007648468017578125,0.060943603515625,-0.005767822265625,0.0003478527069091797,0.0189666748046875,0.00475311279296875,-0.00823974609375,-0.000995635986328125,0.00011414289474487305,0.0169525146484375,0.0104827880859375,-0.03680419921875,-0.01168060302734375,-0.0173797607421875,0.068359375,-0.061309814453125,0.043121337890625,0.0196533203125,-0.051177978515625,0.052337646484375,-0.02374267578125,0.031890869140625,-0.027069091796875,0.01070404052734375,-0.005950927734375,0.01035308837890625,0.01224517822265625,-0.057952880859375,-0.001903533935546875,-0.0149078369140625,-0.05450439453125,-0.026580810546875,-0.0080413818359375,-0.021148681640625,0.003803253173828125,0.065185546875,-0.0183258056640625,-0.0077362060546875,-0.01934814453125,0.0029811859130859375,0.051971435546875,0.061187744140625,-0.02301025390625,0.00794219970703125,0.01367950439453125,0.0038280487060546875,-0.003147125244140625,0.038330078125,-0.01271820068359375,0.004421234130859375,-0.0843505859375,0.0276031494140625,0.005889892578125,-0.0015592575073242188,-0.0057525634765625,-0.0166778564453125,0.032012939453125,0.03082275390625,0.00980377197265625,0.03265380859375,-0.01308441162109375,-0.03662109375,-0.0287322998046875,0.016387939453125,-0.0208282470703125,-0.0225067138671875,-0.0316162109375,0.021240234375,0.003940582275390625,-0.01513671875,0.03875732421875,-0.005725860595703125,-0.0631103515625,0.0178070068359375,-0.025634765625,-0.0243988037109375,0.0045013427734375,0.01611328125,0.00463104248046875,-0.02044677734375,-0.003543853759765625,0.0211639404296875,-0.0245819091796875,0.005535125732421875,0.0311126708984375,-0.0036792755126953125,0.0012331008911132812,-0.00688934326171875,-0.00762939453125,0.00809478759765625,0.0216827392578125,-0.0267486572265625,-0.01416778564453125,-0.056884765625,-0.07440185546875,0.0060272216796875,0.016448974609375,-0.01107025146484375,0.015899658203125,0.01131439208984375,-0.03472900390625,-0.0015583038330078125,-0.03076171875,-0.04901123046875,-0.01172637939453125,0.0229644775390625,0.015960693359375,0.049591064453125,0.01532745361328125,-0.036163330078125,0.00244140625,0.01085662841796875,-0.040069580078125,-0.0036830902099609375,0.00577545166015625,0.0179901123046875,-0.017486572265625,0.015838623046875,-0.050506591796875,0.010589599609375,-0.030303955078125,0.0289306640625,0.040374755859375,0.024749755859375,-0.032501220703125,-0.056793212890625,0.024383544921875,0.02117919921875,0.0400390625,0.0237579345703125,0.03472900390625,-0.0132293701171875,0.00814056396484375,-0.01528167724609375,0.039093017578125,0.011688232421875,-0.0190887451171875,-0.04949951171875,0.0108642578125,-0.04339599609375,0.0228729248046875,0.014892578125,-0.00335693359375,-0.017669677734375,-0.01104736328125,-0.058258056640625,-0.01296234130859375,0.024444580078125,-0.014068603515625,-0.0296783447265625,0.0163726806640625,-0.0169677734375,0.0108795166015625,0.012542724609375,0.0141754150390625,-0.0032634735107421875,-0.04998779296875,-0.003383636474609375,-0.027862548828125,0.0197296142578125,0.037872314453125,0.0242156982421875,0.07562255859375,-0.0227203369140625,0.022552490234375,0.034637451171875,0.0165252685546875,-0.059173583984375,0.06964111328125,0.007808685302734375,0.0118865966796875,0.0291748046875,0.00638580322265625,-0.00960540771484375,-0.0241546630859375,0.0262298583984375,-0.018768310546875,0.039703369140625,0.004184722900390625,0.000469207763671875,0.00287628173828125,0.048187255859375,0.01364898681640625,-0.0133819580078125,-0.0015916824340820312,-0.005641937255859375,0.0106658935546875,0.0191650390625,-0.026275634765625,0.0156402587890625,0.022003173828125,0.04498291015625,0.042938232421875,-0.0445556640625,-0.0193634033203125,0.0165252685546875,-0.014984130859375,-0.01090240478515625,-0.057952880859375,-0.08489990234375,0.00222015380859375,0.0008978843688964844,-0.011749267578125,0.0283355712890625,-0.0018205642700195312,0.0030803680419921875,-0.023895263671875,-0.007259368896484375,0.050567626953125,0.04998779296875,-0.034881591796875,-0.0207061767578125,0.0526123046875,-0.025390625,0.0003478527069091797,-0.0030078887939453125,0.01092529296875,0.00814056396484375,0.0628662109375,0.0191650390625,0.016082763671875,0.0014362335205078125,-0.026519775390625,0.005199432373046875,-0.036651611328125,-0.016754150390625,-0.016204833984375,0.01080322265625,-0.032745361328125,0.032928466796875,0.04364013671875,0.035675048828125,-0.0006570816040039062,0.0015211105346679688,-0.0096588134765625,0.033050537109375,-0.00948333740234375,0.00823974609375,0.0286407470703125,0.03521728515625,0.00963592529296875,0.00397491455078125,0.0184326171875,-0.018951416015625,0.053924560546875,0.0222015380859375,0.01439666748046875,-0.027496337890625,0.01367950439453125,-0.0193634033203125,0.047515869140625,0.0109100341796875,0.0299530029296875,-0.0007367134094238281,0.042999267578125,-0.0018091201782226562,-0.041473388671875,-0.01525115966796875,-0.0012178421020507812,-0.0150146484375,0.0052642822265625,-0.03082275390625,0.01242828369140625,-0.0076141357421875,0.006072998046875,-0.02740478515625,0.00616455078125,0.0265655517578125,0.00513458251953125,-0.0225067138671875,0.004360198974609375,-0.0016584396362304688,-0.03753662109375,0.0191192626953125,-0.0253448486328125,0.03192138671875,-0.0574951171875,0.00261688232421875,-0.0001729726791381836,0.06341552734375,-0.01300811767578125,0.016510009765625,0.0017061233520507812,-0.0096893310546875,-0.0178375244140625,-0.0062255859375,0.016754150390625,0.06256103515625,-0.0034503936767578125,0.022216796875,0.0005221366882324219,-0.00971221923828125,-0.0230255126953125,0.0274505615234375,0.0160675048828125,0.01055145263671875,0.007282257080078125,-0.0243988037109375,0.024993896484375,0.0088348388671875,0.00531005859375,-0.0205230712890625,0.024139404296875,-0.005138397216796875,0.02618408203125,0.0226898193359375,0.01331329345703125,0.011260986328125,0.06915283203125,-0.0312347412109375,0.01552581787109375,-0.0032405853271484375,-0.0511474609375,0.01373291015625,0.01401519775390625,0.00839996337890625,0.018798828125,0.0357666015625,0.003753662109375,0.03466796875,0.0016660690307617188,-0.0009546279907226562,0.021026611328125,0.0015621185302734375,-0.006763458251953125,-0.04949951171875,0.039886474609375,0.0159454345703125,0.0123291015625,0.036285400390625,-0.001781463623046875,-0.01617431640625,-0.0303192138671875,0.007480621337890625,0.017120361328125,-0.0175933837890625,-0.0259857177734375,0.031890869140625,-0.0191650390625,0.026275634765625,-0.01364898681640625,-0.00846099853515625,-0.0034389495849609375,-0.030609130859375,0.019012451171875,0.002735137939453125,0.051788330078125,-0.0594482421875,0.01343536376953125,-0.0309906005859375,-0.037109375,-0.01397705078125,0.0231170654296875,-0.0212554931640625,-0.0069580078125,0.01369476318359375,0.044525146484375,0.00041103363037109375,0.05560302734375,0.032196044921875,0.01065826416015625,0.07470703125,0.0098876953125,-0.0294647216796875,0.01244354248046875,-0.0083770751953125,-0.0213775634765625,-0.00968170166015625,0.0015869140625,0.00469207763671875,-0.049896240234375,-0.0243072509765625,-0.0247039794921875,-0.0152130126953125,0.0013437271118164062,-0.01152801513671875,0.01026153564453125,0.00955963134765625,0.006298065185546875,0.0014028549194335938,-0.017059326171875,0.05267333984375,-0.017486572265625,-0.0062713623046875,-0.003734588623046875,-0.004344940185546875,-0.01824951171875,-0.02557373046875,0.048675537109375,-0.040985107421875,0.032257080078125,-0.004398345947265625,-0.02764892578125,0.01139068603515625,-0.032135009765625,0.0004584789276123047,-0.0137481689453125,0.0224609375,0.0228729248046875,-0.005985260009765625,-0.00949859619140625,-0.050933837890625,0.03228759765625,0.021087646484375,-0.01165771484375,0.05096435546875,0.00984954833984375,0.041412353515625,0.00830078125,0.0229339599609375,0.0305633544921875,0.006435394287109375,-0.0140228271484375,-0.0035800933837890625,-0.031158447265625,0.0290679931640625,0.0033588409423828125,-0.01448822021484375,-0.06231689453125,-0.005084991455078125,0.008941650390625,-0.006275177001953125,-0.0133056640625,0.021575927734375,-0.014984130859375,-0.00293731689453125,-0.0189666748046875,0.016845703125,-0.0010395050048828125,-0.005519866943359375,0.0092620849609375,-0.0255279541015625,0.01788330078125,-0.040313720703125,0.0055389404296875,0.03314208984375,-0.02105712890625,-0.0174102783203125,0.0276031494140625,-0.0084686279296875,-0.005535125732421875,0.0189361572265625,-0.00940704345703125,0.0159454345703125,0.0103607177734375,-0.0015439987182617188,-0.0279388427734375,0.01788330078125,0.021026611328125,-0.00945281982421875,0.0194854736328125,-0.01540374755859375,-0.01100921630859375,-0.03021240234375,-0.005992889404296875,-0.0227203369140625,0.0129852294921875,0.00925445556640625,-0.0251007080078125,0.040252685546875,0.0217132568359375,-0.0032901763916015625,-0.0309600830078125,0.050689697265625,-0.0267486572265625,0.005855560302734375,0.01078033447265625,-0.013214111328125,0.0231170654296875,-0.0318603515625,0.037109375,0.0183258056640625,0.0145416259765625,-0.0411376953125,0.0195465087890625,0.004222869873046875,0.0014972686767578125,0.0125885009765625,0.01715087890625,0.0118255615234375,-0.01500701904296875,0.00485992431640625,0.00385284423828125,0.012786865234375,-0.01080322265625,0.0211639404296875,-0.0261688232421875,0.00743865966796875,0.037933349609375,0.02789306640625,-0.0170745849609375,-0.0118255615234375,0.0101165771484375,-0.01160430908203125,0.0253448486328125,-0.00577545166015625,-0.0240936279296875,0.004611968994140625,-0.00848388671875,-0.00014030933380126953,0.0155792236328125,-0.0152130126953125,-0.046417236328125,0.00955963134765625,-0.0229034423828125,-0.006420135498046875,-0.0270538330078125,-0.049713134765625,-0.0103607177734375,0.01209259033203125,0.051177978515625,0.01210784912109375,-0.0222625732421875,0.023468017578125,0.0233306884765625,0.0182037353515625,-0.02069091796875,-0.005046844482421875,0.0161285400390625,0.0098419189453125,-0.0071258544921875,0.0015897750854492188,-0.0193939208984375,-0.04949951171875,-0.016143798828125,-0.0086822509765625,-0.00980377197265625,-0.019012451171875,0.0013942718505859375,-0.02203369140625,0.0178070068359375,-0.00458526611328125,0.0241851806640625,0.01168060302734375,0.02166748046875,0.007503509521484375,0.017333984375,-0.042816162109375,0.082763671875,-0.0299224853515625,-0.00897979736328125,-0.0657958984375,0.0252532958984375,-0.0008730888366699219,0.025421142578125,0.0194549560546875,-0.0135040283203125,0.016876220703125,0.0247344970703125,0.023468017578125,0.00228118896484375,0.04876708984375,-0.01226806640625,0.0142974853515625,-0.0072174072265625,0.0501708984375,0.006420135498046875,-0.00713348388671875,-0.0032596588134765625,0.00705718994140625,0.036865234375,0.011138916015625,-0.019439697265625,-0.017852783203125,-0.0069580078125,0.001804351806640625,-0.0245819091796875,0.01271820068359375,-0.00021326541900634766,-0.002086639404296875,0.0239715576171875,0.040679931640625,-0.01071929931640625,-0.009307861328125,-0.0257720947265625,0.037445068359375,0.05352783203125,0.003307342529296875,0.04693603515625,-0.00843048095703125,-0.02557373046875,-0.00460052490234375,0.0189361572265625,-0.0153961181640625,-0.00323486328125,0.037689208984375,0.003955841064453125,0.02325439453125,-0.01751708984375,-0.007282257080078125,0.003925323486328125,-0.00832366943359375,-0.0119476318359375,-0.039459228515625,0.029022216796875,-0.01343536376953125,-0.0291900634765625,0.033416748046875,-0.07177734375,-0.009185791015625,-0.02508544921875,0.0062103271484375,0.006256103515625,0.0543212890625,-0.006633758544921875,-0.01204681396484375,-0.02978515625,-0.01456451416015625,0.03460693359375,0.005725860595703125,0.0015535354614257812,0.0273895263671875,0.02972412109375,-0.01104736328125,-0.04754638671875,0.005878448486328125,0.039459228515625,0.000010609626770019531,-0.0196075439453125,0.010162353515625,-0.022491455078125,0.0304718017578125,-0.0223236083984375,-0.0216217041015625,0.0203704833984375,-0.0229339599609375,-0.007198333740234375,0.0004706382751464844,0.0192108154296875,-0.042022705078125,-0.004131317138671875,0.003253936767578125,-0.0213165283203125,0.0155029296875,-0.01488494873046875,0.0180206298828125,-0.0295867919921875,-0.0180511474609375,-0.035858154296875,0.00876617431640625,0.0010461807250976562,0.0164031982421875,0.01776123046875,-0.032745361328125,0.032012939453125,-0.0271453857421875,-0.0134735107421875,-0.02362060546875,-0.0038089752197265625,0.0010433197021484375,0.01166534423828125,-0.016265869140625,0.0113067626953125,-0.00952911376953125,-0.007297515869140625,-0.0229034423828125,0.028533935546875,0.00759124755859375,0.022735595703125,-0.01947021484375,0.0096282958984375,0.0014600753784179688,0.03424072265625,-0.032196044921875,-0.00791168212890625,0.004146575927734375,0.04083251953125,-0.02349853515625,0.0028820037841796875,0.0167694091796875,0.010711669921875,0.0234222412109375,0.00494384765625,0.001522064208984375,0.055511474609375,0.0186309814453125,0.0037994384765625,-0.0109710693359375,-0.0012912750244140625,0.034393310546875,0.0242462158203125,0.03662109375,-0.0256195068359375,-0.0156402587890625,0.023956298828125,-0.0071563720703125,0.0408935546875,0.005878448486328125,-0.0248260498046875,0.03076171875,-0.01476287841796875,0.0228729248046875,-0.0140533447265625,-0.01922607421875,-0.028289794921875,0.0496826171875,0.01934814453125,0.0008916854858398438,-0.02691650390625,-0.0053863525390625,-0.042694091796875,0.0012788772583007812,-0.0141143798828125,-0.01204681396484375,-0.03253173828125,-0.001861572265625,-0.0167083740234375,-0.006755828857421875,0.0240478515625,-0.006927490234375,0.01013946533203125,-0.033782958984375,-0.0017223358154296875,-0.012542724609375,0.00119781494140625,-0.034515380859375,0.006877899169921875,-0.0193328857421875,0.01580810546875,-0.0158538818359375,-0.0267791748046875,-0.008941650390625,-0.02874755859375,-0.01123046875,0.022430419921875,-0.02581787109375,-0.01190185546875,0.01384735107421875,-0.0299530029296875,-0.0230255126953125,0.06689453125,0.00531005859375,0.00626373291015625,0.028106689453125,0.0261383056640625,0.0030727386474609375,0.02716064453125,-0.0179443359375,-0.005168914794921875,0.01922607421875,0.01557159423828125,0.008544921875,0.0073089599609375,-0.0025482177734375,-0.006778717041015625,0.05413818359375,-0.053070068359375,0.0006098747253417969,-0.01323699951171875,0.0003764629364013672,-0.0013532638549804688,-0.033233642578125,-0.00258636474609375,0.0191802978515625,0.0222015380859375,-0.00884246826171875,-0.0129852294921875,0.02630615234375,0.01313018798828125,0.036895751953125,0.036651611328125,-0.00231170654296875,0.007556915283203125,-0.0290374755859375,-0.0120697021484375,0.005924224853515625,0.006282806396484375,0.015777587890625,0.00336456298828125,-0.0184478759765625,-0.025299072265625,0.00423431396484375,0.0201873779296875,-0.0123291015625,0.0235137939453125,-0.0167236328125,-0.01459503173828125,-0.043243408203125,0.0229034423828125,-0.00437164306640625,-0.00434112548828125,-0.01165008544921875,0.00939178466796875,0.0168914794921875,0.0133819580078125,-0.004978179931640625,0.011566162109375,0.00395965576171875,-0.006320953369140625,0.01318359375,-0.01114654541015625,0.0374755859375,0.046722412109375,0.033416748046875,0.0194091796875,0.031463623046875,0.020233154296875,0.0318603515625,-0.00789642333984375,-0.049468994140625,0.0182037353515625,-0.0455322265625,-0.0117340087890625,-0.0400390625,-0.0413818359375,0.0052337646484375,-0.0185699462890625,-0.0021839141845703125,0.0044403076171875,-0.0070343017578125,-0.0017652511596679688,-0.00734710693359375,-0.001739501953125,-0.0019969940185546875,0.01617431640625,0.0156707763671875,-0.0093536376953125,0.03570556640625,0.03643798828125,-0.026580810546875,-0.0230712890625,0.042572021484375,0.01099395751953125,0.026580810546875,-0.038177490234375,0.0279998779296875,-0.0071258544921875,-0.01248931884765625,-0.0203704833984375,0.0240020751953125,-0.01251220703125,-0.026824951171875,-0.045867919921875,0.0209503173828125,0.034423828125,-0.0234222412109375,-0.0306243896484375,0.0075531005859375,0.0234527587890625,-0.00811004638671875,-0.01168060302734375,-0.026824951171875,-0.004955291748046875,0.0144500732421875,-0.00788116455078125,-0.02862548828125,-0.01052093505859375,-0.024505615234375,0.021148681640625,-0.026123046875,-0.0121002197265625,-0.01239776611328125,0.02020263671875,0.04632568359375,0.0112457275390625,0.02386474609375,-0.0312042236328125,0.03240966796875,0.0413818359375,-0.052825927734375,0.0036220550537109375,0.0684814453125,-0.034820556640625,-0.007404327392578125,0.001888275146484375,-0.0161590576171875,-0.01444244384765625,-0.0228271484375,0.00530242919921875,0.00025844573974609375,-0.0174102783203125,-0.00977325439453125,-0.006916046142578125,0.0108489990234375,-0.01207733154296875,-0.005504608154296875,0.03387451171875,0.00794219970703125,-0.03466796875,0.00504302978515625,0.0167236328125,0.0086669921875,-0.029022216796875,-0.0474853515625,0.03143310546875,0.00667572021484375,-0.004016876220703125,-0.0046234130859375,0.0273895263671875,0.039703369140625,-0.025665283203125,-0.0210113525390625,0.0195159912109375,0.01776123046875,0.0243072509765625,0.005157470703125,0.0126190185546875,-0.033782958984375,0.034332275390625,-0.00260162353515625,0.0071563720703125,0.0006117820739746094,-0.0170135498046875,-0.0303955078125,-0.037628173828125,0.00027561187744140625,0.0028285980224609375,-0.0281524658203125,-0.044403076171875,-0.006744384765625,0.0251312255859375,-0.0157928466796875,0.035797119140625,0.03167724609375,0.029571533203125,-0.00963592529296875,-0.0152587890625,-0.0099334716796875,-0.05657958984375,0.0240936279296875,-0.01267242431640625,0.0028476715087890625,-0.006137847900390625,-0.0127716064453125,-0.010650634765625,0.0258636474609375,-0.025299072265625,-0.02197265625,0.00930023193359375,-0.041595458984375,-0.0081024169921875,0.021728515625,-0.017852783203125,0.0616455078125,-0.01038360595703125,0.03277587890625,-0.0039520263671875,0.01995849609375,-0.022857666015625,0.0001170039176940918,-0.0109100341796875,-0.0100555419921875,0.0023956298828125,0.00206756591796875,-0.0297698974609375,0.00734710693359375,-0.006740570068359375,0.0308990478515625,-0.0088958740234375,0.02276611328125,-0.004119873046875,-0.0002149343490600586,0.01100921630859375,0.00643157958984375,-0.03228759765625,0.034332275390625,-0.0145416259765625,0.0236968994140625,0.01360321044921875,0.01153564453125,0.0285491943359375,-0.0157318115234375,0.00995635986328125,0.0263671875,0.005367279052734375,-0.0047607421875,-0.032440185546875,-0.0015411376953125,-0.0291748046875,0.00960540771484375,0.0367431640625,0.00801849365234375,-0.0292205810546875,-0.0211639404296875,0.0005865097045898438,0.00787353515625,-0.01461029052734375,-0.0079193115234375,-0.0307159423828125,-0.03271484375,0.018035888671875,0.0157318115234375,-0.017608642578125,-0.00252532958984375,-0.036041259765625,0.0247344970703125,0.043121337890625,-0.00458526611328125,0.006542205810546875,-0.030670166015625,0.00060272216796875,0.00572967529296875,0.00826263427734375,-0.006744384765625,0.039947509765625,0.0263214111328125,-0.00548553466796875,-0.021881103515625,-0.00037980079650878906,-0.01419830322265625,0.038909912109375,0.015380859375,0.01351165771484375,0.0187530517578125,-0.00960540771484375,-0.0187530517578125,-0.0292816162109375,-0.04876708984375,0.0198974609375,-0.008697509765625,-0.00626373291015625,0.0028018951416015625,0.019378662109375,-0.01824951171875,0.0253753662109375,0.017120361328125,-0.0114593505859375,0.027587890625,0.00534820556640625,-0.0188751220703125,-0.006801605224609375,0.01062774658203125,0.018310546875,-0.0201263427734375,-0.016357421875,-0.0232696533203125,-0.032379150390625,0.0260162353515625,-0.05108642578125,-0.00862884521484375,-0.047698974609375,0.032073974609375,-0.007564544677734375,-0.021697998046875,0.04931640625,0.015838623046875,-0.020355224609375,0.00942230224609375,0.012847900390625,0.033294677734375,0.0185699462890625,-0.005794525146484375,-0.0184478759765625,0.024139404296875,-0.01267242431640625,0.005611419677734375,-0.03802490234375,-0.0263824462890625,-0.01363372802734375,-0.032012939453125,0.00466156005859375,0.0157470703125,0.0272674560546875,0.047515869140625,0.01004791259765625,-0.0167999267578125,0.016204833984375,-0.01219940185546875,-0.01168060302734375,0.01422119140625,-0.00372314453125,-0.00446319580078125,0.004669189453125,-0.02911376953125,0.0386962890625,-0.0092010498046875,-0.005123138427734375,0.004131317138671875,-0.0050048828125,-0.0279388427734375,-0.0092620849609375,-0.0208587646484375,-0.003910064697265625,0.0099639892578125,0.02911376953125,-0.0206146240234375,-0.00799560546875,-0.01511383056640625,-0.0149383544921875,0.00433349609375,-0.045318603515625,-0.00568389892578125,0.0245361328125,0.007244110107421875,-0.022918701171875,0.0135498046875,-0.01259613037109375,-0.031280517578125,-0.023223876953125,-0.005489349365234375,0.02044677734375,0.0285491943359375,0.034210205078125,-0.003025054931640625,-0.0467529296875,-0.01141357421875,0.0135498046875,-0.0244903564453125,0.01107025146484375,-0.02276611328125,0.01422119140625,0.00830078125,0.01849365234375,0.00677490234375,0.056793212890625,0.0021457672119140625,0.0230255126953125,0.005889892578125,-0.0264739990234375,0.04437255859375,0.0173797607421875,0.027557373046875,0.00418853759765625,0.0007157325744628906,-0.0421142578125,-0.0110626220703125,0.0638427734375,-0.004978179931640625,0.01377105712890625,-0.006801605224609375,-0.029815673828125,0.009185791015625,-0.0243072509765625,-0.004871368408203125,0.0088653564453125,0.06317138671875,0.0015287399291992188,-0.0229034423828125,0.0311431884765625,-0.024444580078125,-0.0212249755859375,-0.00870513916015625,-0.01512908935546875,-0.0308685302734375,-0.002857208251953125,-0.0078582763671875,0.06256103515625,0.017425537109375,0.0294647216796875,0.01280975341796875,-0.0098419189453125,0.0284423828125,-0.0280609130859375,-0.030059814453125,0.01485443115234375,-0.040283203125,-0.0162506103515625,-0.00675201416015625,0.00153350830078125,-0.025726318359375,-0.0242462158203125,-0.0152587890625,-0.01861572265625,0.006305694580078125,0.013824462890625,-0.036163330078125,0.02099609375,-0.0295257568359375,0.01373291015625,0.019683837890625,-0.035064697265625,0.005245208740234375,-0.00032782554626464844,0.00695037841796875,0.0035686492919921875,-0.0163116455078125,0.0181121826171875,-0.01904296875,0.0261077880859375,-0.007396697998046875,-0.01190185546875,-0.015716552734375,0.0013952255249023438,-0.027618408203125,0.0574951171875,-0.02362060546875,-0.0000788569450378418,0.01209259033203125,0.0025615692138671875,-0.01337432861328125,-0.0036907196044921875,0.0034389495849609375,0.002498626708984375,0.01104736328125,-0.041534423828125,-0.00014007091522216797,-0.0013074874877929688,0.003082275390625,-0.00870513916015625,-0.0243377685546875,0.01177978515625,0.0026721954345703125,-0.005035400390625,0.02630615234375,0.01313018798828125,-0.0009069442749023438,-0.01446533203125,-0.051055908203125,-0.005718231201171875,0.0093841552734375,0.0157318115234375,0.0118255615234375,-0.028472900390625,-0.00794219970703125,-0.0130615234375,0.03887939453125,0.020538330078125,0.0005993843078613281,-0.0105743408203125,0.005725860595703125,-0.004848480224609375,0.03228759765625,0.004974365234375,-0.0226287841796875,0.01947021484375,0.01251983642578125,0.0137481689453125,-0.034423828125,-0.0235748291015625,0.0034503936767578125,0.0321044921875,0.0240631103515625,-0.0450439453125,-0.003543853759765625,-0.0318603515625,-0.022369384765625,0.03253173828125,-0.005435943603515625,-0.005374908447265625,-0.011932373046875,0.00786590576171875,-0.005115509033203125,-0.009796142578125,-0.018310546875,-0.038421630859375,-0.006336212158203125,-0.0167694091796875,0.00537109375,-0.00856781005859375,-0.0450439453125,0.04339599609375,-0.01511383056640625,0.001708984375,0.0108184814453125,0.0088348388671875,0.004283905029296875,-0.034942626953125,-0.021575927734375,0.0241851806640625,0.004573822021484375],"index":2}],"model":"text-embedding-3-small","usage":{"prompt_tokens":16,"total_tokens":16}} \ No newline at end of file diff --git a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.blobs/9a14a7a518e93b520c904dd30764c1ad41fd7d47fe63606d39e6da1e58f3a0bc.bin b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.blobs/9a14a7a518e93b520c904dd30764c1ad41fd7d47fe63606d39e6da1e58f3a0bc.bin new file mode 100644 index 000000000..d9c9ce06a --- /dev/null +++ b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.blobs/9a14a7a518e93b520c904dd30764c1ad41fd7d47fe63606d39e6da1e58f3a0bc.bin @@ -0,0 +1 @@ +{"object":"list","data":[{"object":"embedding","embedding":[-0.0296630859375,0.006267547607421875,-0.03515625,0.007568359375,-0.0027828216552734375,-0.015655517578125,-0.003498077392578125,0.0014820098876953125,-0.0012493133544921875,0.0075531005859375,0.0275421142578125,-0.0206756591796875,0.00504302978515625,0.0164947509765625,-0.005992889404296875,0.04437255859375,0.029510498046875,0.049285888671875,0.0657958984375,0.009246826171875,-0.0160369873046875,-0.0012025833129882812,-0.004291534423828125,0.00943756103515625,0.032257080078125,-0.01117706298828125,0.0193939208984375,0.0390625,-0.0022983551025390625,0.056060791015625,0.038482666015625,-0.01031494140625,-0.005466461181640625,-0.0065460205078125,0.020355224609375,-0.052642822265625,-0.0214385986328125,-0.030364990234375,0.01268768310546875,0.04833984375,-0.00676727294921875,-0.047943115234375,-0.022674560546875,0.060546875,-0.017669677734375,-0.0247955322265625,-0.0186004638671875,-0.01375579833984375,0.01436614990234375,-0.0098876953125,0.0458984375,-0.00930023193359375,-0.002887725830078125,0.0162353515625,-0.0177764892578125,0.022735595703125,0.04669189453125,0.0189971923828125,0.01435089111328125,0.0184173583984375,0.03314208984375,-0.01355743408203125,0.0382080078125,-0.01727294921875,-0.004901885986328125,0.035980224609375,-0.034332275390625,0.0274505615234375,0.0181121826171875,0.023162841796875,0.0089263916015625,0.07293701171875,-0.00955963134765625,0.017303466796875,0.044097900390625,0.03118896484375,0.02508544921875,0.053131103515625,0.00029468536376953125,-0.0177459716796875,0.007732391357421875,0.0357666015625,0.00974273681640625,-0.0086517333984375,-0.0109405517578125,-0.02435302734375,0.0025119781494140625,0.01412200927734375,-0.00411224365234375,-0.0293426513671875,-0.004787445068359375,-0.004810333251953125,-0.03570556640625,0.04217529296875,-0.0162811279296875,-0.017669677734375,0.011871337890625,-0.0347900390625,-0.0380859375,0.0181884765625,0.055023193359375,-0.0208892822265625,-0.0088043212890625,0.04150390625,0.01334381103515625,0.00965118408203125,0.0296630859375,-0.0006122589111328125,0.01444244384765625,-0.041748046875,-0.051483154296875,0.0189361572265625,0.012481689453125,0.0165557861328125,-0.039276123046875,0.0159759521484375,0.0231781005859375,-0.01392364501953125,0.023590087890625,-0.00513458251953125,0.0043182373046875,0.01378631591796875,-0.051483154296875,0.0225982666015625,0.019683837890625,-0.016510009765625,0.00736236572265625,-0.0027637481689453125,0.005496978759765625,-0.04425048828125,0.00417327880859375,-0.0296478271484375,0.0210113525390625,0.043487548828125,0.037017822265625,-0.027252197265625,0.027069091796875,-0.01204681396484375,0.0011625289916992188,0.0139007568359375,-0.0099945068359375,0.020172119140625,0.0112457275390625,0.05078125,-0.0160675048828125,-0.0538330078125,-0.03594970703125,0.0297698974609375,0.04803466796875,-0.043182373046875,0.01546478271484375,-0.038665771484375,0.0251007080078125,0.00678253173828125,0.0283966064453125,-0.062164306640625,0.004852294921875,0.031341552734375,0.0310211181640625,0.0228271484375,-0.04522705078125,0.042327880859375,-0.01230621337890625,-0.0180206298828125,-0.003330230712890625,0.01143646240234375,0.0025463104248046875,-0.0133819580078125,-0.002857208251953125,0.0265045166015625,-0.0269927978515625,0.0021419525146484375,0.054107666015625,0.05462646484375,0.0157318115234375,-0.019805908203125,0.0256195068359375,0.04766845703125,-0.0276947021484375,0.01059722900390625,-0.0244598388671875,0.0160369873046875,0.03216552734375,-0.005130767822265625,-0.004817962646484375,0.0231170654296875,0.00215911865234375,-0.0310516357421875,-0.0006608963012695312,0.0513916015625,0.06304931640625,-0.0350341796875,0.039306640625,0.000789642333984375,-0.06353759765625,-0.00441741943359375,0.01204681396484375,-0.03558349609375,0.009979248046875,-0.00823974609375,-0.05572509765625,0.053863525390625,-0.021087646484375,0.01531982421875,-0.006862640380859375,-0.0130157470703125,-0.0257415771484375,-0.05389404296875,0.05963134765625,0.009979248046875,-0.003612518310546875,-0.005550384521484375,-0.005115509033203125,-0.008697509765625,0.0163116455078125,-0.008819580078125,-0.0208740234375,0.036346435546875,0.0665283203125,-0.018768310546875,0.0217437744140625,0.01470947265625,0.032257080078125,0.002544403076171875,-0.037261962890625,0.043365478515625,0.053741455078125,-0.01448822021484375,-0.033905029296875,-0.00217437744140625,0.0008192062377929688,0.0008029937744140625,-0.045074462890625,-0.013275146484375,-0.0218353271484375,-0.026458740234375,0.007114410400390625,-0.0187225341796875,-0.063232421875,0.01430511474609375,-0.01788330078125,0.0283660888671875,0.0084686279296875,-0.0135040283203125,0.0052490234375,-0.0137176513671875,0.0196685791015625,0.034088134765625,-0.03253173828125,0.0189056396484375,0.032623291015625,-0.0010623931884765625,-0.00228118896484375,-0.0187530517578125,-0.0088043212890625,0.0276641845703125,0.0017299652099609375,-0.0003771781921386719,-0.048980712890625,-0.0006017684936523438,-0.01500701904296875,0.005191802978515625,0.00429534912109375,-0.005184173583984375,0.00960540771484375,0.0094451904296875,-0.00948333740234375,0.0108184814453125,-0.0249786376953125,-0.05511474609375,0.06256103515625,-0.00734710693359375,0.0005350112915039062,0.03216552734375,-0.01824951171875,0.009765625,-0.0136871337890625,0.0005764961242675781,-0.00807952880859375,-0.0139312744140625,-0.0242919921875,0.0194244384765625,-0.0340576171875,-0.003696441650390625,-0.0175628662109375,-0.021148681640625,0.03900146484375,0.054351806640625,0.004642486572265625,0.0367431640625,-0.00688934326171875,0.0088958740234375,-0.00592041015625,0.0197906494140625,-0.038787841796875,-0.0063934326171875,0.0278778076171875,0.00727081298828125,0.002887725830078125,0.0100860595703125,0.019195556640625,-0.0457763671875,-0.0017881393432617188,0.00920867919921875,-0.048614501953125,0.0784912109375,-0.008880615234375,0.0280609130859375,0.034912109375,0.0017719268798828125,-0.046844482421875,-0.01605224609375,0.044403076171875,-0.1109619140625,-0.0017175674438476562,0.0016679763793945312,-0.00923919677734375,0.040283203125,0.0096435546875,0.002147674560546875,-0.0004787445068359375,-0.011383056640625,-0.0209503173828125,0.0019741058349609375,-0.0135345458984375,0.0089569091796875,0.0301361083984375,0.03253173828125,-0.004974365234375,0.0011262893676757812,0.00024437904357910156,-0.01947021484375,0.0072479248046875,0.044281005859375,-0.01422882080078125,-0.0249481201171875,0.0116729736328125,0.0249786376953125,0.037872314453125,-0.005054473876953125,-0.00881195068359375,-0.01114654541015625,-0.01047515869140625,0.0156707763671875,-0.011810302734375,0.0013494491577148438,0.023773193359375,0.032196044921875,-0.01100921630859375,-0.036041259765625,-0.034637451171875,-0.03729248046875,-0.02435302734375,0.029266357421875,-0.0302581787109375,0.002613067626953125,0.0782470703125,0.04681396484375,-0.04119873046875,0.004863739013671875,-0.029205322265625,-0.04193115234375,-0.033203125,-0.039031982421875,-0.0670166015625,0.0243072509765625,-0.008697509765625,0.0117645263671875,-0.022125244140625,0.045623779296875,-0.017974853515625,-0.01012420654296875,0.05230712890625,-0.0516357421875,0.0048828125,-0.038055419921875,-0.034576416015625,0.01143646240234375,-0.0052337646484375,-0.057708740234375,-0.05389404296875,0.0396728515625,0.0263824462890625,-0.055816650390625,0.01548004150390625,0.031982421875,0.00333404541015625,-0.06695556640625,-0.0166168212890625,-0.01343536376953125,-0.01204681396484375,0.0177764892578125,0.01134490966796875,0.0274810791015625,-0.01611328125,-0.0214385986328125,0.02435302734375,0.00010132789611816406,-0.0528564453125,-0.01445770263671875,-0.0273590087890625,-0.01395416259765625,-0.016754150390625,-0.02288818359375,0.0193023681640625,0.03411865234375,-0.016937255859375,-0.00798797607421875,-0.009796142578125,-0.045745849609375,0.00010347366333007812,-0.080078125,0.03448486328125,-0.005115509033203125,0.007198333740234375,0.010528564453125,0.058929443359375,-0.046600341796875,0.01177215576171875,0.004169464111328125,0.02374267578125,-0.00969696044921875,0.0193023681640625,-0.0217132568359375,-0.0181732177734375,0.006565093994140625,-0.020599365234375,-0.034576416015625,0.01959228515625,-0.0146942138671875,0.0228271484375,-0.058685302734375,0.0019893646240234375,-0.036651611328125,-0.0038204193115234375,0.0005564689636230469,0.001636505126953125,-0.01275634765625,-0.022705078125,-0.001220703125,0.05194091796875,-0.0240936279296875,0.0030574798583984375,-0.01143646240234375,-0.04400634765625,-0.0265045166015625,0.04547119140625,0.041473388671875,0.00965118408203125,0.012969970703125,-0.0284881591796875,0.0117340087890625,-0.0008306503295898438,-0.0239105224609375,0.0023365020751953125,0.043060302734375,0.003719329833984375,0.06475830078125,0.0158538818359375,-0.04779052734375,0.026580810546875,0.07342529296875,-0.003673553466796875,0.047821044921875,0.029449462890625,0.0010004043579101562,0.02935791015625,0.031280517578125,-0.0283660888671875,-0.014495849609375,-0.027984619140625,0.005352020263671875,0.0218353271484375,0.046142578125,0.011444091796875,0.0186309814453125,-0.053375244140625,0.04168701171875,-0.03326416015625,-0.037139892578125,-0.023651123046875,0.023406982421875,-0.0132293701171875,-0.0131072998046875,-0.0784912109375,-0.0114898681640625,0.0182952880859375,0.005550384521484375,-0.03643798828125,0.007099151611328125,-0.00292205810546875,-0.01953125,0.00965118408203125,-0.005001068115234375,0.0205230712890625,-0.005237579345703125,-0.041534423828125,-0.04498291015625,0.0145111083984375,0.00319671630859375,-0.0086822509765625,0.0108795166015625,0.0232391357421875,0.042266845703125,0.0282440185546875,0.070556640625,-0.0033111572265625,0.007293701171875,-0.00217437744140625,-0.019805908203125,0.0287933349609375,0.0017995834350585938,-0.00757598876953125,-0.00439453125,-0.0145721435546875,-0.0015916824340820312,-0.0107879638671875,0.041015625,-0.0244140625,0.013641357421875,0.01038360595703125,0.04376220703125,-0.007137298583984375,0.0005049705505371094,0.0233154296875,0.0062713623046875,-0.03363037109375,-0.01007080078125,0.0181884765625,-0.0311279296875,0.0347900390625,-0.01319122314453125,-0.00823974609375,0.0089874267578125,0.007305145263671875,-0.02410888671875,-0.00528717041015625,0.03424072265625,0.0080108642578125,0.0299072265625,0.0267333984375,0.011688232421875,-0.0297698974609375,0.0033054351806640625,-0.020965576171875,0.0014486312866210938,0.038543701171875,-0.019744873046875,-0.017852783203125,-0.0267486572265625,-0.0011415481567382812,0.013641357421875,-0.04693603515625,-0.011627197265625,0.01267242431640625,-0.0288238525390625,0.00984954833984375,-0.0009074211120605469,-0.0021152496337890625,0.00921630859375,-0.00815582275390625,0.07098388671875,0.001934051513671875,0.006877899169921875,0.036163330078125,0.0418701171875,0.0191497802734375,-0.0103912353515625,-0.0249786376953125,-0.019622802734375,0.0093536376953125,0.037017822265625,-0.0185394287109375,0.00994873046875,0.03857421875,-0.01202392578125,-0.00324249267578125,-0.0017414093017578125,-0.01242828369140625,0.0458984375,-0.0019741058349609375,0.01751708984375,0.028289794921875,-0.009246826171875,-0.0212860107421875,-0.0082244873046875,-0.0027942657470703125,-0.0019588470458984375,-0.01009368896484375,-0.0255126953125,0.0303802490234375,0.0015048980712890625,-0.00312042236328125,-0.0011529922485351562,0.036712646484375,0.017181396484375,-0.043914794921875,-0.040802001953125,-0.036041259765625,0.0023670196533203125,-0.019775390625,-0.0014295578002929688,-0.0099639892578125,-0.01218414306640625,0.025390625,0.0047454833984375,0.05322265625,-0.01451873779296875,0.001033782958984375,-0.017120361328125,0.007781982421875,-0.0310821533203125,0.013336181640625,-0.0035800933837890625,0.004894256591796875,0.00014019012451171875,-0.01103973388671875,0.0235443115234375,-0.0001455545425415039,0.0221710205078125,0.0026378631591796875,0.031707763671875,-0.037384033203125,0.006122589111328125,-0.0145263671875,0.0531005859375,0.018890380859375,0.0089111328125,0.01534271240234375,-0.0279388427734375,0.035400390625,-0.00717926025390625,0.04412841796875,0.002849578857421875,0.0017652511596679688,-0.0233001708984375,-0.0465087890625,-0.0143280029296875,0.0032978057861328125,-0.025909423828125,0.01482391357421875,0.0268707275390625,0.06268310546875,-0.0190582275390625,0.0110626220703125,0.0082855224609375,0.0256195068359375,0.051361083984375,0.037872314453125,-0.03045654296875,0.0131988525390625,0.0017719268798828125,-0.0162506103515625,0.0101165771484375,0.006275177001953125,0.0528564453125,-0.0119781494140625,0.01558685302734375,-0.042022705078125,0.01413726806640625,-0.01214599609375,-0.0003771781921386719,0.02435302734375,-0.032135009765625,-0.00507354736328125,0.0157012939453125,0.0195770263671875,0.04827880859375,0.027313232421875,0.0111846923828125,-0.0229339599609375,-0.0240936279296875,-0.006793975830078125,0.01287841796875,0.037384033203125,-0.033843994140625,0.0242462158203125,-0.0185546875,-0.03204345703125,0.0247039794921875,-0.044097900390625,0.026947021484375,-0.042205810546875,0.007785797119140625,-0.01312255859375,0.020782470703125,-0.04705810546875,-0.000027060508728027344,0.00946044921875,-0.0228118896484375,-0.00191497802734375,-0.0178070068359375,-0.02288818359375,0.02947998046875,0.0145263671875,-0.048919677734375,0.023040771484375,0.0194244384765625,0.0166015625,0.061920166015625,-0.01275634765625,-0.0179901123046875,-0.0389404296875,-0.0253753662109375,-0.00923919677734375,0.017822265625,-0.017486572265625,-0.01232147216796875,-0.0086669921875,0.01485443115234375,-0.022857666015625,-0.042938232421875,-0.04510498046875,-0.00750732421875,0.007091522216796875,-0.0009541511535644531,-0.00823974609375,0.00591278076171875,0.027618408203125,-0.006984710693359375,-0.0004355907440185547,-0.0132293701171875,-0.0198211669921875,0.0007796287536621094,-0.002727508544921875,-0.02001953125,-0.01019287109375,0.004711151123046875,0.01343536376953125,-0.01406097412109375,-0.03204345703125,-0.036041259765625,-0.02032470703125,0.037139892578125,0.00914764404296875,0.0225677490234375,-0.00959014892578125,0.0223236083984375,-0.05511474609375,0.01129913330078125,0.0017223358154296875,-0.0099334716796875,-0.01070404052734375,-0.0038814544677734375,0.00850677490234375,0.054962158203125,-0.0198974609375,-0.0285491943359375,-0.031280517578125,-0.010498046875,-0.007724761962890625,0.002773284912109375,0.0092926025390625,-0.0049285888671875,0.02655029296875,-0.0091094970703125,0.0379638671875,0.0215606689453125,-0.0247802734375,-0.038360595703125,0.0263214111328125,0.03564453125,-0.016754150390625,-0.0201873779296875,0.030059814453125,-0.0182342529296875,-0.00441741943359375,0.00211334228515625,-0.00836944580078125,-0.01006317138671875,-0.0062255859375,0.011871337890625,-0.043060302734375,0.0030364990234375,0.062225341796875,0.0262603759765625,-0.030242919921875,-0.006252288818359375,-0.0165252685546875,-0.01442718505859375,0.028350830078125,-0.01088714599609375,0.01560211181640625,0.01531982421875,-0.01349639892578125,-0.027801513671875,0.05560302734375,-0.044586181640625,-0.0196380615234375,-0.002941131591796875,-0.0102081298828125,0.00313568115234375,-0.0214080810546875,-0.01070404052734375,-0.002285003662109375,-0.0257110595703125,0.034820556640625,-0.004161834716796875,-0.0063934326171875,-0.019195556640625,0.0171051025390625,0.0036468505859375,-0.016876220703125,0.007259368896484375,0.052764892578125,0.0255126953125,0.0025844573974609375,0.0182952880859375,-0.01067352294921875,-0.0018062591552734375,0.00010073184967041016,-0.0401611328125,-0.0014486312866210938,0.008209228515625,0.01153564453125,-0.01114654541015625,-0.0065460205078125,-0.0477294921875,0.03729248046875,0.0222320556640625,0.0218963623046875,-0.006969451904296875,0.0050048828125,-0.06488037109375,0.0343017578125,-0.03314208984375,0.0289764404296875,0.0102081298828125,0.0004973411560058594,0.0078277587890625,-0.035736083984375,0.01190185546875,0.01146697998046875,0.004497528076171875,0.0164794921875,0.02935791015625,-0.0101165771484375,-0.006595611572265625,-0.021881103515625,0.0061492919921875,-0.026092529296875,0.057464599609375,0.0083465576171875,-0.05426025390625,0.006404876708984375,-0.01386260986328125,0.0032749176025390625,-0.00942230224609375,0.00664520263671875,0.00922393798828125,-0.03973388671875,0.0173187255859375,-0.02032470703125,0.0189666748046875,-0.0526123046875,0.03765869140625,-0.019134521484375,0.03668212890625,0.02581787109375,-0.028289794921875,-0.0215301513671875,-0.0014009475708007812,0.029998779296875,-0.048980712890625,-0.00582122802734375,-0.044769287109375,-0.023040771484375,-0.04046630859375,-0.00556182861328125,0.055267333984375,-0.016082763671875,-0.0037212371826171875,0.0189971923828125,0.00806427001953125,0.0052337646484375,0.029693603515625,0.01401519775390625,0.017242431640625,0.01529693603515625,-0.050567626953125,-0.00003820657730102539,-0.005496978759765625,0.026947021484375,0.00490570068359375,-0.0352783203125,-0.001842498779296875,-0.018707275390625,-0.003665924072265625,0.01751708984375,0.0295867919921875,-0.00968170166015625,-0.01537322998046875,0.023834228515625,0.019744873046875,-0.0159149169921875,-0.0021266937255859375,0.006381988525390625,0.004756927490234375,0.0152587890625,-0.06591796875,-0.043975830078125,0.0220184326171875,0.040130615234375,0.0086822509765625,0.0225067138671875,-0.008697509765625,-0.03204345703125,-0.00839996337890625,-0.0214080810546875,-0.001556396484375,-0.00408935546875,-0.04107666015625,-0.0188751220703125,0.0228271484375,0.0699462890625,-0.03497314453125,0.0250091552734375,0.0292205810546875,-0.00881195068359375,0.03369140625,-0.0214996337890625,0.03497314453125,-0.00469207763671875,-0.035858154296875,0.0088348388671875,-0.0101470947265625,-0.00576019287109375,0.004024505615234375,0.00038433074951171875,-0.0060882568359375,0.01348876953125,0.0292205810546875,-0.01470184326171875,0.003444671630859375,-0.0108489990234375,0.01300048828125,-0.00959014892578125,0.0014486312866210938,0.0139617919921875,0.015411376953125,0.035400390625,-0.0010824203491210938,0.005252838134765625,0.0246429443359375,-0.0041656494140625,-0.01739501953125,0.0157318115234375,-0.01535797119140625,0.041259765625,0.0230560302734375,0.0241546630859375,-0.019622802734375,-0.006900787353515625,-0.01448822021484375,0.025970458984375,-0.01003265380859375,0.00260162353515625,0.0282135009765625,-0.004146575927734375,-0.00737762451171875,0.021331787109375,0.00986480712890625,0.01898193359375,-0.009857177734375,-0.0199737548828125,-0.0013742446899414062,0.023101806640625,0.0037059783935546875,0.0249786376953125,0.0294036865234375,-0.016815185546875,-0.01483154296875,0.006328582763671875,0.05792236328125,-0.021697998046875,-0.038055419921875,0.026947021484375,-0.00003319978713989258,0.0264892578125,0.01282501220703125,-0.0011234283447265625,0.01419830322265625,-0.0112457275390625,-0.0161895751953125,-0.031707763671875,-0.0277862548828125,-0.004230499267578125,0.036834716796875,-0.0176544189453125,0.0102996826171875,-0.012359619140625,-0.00848388671875,0.0299072265625,-0.032806396484375,0.0091094970703125,-0.006076812744140625,0.00616455078125,0.0222015380859375,0.03302001953125,-0.03460693359375,-0.0234222412109375,-0.002826690673828125,0.0111846923828125,-0.010345458984375,-0.020233154296875,-0.0245208740234375,0.0301513671875,0.0260162353515625,-0.0399169921875,-0.0132293701171875,0.00194549560546875,-0.0294036865234375,-0.01751708984375,-0.0010356903076171875,-0.0187225341796875,0.002750396728515625,0.036102294921875,0.00817108154296875,-0.0097808837890625,-0.01001739501953125,-0.01654052734375,0.00577545166015625,-0.0177001953125,-0.027862548828125,0.0159454345703125,-0.0150604248046875,-0.018096923828125,-0.0190887451171875,0.0224761962890625,-0.0098419189453125,-0.01006317138671875,0.00327301025390625,-0.0482177734375,0.045318603515625,-0.0338134765625,0.0164031982421875,0.00738525390625,-0.0208282470703125,0.009674072265625,0.0006899833679199219,0.0084075927734375,0.0035839080810546875,-0.00695037841796875,-0.005527496337890625,0.009002685546875,0.02105712890625,0.037628173828125,-0.0006389617919921875,0.05352783203125,-0.026611328125,-0.0460205078125,0.00217437744140625,-0.04168701171875,-0.00646209716796875,-0.00945281982421875,-0.0200042724609375,-0.046630859375,-0.0183563232421875,-0.003444671630859375,0.0109405517578125,0.03955078125,-0.011444091796875,0.0157318115234375,-0.0165863037109375,0.03289794921875,0.00970458984375,-0.02471923828125,-0.01837158203125,-0.02294921875,0.03326416015625,-0.020965576171875,0.01488494873046875,-0.01058197021484375,-0.00036334991455078125,0.007061004638671875,0.0217132568359375,-0.0255126953125,0.041534423828125,0.0280914306640625,0.04107666015625,0.0200042724609375,-0.00705718994140625,0.0714111328125,0.0264434814453125,-0.056427001953125,-0.021148681640625,0.02581787109375,-0.0496826171875,-0.0250396728515625,-0.03546142578125,0.0142364501953125,0.044158935546875,-0.021759033203125,-0.0106048583984375,0.0498046875,0.005687713623046875,-0.0086669921875,0.0111846923828125,0.006259918212890625,0.00911712646484375,0.04229736328125,-0.0245361328125,-0.002834320068359375,-0.01082611083984375,0.01107025146484375,0.0009684562683105469,-0.0188446044921875,0.00650787353515625,-0.038421630859375,0.0018186569213867188,-0.01529693603515625,0.038909912109375,0.0306854248046875,-0.002899169921875,-0.0246124267578125,0.01328277587890625,0.0139923095703125,-0.00299072265625,-0.0113372802734375,0.0214691162109375,0.01983642578125,-0.0199432373046875,0.01288604736328125,0.0195159912109375,0.007137298583984375,0.023223876953125,-0.016693115234375,-0.020965576171875,-0.0236053466796875,0.0217742919921875,0.031463623046875,0.0255126953125,-0.0088958740234375,-0.0175323486328125,-0.0160064697265625,-0.007167816162109375,-0.016937255859375,-0.01319122314453125,-0.005886077880859375,0.05218505859375,0.04376220703125,-0.01457977294921875,-0.00858306884765625,0.0496826171875,0.0172119140625,-0.033447265625,0.0213470458984375,0.043060302734375,-0.0217437744140625,0.02105712890625,-0.0020809173583984375,0.00560760498046875,0.0067138671875,-0.026519775390625,0.0189971923828125,0.01500701904296875,-0.044403076171875,0.0249786376953125,0.0226593017578125,0.0257568359375,-0.00914764404296875,0.0095367431640625,0.049560546875,0.0180511474609375,-0.0193023681640625,-0.003787994384765625,0.04083251953125,-0.0159759521484375,-0.028472900390625,-0.0355224609375,0.0251922607421875,0.03948974609375,0.015533447265625,0.0169677734375,-0.005828857421875,0.0102081298828125,-0.028533935546875,-0.030242919921875,0.029205322265625,0.036102294921875,0.0211334228515625,0.0272216796875,0.050201416015625,-0.005626678466796875,-0.0144805908203125,0.0008854866027832031,0.0250091552734375,-0.0008344650268554688,-0.01165771484375,0.011505126953125,-0.0256500244140625,0.00514984130859375,0.00830078125,-0.03912353515625,-0.03887939453125,-0.01041412353515625,-0.0266876220703125,0.0276031494140625,0.0250396728515625,0.0006151199340820312,0.007045745849609375,-0.0219268798828125,0.022247314453125,0.01082611083984375,0.006229400634765625,0.05853271484375,0.004268646240234375,0.0249176025390625,-0.0247344970703125,-0.00659942626953125,-0.034149169921875,0.01128387451171875,-0.03704833984375,-0.0185394287109375,0.0032215118408203125,-0.031463623046875,-0.00916290283203125,0.01788330078125,0.0340576171875,-0.01364898681640625,-0.0097198486328125,0.031585693359375,-0.02532958984375,-0.0009860992431640625,-0.01215362548828125,-0.0281829833984375,-0.00740814208984375,-0.004039764404296875,0.03515625,0.01322174072265625,-0.0194854736328125,0.01421356201171875,-0.04754638671875,-0.019622802734375,-0.0193634033203125,0.0257720947265625,0.0085601806640625,0.0276336669921875,-0.007549285888671875,-0.01284027099609375,-0.043975830078125,0.0018749237060546875,0.039398193359375,-0.022247314453125,0.033538818359375,-0.0005292892456054688,0.03570556640625,-0.007160186767578125,-0.00952911376953125,-0.0399169921875,0.0274810791015625,0.01470184326171875,-0.004547119140625,0.006256103515625,-0.01959228515625,-0.01364898681640625,-0.0213775634765625,0.0007653236389160156,-0.017974853515625,0.00644683837890625,-0.002841949462890625,-0.0016908645629882812,-0.0099029541015625,0.00998687744140625,0.04608154296875,-0.019561767578125,-0.01221466064453125,0.0243377685546875,0.0166778564453125,0.0020542144775390625,-0.017242431640625,0.050506591796875,0.03045654296875,0.0288238525390625,-0.01263427734375,0.007537841796875,0.00563812255859375,-0.0106048583984375,0.05718994140625,0.007381439208984375,0.00865936279296875,-0.00913238525390625,0.045654296875,-0.006839752197265625,0.042266845703125,-0.01153564453125,0.006103515625,-0.0059967041015625,0.0257415771484375,0.00684356689453125,-0.02398681640625,-0.0006957054138183594,-0.01232147216796875,-0.008453369140625,-0.02984619140625,-0.042633056640625,-0.00995635986328125,-0.026092529296875,0.023345947265625,-0.002223968505859375,0.025390625,0.0253753662109375,-0.006931304931640625,0.027496337890625,-0.0104827880859375,0.01392364501953125,-0.016876220703125,-0.02056884765625,0.045501708984375,-0.0089874267578125,-0.0156402587890625,-0.02032470703125,-0.01064300537109375,-0.0218353271484375,-0.0117034912109375,-0.01438140869140625,-0.054779052734375,0.0189361572265625,-0.051483154296875,-0.046722412109375,0.0129852294921875,0.0203399658203125,-0.000530242919921875,0.01058197021484375,0.01983642578125,0.003459930419921875,0.000053763389587402344,0.01971435546875,-0.05584716796875,0.03558349609375,-0.0254364013671875,-0.042266845703125,-0.0294036865234375,-0.0095977783203125,-0.01403045654296875,0.0033721923828125,-0.0087738037109375,-0.0003464221954345703,-0.01678466796875,0.0197296142578125,0.0067291259765625,-0.045257568359375,0.022125244140625,-0.05731201171875,-0.0246124267578125,0.035247802734375,-0.03460693359375,-0.01137542724609375,0.0496826171875,0.004161834716796875,0.0107879638671875,-0.013214111328125,-0.037689208984375,0.0001323223114013672,-0.01232147216796875,-0.018463134765625,-0.00948333740234375,0.0164031982421875,0.0057220458984375,-0.036956787109375,0.0230560302734375,-0.0282135009765625,-0.00818634033203125,-0.02606201171875,0.01230621337890625,-0.03436279296875,-0.03363037109375,0.02099609375,-0.01261138916015625,-0.0113677978515625,-0.0180816650390625,0.0201873779296875,-0.0027141571044921875,-0.0033130645751953125,-0.0301971435546875,0.0157623291015625,-0.032501220703125,0.053466796875,-0.0010700225830078125,0.0064697265625,-0.043731689453125,0.00951385498046875,0.0012493133544921875,-0.005672454833984375,0.0083770751953125,-0.0024166107177734375,0.0023956298828125,0.01409149169921875,0.050628662109375,-0.0022907257080078125,0.02734375,-0.037261962890625,-0.0087432861328125,0.0017070770263671875,-0.0084686279296875,0.0185089111328125,0.0275421142578125,0.03680419921875,-0.0301971435546875,-0.01242828369140625,0.00037384033203125,-0.0003161430358886719,0.0175323486328125,0.0042266845703125,0.006183624267578125,-0.008453369140625,-0.027923583984375,0.0236053466796875,0.0095672607421875,-0.0084381103515625,0.0011796951293945312,-0.0130767822265625,-0.02569580078125,-0.0226898193359375,0.0019893646240234375,-0.02581787109375,0.0104217529296875,-0.004848480224609375,0.008636474609375,0.03741455078125,0.01026153564453125,0.020111083984375,0.0498046875,0.034332275390625,0.003932952880859375,0.033721923828125,-0.0064849853515625,0.0019893646240234375,0.0097503662109375,-0.01122283935546875,-0.01113128662109375,-0.0277862548828125,0.0030841827392578125,0.0062103271484375,-0.0030918121337890625,-0.00015163421630859375,-0.01316070556640625,0.00952911376953125,-0.017425537109375,-0.01776123046875,-0.05194091796875,0.0261383056640625,-0.02471923828125,0.005611419677734375,-0.0200042724609375,-0.0043792724609375,-0.000640869140625,-0.0038852691650390625,-0.002590179443359375,0.0374755859375,0.01983642578125,0.012451171875,0.027679443359375,-0.031005859375,-0.007778167724609375,-0.005329132080078125,0.00830078125,-0.00525665283203125,0.0198211669921875,-0.0147552490234375,0.0087432861328125,0.0014028549194335938,-0.01395416259765625,0.0243377685546875,-0.001628875732421875,0.042144775390625,-0.00213623046875,0.01230621337890625,0.03131103515625,0.0250396728515625,-0.0259552001953125,-0.02593994140625,0.0007104873657226562,-0.01934814453125,0.01018524169921875,0.01593017578125,-0.016693115234375,0.016357421875,0.0251617431640625,0.0005369186401367188,0.0159149169921875,-0.0015897750854492188,-0.023529052734375,-0.0286407470703125,0.027435302734375,0.017608642578125,0.005527496337890625,-0.003940582275390625,-0.0145111083984375,-0.0003685951232910156,0.007617950439453125,-0.0272216796875,0.003620147705078125,-0.010162353515625,-0.00982666015625,0.045623779296875,0.0185394287109375,0.01515960693359375,0.0307464599609375,-0.0227508544921875,0.0003216266632080078,-0.003452301025390625,-0.0244293212890625,-0.0220794677734375,-0.006565093994140625,-0.007904052734375,0.022979736328125,0.0207672119140625,0.00188446044921875,-0.00927734375,-0.00920867919921875,-0.0171051025390625,-0.018280029296875,0.022430419921875,0.00710296630859375,0.0169830322265625,0.0310516357421875,0.0020160675048828125,-0.041229248046875,-0.0029506683349609375,-0.02294921875,0.031829833984375,0.01343536376953125,0.0264892578125,-0.037139892578125,-0.00783538818359375,0.0183258056640625,-0.033721923828125,-0.034423828125,0.01538848876953125,-0.01531982421875,-0.006122589111328125,0.0006113052368164062,-0.0278167724609375,0.004138946533203125,-0.00421905517578125],"index":0},{"object":"embedding","embedding":[-0.0276031494140625,0.0059356689453125,-0.00809478759765625,0.0106964111328125,-0.02032470703125,0.005748748779296875,-0.0045013427734375,0.03436279296875,-0.02044677734375,0.007053375244140625,-0.0128326416015625,-0.022705078125,0.0469970703125,0.0175933837890625,0.00894927978515625,0.0158538818359375,-0.0012102127075195312,0.0281219482421875,0.01424407958984375,0.03753662109375,0.0160980224609375,-0.006320953369140625,0.00907135009765625,0.029693603515625,0.038330078125,-0.003307342529296875,0.0125579833984375,-0.045379638671875,-0.01476287841796875,-0.034698486328125,0.0210723876953125,-0.0212249755859375,0.042572021484375,0.003879547119140625,-0.01396942138671875,-0.016387939453125,-0.0084686279296875,0.008544921875,0.004917144775390625,0.0106201171875,-0.0204620361328125,-0.04571533203125,-0.03326416015625,0.044219970703125,-0.062255859375,0.0085906982421875,-0.03961181640625,-0.006160736083984375,-0.013153076171875,-0.01238250732421875,0.0643310546875,-0.00321197509765625,0.0158538818359375,-0.04119873046875,0.0260009765625,-0.00148773193359375,-0.0216217041015625,0.0364990234375,0.024688720703125,0.03607177734375,0.05609130859375,-0.0002605915069580078,0.01462554931640625,-0.006618499755859375,-0.04095458984375,-0.0152130126953125,0.0223236083984375,0.023590087890625,0.0148773193359375,-0.05657958984375,0.0474853515625,0.040924072265625,0.01441192626953125,0.007381439208984375,0.01215362548828125,0.05487060546875,0.03924560546875,0.045745849609375,0.03265380859375,-0.01349639892578125,0.005596160888671875,0.0224151611328125,0.01050567626953125,-0.01812744140625,-0.006824493408203125,-0.037017822265625,0.033203125,0.01441192626953125,0.007038116455078125,-0.0106048583984375,-0.048858642578125,-0.03778076171875,-0.002567291259765625,0.0831298828125,0.0033206939697265625,-0.029449462890625,-0.0186614990234375,-0.0026035308837890625,-0.04736328125,0.006683349609375,0.061767578125,-0.025787353515625,0.04486083984375,0.015716552734375,0.0242919921875,-0.024200439453125,0.03216552734375,0.00852203369140625,0.01035308837890625,0.025360107421875,-0.04510498046875,0.042083740234375,0.0535888671875,-0.018646240234375,-0.056549072265625,0.01837158203125,0.0167999267578125,-0.00426483154296875,-0.0280609130859375,0.026397705078125,-0.008026123046875,0.02740478515625,-0.03082275390625,0.00975799560546875,0.0035953521728515625,-0.0158843994140625,0.0207672119140625,0.0021915435791015625,-0.0220489501953125,-0.00521087646484375,0.0249786376953125,0.012542724609375,0.0031223297119140625,0.0150146484375,0.0194091796875,0.0055084228515625,-0.034881591796875,0.0462646484375,-0.0078887939453125,-0.01146697998046875,-0.01082611083984375,0.01485443115234375,0.016845703125,0.03753662109375,-0.045379638671875,0.03485107421875,-0.0304412841796875,0.0350341796875,0.043060302734375,-0.0020236968994140625,0.0035152435302734375,-0.002803802490234375,0.019287109375,-0.01690673828125,0.0134124755859375,-0.056640625,0.0017499923706054688,0.0811767578125,-0.00397491455078125,-0.00823974609375,-0.032501220703125,0.02142333984375,0.0099945068359375,0.01253509521484375,-0.047088623046875,0.0035533905029296875,-0.01119232177734375,0.00506591796875,-0.003391265869140625,-0.04736328125,-0.0170135498046875,0.0322265625,-0.0087127685546875,0.049407958984375,-0.051025390625,0.012481689453125,0.030303955078125,0.01436614990234375,-0.007671356201171875,0.041259765625,0.01385498046875,0.0269012451171875,-0.01348114013671875,0.003536224365234375,-0.0178985595703125,0.0190582275390625,0.0021686553955078125,-0.00923919677734375,-0.0201263427734375,0.07403564453125,-0.00798797607421875,-0.02899169921875,0.0322265625,-0.029388427734375,-0.0238494873046875,-0.005054473876953125,0.0372314453125,-0.059539794921875,0.046417236328125,0.003650665283203125,0.004367828369140625,0.0049896240234375,-0.0115509033203125,0.0261383056640625,-0.027435302734375,-0.0019702911376953125,-0.015594482421875,-0.0229644775390625,0.0241546630859375,0.0289306640625,0.0026416778564453125,-0.018524169921875,-0.04937744140625,-0.0294952392578125,-0.0014133453369140625,0.005229949951171875,-0.0328369140625,0.019989013671875,0.06365966796875,0.01284027099609375,0.005695343017578125,0.0095062255859375,0.048095703125,-0.0576171875,0.01293182373046875,0.027557373046875,0.0452880859375,-0.0099029541015625,-0.039886474609375,-0.0203704833984375,-0.00839996337890625,-0.017242431640625,-0.00975799560546875,-0.034637451171875,0.00211334228515625,-0.0002994537353515625,-0.0095062255859375,-0.019317626953125,-0.0384521484375,-0.046173095703125,-0.04168701171875,-0.0026950836181640625,0.08746337890625,-0.045318603515625,-0.00815582275390625,-0.01372528076171875,0.0036983489990234375,0.035400390625,-0.02618408203125,0.0289459228515625,-0.04107666015625,-0.01253509521484375,0.01532745361328125,-0.01314544677734375,0.004985809326171875,-0.0031414031982421875,-0.0216217041015625,0.01800537109375,-0.01256561279296875,-0.0228271484375,-0.03265380859375,-0.027618408203125,-0.00927734375,-0.00354766845703125,-0.020599365234375,0.00498199462890625,0.002368927001953125,0.005596160888671875,-0.058013916015625,-0.07427978515625,0.0196075439453125,0.01291656494140625,0.0323486328125,0.00016617774963378906,-0.052886962890625,-0.0162811279296875,0.0220489501953125,-0.01385498046875,0.00933837890625,-0.0013208389282226562,-0.00726318359375,0.0146331787109375,-0.0185546875,-0.0307159423828125,0.0230560302734375,-0.0309906005859375,-0.0294952392578125,0.053253173828125,0.009979248046875,0.033416748046875,0.0345458984375,0.0101776123046875,0.0093994140625,0.0263519287109375,0.03558349609375,0.0072174072265625,0.032379150390625,-0.00910186767578125,-0.05767822265625,0.00690460205078125,0.0333251953125,-0.05908203125,0.0204010009765625,-0.0114593505859375,-0.0377197265625,0.0731201171875,-0.044769287109375,0.042144775390625,0.0066680908203125,0.0244598388671875,-0.05291748046875,-0.05267333984375,0.023773193359375,-0.0902099609375,0.0004940032958984375,-0.00792694091796875,-0.0068511962890625,-0.007610321044921875,0.0135040283203125,-0.01220703125,-0.0159149169921875,-0.033233642578125,-0.046051025390625,0.01071929931640625,0.0004591941833496094,0.050079345703125,0.0335693359375,0.034271240234375,0.03717041015625,0.0120391845703125,0.0206298828125,-0.011932373046875,0.02349853515625,0.045379638671875,0.032135009765625,-0.0233306884765625,0.02899169921875,0.0419921875,0.02935791015625,-0.01035308837890625,0.0228118896484375,0.00888824462890625,-0.00870513916015625,0.0014200210571289062,0.0082855224609375,0.034576416015625,0.00965118408203125,-0.00402069091796875,-0.0007386207580566406,-0.02435302734375,-0.03717041015625,-0.00470733642578125,-0.034637451171875,0.0206146240234375,0.018890380859375,0.00921630859375,0.04296875,0.040924072265625,-0.037933349609375,0.0191650390625,0.0205535888671875,-0.0264129638671875,0.0092620849609375,0.005092620849609375,0.002899169921875,0.0018815994262695312,-0.035247802734375,0.009857177734375,-0.01352691650390625,0.01157379150390625,-0.0215606689453125,-0.03814697265625,0.0236358642578125,0.00334930419921875,-0.005992889404296875,-0.015594482421875,0.0157470703125,0.0298919677734375,0.00592803955078125,-0.04290771484375,-0.052490234375,0.037506103515625,-0.006847381591796875,-0.06939697265625,-0.032073974609375,0.006618499755859375,-0.0007014274597167969,-0.042236328125,-0.058197021484375,-0.018829345703125,-0.0204620361328125,0.021942138671875,0.007747650146484375,0.01021575927734375,-0.0244140625,-0.033447265625,-0.00806427001953125,0.02899169921875,-0.07745361328125,-0.007038116455078125,-0.0175018310546875,-0.046966552734375,-0.0169830322265625,-0.01519012451171875,-0.007320404052734375,0.0032806396484375,-0.0076751708984375,0.029052734375,0.00897979736328125,-0.045501708984375,-0.01094818115234375,-0.020294189453125,0.01038360595703125,0.01546478271484375,-0.016876220703125,0.0146636962890625,-0.04010009765625,0.00228118896484375,0.0310211181640625,-0.0192718505859375,0.056793212890625,-0.010528564453125,-0.03253173828125,-0.042236328125,0.019287109375,-0.02008056640625,0.01605224609375,0.038238525390625,0.003009796142578125,-0.05096435546875,0.01461029052734375,-0.05303955078125,-0.0137786865234375,-0.00472259521484375,-0.0236968994140625,-0.01450347900390625,0.0227508544921875,0.007770538330078125,0.01451873779296875,-0.00585174560546875,-0.00331878662109375,-0.02423095703125,0.02435302734375,0.0247650146484375,-0.03900146484375,0.031951904296875,-0.01715087890625,0.032379150390625,0.01485443115234375,0.002376556396484375,-0.01788330078125,-0.01190185546875,0.00040841102600097656,-0.031829833984375,0.0061187744140625,0.026397705078125,0.06695556640625,0.0784912109375,0.014007568359375,-0.027679443359375,-0.005855560302734375,0.043670654296875,-0.0007181167602539062,0.04412841796875,0.00160980224609375,0.004108428955078125,-0.027618408203125,0.017333984375,-0.00461578369140625,-0.0311279296875,0.004611968994140625,0.053009033203125,0.003284454345703125,0.0041656494140625,-0.0002428293228149414,0.032928466796875,-0.0177001953125,-0.0152435302734375,0.035614013671875,-0.060333251953125,0.00485992431640625,0.061065673828125,0.01251220703125,-0.051239013671875,-0.0452880859375,-0.03741455078125,0.0098724365234375,-0.049896240234375,-0.037994384765625,-0.05096435546875,0.006099700927734375,0.01220703125,0.03460693359375,-0.0062408447265625,0.027374267578125,-0.00896453857421875,-0.0455322265625,-0.025848388671875,-0.0015716552734375,0.008270263671875,-0.0248565673828125,-0.0024814605712890625,0.0440673828125,0.044097900390625,0.053924560546875,0.022430419921875,-0.057525634765625,0.005809783935546875,-0.002742767333984375,-0.05908203125,0.00733184814453125,-0.0215911865234375,-0.009613037109375,-0.0134735107421875,-0.025665283203125,0.0108489990234375,0.0216522216796875,0.049896240234375,-0.045562744140625,0.01947021484375,0.0219268798828125,0.01154327392578125,-0.004756927490234375,-0.005859375,-0.005706787109375,0.01024627685546875,-0.03179931640625,-0.0032863616943359375,0.007656097412109375,-0.0239715576171875,0.02630615234375,-0.0019216537475585938,-0.002307891845703125,-0.048858642578125,-0.020294189453125,-0.038543701171875,0.0193634033203125,0.032318115234375,-0.025787353515625,-0.0065155029296875,0.038055419921875,0.0267181396484375,-0.029144287109375,0.0148468017578125,-0.02569580078125,0.01061248779296875,0.0087432861328125,0.00005310773849487305,0.00360870361328125,-0.005977630615234375,0.022857666015625,-0.005619049072265625,-0.01409149169921875,-0.00518798828125,0.0011949539184570312,-0.013153076171875,0.0333251953125,0.0178375244140625,0.007720947265625,-0.01020050048828125,-0.005565643310546875,0.046295166015625,-0.0292205810546875,-0.0001550912857055664,0.0005249977111816406,0.053924560546875,-0.0100555419921875,-0.005756378173828125,-0.0060882568359375,-0.0157318115234375,0.01116943359375,0.008331298828125,0.0138397216796875,0.0230865478515625,-0.01629638671875,0.0127410888671875,0.0034046173095703125,-0.00687408447265625,0.00981903076171875,0.061065673828125,-0.0259552001953125,-0.0009374618530273438,0.0284423828125,-0.002643585205078125,0.016510009765625,-0.01342010498046875,0.0007457733154296875,0.0028228759765625,-0.005687713623046875,-0.020294189453125,0.036834716796875,-0.014984130859375,0.040252685546875,0.00841522216796875,0.0518798828125,-0.0012636184692382812,-0.026123046875,-0.0227508544921875,-0.040435791015625,0.01617431640625,-0.0020046234130859375,-0.00865936279296875,0.01178741455078125,-0.005252838134765625,0.0322265625,-0.006397247314453125,0.057342529296875,-0.0180511474609375,-0.0136871337890625,-0.0200042724609375,-0.02349853515625,-0.024078369140625,-0.0029621124267578125,-0.00928497314453125,-0.01416778564453125,0.0108795166015625,-0.0090789794921875,0.006099700927734375,0.0008630752563476562,0.0338134765625,0.026458740234375,-0.008575439453125,0.00742340087890625,0.0015535354614257812,-0.00930023193359375,0.0318603515625,-0.0017538070678710938,-0.019073486328125,0.007480621337890625,0.0032329559326171875,0.0250244140625,-0.003643035888671875,0.04412841796875,-0.0284423828125,0.004352569580078125,-0.0155487060546875,-0.023712158203125,0.01129913330078125,-0.0046539306640625,-0.03240966796875,-0.00464630126953125,0.003631591796875,0.0455322265625,-0.0531005859375,0.042083740234375,0.0090484619140625,0.00023281574249267578,0.0499267578125,-0.0055389404296875,-0.002079010009765625,0.01052093505859375,-0.0131378173828125,-0.0063934326171875,-0.00286102294921875,-0.0060882568359375,0.02093505859375,-0.033111572265625,0.0270538330078125,-0.0300750732421875,-0.006816864013671875,-0.007770538330078125,0.0193023681640625,0.0135498046875,-0.0236053466796875,0.0100250244140625,0.01074981689453125,0.00989532470703125,0.0242462158203125,-0.03973388671875,-0.01154327392578125,-0.00405120849609375,0.0011339187622070312,0.0224456787109375,-0.04522705078125,0.06182861328125,-0.0138092041015625,0.0178680419921875,-0.0243682861328125,-0.053466796875,-0.00010544061660766602,-0.0134735107421875,0.0137481689453125,-0.032135009765625,0.0008807182312011719,0.0229644775390625,0.0011749267578125,-0.0117340087890625,-0.00875091552734375,0.01073455810546875,0.007038116455078125,-0.01503753662109375,-0.000030040740966796875,-0.003582000732421875,0.046722412109375,0.028167724609375,-0.032012939453125,0.038116455078125,0.016021728515625,-0.0175933837890625,0.00033020973205566406,0.007671356201171875,-0.00531005859375,-0.04443359375,-0.060333251953125,-0.00727081298828125,-0.016021728515625,-0.019500732421875,-0.00101470947265625,-0.0200347900390625,-0.00835418701171875,-0.00855255126953125,0.01404571533203125,-0.038330078125,-0.0174560546875,0.0219268798828125,-0.031097412109375,0.0272369384765625,0.02288818359375,0.026885986328125,0.00965118408203125,0.0179595947265625,-0.00762176513671875,-0.0271759033203125,-0.002643585205078125,0.01464080810546875,0.011444091796875,0.0134124755859375,0.0216522216796875,-0.00577545166015625,-0.05145263671875,0.0312042236328125,0.0036907196044921875,-0.038818359375,0.0287322998046875,0.0169830322265625,0.043975830078125,-0.0006785392761230469,-0.0311279296875,-0.037750244140625,-0.015533447265625,-0.015411376953125,-0.030792236328125,-0.01300811767578125,0.0137786865234375,-0.0199127197265625,0.0125732421875,0.01209259033203125,-0.01317596435546875,-0.032562255859375,-0.0025234222412109375,0.0014162063598632812,0.004070281982421875,0.015777587890625,-0.018707275390625,-0.0018978118896484375,-0.004634857177734375,0.0207366943359375,-0.00811004638671875,0.004222869873046875,0.0033626556396484375,-0.02227783203125,0.0266876220703125,0.022613525390625,0.0021381378173828125,0.0123138427734375,-0.0022907257080078125,-0.06591796875,-0.01076507568359375,0.035919189453125,0.01264190673828125,-0.022003173828125,-0.0321044921875,-0.004894256591796875,-0.0100250244140625,0.08270263671875,0.005321502685546875,0.0004944801330566406,0.035736083984375,-0.0195465087890625,-0.042694091796875,0.03265380859375,-0.035400390625,-0.02508544921875,0.0097503662109375,-0.0230255126953125,-0.0045623779296875,0.0229644775390625,-0.025177001953125,0.015533447265625,-0.025909423828125,-0.033599853515625,0.010284423828125,-0.0186614990234375,-0.0225982666015625,-0.00844573974609375,0.014984130859375,0.021392822265625,-0.00487518310546875,-0.0277862548828125,0.00909423828125,0.0193634033203125,0.00019943714141845703,-0.0175933837890625,-0.0154266357421875,-0.003631591796875,-0.03961181640625,0.01319122314453125,-0.007740020751953125,-0.045989990234375,-0.0166015625,0.01187896728515625,0.0055084228515625,-0.0206756591796875,0.002330780029296875,0.020416259765625,-0.030853271484375,0.01509857177734375,-0.043304443359375,0.0175933837890625,0.009429931640625,0.00591278076171875,-0.00656890869140625,-0.0246734619140625,-0.0288848876953125,0.032989501953125,-0.044281005859375,-0.0016870498657226562,-0.00525665283203125,0.036468505859375,-0.01513671875,-0.0253143310546875,-0.00649261474609375,-0.012237548828125,0.020111083984375,0.026397705078125,0.0115509033203125,0.0040435791015625,0.01311492919921875,-0.0132598876953125,0.009857177734375,-0.02618408203125,0.040069580078125,-0.006877899169921875,-0.059295654296875,-0.00911712646484375,-0.0005626678466796875,0.00804901123046875,-0.0357666015625,-0.02740478515625,0.008056640625,0.0022525787353515625,-0.029388427734375,-0.028167724609375,0.0019216537475585938,-0.01279449462890625,-0.0072784423828125,0.037841796875,0.058502197265625,-0.0026988983154296875,-0.031280517578125,-0.01033782958984375,-0.009674072265625,0.033050537109375,-0.0304107666015625,0.0169525146484375,-0.0266571044921875,0.00965118408203125,-0.00222015380859375,0.025848388671875,-0.00152587890625,-0.0221099853515625,-0.01166534423828125,0.0321044921875,0.0037746429443359375,0.0025653839111328125,0.027099609375,0.01242828369140625,-0.05731201171875,0.042266845703125,-0.06341552734375,0.005260467529296875,0.0191192626953125,0.01995849609375,-0.00170135498046875,-0.01027679443359375,-0.039764404296875,-0.026336669921875,0.0075225830078125,0.029388427734375,0.0281524658203125,-0.0372314453125,0.02557373046875,0.006175994873046875,-0.0073699951171875,0.0190582275390625,0.01250457763671875,0.01416778564453125,0.0095977783203125,0.0223846435546875,0.007415771484375,-0.022979736328125,0.007904052734375,0.0235443115234375,0.0230865478515625,0.003719329833984375,0.0239715576171875,-0.028289794921875,0.0208587646484375,-0.001354217529296875,0.0140533447265625,-0.00864410400390625,-0.013153076171875,-0.0102691650390625,-0.00119781494140625,0.010772705078125,-0.006542205810546875,-0.01389312744140625,0.0238189697265625,-0.005184173583984375,0.042816162109375,-0.02825927734375,0.027374267578125,-0.041351318359375,0.01418304443359375,-0.0166015625,-0.020355224609375,-0.0318603515625,-0.0025768280029296875,0.00045037269592285156,0.0027332305908203125,0.0166015625,-0.004894256591796875,-0.006320953369140625,-0.01265716552734375,0.0293121337890625,0.00112152099609375,-0.0036296844482421875,0.0045013427734375,-0.00305938720703125,0.0228729248046875,0.032958984375,-0.0201568603515625,0.0047149658203125,0.0222625732421875,0.0181732177734375,-0.0296630859375,0.041961669921875,0.01457977294921875,0.041839599609375,-0.005535125732421875,-0.0283203125,-0.0222625732421875,0.025146484375,-0.00757598876953125,0.01209259033203125,-0.021759033203125,0.007053375244140625,-0.01399993896484375,0.0321044921875,0.035980224609375,0.0263824462890625,-0.0113067626953125,0.005199432373046875,-0.04083251953125,-0.008026123046875,-0.00795745849609375,-0.0229949951171875,-0.028228759765625,0.0010805130004882812,0.0186004638671875,0.016326904296875,-0.006229400634765625,-0.0267333984375,0.016510009765625,-0.034088134765625,-0.01306915283203125,-0.0262298583984375,0.01364898681640625,0.0161285400390625,0.031646728515625,-0.004390716552734375,0.04388427734375,0.002574920654296875,-0.03375244140625,0.0170745849609375,0.0056304931640625,-0.02337646484375,0.032867431640625,-0.032928466796875,-0.01264190673828125,-0.050506591796875,-0.01788330078125,0.0002963542938232422,-0.017242431640625,0.028839111328125,-0.00937652587890625,-0.0215301513671875,-0.03314208984375,0.00450897216796875,0.00494384765625,-0.01151275634765625,-0.017730712890625,0.0052490234375,-0.0104522705078125,-0.005603790283203125,-0.0256805419921875,-0.010284423828125,0.00017452239990234375,-0.01776123046875,0.0199737548828125,0.02783203125,0.0006313323974609375,0.0256195068359375,-0.009857177734375,-0.030792236328125,0.021759033203125,0.0760498046875,0.057830810546875,-0.03314208984375,0.045166015625,0.0137481689453125,0.01190948486328125,0.007106781005859375,-0.01212310791015625,0.0283966064453125,0.03729248046875,0.0010480880737304688,0.00815582275390625,0.027008056640625,0.0201263427734375,-0.00658416748046875,0.0257568359375,-0.0496826171875,0.04254150390625,0.0098419189453125,0.0154876708984375,0.05078125,-0.035064697265625,0.0181732177734375,0.00786590576171875,-0.008026123046875,-0.0006685256958007812,0.00951385498046875,-0.0030117034912109375,-0.0149993896484375,0.02667236328125,0.024749755859375,0.0284423828125,0.036773681640625,-0.023956298828125,0.003978729248046875,0.002471923828125,-0.01424407958984375,-0.0006551742553710938,-0.040252685546875,-0.036407470703125,-0.03131103515625,0.01033782958984375,0.0015287399291992188,-0.034149169921875,0.01300048828125,-0.017242431640625,-0.00594329833984375,-0.01373291015625,0.011383056640625,-0.03619384765625,-0.0360107421875,-0.0013875961303710938,0.005535125732421875,0.032440185546875,-0.01922607421875,0.05078125,-0.0094757080078125,0.029266357421875,0.016448974609375,0.0203857421875,-0.01404571533203125,0.027618408203125,0.01010894775390625,-0.000059604644775390625,-0.014678955078125,0.041717529296875,0.0284881591796875,-0.026519775390625,-0.04498291015625,-0.030975341796875,-0.007396697998046875,-0.0176849365234375,-0.006526947021484375,-0.0291595458984375,0.0097198486328125,0.054931640625,-0.00206756591796875,-0.01308441162109375,0.004238128662109375,0.0062103271484375,-0.02459716796875,-0.0102996826171875,0.0033321380615234375,-0.022308349609375,0.0164642333984375,0.003997802734375,-0.017547607421875,0.0421142578125,0.023406982421875,-0.04962158203125,0.0033817291259765625,0.00705718994140625,-0.013092041015625,0.01256561279296875,-0.011016845703125,-0.002758026123046875,0.06390380859375,0.01294708251953125,0.0255279541015625,0.041229248046875,-0.01522064208984375,-0.019561767578125,0.008270263671875,-0.00946044921875,0.03448486328125,-0.008819580078125,-0.005039215087890625,0.0193328857421875,0.017669677734375,-0.01287078857421875,0.0093231201171875,-0.0011167526245117188,0.00270843505859375,0.0172882080078125,-0.0174102783203125,0.0006766319274902344,0.043853759765625,-0.01629638671875,0.03375244140625,-0.004978179931640625,-0.03082275390625,-0.02545166015625,0.01030731201171875,0.041900634765625,-0.002864837646484375,-0.0026378631591796875,-0.007091522216796875,0.057281494140625,0.04241943359375,-0.0036983489990234375,-0.0233612060546875,0.0616455078125,-0.037017822265625,-0.0227813720703125,-0.00034046173095703125,0.0164031982421875,0.027008056640625,-0.05523681640625,0.0013666152954101562,0.01461029052734375,0.02630615234375,0.00457000732421875,-0.006183624267578125,0.011444091796875,-0.020721435546875,0.020416259765625,0.01380157470703125,-0.00004863739013671875,-0.02508544921875,0.03399658203125,0.03826904296875,0.004314422607421875,-0.04052734375,-0.031097412109375,0.052276611328125,0.01543426513671875,0.002498626708984375,0.01666259765625,-0.00521087646484375,0.02496337890625,-0.046173095703125,-0.01171875,0.004329681396484375,0.01204681396484375,0.053680419921875,0.01522064208984375,-0.006061553955078125,-0.0860595703125,-0.0209808349609375,0.0079803466796875,0.0022258758544921875,0.01165008544921875,0.00428009033203125,-0.034210205078125,-0.009429931640625,-0.008087158203125,0.0418701171875,-0.0022106170654296875,-0.05133056640625,-0.0178985595703125,-0.00882720947265625,-0.034820556640625,-0.00543975830078125,0.035858154296875,0.02777099609375,-0.0007128715515136719,0.0233306884765625,0.003582000732421875,0.00653076171875,0.03973388671875,0.006595611572265625,-0.00890350341796875,0.00835418701171875,-0.015106201171875,-0.0193328857421875,0.017669677734375,-0.012786865234375,-0.0254669189453125,-0.019378662109375,-0.01556396484375,-0.00830078125,0.0179595947265625,-0.01776123046875,0.0277099609375,-0.0269622802734375,-0.004062652587890625,-0.01468658447265625,-0.00047707557678222656,-0.0118865966796875,0.02886962890625,-0.01529693603515625,-0.01275634765625,0.0229339599609375,0.005596160888671875,-0.022918701171875,-0.0176849365234375,-0.0158538818359375,0.01222991943359375,-0.030303955078125,0.01041412353515625,0.0217742919921875,-0.005733489990234375,0.040069580078125,-0.019378662109375,-0.04852294921875,0.048248291015625,-0.01171112060546875,0.011566162109375,0.0199432373046875,-0.008056640625,0.01245880126953125,-0.0048675537109375,-0.01261138916015625,-0.01361083984375,-0.0263519287109375,0.0271759033203125,0.0176239013671875,0.002044677734375,-0.014801025390625,-0.01349639892578125,-0.0224456787109375,-0.004261016845703125,-0.033447265625,-0.014129638671875,-0.0137786865234375,0.01393890380859375,-0.03765869140625,0.03204345703125,-0.0094146728515625,0.021820068359375,0.004467010498046875,0.0304718017578125,-0.00033092498779296875,0.0120697021484375,-0.031829833984375,0.045501708984375,-0.00267791748046875,-0.003223419189453125,-0.00850677490234375,-0.007022857666015625,-0.01605224609375,-0.00400543212890625,0.0294189453125,0.004375457763671875,0.025848388671875,-0.0026397705078125,0.00910186767578125,-0.00948333740234375,0.00982666015625,-0.03668212890625,-0.0072784423828125,0.005046844482421875,-0.01129150390625,0.03271484375,0.002826690673828125,0.0269317626953125,0.008148193359375,-0.01093292236328125,-0.01166534423828125,-0.0292510986328125,0.006023406982421875,-0.0010995864868164062,-0.02911376953125,-0.020111083984375,0.0225830078125,0.0213165283203125,-0.013397216796875,0.04815673828125,-0.0190277099609375,-0.058563232421875,-0.03350830078125,-0.01448822021484375,0.0288848876953125,-0.041259765625,-0.0548095703125,-0.00946044921875,-0.0196075439453125,0.0047760009765625,-0.035125732421875,-0.0225982666015625,-0.02935791015625,0.03826904296875,-0.00276947021484375,-0.047821044921875,0.0355224609375,0.01447296142578125,0.0142669677734375,0.005512237548828125,0.0029964447021484375,-0.0177001953125,0.0013713836669921875,0.0012979507446289062,-0.0428466796875,0.0077972412109375,-0.0076904296875,-0.0009698867797851562,-0.0056304931640625,-0.007221221923828125,-0.0260162353515625,0.0235748291015625,-0.00978851318359375,0.0062103271484375,0.0143890380859375,0.031494140625,0.00949859619140625,-0.01279449462890625,0.01427459716796875,-0.04705810546875,-0.003692626953125,0.0308685302734375,-0.00731658935546875,0.01947021484375,0.02056884765625,0.0004417896270751953,0.02630615234375,-0.00047516822814941406,0.0140533447265625,0.0161590576171875,0.0139617919921875,-0.00714874267578125,-0.0186614990234375,0.005718231201171875,-0.00865936279296875,-0.0033740997314453125,0.016387939453125,0.0027751922607421875,0.00916290283203125,-0.007427215576171875,0.02886962890625,0.0026302337646484375,-0.00493621826171875,0.0197601318359375,-0.02447509765625,0.002613067626953125,-0.0101776123046875,-0.00049591064453125,0.0023822784423828125,-0.0187225341796875,-0.028289794921875,0.0301361083984375,-0.01392364501953125,0.06622314453125,-0.0226898193359375,-0.0244598388671875,-0.0277862548828125,-0.006763458251953125,0.0005540847778320312,-0.01971435546875,-0.035919189453125,-0.03375244140625,-0.028839111328125,0.035552978515625,0.054656982421875,0.004047393798828125,0.004932403564453125,-0.0191497802734375,0.00241851806640625,0.02130126953125,-0.01202392578125,0.028228759765625,0.004520416259765625,0.013336181640625,0.040252685546875,-0.00826263427734375,0.004749298095703125,0.004817962646484375,0.01386260986328125,0.029327392578125,0.02056884765625,0.0023937225341796875,-0.0290374755859375,-0.03125,-0.00791168212890625,0.03839111328125,-0.0035800933837890625,0.0019817352294921875,-0.0020236968994140625,-0.0010747909545898438,0.0187225341796875,-0.020538330078125,0.01404571533203125,-0.0244293212890625,-0.0190887451171875,-0.0021266937255859375,-0.00800323486328125,-0.00945281982421875,0.072021484375,-0.003887176513671875,0.0158538818359375,0.0325927734375,0.00061798095703125,0.056793212890625,-0.00885009765625,-0.00376129150390625,-0.00994873046875,-0.0227813720703125,0.0027408599853515625,0.004932403564453125,-0.020904541015625,-0.03741455078125,-0.0338134765625,-0.0181732177734375,-0.035614013671875,0.003986358642578125,0.0038356781005859375,-0.011138916015625,-0.0149078369140625,-0.005214691162109375,-0.02008056640625,0.0199127197265625,-0.029937744140625,-0.03515625,-0.010101318359375,0.005596160888671875,-0.006259918212890625,0.01522064208984375,0.0159454345703125,-0.00555419921875,-0.023162841796875,0.004558563232421875,-0.038055419921875,-0.0093231201171875,0.031829833984375,-0.0074310302734375,0.0040283203125,0.003368377685546875,0.025909423828125,0.0125579833984375,0.00592041015625,0.0123748779296875,0.00762939453125,-0.034027099609375,0.0008492469787597656,0.009735107421875,-0.026519775390625,-0.041595458984375,0.008056640625,-0.006259918212890625,-0.002956390380859375,0.005825042724609375,0.004833221435546875,0.0026702880859375,0.01056671142578125,0.02178955078125,-0.0191802978515625,0.0181121826171875,-0.02825927734375,-0.050506591796875,-0.01378631591796875,0.0014524459838867188,-0.014739990234375,0.000034749507904052734,-0.0226898193359375,-0.0350341796875,-0.004924774169921875,0.0094451904296875,0.033660888671875,-0.020660400390625,0.006587982177734375,0.04681396484375,-0.005199432373046875,0.01413726806640625,0.0308685302734375,-0.0295257568359375,-0.03692626953125,-0.0298309326171875,0.03973388671875,0.0158538818359375,0.01226043701171875,0.00884246826171875,0.0192718505859375,0.0176239013671875,-0.025909423828125,-0.00565338134765625,-0.023773193359375,-0.013885498046875,-0.01123809814453125,0.03143310546875,0.00637054443359375,0.00009250640869140625,0.0699462890625,0.01123809814453125,-0.0188140869140625,-0.006397247314453125,-0.01245880126953125,-0.014007568359375,0.0006613731384277344,0.005390167236328125,-0.023468017578125,-0.054107666015625,0.02117919921875,0.0171051025390625,-0.018707275390625,0.01009368896484375,0.00905609130859375,-0.0179595947265625,-0.022491455078125,-0.01105499267578125,-0.01885986328125,0.00705718994140625],"index":1},{"object":"embedding","embedding":[-0.109375,-0.041168212890625,-0.002101898193359375,0.023651123046875,-0.031402587890625,0.01515960693359375,-0.00434112548828125,0.003208160400390625,-0.0031585693359375,-0.03753662109375,0.01328277587890625,0.0272064208984375,0.0340576171875,-0.005039215087890625,0.012908935546875,0.04180908203125,-0.0038280487060546875,0.0506591796875,0.01971435546875,0.0045623779296875,-0.018798828125,0.03167724609375,-0.0028629302978515625,-0.004058837890625,0.05450439453125,-0.037078857421875,-0.0191650390625,0.01995849609375,0.01245880126953125,-0.03204345703125,-0.0078277587890625,-0.036376953125,0.00537872314453125,0.0006432533264160156,-0.0269012451171875,-0.0019855499267578125,0.04229736328125,-0.03021240234375,0.006145477294921875,0.00362396240234375,-0.02740478515625,-0.01137542724609375,-0.00661468505859375,0.082275390625,-0.03704833984375,0.002071380615234375,-0.016204833984375,0.039764404296875,-0.0162200927734375,-0.0174560546875,0.022857666015625,-0.02874755859375,0.0213623046875,0.00366973876953125,-0.0152130126953125,-0.00859832763671875,0.082275390625,-0.0196075439453125,0.006366729736328125,0.006870269775390625,0.007366180419921875,-0.00824737548828125,0.0273895263671875,-0.001049041748046875,0.00585174560546875,0.035430908203125,0.025421142578125,0.054901123046875,0.040283203125,-0.0102691650390625,0.022796630859375,0.06689453125,0.003185272216796875,0.061431884765625,0.003978729248046875,0.059906005859375,-0.0001761913299560547,0.015533447265625,0.0263519287109375,0.01531219482421875,-0.00391387939453125,0.0042572021484375,0.03509521484375,-0.0008854866027832031,0.027984619140625,-0.0243988037109375,0.023712158203125,0.0246734619140625,0.02734375,-0.049163818359375,-0.0056304931640625,0.0115203857421875,0.01197052001953125,0.04010009765625,0.0178985595703125,0.015960693359375,0.015472412109375,-0.0180511474609375,-0.06927490234375,0.0013580322265625,0.03076171875,-0.038665771484375,-0.0020351409912109375,0.0187225341796875,0.004940032958984375,-0.0245513916015625,0.01145172119140625,0.0162353515625,0.0242767333984375,0.0293121337890625,-0.03228759765625,-0.00864410400390625,0.00153350830078125,-0.00608062744140625,-0.0538330078125,0.004241943359375,-0.01528167724609375,-0.0294342041015625,0.039520263671875,-0.00180816650390625,-0.026702880859375,0.039520263671875,0.0109100341796875,0.0005645751953125,0.00354766845703125,0.018035888671875,-0.0098114013671875,0.0097808837890625,0.0012788772583007812,-0.00838470458984375,0.04925537109375,0.0355224609375,0.0168609619140625,0.01446533203125,-0.00042176246643066406,0.00018131732940673828,-0.009765625,0.02044677734375,0.01129913330078125,0.032806396484375,0.00998687744140625,-0.01256561279296875,0.01140594482421875,0.0445556640625,0.003208160400390625,-0.01392364501953125,-0.0020694732666015625,0.031280517578125,0.0231475830078125,0.0166778564453125,-0.00948333740234375,-0.013519287109375,0.03253173828125,-0.0269012451171875,-0.0292205810546875,-0.0016937255859375,-0.0127105712890625,0.072509765625,0.0147857666015625,0.048095703125,-0.044952392578125,0.042083740234375,0.03448486328125,0.01214599609375,-0.032989501953125,-0.02862548828125,-0.0303192138671875,-0.0013904571533203125,-0.0008397102355957031,-0.0216217041015625,-0.0396728515625,0.018829345703125,0.01029205322265625,0.06072998046875,0.01508331298828125,-0.033935546875,0.00765228271484375,0.0154571533203125,-0.048095703125,0.033050537109375,-0.007427215576171875,0.056396484375,0.0208282470703125,-0.045013427734375,-0.0205535888671875,0.03466796875,-0.0096893310546875,-0.0243377685546875,-0.034088134765625,0.01300811767578125,0.0164337158203125,-0.03448486328125,0.01363372802734375,0.0286712646484375,-0.0154571533203125,0.019683837890625,-0.0304718017578125,0.005947113037109375,0.06927490234375,-0.0210418701171875,0.0016222000122070312,-0.0247802734375,-0.0006213188171386719,-0.0095977783203125,-0.0146942138671875,-0.04388427734375,0.00597381591796875,-0.000400543212890625,0.0406494140625,0.0224456787109375,-0.038787841796875,-0.036346435546875,-0.021240234375,-0.0288238525390625,0.038421630859375,0.02398681640625,-0.0057373046875,0.0587158203125,0.04925537109375,-0.0189208984375,-0.00550079345703125,0.01885986328125,0.022613525390625,-0.0222320556640625,0.0131378173828125,0.0011577606201171875,-0.01364898681640625,-0.01044464111328125,-0.0276031494140625,0.00409698486328125,-0.0277862548828125,-0.0002130270004272461,0.002315521240234375,-0.01537322998046875,-0.04254150390625,-0.04083251953125,0.0023670196533203125,0.0097808837890625,-0.050750732421875,-0.0189666748046875,-0.01271820068359375,-0.028289794921875,0.06005859375,0.048583984375,-0.03021240234375,-0.0079193115234375,0.0335693359375,0.02435302734375,-0.006320953369140625,0.07568359375,-0.045166015625,-0.041168212890625,-0.004772186279296875,-0.020172119140625,0.00577545166015625,0.0030059814453125,-0.03125,0.0028629302978515625,0.0015125274658203125,-0.033203125,-0.038299560546875,-0.017364501953125,-0.0148162841796875,-0.0091400146484375,-0.07470703125,-0.0154571533203125,0.01464080810546875,0.0382080078125,-0.0166473388671875,-0.048492431640625,-0.027008056640625,0.0197296142578125,0.0216522216796875,0.0241546630859375,-0.061004638671875,-0.009429931640625,0.0213470458984375,-0.0278778076171875,0.0276336669921875,0.0205078125,-0.0037994384765625,-0.057464599609375,0.0034008026123046875,0.0150299072265625,-0.0280303955078125,-0.0138702392578125,-0.00762939453125,0.0609130859375,-0.00577545166015625,0.00034809112548828125,0.0189208984375,0.00475311279296875,-0.00826263427734375,-0.0010061264038085938,0.00009620189666748047,0.0169830322265625,0.01042938232421875,-0.036773681640625,-0.01165008544921875,-0.0174102783203125,0.068359375,-0.061309814453125,0.043060302734375,0.019683837890625,-0.051116943359375,0.05224609375,-0.02374267578125,0.031890869140625,-0.027069091796875,0.010711669921875,-0.005970001220703125,0.0103759765625,0.01219940185546875,-0.057891845703125,-0.00189208984375,-0.01493072509765625,-0.05450439453125,-0.02655029296875,-0.00803375244140625,-0.021148681640625,0.0037822723388671875,0.06512451171875,-0.0183258056640625,-0.007785797119140625,-0.0193634033203125,0.002994537353515625,0.05194091796875,0.061187744140625,-0.02301025390625,0.00794219970703125,0.0136566162109375,0.003826141357421875,-0.0031490325927734375,0.038330078125,-0.01268768310546875,0.004421234130859375,-0.0843505859375,0.0276031494140625,0.00592041015625,-0.0015497207641601562,-0.0057525634765625,-0.0166473388671875,0.032012939453125,0.0308380126953125,0.0098114013671875,0.0325927734375,-0.01311492919921875,-0.03662109375,-0.028778076171875,0.0163726806640625,-0.02081298828125,-0.022491455078125,-0.031524658203125,0.0212249755859375,0.00396728515625,-0.0151519775390625,0.03875732421875,-0.00571441650390625,-0.06304931640625,0.017791748046875,-0.0256195068359375,-0.024383544921875,0.0044708251953125,0.0161285400390625,0.00467681884765625,-0.02044677734375,-0.0035552978515625,0.021087646484375,-0.0245819091796875,0.005558013916015625,0.0311431884765625,-0.003658294677734375,0.0012140274047851562,-0.00688934326171875,-0.0076141357421875,0.00814056396484375,0.0216827392578125,-0.0267486572265625,-0.014190673828125,-0.056854248046875,-0.0743408203125,0.005985260009765625,0.016448974609375,-0.0110626220703125,0.0158843994140625,0.01126861572265625,-0.03472900390625,-0.0015325546264648438,-0.0307159423828125,-0.048980712890625,-0.01169586181640625,0.0229949951171875,0.0159454345703125,0.049591064453125,0.01529693603515625,-0.036163330078125,0.0024509429931640625,0.0108489990234375,-0.040008544921875,-0.0036907196044921875,0.005809783935546875,0.017974853515625,-0.017486572265625,0.01580810546875,-0.050537109375,0.01053619384765625,-0.0303192138671875,0.0289154052734375,0.040374755859375,0.0247344970703125,-0.032501220703125,-0.0567626953125,0.024322509765625,0.0211639404296875,0.040008544921875,0.02374267578125,0.034759521484375,-0.01325225830078125,0.00814056396484375,-0.01528167724609375,0.03912353515625,0.0116729736328125,-0.01904296875,-0.049468994140625,0.01088714599609375,-0.043426513671875,0.0228729248046875,0.01488494873046875,-0.0033702850341796875,-0.0176849365234375,-0.011016845703125,-0.058258056640625,-0.0129852294921875,0.0244293212890625,-0.014068603515625,-0.0296173095703125,0.0163116455078125,-0.0169525146484375,0.01090240478515625,0.01248931884765625,0.01419830322265625,-0.0032749176025390625,-0.0499267578125,-0.0034008026123046875,-0.0278778076171875,0.0196990966796875,0.037841796875,0.024200439453125,0.0755615234375,-0.0227203369140625,0.0225830078125,0.03460693359375,0.0164947509765625,-0.05914306640625,0.06964111328125,0.007843017578125,0.01187896728515625,0.0291290283203125,0.00641632080078125,-0.00959014892578125,-0.0241241455078125,0.026214599609375,-0.0187225341796875,0.039703369140625,0.004180908203125,0.0004916191101074219,0.0028705596923828125,0.04815673828125,0.01364898681640625,-0.01335906982421875,-0.0016145706176757812,-0.005645751953125,0.01073455810546875,0.0191650390625,-0.02630615234375,0.0156402587890625,0.0219879150390625,0.044952392578125,0.04290771484375,-0.044464111328125,-0.0193634033203125,0.0164794921875,-0.0149993896484375,-0.01090240478515625,-0.057952880859375,-0.08489990234375,0.00222015380859375,0.000926971435546875,-0.01174163818359375,0.028350830078125,-0.00182342529296875,0.0030841827392578125,-0.0239105224609375,-0.007266998291015625,0.050537109375,0.049957275390625,-0.03485107421875,-0.0207366943359375,0.0526123046875,-0.025390625,0.0003330707550048828,-0.003017425537109375,0.01090240478515625,0.0081634521484375,0.062744140625,0.0191650390625,0.0160675048828125,0.00147247314453125,-0.026519775390625,0.005218505859375,-0.036651611328125,-0.0167694091796875,-0.0161590576171875,0.0107879638671875,-0.03271484375,0.03289794921875,0.04364013671875,0.03564453125,-0.0006413459777832031,0.0015048980712890625,-0.009674072265625,0.033050537109375,-0.00948333740234375,0.0082244873046875,0.02862548828125,0.035186767578125,0.00962066650390625,0.003993988037109375,0.0184478759765625,-0.0189208984375,0.05389404296875,0.0221405029296875,0.014434814453125,-0.0275115966796875,0.01367950439453125,-0.019378662109375,0.0474853515625,0.0108795166015625,0.0299530029296875,-0.0007200241088867188,0.04296875,-0.0017957687377929688,-0.04144287109375,-0.01525115966796875,-0.0012292861938476562,-0.01503753662109375,0.005222320556640625,-0.0308074951171875,0.0124664306640625,-0.007568359375,0.006046295166015625,-0.02740478515625,0.006195068359375,0.0265655517578125,0.005138397216796875,-0.022491455078125,0.004360198974609375,-0.001689910888671875,-0.03753662109375,0.0190887451171875,-0.0253143310546875,0.0318603515625,-0.0574951171875,0.0026302337646484375,-0.0001634359359741211,0.06341552734375,-0.01300048828125,0.0165252685546875,0.001712799072265625,-0.00969696044921875,-0.0178375244140625,-0.006183624267578125,0.0167694091796875,0.06268310546875,-0.0034637451171875,0.022186279296875,0.00048542022705078125,-0.0097198486328125,-0.023040771484375,0.027435302734375,0.0160980224609375,0.01053619384765625,0.0072784423828125,-0.024383544921875,0.024993896484375,0.00878143310546875,0.00531005859375,-0.0205078125,0.024139404296875,-0.00514984130859375,0.0261688232421875,0.0226593017578125,0.0133056640625,0.01126861572265625,0.0692138671875,-0.0312347412109375,0.015472412109375,-0.0032596588134765625,-0.051116943359375,0.013702392578125,0.0140228271484375,0.00838470458984375,0.018798828125,0.035797119140625,0.003749847412109375,0.03460693359375,0.0016536712646484375,-0.000949859619140625,0.02099609375,0.0015611648559570312,-0.006748199462890625,-0.049468994140625,0.03985595703125,0.0158843994140625,0.0123138427734375,0.0362548828125,-0.0017871856689453125,-0.016204833984375,-0.0303192138671875,0.00746917724609375,0.0171356201171875,-0.017578125,-0.0259552001953125,0.031829833984375,-0.0191650390625,0.0262603759765625,-0.01363372802734375,-0.00849151611328125,-0.003444671630859375,-0.0305938720703125,0.019012451171875,0.0027484893798828125,0.0517578125,-0.059417724609375,0.013427734375,-0.0309906005859375,-0.037109375,-0.01393890380859375,0.0230712890625,-0.021240234375,-0.006923675537109375,0.01363372802734375,0.044525146484375,0.0003800392150878906,0.055511474609375,0.03216552734375,0.010650634765625,0.07464599609375,0.00989532470703125,-0.0294342041015625,0.012481689453125,-0.00835418701171875,-0.0213775634765625,-0.0096588134765625,0.0015869140625,0.00466156005859375,-0.04986572265625,-0.02435302734375,-0.024688720703125,-0.0152130126953125,0.001346588134765625,-0.0115203857421875,0.0102386474609375,0.0095672607421875,0.006282806396484375,0.0013895034790039062,-0.01708984375,0.052642822265625,-0.0174407958984375,-0.00627899169921875,-0.0037403106689453125,-0.004322052001953125,-0.0182342529296875,-0.0255279541015625,0.048675537109375,-0.040924072265625,0.032257080078125,-0.00433349609375,-0.0276031494140625,0.0113983154296875,-0.0321044921875,0.0004773139953613281,-0.01374053955078125,0.022430419921875,0.0228118896484375,-0.0059967041015625,-0.0095062255859375,-0.050872802734375,0.03228759765625,0.0210418701171875,-0.01165771484375,0.050933837890625,0.009857177734375,0.041351318359375,0.00832366943359375,0.02294921875,0.030517578125,0.006465911865234375,-0.01404571533203125,-0.0035610198974609375,-0.03118896484375,0.0290679931640625,0.0034046173095703125,-0.01447296142578125,-0.062286376953125,-0.005123138427734375,0.009002685546875,-0.006267547607421875,-0.0133209228515625,0.021575927734375,-0.01500701904296875,-0.0029201507568359375,-0.0189666748046875,0.016815185546875,-0.0010480880737304688,-0.005496978759765625,0.00926971435546875,-0.025482177734375,0.01788330078125,-0.040252685546875,0.005535125732421875,0.033172607421875,-0.021026611328125,-0.01739501953125,0.0276031494140625,-0.00844573974609375,-0.005558013916015625,0.0188751220703125,-0.00940704345703125,0.01593017578125,0.01036834716796875,-0.001537322998046875,-0.0279083251953125,0.0178985595703125,0.02099609375,-0.009429931640625,0.0194549560546875,-0.01540374755859375,-0.0110015869140625,-0.0301971435546875,-0.0059967041015625,-0.022674560546875,0.01297760009765625,0.009246826171875,-0.0251312255859375,0.040283203125,0.0216827392578125,-0.0032958984375,-0.0309600830078125,0.05072021484375,-0.026702880859375,0.00583648681640625,0.01078033447265625,-0.01323699951171875,0.023101806640625,-0.0318603515625,0.037078857421875,0.0183258056640625,0.014556884765625,-0.04107666015625,0.019561767578125,0.0042266845703125,0.0015115737915039062,0.0125579833984375,0.0171661376953125,0.01181793212890625,-0.01500701904296875,0.004863739013671875,0.003849029541015625,0.012786865234375,-0.01074981689453125,0.021148681640625,-0.026123046875,0.00746917724609375,0.037933349609375,0.0279083251953125,-0.01708984375,-0.0117950439453125,0.01015472412109375,-0.01157379150390625,0.02532958984375,-0.00576019287109375,-0.024078369140625,0.00463104248046875,-0.00847625732421875,-0.0001379251480102539,0.01557159423828125,-0.0151824951171875,-0.04638671875,0.00952911376953125,-0.0228729248046875,-0.006427764892578125,-0.02703857421875,-0.0496826171875,-0.0103759765625,0.01207733154296875,0.0511474609375,0.0121002197265625,-0.02227783203125,0.0234832763671875,0.0233154296875,0.01824951171875,-0.0207061767578125,-0.005069732666015625,0.0161285400390625,0.00982666015625,-0.00713348388671875,0.001583099365234375,-0.0193634033203125,-0.049468994140625,-0.0160980224609375,-0.00870513916015625,-0.009796142578125,-0.01904296875,0.0013990402221679688,-0.0220184326171875,0.017791748046875,-0.0045623779296875,0.0241546630859375,0.01168060302734375,0.0216522216796875,0.00749969482421875,0.017364501953125,-0.042816162109375,0.08270263671875,-0.0299072265625,-0.00897979736328125,-0.06573486328125,0.025238037109375,-0.0008625984191894531,0.0253753662109375,0.0194091796875,-0.01343536376953125,0.016876220703125,0.02471923828125,0.0234527587890625,0.0022449493408203125,0.04876708984375,-0.01226043701171875,0.014312744140625,-0.00719451904296875,0.050079345703125,0.006427764892578125,-0.007129669189453125,-0.0032520294189453125,0.00705718994140625,0.036865234375,0.01116180419921875,-0.01947021484375,-0.0178375244140625,-0.006938934326171875,0.0018167495727539062,-0.0245361328125,0.0127105712890625,-0.00023412704467773438,-0.0020961761474609375,0.023956298828125,0.0406494140625,-0.01070404052734375,-0.00930023193359375,-0.0257568359375,0.037506103515625,0.053497314453125,0.0033321380615234375,0.046905517578125,-0.00838470458984375,-0.0255889892578125,-0.00463104248046875,0.018890380859375,-0.01540374755859375,-0.00322723388671875,0.037689208984375,0.003948211669921875,0.0232391357421875,-0.017486572265625,-0.00727081298828125,0.003932952880859375,-0.008270263671875,-0.01194000244140625,-0.039398193359375,0.029022216796875,-0.013458251953125,-0.0291748046875,0.03338623046875,-0.07183837890625,-0.0091552734375,-0.0250396728515625,0.0062103271484375,0.006244659423828125,0.0543212890625,-0.00659942626953125,-0.01202392578125,-0.0297698974609375,-0.014556884765625,0.03460693359375,0.00572967529296875,0.001567840576171875,0.02734375,0.029754638671875,-0.0110626220703125,-0.047515869140625,0.005878448486328125,0.0394287109375,0.000018835067749023438,-0.0195770263671875,0.01009368896484375,-0.02252197265625,0.030426025390625,-0.022308349609375,-0.0215911865234375,0.0203704833984375,-0.022918701171875,-0.007183074951171875,0.0005292892456054688,0.0191802978515625,-0.042022705078125,-0.004108428955078125,0.003238677978515625,-0.0213165283203125,0.015533447265625,-0.01485443115234375,0.0180206298828125,-0.0295867919921875,-0.0180206298828125,-0.035797119140625,0.00876617431640625,0.0010499954223632812,0.0163726806640625,0.0177764892578125,-0.03271484375,0.031951904296875,-0.0271453857421875,-0.01348114013671875,-0.0236358642578125,-0.003795623779296875,0.0010499954223632812,0.0116424560546875,-0.0162506103515625,0.0113067626953125,-0.009552001953125,-0.0072784423828125,-0.0228729248046875,0.0285186767578125,0.007556915283203125,0.0227203369140625,-0.01947021484375,0.0095977783203125,0.0014629364013671875,0.0341796875,-0.032196044921875,-0.00791168212890625,0.004150390625,0.040771484375,-0.0234832763671875,0.002834320068359375,0.01678466796875,0.010711669921875,0.023406982421875,0.00495147705078125,0.0015058517456054688,0.055419921875,0.01861572265625,0.003787994384765625,-0.010955810546875,-0.0012788772583007812,0.034393310546875,0.024200439453125,0.036590576171875,-0.0256195068359375,-0.0156402587890625,0.0239410400390625,-0.007137298583984375,0.040863037109375,0.005889892578125,-0.0247955322265625,0.03076171875,-0.01473236083984375,0.022857666015625,-0.01407623291015625,-0.019195556640625,-0.028228759765625,0.049591064453125,0.019378662109375,0.0008697509765625,-0.0269012451171875,-0.005390167236328125,-0.04266357421875,0.0012521743774414062,-0.01409912109375,-0.0120391845703125,-0.032501220703125,-0.0018453598022460938,-0.01666259765625,-0.006740570068359375,0.0240325927734375,-0.006927490234375,0.010101318359375,-0.033721923828125,-0.0017194747924804688,-0.012542724609375,0.0012044906616210938,-0.03448486328125,0.0068359375,-0.0193328857421875,0.015777587890625,-0.0158538818359375,-0.026763916015625,-0.008941650390625,-0.02874755859375,-0.0112457275390625,0.02239990234375,-0.02581787109375,-0.01189422607421875,0.0138397216796875,-0.0299072265625,-0.0229949951171875,0.06683349609375,0.005275726318359375,0.00627899169921875,0.028076171875,0.026123046875,0.0030994415283203125,0.027191162109375,-0.0179290771484375,-0.00516510009765625,0.0192108154296875,0.015594482421875,0.008544921875,0.007320404052734375,-0.002529144287109375,-0.006763458251953125,0.0540771484375,-0.05303955078125,0.0006403923034667969,-0.01325225830078125,0.0003781318664550781,-0.0013599395751953125,-0.033203125,-0.0025806427001953125,0.0191802978515625,0.0222015380859375,-0.00885009765625,-0.01300811767578125,0.026275634765625,0.01317596435546875,0.036895751953125,0.036651611328125,-0.002315521240234375,0.0075531005859375,-0.0290374755859375,-0.0121002197265625,0.005886077880859375,0.006282806396484375,0.0157470703125,0.003368377685546875,-0.0184326171875,-0.0253143310546875,0.004241943359375,0.0201568603515625,-0.01227569580078125,0.02349853515625,-0.0167694091796875,-0.01458740234375,-0.043243408203125,0.0229034423828125,-0.004390716552734375,-0.00434112548828125,-0.0117034912109375,0.0093994140625,0.01690673828125,0.0133819580078125,-0.004993438720703125,0.01155853271484375,0.003963470458984375,-0.006305694580078125,0.01317596435546875,-0.0111236572265625,0.037445068359375,0.04669189453125,0.03338623046875,0.0193939208984375,0.031402587890625,0.0202178955078125,0.0318603515625,-0.007904052734375,-0.049468994140625,0.018157958984375,-0.045501708984375,-0.01177215576171875,-0.040008544921875,-0.041351318359375,0.00522613525390625,-0.0185546875,-0.0021991729736328125,0.004451751708984375,-0.007022857666015625,-0.0017242431640625,-0.007366180419921875,-0.0017347335815429688,-0.002017974853515625,0.0161895751953125,0.0156402587890625,-0.0093536376953125,0.03564453125,0.036407470703125,-0.0265655517578125,-0.0230560302734375,0.042572021484375,0.01097869873046875,0.026611328125,-0.038177490234375,0.0279998779296875,-0.007171630859375,-0.01245880126953125,-0.0203399658203125,0.02398681640625,-0.01251983642578125,-0.0268402099609375,-0.04583740234375,0.0209503173828125,0.034393310546875,-0.0233917236328125,-0.0306243896484375,0.007549285888671875,0.023406982421875,-0.00807952880859375,-0.0116729736328125,-0.0268096923828125,-0.00495147705078125,0.01447296142578125,-0.0078277587890625,-0.0286407470703125,-0.01052093505859375,-0.02447509765625,0.021148681640625,-0.0261077880859375,-0.01206207275390625,-0.01239776611328125,0.0201873779296875,0.046295166015625,0.01123809814453125,0.0238494873046875,-0.0312042236328125,0.032379150390625,0.041351318359375,-0.052825927734375,0.003604888916015625,0.06842041015625,-0.034820556640625,-0.007396697998046875,0.00186920166015625,-0.016204833984375,-0.014434814453125,-0.0228118896484375,0.005321502685546875,0.00028014183044433594,-0.0174102783203125,-0.00974273681640625,-0.00693511962890625,0.0108795166015625,-0.01207733154296875,-0.0055084228515625,0.033843994140625,0.007904052734375,-0.034637451171875,0.0050201416015625,0.016693115234375,0.0086212158203125,-0.029022216796875,-0.04742431640625,0.031402587890625,0.006664276123046875,-0.0040283203125,-0.004619598388671875,0.027435302734375,0.039703369140625,-0.025665283203125,-0.0209808349609375,0.01947021484375,0.01776123046875,0.024322509765625,0.005157470703125,0.0126190185546875,-0.03375244140625,0.034332275390625,-0.00262451171875,0.0071563720703125,0.0005946159362792969,-0.0169677734375,-0.0303955078125,-0.037628173828125,0.0002275705337524414,0.002838134765625,-0.02813720703125,-0.044403076171875,-0.006748199462890625,0.02508544921875,-0.015777587890625,0.035797119140625,0.03167724609375,0.0295562744140625,-0.0096435546875,-0.0152740478515625,-0.00992584228515625,-0.056549072265625,0.024078369140625,-0.01268768310546875,0.0028591156005859375,-0.00611114501953125,-0.01277923583984375,-0.01064300537109375,0.02581787109375,-0.0252838134765625,-0.02197265625,0.00927734375,-0.04156494140625,-0.0081024169921875,0.021728515625,-0.0178375244140625,0.061614990234375,-0.0103912353515625,0.03277587890625,-0.00395965576171875,0.0199432373046875,-0.0228424072265625,0.00010395050048828125,-0.01091766357421875,-0.01003265380859375,0.0023860931396484375,0.0020847320556640625,-0.0297698974609375,0.007381439208984375,-0.006748199462890625,0.0308990478515625,-0.00885772705078125,0.0227508544921875,-0.004146575927734375,-0.0001823902130126953,0.01097869873046875,0.006439208984375,-0.032257080078125,0.034332275390625,-0.01451873779296875,0.023651123046875,0.0135955810546875,0.0115509033203125,0.028533935546875,-0.01568603515625,0.0099639892578125,0.0263519287109375,0.00537109375,-0.004764556884765625,-0.03240966796875,-0.0015802383422851562,-0.0291748046875,0.009613037109375,0.036712646484375,0.00801849365234375,-0.0292205810546875,-0.02117919921875,0.0005826950073242188,0.00788116455078125,-0.01458740234375,-0.00792694091796875,-0.03070068359375,-0.03271484375,0.0180511474609375,0.0157623291015625,-0.017578125,-0.0025177001953125,-0.0360107421875,0.024688720703125,0.043121337890625,-0.004581451416015625,0.006549835205078125,-0.03070068359375,0.0006194114685058594,0.0057373046875,0.0082244873046875,-0.006740570068359375,0.0399169921875,0.0263214111328125,-0.00548553466796875,-0.021881103515625,-0.000354766845703125,-0.014190673828125,0.03887939453125,0.01537322998046875,0.013519287109375,0.0187225341796875,-0.00959014892578125,-0.0187530517578125,-0.0292816162109375,-0.0487060546875,0.0198974609375,-0.008697509765625,-0.006256103515625,0.0028057098388671875,0.0193939208984375,-0.01824951171875,0.02532958984375,0.0171051025390625,-0.0114288330078125,0.027587890625,0.005313873291015625,-0.018829345703125,-0.006801605224609375,0.0106048583984375,0.0182952880859375,-0.0201263427734375,-0.016357421875,-0.0232391357421875,-0.0323486328125,0.026031494140625,-0.051116943359375,-0.00861358642578125,-0.04766845703125,0.032012939453125,-0.007568359375,-0.0217132568359375,0.049285888671875,0.015838623046875,-0.020355224609375,0.00942230224609375,0.01285552978515625,0.0333251953125,0.0185546875,-0.00582122802734375,-0.0184478759765625,0.024139404296875,-0.012664794921875,0.005649566650390625,-0.037994384765625,-0.0263519287109375,-0.01360321044921875,-0.032012939453125,0.00464630126953125,0.0157623291015625,0.027252197265625,0.04742431640625,0.01007843017578125,-0.0167999267578125,0.01617431640625,-0.012237548828125,-0.0116729736328125,0.01422119140625,-0.0037288665771484375,-0.00446319580078125,0.004669189453125,-0.029083251953125,0.0386962890625,-0.009185791015625,-0.005138397216796875,0.004119873046875,-0.00498199462890625,-0.0279083251953125,-0.0092315673828125,-0.020843505859375,-0.003910064697265625,0.0099639892578125,0.029083251953125,-0.0206146240234375,-0.007965087890625,-0.01509857177734375,-0.0149383544921875,0.0043182373046875,-0.0452880859375,-0.005710601806640625,0.0244903564453125,0.007266998291015625,-0.0229034423828125,0.01355743408203125,-0.0125885009765625,-0.031280517578125,-0.0232391357421875,-0.005512237548828125,0.0204620361328125,0.028533935546875,0.0341796875,-0.0030422210693359375,-0.046783447265625,-0.01140594482421875,0.01355743408203125,-0.0244903564453125,0.01104736328125,-0.02276611328125,0.0142364501953125,0.00832366943359375,0.0184783935546875,0.006786346435546875,0.056793212890625,0.0021457672119140625,0.02301025390625,0.005886077880859375,-0.026458740234375,0.044403076171875,0.017364501953125,0.027587890625,0.004169464111328125,0.0007371902465820312,-0.042083740234375,-0.011077880859375,0.06378173828125,-0.004947662353515625,0.01377105712890625,-0.00679779052734375,-0.02978515625,0.0092315673828125,-0.024322509765625,-0.00490570068359375,0.00887298583984375,0.0631103515625,0.0015497207641601562,-0.0228729248046875,0.0311126708984375,-0.024444580078125,-0.021209716796875,-0.0086822509765625,-0.015106201171875,-0.0308685302734375,-0.002880096435546875,-0.00786590576171875,0.06256103515625,0.0174102783203125,0.02947998046875,0.0128173828125,-0.0098419189453125,0.0284881591796875,-0.028076171875,-0.030059814453125,0.01483917236328125,-0.040283203125,-0.0162353515625,-0.00675201416015625,0.0015344619750976562,-0.025726318359375,-0.02423095703125,-0.0152740478515625,-0.0186004638671875,0.006298065185546875,0.01380157470703125,-0.036163330078125,0.020965576171875,-0.029510498046875,0.013702392578125,0.0196533203125,-0.03509521484375,0.00527191162109375,-0.0003497600555419922,0.0069580078125,0.0035610198974609375,-0.0163116455078125,0.0181121826171875,-0.019012451171875,0.0260772705078125,-0.007419586181640625,-0.01190185546875,-0.015716552734375,0.0014019012451171875,-0.0276031494140625,0.057464599609375,-0.0236358642578125,-0.00008851289749145508,0.01207733154296875,0.002544403076171875,-0.01335906982421875,-0.0036640167236328125,0.003437042236328125,0.002498626708984375,0.01105499267578125,-0.041534423828125,-0.00018703937530517578,-0.0013027191162109375,0.0030918121337890625,-0.00867462158203125,-0.0243377685546875,0.01177978515625,0.0026683807373046875,-0.005035400390625,0.026275634765625,0.0131378173828125,-0.0008482933044433594,-0.01444244384765625,-0.051025390625,-0.0057373046875,0.0093536376953125,0.0157318115234375,0.01180267333984375,-0.028472900390625,-0.007965087890625,-0.01303863525390625,0.038818359375,0.020538330078125,0.0005950927734375,-0.01058197021484375,0.00571441650390625,-0.004848480224609375,0.032257080078125,0.00498199462890625,-0.0225982666015625,0.019439697265625,0.0125579833984375,0.01374053955078125,-0.03436279296875,-0.0235137939453125,0.00345611572265625,0.032073974609375,0.0240478515625,-0.0450439453125,-0.0035495758056640625,-0.0318603515625,-0.022369384765625,0.032562255859375,-0.005435943603515625,-0.00537872314453125,-0.0119171142578125,0.0078887939453125,-0.00511932373046875,-0.00978851318359375,-0.018310546875,-0.03839111328125,-0.006366729736328125,-0.016754150390625,0.005397796630859375,-0.0085601806640625,-0.04498291015625,0.043365478515625,-0.01511383056640625,0.0017032623291015625,0.0108184814453125,0.0088653564453125,0.0042877197265625,-0.034942626953125,-0.021575927734375,0.0241851806640625,0.00455474853515625],"index":2}],"model":"text-embedding-3-small","usage":{"prompt_tokens":16,"total_tokens":16}} \ No newline at end of file diff --git a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.json b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.json index 67ea54b0a..e2639c23b 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.json @@ -2,9 +2,9 @@ "entries": [ { "callIndex": 0, - "id": "7c0e162d6794cf5d", + "id": "9aa262365558ebc2", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:34.738Z", + "recordedAt": "2026-06-30T14:05:02.949Z", "request": { "body": { "kind": "json", @@ -37,11 +37,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528914, - "created_at": 1781528913, + "completed_at": 1782828302, + "created_at": 1782828302, "error": null, "frequency_penalty": 0, - "id": "resp_08e21a27e86c971e006a2ff951c5048192a0af2698bfaf280b", + "id": "resp_0810d72bbc10a107006a43cd0e72e4819c903b9f07dbdd028f", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -60,7 +60,7 @@ "type": "output_text" } ], - "id": "msg_08e21a27e86c971e006a2ff952764c8192915880c5d463c15f", + "id": "msg_0810d72bbc10a107006a43cd0ed8cc819cb1ce7c939bfaa495", "role": "assistant", "status": "completed", "type": "message" @@ -88,6 +88,24 @@ "verbosity": "medium" }, "tool_choice": "auto", + "tool_usage": { + "image_gen": { + "input_tokens": 0, + "input_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "output_tokens": 0, + "output_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "total_tokens": 0 + }, + "web_search": { + "num_requests": 0 + } + }, "tools": [], "top_logprobs": 0, "top_p": 1, @@ -110,13 +128,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a0c1cdde08b43249-VIE", + "cf-ray": "a13db939b8afc2cd-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:34 GMT", + "date": "Tue, 30 Jun 2026 14:05:03 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1035", + "openai-processing-ms": "547", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -130,7 +148,7 @@ "x-ratelimit-remaining-tokens": "149999962", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_c1eb4fa2cddc4c94906c59ce4ec7d77a" + "x-request-id": "057ee907-5a6a-4b0b-bb80-8a906851a186" }, "status": 200, "statusText": "OK" @@ -138,9 +156,9 @@ }, { "callIndex": 1, - "id": "f12aff3913439248", + "id": "9e077c56377ca81c", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:36.241Z", + "recordedAt": "2026-06-30T14:05:03.770Z", "request": { "body": { "kind": "json", @@ -191,11 +209,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528916, - "created_at": 1781528914, + "completed_at": 1782828303, + "created_at": 1782828303, "error": null, "frequency_penalty": 0, - "id": "resp_04d2d681e1b09a4a006a2ff952f2bc81a1a73280bae81965e2", + "id": "resp_0d739bd2e58f11a3006a43cd0f2ec881a1b23550f482686aab", "incomplete_details": null, "instructions": null, "max_output_tokens": 32, @@ -214,7 +232,7 @@ "type": "output_text" } ], - "id": "msg_04d2d681e1b09a4a006a2ff953cd1081a183158139618edb2d", + "id": "msg_0d739bd2e58f11a3006a43cd0fa1d481a1a70b02e9b85c4e6c", "role": "assistant", "status": "completed", "type": "message" @@ -255,6 +273,24 @@ "verbosity": "medium" }, "tool_choice": "auto", + "tool_usage": { + "image_gen": { + "input_tokens": 0, + "input_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "output_tokens": 0, + "output_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "total_tokens": 0 + }, + "web_search": { + "num_requests": 0 + } + }, "tools": [], "top_logprobs": 0, "top_p": 1, @@ -277,13 +313,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a0c1cde5d91d3249-VIE", + "cf-ray": "a13db93e4bb0c2cd-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:36 GMT", + "date": "Tue, 30 Jun 2026 14:05:03 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1325", + "openai-processing-ms": "648", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -297,7 +333,7 @@ "x-ratelimit-remaining-tokens": "149999937", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_d2fe9d24b8fe40a0a42eb23029b05c16" + "x-request-id": "256e2fa3-4dee-48de-837e-724fb92a9fd0" }, "status": 200, "statusText": "OK" @@ -305,9 +341,9 @@ }, { "callIndex": 2, - "id": "5d2312f425df9f2f", + "id": "bdbf85bb8f9015c8", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:37.546Z", + "recordedAt": "2026-06-30T14:05:04.956Z", "request": { "body": { "kind": "json", @@ -336,20 +372,20 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_003258bee4145e59006a2ff9548af081a29187e415896a4044\",\"object\":\"response\",\"created_at\":1781528916,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", - "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_003258bee4145e59006a2ff9548af081a29187e415896a4044\",\"object\":\"response\",\"created_at\":1781528916,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", - "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}", - "event: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"One\",\"item_id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"logprobs\":[],\"obfuscation\":\"KhAN5ehZudKpu\",\"output_index\":0,\"sequence_number\":4}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"logprobs\":[],\"obfuscation\":\"6ypyq0ysbrSz7BX\",\"output_index\":0,\"sequence_number\":5}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" two\",\"item_id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"logprobs\":[],\"obfuscation\":\"D5nW88UhRzk2\",\"output_index\":0,\"sequence_number\":6}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"logprobs\":[],\"obfuscation\":\"XTRoBmEEWkvzRVi\",\"output_index\":0,\"sequence_number\":7}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" three\",\"item_id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"logprobs\":[],\"obfuscation\":\"7YtPHZTD2K\",\"output_index\":0,\"sequence_number\":8}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"logprobs\":[],\"obfuscation\":\"P2enBKQJmr3WGo7\",\"output_index\":0,\"sequence_number\":9}", - "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":10,\"text\":\"One, two, three.\"}", - "event: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"},\"sequence_number\":11}", - "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"}],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":12}", - "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_003258bee4145e59006a2ff9548af081a29187e415896a4044\",\"object\":\"response\",\"created_at\":1781528916,\"status\":\"completed\",\"background\":false,\"completed_at\":1781528917,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"msg_003258bee4145e59006a2ff9552f4081a2bf63b33b370ef0c6\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":22,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":7,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":29},\"user\":null,\"metadata\":{}},\"sequence_number\":13}" + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0e012e9ce2b1452c006a43cd100c0881a18fd673f301d1f2c1\",\"object\":\"response\",\"created_at\":1782828304,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0e012e9ce2b1452c006a43cd100c0881a18fd673f301d1f2c1\",\"object\":\"response\",\"created_at\":1782828304,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"One\",\"item_id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"logprobs\":[],\"obfuscation\":\"8uJHWEIUrLvRb\",\"output_index\":0,\"sequence_number\":4}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"logprobs\":[],\"obfuscation\":\"p6V9s65wwdM1WMS\",\"output_index\":0,\"sequence_number\":5}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" two\",\"item_id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"logprobs\":[],\"obfuscation\":\"WlpYsBM2K5mx\",\"output_index\":0,\"sequence_number\":6}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"logprobs\":[],\"obfuscation\":\"NKR6OMfjdITEWbM\",\"output_index\":0,\"sequence_number\":7}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" three\",\"item_id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"logprobs\":[],\"obfuscation\":\"UJMxs5cdmt\",\"output_index\":0,\"sequence_number\":8}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"logprobs\":[],\"obfuscation\":\"EfiHDIscGRgwQnK\",\"output_index\":0,\"sequence_number\":9}", + "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":10,\"text\":\"One, two, three.\"}", + "event: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"},\"sequence_number\":11}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"}],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":12}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0e012e9ce2b1452c006a43cd100c0881a18fd673f301d1f2c1\",\"object\":\"response\",\"created_at\":1782828304,\"status\":\"completed\",\"background\":false,\"completed_at\":1782828304,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"msg_0e012e9ce2b1452c006a43cd10b96081a1ae4f0b70ea588c97\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":22,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":7,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":29},\"user\":null,\"metadata\":{}},\"sequence_number\":13}" ], "kind": "sse" }, @@ -357,12 +393,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a0c1cdef39103249-VIE", + "cf-ray": "a13db9435ea4c2cd-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Mon, 15 Jun 2026 13:08:36 GMT", + "date": "Tue, 30 Jun 2026 14:05:04 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "312", + "openai-processing-ms": "198", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -370,7 +406,7 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "req_68374548a7194c579321e84e19a23da6" + "x-request-id": "56da0271-453a-4cf0-962f-0915cf96b620" }, "status": 200, "statusText": "OK" @@ -378,9 +414,9 @@ }, { "callIndex": 0, - "id": "7d3c0bb6426e6be4", + "id": "49a95bf2b3466013", "matchKey": "POST api.openai.com/v1/embeddings", - "recordedAt": "2026-06-15T13:08:37.757Z", + "recordedAt": "2026-06-30T14:05:05.144Z", "request": { "body": { "kind": "json", @@ -401,556 +437,559 @@ "data": [ { "embedding": [ - 0.0196075439453125, 0.019073486328125, -0.01314544677734375, - -0.020660400390625, -0.0188140869140625, 0.029632568359375, - -0.0206298828125, 0.0236358642578125, 0.006320953369140625, - -0.01708984375, 0.004039764404296875, 0.0103607177734375, - -0.0289459228515625, 0.0068359375, -0.03192138671875, - 0.0251922607421875, -0.0282745361328125, 0.050262451171875, - 0.0914306640625, -0.02008056640625, 0.0222930908203125, - -0.01297760009765625, -0.0144805908203125, 0.034393310546875, - 0.052734375, -0.0011014938354492188, 0.00817108154296875, - 0.042510986328125, 0.0030460357666015625, 0.05987548828125, - 0.0164642333984375, -0.00787353515625, -0.00244903564453125, - 0.02423095703125, 0.01953125, -0.061065673828125, - -0.013336181640625, -0.03851318359375, 0.0079498291015625, - 0.0276641845703125, 0.0171051025390625, -0.02838134765625, - -0.0286865234375, 0.03277587890625, -0.035919189453125, - -0.047088623046875, -0.00940704345703125, -0.0224761962890625, - 0.02313232421875, -0.0037555694580078125, 0.045654296875, - -0.004848480224609375, 0.02020263671875, 0.00923919677734375, - 0.0044708251953125, 0.02252197265625, 0.03271484375, - 0.0433349609375, 0.0257110595703125, 0.0035400390625, - 0.051788330078125, 0.0206298828125, 0.04046630859375, - 0.01776123046875, -0.00559234619140625, 0.03271484375, - 0.021575927734375, 0.0322265625, 0.050048828125, - 0.02581787109375, 0.0187835693359375, 0.044342041015625, - -0.005947113037109375, 0.006748199462890625, 0.01885986328125, - 0.014678955078125, 0.004638671875, 0.038848876953125, - 0.0173492431640625, -0.03466796875, -0.0016269683837890625, - 0.01055908203125, 0.01372528076171875, -0.02166748046875, - -0.00677490234375, -0.01284027099609375, -0.00388336181640625, - 0.00274658203125, -0.002719879150390625, -0.0220794677734375, - 0.0014619827270507812, -0.01175689697265625, -0.0172119140625, - 0.015655517578125, -0.0308990478515625, 0.00458526611328125, - 0.0211334228515625, -0.04888916015625, -0.058837890625, - 0.02716064453125, 0.027862548828125, 0.001308441162109375, - -0.04681396484375, 0.0316162109375, 0.0155029296875, - -0.01544952392578125, 0.0004296302795410156, - -0.0005507469177246094, 0.01428985595703125, -0.0408935546875, - -0.021759033203125, 0.00412750244140625, -0.00025177001953125, - 0.032440185546875, -0.059783935546875, 0.01093292236328125, - 0.01397705078125, -0.00713348388671875, 0.031005859375, - -0.007572174072265625, -0.006343841552734375, - 0.0026073455810546875, -0.04180908203125, 0.040374755859375, - -0.03387451171875, -0.048248291015625, 0.006519317626953125, - 0.0264739990234375, 0.0227203369140625, -0.00856781005859375, - 0.004657745361328125, -0.044952392578125, 0.016876220703125, - 0.0258941650390625, 0.0506591796875, -0.00958251953125, - 0.033721923828125, -0.0057525634765625, 0.01751708984375, - 0.0177154541015625, -0.01558685302734375, 0.028533935546875, - -0.01058197021484375, 0.036529541015625, -0.0183258056640625, - -0.033843994140625, -0.031402587890625, 0.040069580078125, - 0.01015472412109375, -0.04278564453125, 0.016510009765625, - -0.0212554931640625, 0.00275421142578125, 0.0289459228515625, - -0.0037078857421875, -0.062103271484375, 0.01442718505859375, - -0.0018835067749023438, 0.0384521484375, 0.02569580078125, - -0.036865234375, 0.021331787109375, -0.046173095703125, - -0.016265869140625, -0.0034809112548828125, - 0.0081939697265625, -0.0090179443359375, -0.00542449951171875, - 0.011871337890625, 0.0159454345703125, -0.0235137939453125, - 0.00461578369140625, 0.051116943359375, 0.0389404296875, - 0.0225677490234375, -0.01392364501953125, -0.0185699462890625, - 0.08013916015625, 0.0262603759765625, -0.02142333984375, - -0.01103973388671875, -0.01428985595703125, 0.030731201171875, - -0.01473236083984375, 0.0189361572265625, 0.0250244140625, - -0.0206451416015625, -0.026885986328125, -0.0172882080078125, - 0.05322265625, 0.0615234375, -0.019073486328125, - 0.056396484375, -0.045440673828125, -0.06280517578125, - 0.0241546630859375, 0.0021800994873046875, - 0.006801605224609375, 0.0093231201171875, 0.00798797607421875, - -0.03924560546875, 0.04193115234375, -0.0056304931640625, - -0.00327301025390625, -0.01485443115234375, - 0.0191192626953125, -0.01004791259765625, -0.048309326171875, - 0.0295257568359375, -0.004802703857421875, - -0.0124359130859375, -0.00547027587890625, - -0.0262298583984375, 0.0384521484375, 0.03857421875, - -0.01038360595703125, 0.012908935546875, 0.034027099609375, - 0.0299072265625, -0.00550079345703125, 0.034637451171875, - 0.023406982421875, 0.0113067626953125, -0.01557159423828125, - -0.048919677734375, 0.055419921875, 0.052642822265625, - 0.00609588623046875, -0.044586181640625, 0.002712249755859375, - 0.00432586669921875, -0.028656005859375, -0.0147552490234375, - -0.015411376953125, -0.0269775390625, -0.01922607421875, - 0.003505706787109375, -0.0132598876953125, -0.04779052734375, - 0.019317626953125, -0.0338134765625, 0.01849365234375, - 0.01416015625, 0.0026702880859375, -0.00037384033203125, - 0.0026149749755859375, 0.01383209228515625, 0.037200927734375, - -0.0421142578125, 0.0126953125, 0.043365478515625, - -0.0171966552734375, -0.025360107421875, 0.017303466796875, - -0.03546142578125, 0.035125732421875, 0.006137847900390625, - -0.00630950927734375, -0.047698974609375, -0.0099029541015625, - 0.01043701171875, 0.0198974609375, -0.00995635986328125, - -0.0018243789672851562, -0.00839996337890625, - 0.0192108154296875, -0.0095977783203125, -0.023651123046875, - -0.0224609375, -0.030517578125, 0.03485107421875, - -0.0008287429809570312, -0.0177154541015625, 0.029052734375, - -0.020965576171875, 0.005268096923828125, -0.028167724609375, - 0.0009093284606933594, -0.001140594482421875, - 0.0157928466796875, -0.02178955078125, 0.0443115234375, - -0.01227569580078125, 0.01256561279296875, - -0.0095367431640625, -0.0198211669921875, 0.04046630859375, - 0.06732177734375, -0.032562255859375, 0.052032470703125, - 0.02166748046875, -0.021209716796875, -0.033935546875, - 0.0225982666015625, -0.008056640625, 0.006862640380859375, - 0.035552978515625, 0.0010929107666015625, - 0.006832122802734375, 0.012481689453125, -0.0239105224609375, - -0.0117950439453125, 0.004608154296875, 0.01525115966796875, - -0.049560546875, 0.048431396484375, -0.045501708984375, - 0.0196685791015625, 0.0521240234375, 0.00585174560546875, - -0.054107666015625, -0.036376953125, 0.04632568359375, - -0.06768798828125, -0.01151275634765625, 0.00713348388671875, - -0.0157928466796875, 0.0195770263671875, 0.03448486328125, - 0.01102447509765625, -0.00614166259765625, - 0.01256561279296875, 0.007549285888671875, - 0.0020580291748046875, -0.0272674560546875, 0.031707763671875, - 0.0144805908203125, 0.03839111328125, -0.0278778076171875, - -0.00634765625, 0.0008325576782226562, 0.00878143310546875, - -0.008514404296875, 0.06134033203125, -0.040191650390625, - -0.021484375, 0.003170013427734375, 0.029327392578125, - 0.003055572509765625, -0.00859832763671875, -0.02532958984375, - 0.0270538330078125, -0.035919189453125, 0.0270233154296875, - -0.0033893585205078125, -0.01428985595703125, 0.0377197265625, - 0.001129150390625, -0.005687713623046875, -0.03594970703125, - -0.0191802978515625, -0.0195770263671875, - 0.0004911422729492188, 0.0313720703125, -0.040771484375, - 0.0191802978515625, 0.06414794921875, 0.00946807861328125, - -0.05694580078125, 0.0130462646484375, -0.016510009765625, - -0.052764892578125, -0.0163116455078125, -0.018951416015625, - -0.03668212890625, -0.0084381103515625, - -0.0017042160034179688, -0.00557708740234375, + 0.0196380615234375, 0.019073486328125, -0.01320648193359375, + -0.0206451416015625, -0.0188751220703125, 0.02972412109375, + -0.020599365234375, 0.023651123046875, 0.006359100341796875, + -0.017059326171875, 0.004039764404296875, 0.01035308837890625, + -0.028961181640625, 0.00681304931640625, -0.03192138671875, + 0.02520751953125, -0.0282440185546875, 0.0501708984375, + 0.09149169921875, -0.020050048828125, 0.022308349609375, + -0.01296234130859375, -0.01445770263671875, 0.03436279296875, + 0.052764892578125, -0.0010938644409179688, 0.0081634521484375, + 0.042510986328125, 0.003047943115234375, 0.059844970703125, + 0.0164337158203125, -0.0078582763671875, + -0.0024394989013671875, 0.02423095703125, 0.0195159912109375, + -0.061065673828125, -0.0133514404296875, -0.038421630859375, + 0.00791168212890625, 0.027679443359375, 0.01708984375, + -0.0284271240234375, -0.0287322998046875, 0.03277587890625, + -0.035919189453125, -0.04705810546875, -0.0094451904296875, + -0.022491455078125, 0.02313232421875, -0.0037364959716796875, + 0.045654296875, -0.00487518310546875, 0.020172119140625, + 0.009246826171875, 0.00449371337890625, 0.022552490234375, + 0.03277587890625, 0.0433349609375, 0.02569580078125, + 0.0035457611083984375, 0.051788330078125, 0.020599365234375, + 0.04046630859375, 0.0177459716796875, -0.0055999755859375, + 0.03271484375, 0.0215606689453125, 0.032257080078125, + 0.050048828125, 0.0258026123046875, 0.018768310546875, + 0.044342041015625, -0.005954742431640625, 0.00675201416015625, + 0.0188751220703125, 0.01470947265625, 0.00463104248046875, + 0.038787841796875, 0.017364501953125, -0.03466796875, + -0.0016241073608398438, 0.01056671142578125, + 0.0137481689453125, -0.0216827392578125, -0.00678253173828125, + -0.01279449462890625, -0.00383758544921875, + 0.0027370452880859375, -0.0027408599853515625, + -0.0220947265625, 0.0014705657958984375, -0.0117034912109375, + -0.0172882080078125, 0.015655517578125, -0.03094482421875, + 0.00457000732421875, 0.0211029052734375, -0.04888916015625, + -0.058837890625, 0.02716064453125, 0.0279083251953125, + 0.0013456344604492188, -0.046783447265625, 0.0316162109375, + 0.0154876708984375, -0.01546478271484375, + 0.00037980079650878906, -0.0005192756652832031, + 0.0143280029296875, -0.040924072265625, -0.021728515625, + 0.004119873046875, -0.0002334117889404297, 0.032440185546875, + -0.059783935546875, 0.01092529296875, 0.014007568359375, + -0.00711822509765625, 0.031036376953125, + -0.007556915283203125, -0.00634002685546875, 0.0025634765625, + -0.04180908203125, 0.0404052734375, -0.03387451171875, + -0.048248291015625, 0.00656890869140625, 0.0265350341796875, + 0.0227813720703125, -0.00855255126953125, 0.00469970703125, + -0.044952392578125, 0.01690673828125, 0.025909423828125, + 0.05059814453125, -0.0096282958984375, 0.033782958984375, + -0.00574493408203125, 0.0175018310546875, 0.01776123046875, + -0.015625, 0.0285797119140625, -0.01055908203125, + 0.0364990234375, -0.018280029296875, -0.0338134765625, + -0.0313720703125, 0.040069580078125, 0.0101470947265625, + -0.04278564453125, 0.0164794921875, -0.0212554931640625, + 0.00272369384765625, 0.0289459228515625, + -0.003696441650390625, -0.0621337890625, 0.014434814453125, + -0.00196075439453125, 0.0384521484375, 0.025665283203125, + -0.036865234375, 0.0212860107421875, -0.046142578125, + -0.0162811279296875, -0.0034656524658203125, + 0.00821685791015625, -0.00901031494140625, + -0.00539398193359375, 0.011871337890625, 0.0160064697265625, + -0.0234527587890625, 0.004573822021484375, 0.0511474609375, + 0.038909912109375, 0.0225677490234375, -0.0139312744140625, + -0.018524169921875, 0.08013916015625, 0.026275634765625, + -0.0214385986328125, -0.01105499267578125, + -0.01430511474609375, 0.03076171875, -0.01468658447265625, + 0.0189056396484375, 0.0250244140625, -0.0206146240234375, + -0.0269317626953125, -0.0172882080078125, 0.05322265625, + 0.061492919921875, -0.0190887451171875, 0.056365966796875, + -0.04541015625, -0.0628662109375, 0.0241546630859375, + 0.002185821533203125, 0.0067596435546875, 0.00933074951171875, + 0.0079803466796875, -0.039215087890625, 0.041900634765625, + -0.0055999755859375, -0.0033016204833984375, + -0.01486968994140625, 0.019073486328125, -0.0100555419921875, + -0.04833984375, 0.029510498046875, -0.00475311279296875, + -0.01241302490234375, -0.005481719970703125, + -0.0262298583984375, 0.038421630859375, 0.038543701171875, + -0.01038360595703125, 0.012939453125, 0.033966064453125, + 0.0299072265625, -0.005496978759765625, 0.03466796875, + 0.023406982421875, 0.0113525390625, -0.0155792236328125, + -0.048919677734375, 0.055419921875, 0.05267333984375, + 0.00608062744140625, -0.04461669921875, 0.002704620361328125, + 0.00434112548828125, -0.0286407470703125, + -0.01476287841796875, -0.01540374755859375, + -0.0269317626953125, -0.019195556640625, 0.0035400390625, + -0.01326751708984375, -0.047821044921875, 0.0193634033203125, + -0.033843994140625, 0.0185394287109375, 0.0141448974609375, + 0.0026836395263671875, -0.00033974647521972656, + 0.002651214599609375, 0.01383209228515625, 0.03717041015625, + -0.042083740234375, 0.01270294189453125, 0.04339599609375, + -0.0172119140625, -0.025360107421875, 0.0172576904296875, + -0.035430908203125, 0.035125732421875, 0.00611114501953125, + -0.00634002685546875, -0.047698974609375, + -0.00983428955078125, 0.0104217529296875, 0.019866943359375, + -0.00997161865234375, -0.0018606185913085938, + -0.008392333984375, 0.019195556640625, -0.00960540771484375, + -0.023651123046875, -0.022491455078125, -0.030517578125, + 0.034912109375, -0.0008358955383300781, -0.0177154541015625, + 0.0290985107421875, -0.020965576171875, 0.005283355712890625, + -0.028228759765625, 0.0008840560913085938, -0.001129150390625, + 0.015777587890625, -0.0218505859375, 0.0443115234375, + -0.01230621337890625, 0.01255035400390625, + -0.00955963134765625, -0.01983642578125, 0.04046630859375, + 0.0672607421875, -0.0325927734375, 0.052032470703125, + 0.02166748046875, -0.021240234375, -0.033966064453125, + 0.022613525390625, -0.008087158203125, 0.006885528564453125, + 0.03558349609375, 0.0010814666748046875, 0.006816864013671875, + 0.0125274658203125, -0.0239105224609375, -0.01180267333984375, + 0.004608154296875, 0.0152740478515625, -0.04949951171875, + 0.0484619140625, -0.045501708984375, 0.019683837890625, + 0.0521240234375, 0.005802154541015625, -0.054107666015625, + -0.03643798828125, 0.04638671875, -0.0677490234375, + -0.01151275634765625, 0.007213592529296875, + -0.0158538818359375, 0.019561767578125, 0.03448486328125, + 0.011016845703125, -0.0061187744140625, 0.0125732421875, + 0.007537841796875, 0.002048492431640625, -0.0272369384765625, + 0.03173828125, 0.01447296142578125, 0.03839111328125, + -0.02783203125, -0.0063323974609375, 0.0008225440979003906, + 0.00875091552734375, -0.00853729248046875, 0.06134033203125, + -0.0401611328125, -0.021484375, 0.0031414031982421875, + 0.029296875, 0.003040313720703125, -0.0085601806640625, + -0.0253448486328125, 0.0270233154296875, -0.035919189453125, + 0.0270233154296875, -0.0033855438232421875, + -0.01428985595703125, 0.0377197265625, 0.0011196136474609375, + -0.00563812255859375, -0.03594970703125, -0.0191650390625, + -0.0196075439453125, 0.0004887580871582031, 0.0313720703125, + -0.040771484375, 0.0192108154296875, 0.064208984375, + 0.0094451904296875, -0.05694580078125, 0.01303863525390625, + -0.0164947509765625, -0.052764892578125, -0.0163116455078125, + -0.018951416015625, -0.036712646484375, -0.0084228515625, + -0.0016994476318359375, -0.005573272705078125, -0.03851318359375, 0.07061767578125, -0.049896240234375, - -0.0277252197265625, 0.0287322998046875, -0.02880859375, - 0.047088623046875, -0.030364990234375, -0.025054931640625, - -0.008270263671875, -0.04766845703125, -0.02618408203125, - -0.0643310546875, -0.002410888671875, 0.0355224609375, - -0.04705810546875, 0.03204345703125, 0.0369873046875, - 0.043701171875, -0.0550537109375, 0.01226043701171875, - -0.006168365478515625, 0.012237548828125, - 0.004772186279296875, 0.00537872314453125, 0.022552490234375, - -0.03302001953125, -0.0009675025939941406, -0.0103759765625, - -0.00447845458984375, -0.029510498046875, -0.0172576904296875, - 0.0028629302978515625, -0.0390625, 0.01015472412109375, - -0.006866455078125, 0.04296875, 0.028167724609375, - 0.0075225830078125, -0.01715087890625, 0.0215911865234375, - -0.0222625732421875, 0.006572723388671875, -0.037872314453125, - 0.015380859375, -0.003780364990234375, 0.0131683349609375, - 0.0540771484375, 0.0298919677734375, -0.07373046875, - 0.0330810546875, -0.02154541015625, 0.037506103515625, - 0.004802703857421875, -0.058837890625, 0.0113525390625, - 0.0028858184814453125, -0.007354736328125, - -0.01139068603515625, -0.06524658203125, -0.019317626953125, - 0.032623291015625, 0.00508880615234375, 0.021331787109375, - 0.0006260871887207031, -0.008514404296875, - 0.01102447509765625, 0.0150909423828125, 0.0099639892578125, - 0.01019287109375, -0.01428985595703125, 0.00167083740234375, - 0.047515869140625, -0.017364501953125, 0.01197052001953125, - -0.03564453125, -0.0462646484375, -0.017425537109375, - 0.055816650390625, 0.029937744140625, -0.045867919921875, - 0.06005859375, -0.0311737060546875, -0.00281524658203125, - -0.00878143310546875, -0.01318359375, -0.0246124267578125, - 0.0300140380859375, 0.0197296142578125, 0.0699462890625, - 0.00809478759765625, -0.03424072265625, 0.00490570068359375, - 0.046600341796875, -0.00392913818359375, 0.044769287109375, - 0.03271484375, 0.018768310546875, 0.0243072509765625, - 0.019378662109375, -0.038787841796875, -0.03131103515625, - 0.0158538818359375, 0.0335693359375, 0.0224456787109375, - 0.025848388671875, 0.007061004638671875, 0.0049285888671875, - -0.0595703125, 0.038726806640625, -0.0494384765625, - -0.06390380859375, -0.0011005401611328125, 0.0219268798828125, - -0.018798828125, 0.006317138671875, -0.0794677734375, - -0.00662994384765625, 0.00353240966796875, - 0.0020122528076171875, -0.0234527587890625, - 0.0159759521484375, 0.052032470703125, -0.038360595703125, - 0.01372528076171875, -0.00020372867584228516, - 0.021575927734375, -0.00679779052734375, -0.053985595703125, - -0.01056671142578125, -0.0272369384765625, - -0.0236053466796875, 0.023162841796875, 0.00165557861328125, - 0.0499267578125, 0.012908935546875, 0.033233642578125, - 0.08331298828125, 0.01042938232421875, 0.0039825439453125, - 0.00824737548828125, -0.0260772705078125, 0.0299530029296875, - -0.025299072265625, 0.032196044921875, 0.01166534423828125, - -0.010711669921875, -0.00376129150390625, -0.023162841796875, - 0.0157470703125, 0.01163482666015625, 0.002651214599609375, - 0.0198822021484375, 0.0246124267578125, -0.0152740478515625, - 0.004291534423828125, 0.032928466796875, 0.0141143798828125, - -0.024322509765625, -0.007518768310546875, 0.04766845703125, - -0.04901123046875, 0.0227508544921875, -0.0255584716796875, - -0.0141143798828125, -0.01641845703125, 0.0095367431640625, - 0.0183563232421875, 0.0184173583984375, 0.05340576171875, - 0.00008529424667358398, 0.03070068359375, - 0.0038967132568359375, -0.0161285400390625, - -0.006809234619140625, -0.0189361572265625, - -0.01512908935546875, -0.0167999267578125, 0.022003173828125, - -0.027374267578125, -0.03448486328125, -0.016998291015625, + -0.027740478515625, 0.0287628173828125, -0.028839111328125, + 0.04705810546875, -0.0303955078125, -0.0250396728515625, + -0.008270263671875, -0.047637939453125, -0.0262298583984375, + -0.0643310546875, -0.0024242401123046875, 0.0355224609375, + -0.047149658203125, 0.032012939453125, 0.03704833984375, + 0.043701171875, -0.05511474609375, 0.01226806640625, + -0.006153106689453125, 0.012237548828125, 0.00476837158203125, + 0.00540924072265625, 0.02252197265625, -0.03302001953125, + -0.0009093284606933594, -0.0104217529296875, + -0.00444793701171875, -0.0295257568359375, + -0.0172882080078125, 0.002864837646484375, -0.039031982421875, + 0.01010894775390625, -0.006862640380859375, 0.042938232421875, + 0.028167724609375, 0.007511138916015625, -0.0171661376953125, + 0.0216217041015625, -0.022247314453125, 0.00659942626953125, + -0.03790283203125, 0.01537322998046875, + -0.0037822723388671875, 0.01319122314453125, + 0.054046630859375, 0.0298919677734375, -0.07373046875, + 0.033111572265625, -0.021514892578125, 0.03753662109375, + 0.004749298095703125, -0.058837890625, 0.01134490966796875, + 0.0028514862060546875, -0.007328033447265625, + -0.01137542724609375, -0.06524658203125, -0.0193023681640625, + 0.03265380859375, 0.00508880615234375, 0.0213623046875, + 0.0005936622619628906, -0.0084991455078125, + 0.0110015869140625, 0.01507568359375, 0.0099639892578125, + 0.01019287109375, -0.01430511474609375, 0.0016298294067382812, + 0.047576904296875, -0.017364501953125, 0.01197052001953125, + -0.03570556640625, -0.0462646484375, -0.0174102783203125, + 0.055755615234375, 0.0299072265625, -0.045867919921875, + 0.060028076171875, -0.031219482421875, -0.002826690673828125, + -0.0088043212890625, -0.01319122314453125, + -0.0246429443359375, 0.0300750732421875, 0.0197296142578125, + 0.06988525390625, 0.00811767578125, -0.03424072265625, + 0.004909515380859375, 0.046600341796875, + -0.0038928985595703125, 0.044769287109375, 0.032745361328125, + 0.018707275390625, 0.024261474609375, 0.0193939208984375, + -0.038818359375, -0.031280517578125, 0.015869140625, + 0.0335693359375, 0.0224456787109375, 0.02581787109375, + 0.007049560546875, 0.00487518310546875, -0.059600830078125, + 0.03875732421875, -0.0494384765625, -0.06390380859375, + -0.0011310577392578125, 0.021942138671875, + -0.0187530517578125, 0.0063018798828125, -0.0794677734375, + -0.00656890869140625, 0.00356292724609375, + 0.0019741058349609375, -0.0234832763671875, + 0.0159759521484375, 0.052032470703125, -0.038421630859375, + 0.01377105712890625, -0.00019228458404541016, + 0.0215606689453125, -0.006824493408203125, -0.053955078125, + -0.0105743408203125, -0.0272216796875, -0.02362060546875, + 0.023193359375, 0.0016756057739257812, 0.0499267578125, + 0.0129547119140625, 0.033172607421875, 0.08331298828125, + 0.0103759765625, 0.003932952880859375, 0.00826263427734375, + -0.0260772705078125, 0.0300445556640625, -0.0252685546875, + 0.0322265625, 0.01165008544921875, -0.01071929931640625, + -0.0037631988525390625, -0.02313232421875, 0.0157470703125, + 0.0116424560546875, 0.0026683807373046875, 0.0199127197265625, + 0.0246124267578125, -0.01528167724609375, 0.004302978515625, + 0.032928466796875, 0.01409149169921875, -0.024322509765625, + -0.007480621337890625, 0.04766845703125, -0.04901123046875, + 0.0227203369140625, -0.0255889892578125, -0.014129638671875, + -0.0164337158203125, 0.0095062255859375, 0.01837158203125, + 0.01837158203125, 0.05340576171875, 0.00007402896881103516, + 0.03070068359375, 0.003925323486328125, -0.0161285400390625, + -0.00675201416015625, -0.0189666748046875, + -0.01511383056640625, -0.0167999267578125, 0.0219573974609375, + -0.0273590087890625, -0.034515380859375, -0.01702880859375, -0.024627685546875, 0.045806884765625, -0.03558349609375, - -0.0439453125, -0.000728607177734375, -0.0036830902099609375, - -0.009368896484375, -0.0039520263671875, 0.026947021484375, - -0.01522064208984375, -0.00968170166015625, 0.06329345703125, - 0.037994384765625, 0.017242431640625, 0.0188751220703125, - 0.036865234375, 0.00426483154296875, 0.01039886474609375, - -0.01483154296875, -0.022216796875, -0.0118408203125, - 0.0484619140625, 0.01296234130859375, 0.0175018310546875, - 0.02081298828125, 0.0182037353515625, 0.010162353515625, - -0.003997802734375, -0.0299224853515625, 0.0654296875, - -0.0054168701171875, 0.01355743408203125, 0.032470703125, - -0.03521728515625, -0.04522705078125, 0.0218353271484375, - 0.0035457611083984375, -0.002376556396484375, -0.0419921875, - -0.0294342041015625, -0.0037860870361328125, - 0.01380157470703125, 0.0174713134765625, -0.0234527587890625, - 0.01428985595703125, 0.0014009475708007812, 0.01141357421875, - 0.0008606910705566406, -0.035858154296875, - -0.01201629638671875, 0.00235748291015625, 0.0251312255859375, - -0.019287109375, -0.0242156982421875, 0.01537322998046875, - -0.036956787109375, 0.00670623779296875, -0.0191650390625, - 0.0223846435546875, -0.007534027099609375, 0.0176849365234375, - -0.0187530517578125, 0.01541900634765625, 0.028289794921875, - -0.005496978759765625, 0.02801513671875, -0.02410888671875, - 0.023956298828125, -0.01284027099609375, -0.00730133056640625, - 0.01430511474609375, 0.03460693359375, -0.031982421875, - 0.0055694580078125, -0.005382537841796875, 0.047088623046875, - 0.0189361572265625, 0.0183868408203125, -0.0099945068359375, - -0.0172576904296875, 0.024444580078125, 0.0141754150390625, - 0.045562744140625, 0.0128021240234375, -0.0233917236328125, - -0.0251007080078125, -0.004085540771484375, - -0.0197906494140625, 0.008392333984375, -0.03021240234375, - 0.041046142578125, 0.0124664306640625, -0.0015897750854492188, - 0.0059967041015625, -0.006702423095703125, 0.0124664306640625, + -0.0439453125, -0.0007295608520507812, -0.0037212371826171875, + -0.00934600830078125, -0.00396728515625, 0.0269317626953125, + -0.01520538330078125, -0.00968170166015625, 0.063232421875, + 0.0379638671875, 0.0172882080078125, 0.01885986328125, + 0.036865234375, 0.00424957275390625, 0.010406494140625, + -0.01483917236328125, -0.022186279296875, + -0.01180267333984375, 0.0484619140625, 0.01297760009765625, + 0.0174713134765625, 0.020751953125, 0.01824951171875, + 0.01013946533203125, -0.00399017333984375, -0.029998779296875, + 0.0654296875, -0.005413055419921875, 0.0135650634765625, + 0.032470703125, -0.03521728515625, -0.04522705078125, + 0.0218505859375, 0.003498077392578125, -0.002376556396484375, + -0.0419921875, -0.0294647216796875, -0.003753662109375, + 0.01380157470703125, 0.0174560546875, -0.0234375, + 0.01435089111328125, 0.0014057159423828125, + 0.0113372802734375, 0.000843048095703125, -0.035858154296875, + -0.01200103759765625, 0.0024013519287109375, + 0.0251007080078125, -0.0193023681640625, -0.0242462158203125, + 0.01535797119140625, -0.0369873046875, 0.00672149658203125, + -0.0191650390625, 0.022369384765625, -0.0075225830078125, + 0.0176544189453125, -0.0187530517578125, 0.0154266357421875, + 0.028350830078125, -0.00547027587890625, 0.0279541015625, + -0.0240631103515625, 0.02398681640625, -0.0128021240234375, + -0.007293701171875, 0.0142974853515625, 0.03460693359375, + -0.032012939453125, 0.005584716796875, -0.00534820556640625, + 0.04705810546875, 0.018890380859375, 0.0184326171875, + -0.01000213623046875, -0.0172882080078125, 0.0244140625, + 0.01416778564453125, 0.045562744140625, 0.012786865234375, + -0.0233917236328125, -0.025146484375, -0.00409698486328125, + -0.019775390625, 0.00835418701171875, -0.0301971435546875, + 0.041046142578125, 0.012481689453125, -0.0015058517456054688, + 0.0059967041015625, -0.00667572021484375, 0.01248931884765625, 0.02105712890625, 0.04742431640625, 0.0295562744140625, - -0.04473876953125, 0.053680419921875, 0.0214385986328125, - -0.01190185546875, 0.003604888916015625, 0.004787445068359375, - 0.03082275390625, -0.00344085693359375, 0.0184173583984375, - -0.0284271240234375, 0.05914306640625, -0.0222625732421875, - -0.0287017822265625, 0.02880859375, -0.035003662109375, - -0.022186279296875, 0.0284881591796875, 0.0223388671875, - 0.0144500732421875, 0.043853759765625, 0.0281829833984375, - -0.047088623046875, -0.03582763671875, 0.04150390625, - 0.003925323486328125, 0.00934600830078125, -0.022003173828125, - -0.004741668701171875, -0.01403045654296875, - -0.04925537109375, -0.0005216598510742188, - -0.0065765380859375, 0.01715087890625, -0.0152130126953125, - 0.0200042724609375, -0.0130615234375, -0.0202484130859375, - -0.0025310516357421875, 0.0059661865234375, - 0.0185699462890625, -0.0101776123046875, -0.021728515625, - -0.01114654541015625, -0.0189361572265625, 0.0223541259765625, - 0.0265960693359375, -0.02960205078125, 0.019287109375, - -0.01416778564453125, 0.0121307373046875, 0.034515380859375, - -0.033782958984375, 0.000728607177734375, -0.03411865234375, - 0.00010061264038085938, 0.0010194778442382812, - 0.0228271484375, 0.009246826171875, -0.0114288330078125, - -0.00408935546875, 0.00986480712890625, -0.016845703125, - -0.039886474609375, -0.00739288330078125, - 0.007213592529296875, 0.0256805419921875, 0.01123809814453125, - 0.009185791015625, -0.03607177734375, 0.0251617431640625, - -0.017852783203125, -0.007503509521484375, -0.037750244140625, - -0.02001953125, -0.01474761962890625, -0.0113372802734375, - 0.0115814208984375, -0.00036406517028808594, - -0.014190673828125, -0.0032482147216796875, - 0.0017681121826171875, -0.0238494873046875, - -0.025299072265625, -0.0113525390625, 0.01398468017578125, - 0.01377105712890625, 0.01200103759765625, 0.00659942626953125, - -0.0007700920104980469, -0.05926513671875, 0.0075531005859375, - -0.033935546875, 0.00881195068359375, 0.002941131591796875, - -0.02313232421875, 0.02215576171875, 0.06939697265625, - -0.0294647216796875, -0.0032405853271484375, - -0.00983428955078125, -0.023223876953125, - -0.00310516357421875, -0.0014495849609375, - 0.01334381103515625, -0.0032253265380859375, 0.033447265625, - -0.0108642578125, 0.020355224609375, 0.0001189112663269043, - -0.0002608299255371094, -0.0404052734375, - 0.0038318634033203125, 0.0113983154296875, - -0.0255584716796875, -0.00572967529296875, 0.0184783935546875, - -0.0272064208984375, 0.01013946533203125, - -0.01021575927734375, -0.0146636962890625, - -0.0161285400390625, -0.022796630859375, 0.026214599609375, - -0.036590576171875, -0.0227813720703125, 0.0120086669921875, - 0.03369140625, -0.04632568359375, -0.012939453125, - -0.03302001953125, -0.035858154296875, 0.0019168853759765625, - -0.006450653076171875, 0.0162506103515625, 0.0193023681640625, - -0.00664520263671875, -0.01361083984375, 0.04168701171875, - -0.047821044921875, 0.011138916015625, -0.0188751220703125, - 0.00011795759201049805, -0.0157470703125, -0.01470947265625, - -0.01255035400390625, 0.0099334716796875, -0.0283355712890625, - 0.053131103515625, -0.02044677734375, -0.027008056640625, - -0.05059814453125, -0.01421356201171875, - 0.0009927749633789062, 0.0079803466796875, 0.0181884765625, - 0.0401611328125, 0.01983642578125, -0.028778076171875, - -0.004673004150390625, 0.0011386871337890625, - 0.0002682209014892578, -0.00746917724609375, - -0.038360595703125, -0.01195526123046875, -0.037689208984375, - 0.039764404296875, -0.0227813720703125, -0.00922393798828125, - -0.038116455078125, 0.0167388916015625, 0.01528167724609375, - -0.0020923614501953125, -0.0123291015625, - -0.007373809814453125, -0.04132080078125, 0.03277587890625, - -0.0265045166015625, 0.033172607421875, 0.0306549072265625, - -0.0022735595703125, 0.0080718994140625, -0.0269317626953125, - 0.0202178955078125, 0.0038299560546875, 0.022674560546875, - 0.00959014892578125, 0.039520263671875, 0.00336456298828125, - -0.0233917236328125, 0.0082855224609375, 0.01971435546875, - -0.035430908203125, 0.05047607421875, 0.006145477294921875, - -0.05767822265625, 0.00943756103515625, -0.005275726318359375, - 0.0142822265625, -0.012359619140625, -0.007305145263671875, - 0.006893157958984375, -0.023101806640625, 0.050323486328125, - -0.0291595458984375, 0.0227203369140625, -0.035614013671875, - 0.0396728515625, 0.00412750244140625, 0.034393310546875, - 0.00354766845703125, -0.032135009765625, -0.0251617431640625, - 0.003032684326171875, -0.0310211181640625, -0.033660888671875, - 0.0011720657348632812, -0.009918212890625, - -0.0187530517578125, -0.038116455078125, -0.0288543701171875, - 0.05987548828125, 0.005603790283203125, -0.032379150390625, - 0.0026187896728515625, 0.01201629638671875, - 0.001361846923828125, 0.0191497802734375, -0.00958251953125, - 0.01006317138671875, -0.01715087890625, -0.0546875, - -0.00728607177734375, 0.0243072509765625, 0.043853759765625, - -0.004398345947265625, -0.0305938720703125, - -0.0135650634765625, -0.0357666015625, -0.01088714599609375, - 0.01580810546875, 0.0311126708984375, 0.01107025146484375, - 0.0009198188781738281, 0.01346588134765625, - -0.00598907470703125, -0.031585693359375, 0.0192718505859375, - -0.0298919677734375, 0.024322509765625, -0.0038299560546875, - -0.03668212890625, -0.03363037109375, 0.01568603515625, - 0.027618408203125, -0.0020351409912109375, 0.029083251953125, - 0.0151824951171875, -0.025604248046875, -0.01169586181640625, - -0.003437042236328125, -0.030426025390625, -0.004547119140625, - -0.027496337890625, -0.017486572265625, 0.016510009765625, - 0.049224853515625, -0.044769287109375, 0.0099945068359375, - 0.03118896484375, -0.033172607421875, 0.018585205078125, - -0.032806396484375, 0.02734375, -0.03875732421875, - -0.05328369140625, 0.0248870849609375, 0.0003790855407714844, - -0.0165863037109375, -0.0008473396301269531, - 0.006267547607421875, -0.0216522216796875, - -0.004703521728515625, 0.0313720703125, -0.004276275634765625, - -0.0088653564453125, -0.01087188720703125, 0.032623291015625, - -0.046142578125, -0.0183563232421875, -0.00930023193359375, - 0.040618896484375, 0.006988525390625, 0.024169921875, - 0.007266998291015625, 0.013397216796875, 0.00238800048828125, - 0.00870513916015625, 0.02020263671875, -0.033050537109375, - 0.054840087890625, 0.023162841796875, -0.0002655982971191406, - -0.050750732421875, -0.023345947265625, -0.01496124267578125, - 0.02587890625, 0.00466156005859375, -0.01174163818359375, - 0.0265960693359375, -0.0006241798400878906, - -0.0022716522216796875, -0.0010480880737304688, - -0.01158905029296875, 0.0088043212890625, 0.01372528076171875, - -0.0122833251953125, 0.0022296905517578125, - -0.0183258056640625, 0.0221405029296875, 0.0283355712890625, - 0.042083740234375, -0.00858306884765625, -0.034881591796875, - 0.0240020751953125, 0.037689208984375, -0.01555633544921875, - -0.039154052734375, 0.05511474609375, 0.01129150390625, - 0.0042266845703125, 0.0019359588623046875, - -0.0081329345703125, 0.01029205322265625, - -0.002567291259765625, -0.0022258758544921875, - -0.0098876953125, -0.013153076171875, -0.035858154296875, - 0.01329803466796875, -0.01081085205078125, 0.0192718505859375, - 0.00901031494140625, 0.00010645389556884766, - 0.0134429931640625, -0.0038509368896484375, 0.01763916015625, - 0.0283355712890625, 0.01259613037109375, 0.00826263427734375, - 0.04632568359375, -0.054901123046875, -0.051239013671875, - 0.030975341796875, 0.0223846435546875, 0.0031890869140625, - -0.01381683349609375, -0.0230712890625, -0.00873565673828125, - 0.036590576171875, -0.010467529296875, -0.03173828125, - -0.004344940185546875, -0.03387451171875, - -0.00930023193359375, 0.0092620849609375, -0.0279541015625, - 0.0113372802734375, 0.0222930908203125, 0.0179901123046875, - -0.006481170654296875, -0.01105499267578125, - -0.005947113037109375, 0.005802154541015625, -0.0125732421875, - -0.00921630859375, -0.0013303756713867188, - -0.0197906494140625, -0.005924224853515625, - -0.0263214111328125, -0.01259613037109375, - -0.005962371826171875, 0.017303466796875, -0.0138397216796875, - -0.042022705078125, 0.0295562744140625, -0.015716552734375, - 0.0291748046875, 0.035552978515625, 0.00788116455078125, - -0.01380157470703125, -0.0011653900146484375, - -0.0090179443359375, -0.001216888427734375, - 0.0025177001953125, 0.0003676414489746094, 0.0197906494140625, - -0.02069091796875, 0.01342010498046875, 0.0030536651611328125, - 0.03173828125, -0.001850128173828125, -0.052215576171875, - -0.023193359375, -0.012176513671875, -0.0166778564453125, - -0.03997802734375, -0.041229248046875, -0.017974853515625, - -0.00385284423828125, 0.005035400390625, - -0.002956390380859375, 0.033843994140625, -0.01116943359375, - 0.0279083251953125, -0.0178070068359375, 0.024627685546875, - 0.032867431640625, 0.003444671630859375, 0.0240478515625, - -0.01445770263671875, 0.040771484375, -0.01230621337890625, - 0.00666046142578125, -0.008087158203125, 0.006805419921875, - -0.004276275634765625, 0.0221405029296875, -0.024749755859375, - 0.0400390625, 0.0138397216796875, 0.0361328125, - -0.0028705596923828125, -0.003787994384765625, - 0.06475830078125, 0.0302886962890625, -0.043304443359375, - -0.04559326171875, 0.020751953125, -0.0275115966796875, - -0.02569580078125, -0.01329803466796875, 0.003986358642578125, - 0.04998779296875, -0.0101776123046875, -0.0172119140625, - 0.048004150390625, 0.014007568359375, -0.0207061767578125, - -0.0168914794921875, 0.0146026611328125, 0.0286712646484375, - 0.03729248046875, -0.0244598388671875, 0.00667572021484375, - -0.0207366943359375, 0.03302001953125, 0.00540924072265625, - -0.0284576416015625, 0.01849365234375, -0.011444091796875, - 0.001476287841796875, -0.005615234375, 0.03778076171875, - 0.02642822265625, 0.01239776611328125, -0.01181793212890625, - 0.03521728515625, 0.013031005859375, 0.01139068603515625, - 0.00672149658203125, 0.024444580078125, 0.0197601318359375, - -0.0177001953125, -0.024200439453125, 0.0216827392578125, - -0.0004317760467529297, 0.00811767578125, -0.0131683349609375, - 0.0012493133544921875, -0.01227569580078125, - 0.0030918121337890625, 0.041107177734375, 0.012481689453125, - -0.029998779296875, -0.0092620849609375, -0.01904296875, - 0.0090484619140625, -0.0301055908203125, -0.00742340087890625, - -0.01364898681640625, 0.0297088623046875, 0.0328369140625, - -0.0116729736328125, 0.00152587890625, 0.045867919921875, - 0.0035400390625, -0.03497314453125, 0.023406982421875, - 0.03289794921875, -0.028076171875, 0.01800537109375, - 0.01024627685546875, -0.004169464111328125, -0.00396728515625, - -0.0245513916015625, -0.01021575927734375, -0.031585693359375, - -0.05474853515625, 0.0168304443359375, 0.026519775390625, - 0.0267333984375, -0.01230621337890625, -0.0149383544921875, - 0.0204620361328125, 0.015380859375, -0.0626220703125, - -0.0162353515625, 0.0220794677734375, -0.0171356201171875, - -0.01561737060546875, -0.035980224609375, 0.0192718505859375, + -0.04473876953125, 0.05364990234375, 0.021392822265625, + -0.01189422607421875, 0.003597259521484375, + 0.004817962646484375, 0.03076171875, -0.0034389495849609375, + 0.0184326171875, -0.0283966064453125, 0.05914306640625, + -0.0222625732421875, -0.0287017822265625, 0.028778076171875, + -0.0350341796875, -0.0222015380859375, 0.02850341796875, + 0.022308349609375, 0.01444244384765625, 0.04388427734375, + 0.028167724609375, -0.04718017578125, -0.03582763671875, + 0.04150390625, 0.003902435302734375, 0.0093536376953125, + -0.02203369140625, -0.004726409912109375, -0.0140228271484375, + -0.049285888671875, -0.0005688667297363281, -0.006591796875, + 0.0171356201171875, -0.01517486572265625, 0.0199432373046875, + -0.013031005859375, -0.0202789306640625, + -0.002544403076171875, 0.005962371826171875, 0.0185546875, + -0.01016998291015625, -0.021697998046875, + -0.01117706298828125, -0.0189361572265625, 0.0223541259765625, + 0.0265960693359375, -0.0296173095703125, 0.019287109375, + -0.0141754150390625, 0.01216888427734375, 0.034698486328125, + -0.033782958984375, 0.0007343292236328125, -0.034149169921875, + 0.0001068115234375, 0.0009908676147460938, 0.0228271484375, + 0.00920867919921875, -0.01145172119140625, + -0.004093170166015625, 0.00984954833984375, + -0.0168609619140625, -0.039886474609375, + -0.007373809814453125, 0.007198333740234375, + 0.025665283203125, 0.01123046875, 0.0092315673828125, + -0.03607177734375, 0.0251922607421875, -0.01788330078125, + -0.007472991943359375, -0.03778076171875, -0.0200042724609375, + -0.01473236083984375, -0.01132965087890625, 0.0115966796875, + -0.0003600120544433594, -0.014190673828125, + -0.0032367706298828125, 0.0017652511596679688, + -0.023895263671875, -0.02532958984375, -0.0113525390625, + 0.0139923095703125, 0.01377105712890625, 0.01204681396484375, + 0.00659942626953125, -0.0007576942443847656, + -0.05926513671875, 0.007549285888671875, -0.033905029296875, + 0.00885009765625, 0.00292205810546875, -0.023193359375, + 0.022186279296875, 0.06939697265625, -0.02947998046875, + -0.0032253265380859375, -0.009796142578125, + -0.0232391357421875, -0.0031147003173828125, + -0.0014448165893554688, 0.0133056640625, + -0.003246307373046875, 0.033447265625, -0.0108184814453125, + 0.02032470703125, 0.00016582012176513672, + -0.0002765655517578125, -0.0404052734375, 0.00383758544921875, + 0.01140594482421875, -0.025543212890625, + -0.005756378173828125, 0.0184478759765625, -0.027191162109375, + 0.010162353515625, -0.01020050048828125, -0.0146636962890625, + -0.01611328125, -0.0227813720703125, 0.0262298583984375, + -0.036590576171875, -0.0228118896484375, 0.01200103759765625, + 0.03369140625, -0.04632568359375, -0.012908935546875, + -0.033050537109375, -0.035858154296875, 0.001895904541015625, + -0.00644683837890625, 0.0162811279296875, 0.0193023681640625, + -0.00662994384765625, -0.01361846923828125, 0.04168701171875, + -0.0478515625, 0.01113128662109375, -0.018890380859375, + 0.00014603137969970703, -0.015716552734375, + -0.01471710205078125, -0.01258087158203125, 0.00994873046875, + -0.028350830078125, 0.05316162109375, -0.02044677734375, + -0.0269927978515625, -0.0506591796875, -0.0142364501953125, + 0.0009512901306152344, 0.00801849365234375, + 0.0181732177734375, 0.04010009765625, 0.01983642578125, + -0.028778076171875, -0.004695892333984375, + 0.0011377334594726562, 0.0002841949462890625, + -0.007450103759765625, -0.038360595703125, + -0.01195526123046875, -0.037689208984375, 0.03973388671875, + -0.0227813720703125, -0.0092620849609375, -0.038116455078125, + 0.0167388916015625, 0.01529693603515625, + -0.002117156982421875, -0.01233673095703125, + -0.00740814208984375, -0.04132080078125, 0.03277587890625, + -0.026519775390625, 0.033172607421875, 0.0306549072265625, + -0.0022640228271484375, 0.0081024169921875, + -0.0269317626953125, 0.020233154296875, 0.0038509368896484375, + 0.0226898193359375, 0.00959014892578125, 0.039459228515625, + 0.003368377685546875, -0.0233306884765625, 0.0083160400390625, + 0.01971435546875, -0.035430908203125, 0.0504150390625, + 0.006153106689453125, -0.05767822265625, 0.00940704345703125, + -0.005260467529296875, 0.01422882080078125, + -0.0123748779296875, -0.00731658935546875, + 0.006916046142578125, -0.0230865478515625, 0.05035400390625, + -0.0291595458984375, 0.022705078125, -0.03564453125, + 0.039642333984375, 0.004154205322265625, 0.03436279296875, + 0.0035457611083984375, -0.0321044921875, -0.025146484375, + 0.003063201904296875, -0.030975341796875, -0.033599853515625, + 0.0011835098266601562, -0.00994873046875, -0.018798828125, + -0.03802490234375, -0.0288848876953125, 0.05987548828125, + 0.005603790283203125, -0.032440185546875, + 0.0026149749755859375, 0.011993408203125, + 0.001346588134765625, 0.0190887451171875, -0.009613037109375, + 0.01007080078125, -0.0171356201171875, -0.0546875, + -0.007312774658203125, 0.0242767333984375, 0.04388427734375, + -0.00441741943359375, -0.030609130859375, -0.0135498046875, + -0.0357666015625, -0.0108795166015625, 0.0157928466796875, + 0.0311126708984375, 0.01108551025390625, + 0.0009121894836425781, 0.01349639892578125, + -0.005985260009765625, -0.031585693359375, 0.019256591796875, + -0.029876708984375, 0.02435302734375, -0.0038127899169921875, + -0.036712646484375, -0.033660888671875, 0.0157012939453125, + 0.027618408203125, -0.0020122528076171875, 0.0290679931640625, + 0.01519775390625, -0.025604248046875, -0.01172637939453125, + -0.003452301025390625, -0.0303955078125, -0.00453948974609375, + -0.027496337890625, -0.01751708984375, 0.0164794921875, + 0.049224853515625, -0.044769287109375, 0.0099639892578125, + 0.03118896484375, -0.033203125, 0.0185546875, + -0.03277587890625, 0.02734375, -0.038726806640625, + -0.053253173828125, 0.024932861328125, 0.00039267539978027344, + -0.016571044921875, -0.0008702278137207031, + 0.006275177001953125, -0.021728515625, -0.004669189453125, + 0.031402587890625, -0.0042877197265625, -0.0088653564453125, + -0.010894775390625, 0.032623291015625, -0.046173095703125, + -0.0183563232421875, -0.0092620849609375, 0.040618896484375, + 0.006977081298828125, 0.0242156982421875, + 0.007274627685546875, 0.0134124755859375, 0.00235748291015625, + 0.00870513916015625, 0.0201873779296875, -0.033050537109375, + 0.05487060546875, 0.0231170654296875, -0.0002980232238769531, + -0.050750732421875, -0.0233917236328125, -0.01499176025390625, + 0.02587890625, 0.00461578369140625, -0.01174163818359375, + 0.026611328125, -0.0006389617919921875, -0.002239227294921875, + -0.0010595321655273438, -0.01160430908203125, + 0.008819580078125, 0.01372528076171875, -0.01226806640625, + 0.002239227294921875, -0.0183258056640625, 0.0221405029296875, + 0.0283203125, 0.0421142578125, -0.00855255126953125, + -0.034881591796875, 0.0240020751953125, 0.0377197265625, + -0.0155029296875, -0.03912353515625, 0.055145263671875, + 0.011260986328125, 0.004222869873046875, + 0.0019702911376953125, -0.0081024169921875, + 0.0102691650390625, -0.0025806427001953125, + -0.0022258758544921875, -0.00988006591796875, + -0.013153076171875, -0.035858154296875, 0.0132598876953125, + -0.0107879638671875, 0.019256591796875, 0.009033203125, + 0.00010395050048828125, 0.01342010498046875, -0.00390625, + 0.0177001953125, 0.028350830078125, 0.0125732421875, + 0.00830841064453125, 0.04632568359375, -0.054901123046875, + -0.051239013671875, 0.031005859375, 0.02239990234375, + 0.0031948089599609375, -0.01383209228515625, -0.0230712890625, + -0.00870513916015625, 0.03656005859375, -0.01050567626953125, + -0.031768798828125, -0.00438690185546875, -0.033843994140625, + -0.00930023193359375, 0.00926971435546875, -0.0279541015625, + 0.01134490966796875, 0.02227783203125, 0.017974853515625, + -0.006488800048828125, -0.0110931396484375, + -0.005939483642578125, 0.005809783935546875, -0.0125732421875, + -0.0092620849609375, -0.0013303756713867188, + -0.0197906494140625, -0.005931854248046875, -0.02630615234375, + -0.01263427734375, -0.006008148193359375, 0.017303466796875, + -0.0138702392578125, -0.0419921875, 0.0295562744140625, + -0.015716552734375, 0.0291748046875, 0.0355224609375, + 0.00782012939453125, -0.013824462890625, + -0.0011453628540039062, -0.009033203125, + -0.0012044906616210938, 0.002529144287109375, + 0.0003771781921386719, 0.01983642578125, -0.0207061767578125, + 0.01340484619140625, 0.003055572509765625, 0.031707763671875, + -0.0019130706787109375, -0.05224609375, -0.023223876953125, + -0.012176513671875, -0.01666259765625, -0.040008544921875, + -0.041229248046875, -0.01800537109375, -0.0038776397705078125, + 0.005023956298828125, -0.0029544830322265625, + 0.03387451171875, -0.011199951171875, 0.0279388427734375, + -0.01776123046875, 0.0246124267578125, 0.032867431640625, + 0.0034275054931640625, 0.0240325927734375, -0.014434814453125, + 0.040771484375, -0.0123138427734375, 0.006633758544921875, + -0.00806427001953125, 0.006805419921875, -0.00426483154296875, + 0.0221405029296875, -0.024749755859375, 0.040069580078125, + 0.013824462890625, 0.0361328125, -0.0028667449951171875, + -0.0037746429443359375, 0.06475830078125, 0.030303955078125, + -0.043304443359375, -0.04559326171875, 0.0207366943359375, + -0.0275115966796875, -0.0256805419921875, -0.01324462890625, + 0.004016876220703125, 0.050048828125, -0.01021575927734375, + -0.0172119140625, 0.048004150390625, 0.0139617919921875, + -0.0207061767578125, -0.0168914794921875, 0.0146026611328125, + 0.0286407470703125, 0.037322998046875, -0.0244598388671875, + 0.006633758544921875, -0.0207366943359375, 0.03302001953125, + 0.005397796630859375, -0.0284423828125, 0.0184783935546875, + -0.01146697998046875, 0.0014848709106445312, + -0.005641937255859375, 0.03778076171875, 0.0264434814453125, + 0.0123748779296875, -0.01178741455078125, 0.03521728515625, + 0.013092041015625, 0.01140594482421875, 0.00672149658203125, + 0.024505615234375, 0.019775390625, -0.0177154541015625, + -0.0242156982421875, 0.02166748046875, -0.0004470348358154297, + 0.00811004638671875, -0.013153076171875, + 0.0012683868408203125, -0.01226806640625, + 0.003078460693359375, 0.041107177734375, 0.0124969482421875, + -0.030029296875, -0.0092620849609375, -0.01904296875, + 0.00907135009765625, -0.0301055908203125, + -0.007450103759765625, -0.01367950439453125, + 0.0297698974609375, 0.032867431640625, -0.0117034912109375, + 0.0015239715576171875, 0.045867919921875, 0.00350189208984375, + -0.034942626953125, 0.023406982421875, 0.03289794921875, + -0.0280914306640625, 0.018035888671875, 0.010223388671875, + -0.00412750244140625, -0.003978729248046875, + -0.024566650390625, -0.01024627685546875, -0.031585693359375, + -0.05474853515625, 0.016815185546875, 0.0265045166015625, + 0.02679443359375, -0.01230621337890625, -0.014892578125, + 0.02044677734375, 0.0153656005859375, -0.06256103515625, + -0.0162506103515625, 0.0221099853515625, -0.017120361328125, + -0.015594482421875, -0.035980224609375, 0.0192718505859375, 0.043701171875, 0.0413818359375, 0.03314208984375, - 0.00016868114471435547, -0.000579833984375, - -0.0177154541015625, -0.037384033203125, 0.0377197265625, - 0.0264739990234375, 0.01340484619140625, 0.02313232421875, - 0.04119873046875, -0.0037288665771484375, -0.0226287841796875, - -0.0005016326904296875, 0.00885772705078125, - -0.0029125213623046875, 0.007633209228515625, 0.00732421875, - -0.0113983154296875, 0.00392913818359375, - -0.00774383544921875, -0.040008544921875, -0.0231781005859375, - 0.007091522216796875, -0.0286865234375, 0.032440185546875, - 0.0177001953125, -0.015167236328125, 0.0082550048828125, - -0.01465606689453125, 0.01073455810546875, - 0.007236480712890625, 0.00146484375, 0.03265380859375, - -0.0084686279296875, 0.0301361083984375, 0.0013427734375, - -0.01102447509765625, -0.0197906494140625, - 0.01364898681640625, -0.031219482421875, -0.0229034423828125, - 0.0275115966796875, 0.0003364086151123047, 0.050811767578125, - 0.0234222412109375, 0.01097869873046875, -0.017974853515625, - -0.0154876708984375, 0.016876220703125, 0.0070037841796875, - 0.00920867919921875, -0.0135040283203125, -0.019073486328125, - 0.028564453125, 0.00928497314453125, 0.030181884765625, - -0.01273345947265625, 0.00492095947265625, - 0.0024242401123046875, -0.06781005859375, -0.00714111328125, - 0.0021343231201171875, 0.003330230712890625, - -0.0007662773132324219, 0.019500732421875, 0.0095062255859375, - -0.0262298583984375, -0.00960540771484375, - 0.006473541259765625, 0.05169677734375, -0.017730712890625, - 0.0238037109375, -0.0214691162109375, 0.0304412841796875, - -0.0126190185546875, -0.03070068359375, -0.037078857421875, - 0.022369384765625, 0.034515380859375, -0.0205841064453125, - 0.004116058349609375, -0.038787841796875, -0.0221710205078125, - -0.024993896484375, -0.021453857421875, - -0.0003190040588378906, 0.0036602020263671875, - 0.0107269287109375, 0.0152435302734375, -0.016265869140625, - -0.0222930908203125, 0.0105133056640625, -0.0185546875, - -0.015045166015625, 0.0134735107421875, 0.002307891845703125, - 0.007579803466796875, -0.0022735595703125, 0.0276336669921875, - 0.0083160400390625, 0.01552581787109375, - -0.007038116455078125, 0.008331298828125, -0.0135955810546875, - 0.020721435546875, 0.050933837890625, 0.0147552490234375, - 0.0205841064453125, -0.00490570068359375, 0.038299560546875, - 0.0301055908203125, 0.05523681640625, 0.00766754150390625, - 0.00782012939453125, -0.00164794921875, 0.0191497802734375, - 0.002674102783203125, -0.017242431640625, 0.02203369140625, - -0.0187835693359375, 0.0350341796875, -0.01007080078125, - -0.04803466796875, 0.01506805419921875, -0.031646728515625, - 0.0182342529296875, 0.0239105224609375, 0.0435791015625, - 0.0156097412109375, -0.0275115966796875, 0.0169525146484375, - -0.0036716461181640625, 0.0154571533203125, - -0.00377655029296875, -0.003070831298828125, - 0.034332275390625, -0.0034275054931640625, - -0.0285797119140625, -0.03607177734375, - -0.0008091926574707031, -0.0127410888671875, -0.036376953125, - -0.007793426513671875, -0.043792724609375, 0.0270538330078125, - -0.058013916015625, -0.01438140869140625, - 0.007251739501953125, 0.045013427734375, 0.00720977783203125, - 0.0254058837890625, 0.054718017578125, 0.0061798095703125, - -0.0198822021484375, 0.010162353515625, -0.035919189453125, - 0.0014743804931640625, -0.0060577392578125, -0.02752685546875, - -0.01453399658203125, -0.0137481689453125, - -0.00218963623046875, -0.0038661956787109375, - 0.006755828857421875, 0.00434112548828125, -0.020294189453125, - 0.0181884765625, -0.004611968994140625, -0.0200042724609375, - 0.034454345703125, -0.0709228515625, -0.028533935546875, - 0.0260772705078125, -0.044677734375, 0.021240234375, - 0.032470703125, 0.0162811279296875, -0.01093292236328125, + 0.0001302957534790039, -0.00060272216796875, + -0.0177154541015625, -0.037384033203125, 0.037750244140625, + 0.0265045166015625, 0.01338958740234375, 0.0231170654296875, + 0.04119873046875, -0.0037441253662109375, -0.0226898193359375, + -0.000499725341796875, 0.00890350341796875, + -0.002899169921875, 0.007648468017578125, + 0.007366180419921875, -0.0113983154296875, + 0.003940582275390625, -0.007781982421875, -0.0400390625, + -0.0231781005859375, 0.007110595703125, -0.0287017822265625, + 0.032440185546875, 0.0176849365234375, -0.01515960693359375, + 0.00826263427734375, -0.0146636962890625, 0.01073455810546875, + 0.007213592529296875, 0.0014743804931640625, 0.03265380859375, + -0.00846099853515625, 0.03009033203125, 0.0013189315795898438, + -0.01103973388671875, -0.01983642578125, 0.0136566162109375, + -0.0312347412109375, -0.0228729248046875, 0.0274658203125, + 0.00033664703369140625, 0.050811767578125, 0.0234222412109375, + 0.011016845703125, -0.01800537109375, -0.0154876708984375, + 0.016876220703125, 0.006988525390625, 0.00920867919921875, + -0.01349639892578125, -0.0190887451171875, 0.028564453125, + 0.0092926025390625, 0.03021240234375, -0.01274871826171875, + 0.0049285888671875, 0.0024471282958984375, -0.06781005859375, + -0.007171630859375, 0.002124786376953125, 0.00334930419921875, + -0.0007500648498535156, 0.01947021484375, 0.0095367431640625, + -0.0262298583984375, -0.00958251953125, 0.00647735595703125, + 0.051727294921875, -0.0177154541015625, 0.0238189697265625, + -0.021453857421875, 0.030426025390625, -0.01262664794921875, + -0.0307159423828125, -0.037078857421875, 0.0223541259765625, + 0.03448486328125, -0.020599365234375, 0.0041046142578125, + -0.038787841796875, -0.0221710205078125, -0.0249786376953125, + -0.0214385986328125, -0.0003192424774169922, + 0.0036640167236328125, 0.0107574462890625, 0.0152435302734375, + -0.0162811279296875, -0.0222930908203125, 0.01052093505859375, + -0.0185699462890625, -0.01507568359375, 0.013458251953125, + 0.0023326873779296875, 0.00759124755859375, + -0.0022640228271484375, 0.0276336669921875, + 0.0083465576171875, 0.0155181884765625, -0.00701904296875, + 0.00833892822265625, -0.01355743408203125, 0.02069091796875, + 0.050933837890625, 0.01476287841796875, 0.0205841064453125, + -0.004924774169921875, 0.038299560546875, 0.0301361083984375, + 0.055267333984375, 0.00765228271484375, 0.00782012939453125, + -0.0016546249389648438, 0.0191497802734375, + 0.0026912689208984375, -0.0172119140625, 0.0219879150390625, + -0.0187835693359375, 0.035064697265625, -0.010101318359375, + -0.048065185546875, 0.0150604248046875, -0.031707763671875, + 0.0182647705078125, 0.02392578125, 0.043548583984375, + 0.01558685302734375, -0.0275115966796875, 0.01690673828125, + -0.003688812255859375, 0.01544952392578125, + -0.0037899017333984375, -0.0030841827392578125, + 0.0343017578125, -0.003437042236328125, -0.0285797119140625, + -0.03607177734375, -0.0008149147033691406, -0.01275634765625, + -0.036376953125, -0.007778167724609375, -0.04376220703125, + 0.027099609375, -0.05804443359375, -0.0144195556640625, + 0.0072479248046875, 0.045013427734375, 0.007221221923828125, + 0.025390625, 0.054718017578125, 0.00618743896484375, + -0.0198974609375, 0.0101470947265625, -0.035919189453125, + 0.00145721435546875, -0.00609588623046875, -0.027557373046875, + -0.01454925537109375, -0.0137176513671875, -0.002197265625, + -0.0038280487060546875, 0.006763458251953125, + 0.00432586669921875, -0.0203094482421875, 0.0181732177734375, + -0.00463104248046875, -0.0200042724609375, 0.03448486328125, + -0.0709228515625, -0.028533935546875, 0.0260162353515625, + -0.044677734375, 0.0212249755859375, 0.032501220703125, + 0.0163116455078125, -0.01091766357421875, -0.01284027099609375, -0.028900146484375, - 0.0009975433349609375, -0.0187835693359375, - 0.0098419189453125, 0.0171966552734375, 0.030670166015625, - 0.00463104248046875, -0.022796630859375, 0.0117950439453125, - -0.028472900390625, -0.021148681640625, -0.039337158203125, - 0.0176544189453125, -0.038238525390625, -0.039581298828125, - 0.002685546875, -0.01483154296875, 0.00533294677734375, - 0.0000928044319152832, 0.01045989990234375, -0.01025390625, - -0.0207061767578125, -0.025665283203125, 0.0222015380859375, - -0.0111083984375, 0.023406982421875, -0.0209197998046875, - -0.0036716461181640625, -0.037689208984375, - 0.0189056396484375, 0.0112457275390625, -0.016204833984375, - 0.0017604827880859375, 0.01241302490234375, - -0.0038776397705078125, -0.00168609619140625, 0.043701171875, - -0.0297698974609375, 0.005054473876953125, - -0.0214385986328125, -0.026611328125, -0.01385498046875, - 0.00682830810546875, -0.0007939338684082031, - 0.030181884765625, 0.051513671875, -0.04296875, - -0.037811279296875, -0.0005049705505371094, - 0.01035308837890625, 0.0136260986328125, 0.025604248046875, - 0.0211334228515625, -0.01605224609375, -0.0228118896484375, - -0.004764556884765625, 0.01377105712890625, - -0.01389312744140625, 0.0256805419921875, + 0.0009822845458984375, -0.0187835693359375, + 0.0098114013671875, 0.0172119140625, 0.0307159423828125, + 0.004657745361328125, -0.0228271484375, 0.01180267333984375, + -0.028472900390625, -0.0211639404296875, -0.03936767578125, + 0.0176239013671875, -0.038238525390625, -0.03961181640625, + 0.0026645660400390625, -0.01483154296875, + 0.005336761474609375, 0.00011247396469116211, + 0.01042938232421875, -0.01023101806640625, -0.020721435546875, + -0.0256500244140625, 0.022186279296875, -0.01110076904296875, + 0.0234222412109375, -0.0209197998046875, + -0.0036983489990234375, -0.037628173828125, + 0.0189056396484375, 0.0112762451171875, -0.0162200927734375, + 0.00176239013671875, 0.01241302490234375, + -0.0038700103759765625, -0.0017251968383789062, + 0.043731689453125, -0.0298004150390625, 0.0050811767578125, + -0.0214385986328125, -0.0266265869140625, + -0.01386260986328125, 0.006877899169921875, + -0.0007877349853515625, 0.03021240234375, 0.051544189453125, + -0.04302978515625, -0.037811279296875, -0.0004911422729492188, + 0.0103607177734375, 0.0136260986328125, 0.025604248046875, + 0.0211639404296875, -0.0160675048828125, -0.022796630859375, + -0.004734039306640625, 0.013763427734375, + -0.01389312744140625, 0.0256195068359375, 0.0035343170166015625, -0.026397705078125, - -0.0199737548828125, -0.018646240234375, -0.025054931640625, - 0.02752685546875, 0.01459503173828125, -0.002986907958984375, - 0.038421630859375, -0.0166168212890625, 0.00832366943359375, - 0.06048583984375, 0.0234527587890625, 0.01180267333984375, - 0.00638580322265625, -0.0140838623046875, -0.0074615478515625, - -0.00616455078125, -0.02105712890625, 0.000720977783203125, - -0.01064300537109375, 0.00774383544921875, 0.016632080078125, - 0.0108795166015625, -0.0135498046875, 0.00914764404296875, - 0.034332275390625, -0.01390838623046875, -0.037353515625, - -0.0296173095703125, 0.01849365234375, -0.0230255126953125, - 0.01108551025390625, -0.0214691162109375, 0.0247955322265625, - -0.00872802734375, 0.0184478759765625, 0.00928497314453125, - 0.0202484130859375, 0.0223541259765625, 0.006092071533203125, - 0.035430908203125, -0.035614013671875, -0.0004284381866455078, - -0.0036907196044921875, 0.0053863525390625, - 0.002460479736328125, 0.00722503662109375, - -0.0257110595703125, 0.00926971435546875, 0.00696563720703125, - -0.007740020751953125, 0.01490020751953125, -0.03143310546875, - 0.0160980224609375, -0.0022335052490234375, 0.0146484375, - 0.01129913330078125, 0.019683837890625, -0.0193634033203125, - 0.0092620849609375, 0.01381683349609375, 0.001338958740234375, - 0.01309967041015625, -0.0032100677490234375, - -0.00939178466796875, 0.02569580078125, 0.030731201171875, - 0.023895263671875, 0.0019083023071289062, -0.0124969482421875, - -0.01023101806640625, -0.03558349609375, 0.022857666015625, - -0.000028312206268310547, 0.0123291015625, 0.005157470703125, - -0.01056671142578125, 0.005367279052734375, 0.009490966796875, - 0.005687713623046875, -0.00585174560546875, - 0.01279449462890625, -0.01137542724609375, - 0.005809783935546875, 0.0124359130859375, - -0.006900787353515625, 0.04034423828125, -0.0111083984375, - -0.0012426376342773438, 0.0159454345703125, -0.0450439453125, - -0.01468658447265625, 0.00832366943359375, - -0.01213836669921875, -0.0028018951416015625, - 0.0014476776123046875, -0.00453948974609375, - -0.003498077392578125, -0.0117645263671875, - 0.00293731689453125, -0.0258941650390625, 0.008209228515625, - -0.00203704833984375, 0.0144195556640625, 0.036346435546875, - -0.0119476318359375, -0.03778076171875, 0.0245819091796875, - -0.035858154296875, 0.0084991455078125, 0.01824951171875, - 0.0088653564453125, -0.0467529296875, 0.01412200927734375, - 0.01203155517578125, -0.0232391357421875, - -0.00788116455078125, 0.0123443603515625, -0.031036376953125, - 0.003704071044921875, 0.0136260986328125, - 0.0031147003173828125, 0.0007843971252441406, - 0.00490570068359375 + -0.0199432373046875, -0.018646240234375, -0.0250701904296875, + 0.0275421142578125, 0.0146026611328125, -0.002964019775390625, + 0.03839111328125, -0.0166168212890625, 0.00832366943359375, + 0.060455322265625, 0.0234527587890625, 0.0117950439453125, + 0.006397247314453125, -0.014068603515625, + -0.007488250732421875, -0.00616455078125, -0.0210723876953125, + 0.0007615089416503906, -0.01064300537109375, 0.00775146484375, + 0.016632080078125, 0.01084136962890625, -0.01355743408203125, + 0.0091552734375, 0.03436279296875, -0.013916015625, + -0.037353515625, -0.029632568359375, 0.018524169921875, + -0.0230712890625, 0.01107025146484375, -0.021484375, + 0.0247955322265625, -0.00873565673828125, 0.0184783935546875, + 0.00930023193359375, 0.0202484130859375, 0.0223541259765625, + 0.00608062744140625, 0.035430908203125, -0.035614013671875, + -0.0004277229309082031, -0.003662109375, 0.00539398193359375, + 0.0024127960205078125, 0.007221221923828125, + -0.0256805419921875, 0.00926971435546875, 0.00698089599609375, + -0.0077667236328125, 0.014862060546875, -0.031402587890625, + 0.0160675048828125, -0.0022525787353515625, + 0.01468658447265625, 0.01129913330078125, 0.019622802734375, + -0.0193939208984375, 0.00928497314453125, 0.013824462890625, + 0.0013227462768554688, 0.0131072998046875, + -0.0032062530517578125, -0.0093841552734375, + 0.0257415771484375, 0.0307464599609375, 0.02386474609375, + 0.0018949508666992188, -0.01251220703125, -0.010223388671875, + -0.035614013671875, 0.0228118896484375, + -0.000028192996978759766, 0.0123138427734375, 0.005126953125, + -0.010589599609375, 0.00533294677734375, 0.009490966796875, + 0.00566864013671875, -0.005893707275390625, + 0.01282501220703125, -0.0113372802734375, 0.00579071044921875, + 0.01239776611328125, -0.0068359375, 0.04034423828125, + -0.011077880859375, -0.0012264251708984375, 0.015899658203125, + -0.0450439453125, -0.01468658447265625, 0.0083160400390625, + -0.0121612548828125, -0.0027618408203125, + 0.0014629364013671875, -0.004535675048828125, + -0.0034885406494140625, -0.01180267333984375, 0.0029296875, + -0.025909423828125, 0.00821685791015625, + -0.0020427703857421875, 0.014404296875, 0.036346435546875, + -0.01197052001953125, -0.03778076171875, 0.0245819091796875, + -0.035858154296875, 0.00846099853515625, 0.0182342529296875, + 0.0088653564453125, -0.0467529296875, 0.01409912109375, + 0.01203155517578125, -0.0232696533203125, -0.0079498291015625, + 0.0123291015625, -0.0310516357421875, 0.00372314453125, + 0.0136260986328125, 0.00312042236328125, + 0.0007691383361816406, 0.004894256591796875 ], "index": 0, "object": "embedding" @@ -968,13 +1007,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a0c1cdf768f93249-VIE", + "cf-ray": "a13db94adb2cc2cd-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:37 GMT", + "date": "Tue, 30 Jun 2026 14:05:05 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "42", + "openai-processing-ms": "82", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -989,7 +1028,7 @@ "x-ratelimit-remaining-tokens": "9999993", "x-ratelimit-reset-requests": "6ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_03dbab6160094a719bcbc01a4069874d" + "x-request-id": "07dacdab-63b9-947a-acc3-90a85fdb3223" }, "status": 200, "statusText": "OK" @@ -997,9 +1036,9 @@ }, { "callIndex": 1, - "id": "43d0f8f8c8d2a679", + "id": "fcc3d17c88f1552b", "matchKey": "POST api.openai.com/v1/embeddings", - "recordedAt": "2026-06-15T13:08:37.963Z", + "recordedAt": "2026-06-30T14:05:05.350Z", "request": { "body": { "kind": "json", @@ -1021,20 +1060,20 @@ "body": { "contentType": "application/json", "kind": "binary", - "path": "ai-sdk-v7.cassette.blobs/831ef4f50b23e36798adeddf0314b9154707117acf2e6a8637b8c57a8db961b0.bin", - "sha256": "831ef4f50b23e36798adeddf0314b9154707117acf2e6a8637b8c57a8db961b0" + "path": "ai-sdk-v7.cassette.blobs/9a14a7a518e93b520c904dd30764c1ad41fd7d47fe63606d39e6da1e58f3a0bc.bin", + "sha256": "9a14a7a518e93b520c904dd30764c1ad41fd7d47fe63606d39e6da1e58f3a0bc" }, "headers": { "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a0c1cdf8a9ec3249-VIE", + "cf-ray": "a13db94bebafc2cd-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:38 GMT", + "date": "Tue, 30 Jun 2026 14:05:05 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "83", + "openai-processing-ms": "112", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1049,7 +1088,7 @@ "x-ratelimit-remaining-tokens": "9999985", "x-ratelimit-reset-requests": "6ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_130d8dd80ff340f3be99289a6f249e78" + "x-request-id": "f952cfd4-d6c9-4af5-9636-8dad4e4e6e77" }, "status": 200, "statusText": "OK" @@ -1057,9 +1096,9 @@ }, { "callIndex": 3, - "id": "83cbbf6da482c905", + "id": "e09f32cc805b35e9", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:39.460Z", + "recordedAt": "2026-06-30T14:05:06.332Z", "request": { "body": { "kind": "json", @@ -1116,11 +1155,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528919, - "created_at": 1781528918, + "completed_at": 1782828306, + "created_at": 1782828305, "error": null, "frequency_penalty": 0, - "id": "resp_0b25a1d2d8c902f6006a2ff9562f3881a39ccc1431e249b362", + "id": "resp_0d44b1f448d37f70006a43cd1193dc81a3afb140e6a573e602", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1132,8 +1171,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_AvQX7688fhEaCdlxjn3wmZeZ", - "id": "fc_0b25a1d2d8c902f6006a2ff957358081a38b137a8dbbf2df4e", + "call_id": "call_AkiRjbi2RreT0VGuO1DSeJib", + "id": "fc_0d44b1f448d37f70006a43cd12082481a381a4bdd5f9c67779", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1161,6 +1200,24 @@ "verbosity": "medium" }, "tool_choice": "required", + "tool_usage": { + "image_gen": { + "input_tokens": 0, + "input_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "output_tokens": 0, + "output_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "total_tokens": 0 + }, + "web_search": { + "num_requests": 0 + } + }, "tools": [ { "description": "Get the weather for a location", @@ -1202,13 +1259,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a0c1cdf9fb223249-VIE", + "cf-ray": "a13db94d3c6ec2cd-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:39 GMT", + "date": "Tue, 30 Jun 2026 14:05:06 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1309", + "openai-processing-ms": "804", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1219,10 +1276,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999690", + "x-ratelimit-remaining-tokens": "149999687", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_9c1f789f969d498fb28a0c780f54e9d8" + "x-request-id": "035752ed-6dbf-4bf1-8cb5-8396631d74b7" }, "status": 200, "statusText": "OK" @@ -1230,9 +1287,9 @@ }, { "callIndex": 4, - "id": "417e64addcf59da7", + "id": "4862666ed7237d6b", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:41.140Z", + "recordedAt": "2026-06-30T14:05:07.225Z", "request": { "body": { "kind": "json", @@ -1252,11 +1309,11 @@ "role": "user" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff957358081a38b137a8dbbf2df4e", + "id": "fc_0d44b1f448d37f70006a43cd12082481a381a4bdd5f9c67779", "type": "item_reference" }, { - "call_id": "call_AvQX7688fhEaCdlxjn3wmZeZ", + "call_id": "call_AkiRjbi2RreT0VGuO1DSeJib", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1298,11 +1355,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528921, - "created_at": 1781528919, + "completed_at": 1782828307, + "created_at": 1782828306, "error": null, "frequency_penalty": 0, - "id": "resp_0b25a1d2d8c902f6006a2ff957b31481a3a25543b14b094372", + "id": "resp_0d44b1f448d37f70006a43cd128d6881a3aee7745cd49600d0", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1314,8 +1371,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_XSXU38q42QnVKyDrElH4Obkg", - "id": "fc_0b25a1d2d8c902f6006a2ff958eac481a39747145bfcbd44a9", + "call_id": "call_kzLEMwkgoKReYpTSoSdsCQZS", + "id": "fc_0d44b1f448d37f70006a43cd130ca881a3ba3bdade118a8490", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1343,6 +1400,24 @@ "verbosity": "medium" }, "tool_choice": "required", + "tool_usage": { + "image_gen": { + "input_tokens": 0, + "input_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "output_tokens": 0, + "output_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "total_tokens": 0 + }, + "web_search": { + "num_requests": 0 + } + }, "tools": [ { "description": "Get the weather for a location", @@ -1384,13 +1459,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a0c1ce034b363249-VIE", + "cf-ray": "a13db953589cc2cd-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:41 GMT", + "date": "Tue, 30 Jun 2026 14:05:07 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1478", + "openai-processing-ms": "732", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1404,7 +1479,7 @@ "x-ratelimit-remaining-tokens": "149999650", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_72a976cf46384707ba8f41bbc737cf3b" + "x-request-id": "f29de81f-8c36-4998-97e3-d209e626b684" }, "status": 200, "statusText": "OK" @@ -1412,9 +1487,9 @@ }, { "callIndex": 5, - "id": "341675a0a1a88c63", + "id": "85d657a76f0adc46", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:42.343Z", + "recordedAt": "2026-06-30T14:05:08.069Z", "request": { "body": { "kind": "json", @@ -1434,20 +1509,20 @@ "role": "user" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff957358081a38b137a8dbbf2df4e", + "id": "fc_0d44b1f448d37f70006a43cd12082481a381a4bdd5f9c67779", "type": "item_reference" }, { - "call_id": "call_AvQX7688fhEaCdlxjn3wmZeZ", + "call_id": "call_AkiRjbi2RreT0VGuO1DSeJib", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff958eac481a39747145bfcbd44a9", + "id": "fc_0d44b1f448d37f70006a43cd130ca881a3ba3bdade118a8490", "type": "item_reference" }, { - "call_id": "call_XSXU38q42QnVKyDrElH4Obkg", + "call_id": "call_kzLEMwkgoKReYpTSoSdsCQZS", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1489,11 +1564,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528922, - "created_at": 1781528921, + "completed_at": 1782828307, + "created_at": 1782828307, "error": null, "frequency_penalty": 0, - "id": "resp_0b25a1d2d8c902f6006a2ff9595f2081a38f8aa915715e7646", + "id": "resp_0d44b1f448d37f70006a43cd1373a081a38bd1573fe6cd1bc3", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1505,8 +1580,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_of374lHpH3YYQpti3LoZMJz8", - "id": "fc_0b25a1d2d8c902f6006a2ff95a165481a3959ecf69f5beea46", + "call_id": "call_wJyDgvgcMuQxNrpEwkWm1TPx", + "id": "fc_0d44b1f448d37f70006a43cd13de2881a3a7a908754ffab9d3", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1534,6 +1609,24 @@ "verbosity": "medium" }, "tool_choice": "required", + "tool_usage": { + "image_gen": { + "input_tokens": 0, + "input_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "output_tokens": 0, + "output_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "total_tokens": 0 + }, + "web_search": { + "num_requests": 0 + } + }, "tools": [ { "description": "Get the weather for a location", @@ -1575,13 +1668,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a0c1ce0dcc613249-VIE", + "cf-ray": "a13db958ec10c2cd-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:42 GMT", + "date": "Tue, 30 Jun 2026 14:05:08 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1035", + "openai-processing-ms": "676", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1595,7 +1688,7 @@ "x-ratelimit-remaining-tokens": "149999612", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_49d7920b1bae4f0da8fa87a9331efed2" + "x-request-id": "bf9f9cc4-ca26-4735-ae56-efe2174194cb" }, "status": 200, "statusText": "OK" @@ -1603,9 +1696,9 @@ }, { "callIndex": 6, - "id": "cbb9070d68f84d1b", + "id": "9e2f3f107d421efc", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:43.548Z", + "recordedAt": "2026-06-30T14:05:08.972Z", "request": { "body": { "kind": "json", @@ -1625,29 +1718,29 @@ "role": "user" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff957358081a38b137a8dbbf2df4e", + "id": "fc_0d44b1f448d37f70006a43cd12082481a381a4bdd5f9c67779", "type": "item_reference" }, { - "call_id": "call_AvQX7688fhEaCdlxjn3wmZeZ", + "call_id": "call_AkiRjbi2RreT0VGuO1DSeJib", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff958eac481a39747145bfcbd44a9", + "id": "fc_0d44b1f448d37f70006a43cd130ca881a3ba3bdade118a8490", "type": "item_reference" }, { - "call_id": "call_XSXU38q42QnVKyDrElH4Obkg", + "call_id": "call_kzLEMwkgoKReYpTSoSdsCQZS", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff95a165481a3959ecf69f5beea46", + "id": "fc_0d44b1f448d37f70006a43cd13de2881a3a7a908754ffab9d3", "type": "item_reference" }, { - "call_id": "call_of374lHpH3YYQpti3LoZMJz8", + "call_id": "call_wJyDgvgcMuQxNrpEwkWm1TPx", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1689,11 +1782,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528923, - "created_at": 1781528922, + "completed_at": 1782828308, + "created_at": 1782828308, "error": null, "frequency_penalty": 0, - "id": "resp_0b25a1d2d8c902f6006a2ff95a8dd481a3847100dca2e05e64", + "id": "resp_0d44b1f448d37f70006a43cd144b3c81a38bd55d4a9dcee5eb", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1705,8 +1798,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_nfHRx6yknrL5pAQPlKeRYu8d", - "id": "fc_0b25a1d2d8c902f6006a2ff95b435c81a39123ec9099a17d27", + "call_id": "call_M1YUQAGujkfHbN7k1KH7HIgo", + "id": "fc_0d44b1f448d37f70006a43cd14c6c881a3b595c74dfc7c0162", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1734,6 +1827,24 @@ "verbosity": "medium" }, "tool_choice": "required", + "tool_usage": { + "image_gen": { + "input_tokens": 0, + "input_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "output_tokens": 0, + "output_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "total_tokens": 0 + }, + "web_search": { + "num_requests": 0 + } + }, "tools": [ { "description": "Get the weather for a location", @@ -1775,13 +1886,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a0c1ce154acb3249-VIE", + "cf-ray": "a13db95e3f9bc2cd-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:43 GMT", + "date": "Tue, 30 Jun 2026 14:05:09 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1029", + "openai-processing-ms": "736", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1795,7 +1906,7 @@ "x-ratelimit-remaining-tokens": "149999572", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_eec9413044834713a0935560ff057d17" + "x-request-id": "af939ee1-3deb-45bc-aab1-d96e06ab29a9" }, "status": 200, "statusText": "OK" @@ -1803,9 +1914,9 @@ }, { "callIndex": 7, - "id": "bccc54d212e2503d", + "id": "d22bae6c42006c81", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:44.902Z", + "recordedAt": "2026-06-30T14:05:10.327Z", "request": { "body": { "kind": "json", @@ -1856,11 +1967,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528924, - "created_at": 1781528923, + "completed_at": 1782828309, + "created_at": 1782828309, "error": null, "frequency_penalty": 0, - "id": "resp_0edc151d34749c0a006a2ff95bc61c8192830a0789e2952249", + "id": "resp_04fd991c7ed4f754006a43cd153268819d86019192ffa59396", "incomplete_details": null, "instructions": null, "max_output_tokens": 32, @@ -1879,7 +1990,7 @@ "type": "output_text" } ], - "id": "msg_0edc151d34749c0a006a2ff95cae188192bd080dc85e574076", + "id": "msg_04fd991c7ed4f754006a43cd15c344819d9676c060f3a7c6e0", "role": "assistant", "status": "completed", "type": "message" @@ -1920,6 +2031,24 @@ "verbosity": "medium" }, "tool_choice": "auto", + "tool_usage": { + "image_gen": { + "input_tokens": 0, + "input_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "output_tokens": 0, + "output_tokens_details": { + "image_tokens": 0, + "text_tokens": 0 + }, + "total_tokens": 0 + }, + "web_search": { + "num_requests": 0 + } + }, "tools": [], "top_logprobs": 0, "top_p": 1, @@ -1942,13 +2071,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a0c1ce1ce95c3249-VIE", + "cf-ray": "a13db963db2cc2cd-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:44 GMT", + "date": "Tue, 30 Jun 2026 14:05:10 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1173", + "openai-processing-ms": "1039", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1959,10 +2088,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999942", + "x-ratelimit-remaining-tokens": "149999945", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_f88919222bd54f849db8d5d44579efa8" + "x-request-id": "04159098-36cf-441e-ba7c-02fb7bc48595" }, "status": 200, "statusText": "OK" @@ -1970,9 +2099,9 @@ }, { "callIndex": 8, - "id": "8eec740c1be01c5c", + "id": "6d0eec1cfcef015d", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:45.904Z", + "recordedAt": "2026-06-30T14:05:11.323Z", "request": { "body": { "kind": "json", @@ -2019,19 +2148,469 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0418ddb09e120f3d006a2ff95d20048192bb64d14000f93e29\",\"object\":\"response\",\"created_at\":1781528925,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", - "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0418ddb09e120f3d006a2ff95d20048192bb64d14000f93e29\",\"object\":\"response\",\"created_at\":1781528925,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", - "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_0418ddb09e120f3d006a2ff95d96548192a0f5f1a115863f8e\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}", - "event: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_0418ddb09e120f3d006a2ff95d96548192a0f5f1a115863f8e\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"{\\\"\",\"item_id\":\"msg_0418ddb09e120f3d006a2ff95d96548192a0f5f1a115863f8e\",\"logprobs\":[],\"obfuscation\":\"aNMhy7LXjxBJqr\",\"output_index\":0,\"sequence_number\":4}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"city\",\"item_id\":\"msg_0418ddb09e120f3d006a2ff95d96548192a0f5f1a115863f8e\",\"logprobs\":[],\"obfuscation\":\"qHh2rTbrslig\",\"output_index\":0,\"sequence_number\":5}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\":\\\"\",\"item_id\":\"msg_0418ddb09e120f3d006a2ff95d96548192a0f5f1a115863f8e\",\"logprobs\":[],\"obfuscation\":\"QEBmKUnMLL31l\",\"output_index\":0,\"sequence_number\":6}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"Paris\",\"item_id\":\"msg_0418ddb09e120f3d006a2ff95d96548192a0f5f1a115863f8e\",\"logprobs\":[],\"obfuscation\":\"qdHMOPoZeY2\",\"output_index\":0,\"sequence_number\":7}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\"}\",\"item_id\":\"msg_0418ddb09e120f3d006a2ff95d96548192a0f5f1a115863f8e\",\"logprobs\":[],\"obfuscation\":\"40TvwA19dzdkKS\",\"output_index\":0,\"sequence_number\":8}", - "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0418ddb09e120f3d006a2ff95d96548192a0f5f1a115863f8e\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":9,\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}", - "event: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_0418ddb09e120f3d006a2ff95d96548192a0f5f1a115863f8e\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"},\"sequence_number\":10}", - "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_0418ddb09e120f3d006a2ff95d96548192a0f5f1a115863f8e\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":11}", - "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0418ddb09e120f3d006a2ff95d20048192bb64d14000f93e29\",\"object\":\"response\",\"created_at\":1781528925,\"status\":\"completed\",\"background\":false,\"completed_at\":1781528925,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"msg_0418ddb09e120f3d006a2ff95d96548192a0f5f1a115863f8e\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":38,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":6,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":44},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_08b2905056fc6db1006a43cd16c754819f9b433d61d35b4f01\",\"object\":\"response\",\"created_at\":1782828310,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_08b2905056fc6db1006a43cd16c754819f9b433d61d35b4f01\",\"object\":\"response\",\"created_at\":1782828310,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_08b2905056fc6db1006a43cd173710819faa8d66a93115cb9b\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_08b2905056fc6db1006a43cd173710819faa8d66a93115cb9b\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"{\\\"\",\"item_id\":\"msg_08b2905056fc6db1006a43cd173710819faa8d66a93115cb9b\",\"logprobs\":[],\"obfuscation\":\"sKaD2P7BJhM671\",\"output_index\":0,\"sequence_number\":4}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"city\",\"item_id\":\"msg_08b2905056fc6db1006a43cd173710819faa8d66a93115cb9b\",\"logprobs\":[],\"obfuscation\":\"Ah6Q6v6DcwNE\",\"output_index\":0,\"sequence_number\":5}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\":\\\"\",\"item_id\":\"msg_08b2905056fc6db1006a43cd173710819faa8d66a93115cb9b\",\"logprobs\":[],\"obfuscation\":\"dMEknMop1uDtF\",\"output_index\":0,\"sequence_number\":6}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"Paris\",\"item_id\":\"msg_08b2905056fc6db1006a43cd173710819faa8d66a93115cb9b\",\"logprobs\":[],\"obfuscation\":\"4IIn078aWfE\",\"output_index\":0,\"sequence_number\":7}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\"}\",\"item_id\":\"msg_08b2905056fc6db1006a43cd173710819faa8d66a93115cb9b\",\"logprobs\":[],\"obfuscation\":\"BAA5OWpB2qOvp8\",\"output_index\":0,\"sequence_number\":8}", + "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_08b2905056fc6db1006a43cd173710819faa8d66a93115cb9b\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":9,\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}", + "event: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_08b2905056fc6db1006a43cd173710819faa8d66a93115cb9b\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"},\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_08b2905056fc6db1006a43cd173710819faa8d66a93115cb9b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_08b2905056fc6db1006a43cd16c754819f9b433d61d35b4f01\",\"object\":\"response\",\"created_at\":1782828310,\"status\":\"completed\",\"background\":false,\"completed_at\":1782828311,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"msg_08b2905056fc6db1006a43cd173710819faa8d66a93115cb9b\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":38,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":6,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":44},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + ], + "kind": "sse" + }, + "headers": { + "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", + "alt-svc": "h3=\":443\"; ma=86400", + "cf-cache-status": "DYNAMIC", + "cf-ray": "a13db96c5950c2cd-VIE", + "connection": "keep-alive", + "content-type": "text/event-stream; charset=utf-8", + "date": "Tue, 30 Jun 2026 14:05:10 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "116", + "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", + "openai-version": "2020-10-01", + "server": "cloudflare", + "set-cookie": "[REDACTED]", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-request-id": "b00d73e7-ec2e-4776-af67-38574fbef7fc" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 9, + "id": "cdf4d54c5192d51e", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-06-30T14:05:12.353Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "input_text" + } + ], + "role": "user" + } + ], + "max_output_tokens": 96, + "model": "gpt-4o-mini-2024-07-18", + "stream": true, + "temperature": 0, + "tool_choice": "required", + "tools": [ + { + "description": "Get the weather for a location", + "name": "get_weather", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": ["location"], + "type": "object" + }, + "type": "function" + } + ] + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "chunks": [ + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_06bc0e47031f1035006a43cd17a5f0819c87e070f9e834dbd7\",\"object\":\"response\",\"created_at\":1782828311,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_06bc0e47031f1035006a43cd17a5f0819c87e070f9e834dbd7\",\"object\":\"response\",\"created_at\":1782828311,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_sTScpLSOY47aZi8gJLjVvWXC\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"FAZZfjfG0zwF0L\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"cIPC7Vhe\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"JRjjAZw2DsYZS\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"uATf4bQepED\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"WwU5vooRA1TWXa7\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"0d2IyxK1x\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"OUcyNi2dyVMNtm\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_sTScpLSOY47aZi8gJLjVvWXC\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_06bc0e47031f1035006a43cd17a5f0819c87e070f9e834dbd7\",\"object\":\"response\",\"created_at\":1782828311,\"status\":\"completed\",\"background\":false,\"completed_at\":1782828312,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_sTScpLSOY47aZi8gJLjVvWXC\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":84,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":92},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + ], + "kind": "sse" + }, + "headers": { + "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", + "alt-svc": "h3=\":443\"; ma=86400", + "cf-cache-status": "DYNAMIC", + "cf-ray": "a13db972addbc2cd-VIE", + "connection": "keep-alive", + "content-type": "text/event-stream; charset=utf-8", + "date": "Tue, 30 Jun 2026 14:05:11 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "235", + "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", + "openai-version": "2020-10-01", + "server": "cloudflare", + "set-cookie": "[REDACTED]", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-request-id": "a6f44209-2a5e-43fa-ae38-f6d92212d2c4" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 10, + "id": "bcc5abe5ef622fae", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-06-30T14:05:13.541Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "arguments": "{\"location\":\"Paris, France\"}", + "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "name": "get_weather", + "type": "function_call" + }, + { + "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", + "type": "function_call_output" + } + ], + "max_output_tokens": 96, + "model": "gpt-4o-mini-2024-07-18", + "stream": true, + "temperature": 0, + "tool_choice": "required", + "tools": [ + { + "description": "Get the weather for a location", + "name": "get_weather", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": ["location"], + "type": "object" + }, + "type": "function" + } + ] + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "chunks": [ + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0cf091c9d8607162006a43cd18c7e081a1ae70ca20b185512e\",\"object\":\"response\",\"created_at\":1782828312,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0cf091c9d8607162006a43cd18c7e081a1ae70ca20b185512e\",\"object\":\"response\",\"created_at\":1782828312,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_RCRQYqqTzbN62gHTHHp23Mf2\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"zyvGiMbtbpfGOG\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"nmlfNWem\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"C86uRmRWjQiXr\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"vfzYyOCxi9F\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"OGWJ2mMxKa5zbQa\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"Yy0SfUAU1\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"qQJt1lEqzpuywS\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_RCRQYqqTzbN62gHTHHp23Mf2\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0cf091c9d8607162006a43cd18c7e081a1ae70ca20b185512e\",\"object\":\"response\",\"created_at\":1782828312,\"status\":\"completed\",\"background\":false,\"completed_at\":1782828313,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_RCRQYqqTzbN62gHTHHp23Mf2\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":123,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":131},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + ], + "kind": "sse" + }, + "headers": { + "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", + "alt-svc": "h3=\":443\"; ma=86400", + "cf-cache-status": "DYNAMIC", + "cf-ray": "a13db97909fbc2cd-VIE", + "connection": "keep-alive", + "content-type": "text/event-stream; charset=utf-8", + "date": "Tue, 30 Jun 2026 14:05:12 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "124", + "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", + "openai-version": "2020-10-01", + "server": "cloudflare", + "set-cookie": "[REDACTED]", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-request-id": "e6eb27ba-6372-4a59-a3cc-7461c0daca87" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 11, + "id": "5ae7a910cfe65f0a", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-06-30T14:05:14.796Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "arguments": "{\"location\":\"Paris, France\"}", + "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "name": "get_weather", + "type": "function_call" + }, + { + "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", + "type": "function_call_output" + }, + { + "arguments": "{\"location\":\"Paris, France\"}", + "call_id": "call_RCRQYqqTzbN62gHTHHp23Mf2", + "name": "get_weather", + "type": "function_call" + }, + { + "call_id": "call_RCRQYqqTzbN62gHTHHp23Mf2", + "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", + "type": "function_call_output" + } + ], + "max_output_tokens": 96, + "model": "gpt-4o-mini-2024-07-18", + "stream": true, + "temperature": 0, + "tool_choice": "required", + "tools": [ + { + "description": "Get the weather for a location", + "name": "get_weather", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": ["location"], + "type": "object" + }, + "type": "function" + } + ] + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "chunks": [ + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_06abbb48bcf77776006a43cd19d364819cb93cf33ba3b848f6\",\"object\":\"response\",\"created_at\":1782828313,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_06abbb48bcf77776006a43cd19d364819cb93cf33ba3b848f6\",\"object\":\"response\",\"created_at\":1782828313,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_TWX0F2viwpe2TX5QlLVtUQVI\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"X9fZc0MDBGfT68\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"BDGNmwiY\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"mrSpd5KiNuZ3e\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"7BeqAFR9G4Z\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"i79W3XCNPYkxbiE\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"RpDPgyZxs\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"tTTv99o6bF5UeI\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_TWX0F2viwpe2TX5QlLVtUQVI\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_06abbb48bcf77776006a43cd19d364819cb93cf33ba3b848f6\",\"object\":\"response\",\"created_at\":1782828313,\"status\":\"completed\",\"background\":false,\"completed_at\":1782828314,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_TWX0F2viwpe2TX5QlLVtUQVI\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":162,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":170},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + ], + "kind": "sse" + }, + "headers": { + "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", + "alt-svc": "h3=\":443\"; ma=86400", + "cf-cache-status": "DYNAMIC", + "cf-ray": "a13db9807e84c2cd-VIE", + "connection": "keep-alive", + "content-type": "text/event-stream; charset=utf-8", + "date": "Tue, 30 Jun 2026 14:05:14 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "290", + "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", + "openai-version": "2020-10-01", + "server": "cloudflare", + "set-cookie": "[REDACTED]", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-request-id": "da6ccba4-7d01-4bef-b112-85c2065c865c" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 12, + "id": "99916913afa15f69", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-06-30T14:05:15.815Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "arguments": "{\"location\":\"Paris, France\"}", + "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "name": "get_weather", + "type": "function_call" + }, + { + "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", + "type": "function_call_output" + }, + { + "arguments": "{\"location\":\"Paris, France\"}", + "call_id": "call_RCRQYqqTzbN62gHTHHp23Mf2", + "name": "get_weather", + "type": "function_call" + }, + { + "call_id": "call_RCRQYqqTzbN62gHTHHp23Mf2", + "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", + "type": "function_call_output" + }, + { + "arguments": "{\"location\":\"Paris, France\"}", + "call_id": "call_TWX0F2viwpe2TX5QlLVtUQVI", + "name": "get_weather", + "type": "function_call" + }, + { + "call_id": "call_TWX0F2viwpe2TX5QlLVtUQVI", + "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", + "type": "function_call_output" + } + ], + "max_output_tokens": 96, + "model": "gpt-4o-mini-2024-07-18", + "stream": true, + "temperature": 0, + "tool_choice": "required", + "tools": [ + { + "description": "Get the weather for a location", + "name": "get_weather", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": ["location"], + "type": "object" + }, + "type": "function" + } + ] + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "chunks": [ + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0142b745d8bafca3006a43cd1b0e30819d89e0c23de448e0f7\",\"object\":\"response\",\"created_at\":1782828315,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0142b745d8bafca3006a43cd1b0e30819d89e0c23de448e0f7\",\"object\":\"response\",\"created_at\":1782828315,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_86SOe7Fv6IkNa64Wfh9zR37k\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"HcAXBXIFHmlnxn\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"lmGTz0yC\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"dkyh3nMg0zWEm\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"iGbTMoEbEF8\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"wCxCzVHGQYyDFhR\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"mgougFVkD\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"uYHCWj7aAlU8ku\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_86SOe7Fv6IkNa64Wfh9zR37k\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0142b745d8bafca3006a43cd1b0e30819d89e0c23de448e0f7\",\"object\":\"response\",\"created_at\":1782828315,\"status\":\"completed\",\"background\":false,\"completed_at\":1782828315,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_86SOe7Fv6IkNa64Wfh9zR37k\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":201,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":209},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" ], "kind": "sse" }, @@ -2039,12 +2618,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a0c1ce2559313249-VIE", + "cf-ray": "a13db9885c23c2cd-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Mon, 15 Jun 2026 13:08:45 GMT", + "date": "Tue, 30 Jun 2026 14:05:15 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "192", + "openai-processing-ms": "201", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2052,7 +2631,7 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "req_944fa722f10441f99d1f4c15b4907561" + "x-request-id": "99e2031c-bcb6-4a8b-8876-c0b91a5e7e37" }, "status": 200, "statusText": "OK" diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-auto-hook.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-auto-hook.span-tree.json index 5455e638d..c76040a83 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-auto-hook.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-auto-hook.span-tree.json @@ -42,9 +42,7 @@ "reasoningTokens": 0 } }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { "id": "", "modelId": "gpt-4o-mini-2024-07-18", @@ -93,11 +91,8 @@ } }, "finishReason": "stop", - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { - "headers": "", "id": "", "messages": [ { @@ -124,7 +119,6 @@ "finishReason": "stop", "isContinued": false, "response": { - "headers": "", "id": "", "messages": [ { @@ -249,9 +243,7 @@ }, "output": { "finishReason": "stop", - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "text": "One, two, three.", "warnings": [] }, @@ -381,9 +373,7 @@ "reasoningTokens": 0 } }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { "id": "", "modelId": "gpt-4o-mini-2024-07-18", @@ -421,12 +411,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - {} - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], @@ -471,11 +458,8 @@ } }, "finishReason": "tool-calls", - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { - "headers": "", "id": "", "messages": [ { @@ -521,7 +505,6 @@ "finishReason": "tool-calls", "isContinued": false, "response": { - "headers": "", "id": "", "messages": [ { @@ -704,9 +687,7 @@ "reasoningTokens": 0 } }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { "id": "", "modelId": "gpt-4o-mini-2024-07-18", @@ -778,11 +759,8 @@ "object": { "city": "Paris" }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -922,9 +900,7 @@ "object": { "city": "Paris" }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "warnings": [] }, "metadata": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-auto-hook.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-auto-hook.span-tree.txt index 9cf6df0f3..980d3472c 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-auto-hook.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-auto-hook.span-tree.txt @@ -32,11 +32,8 @@ span_tree: │ } │ }, │ "finishReason": "stop", - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -63,7 +60,6 @@ span_tree: │ "finishReason": "stop", │ "isContinued": false, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -137,9 +133,7 @@ span_tree: │ "reasoningTokens": 0 │ } │ }, - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "response": { │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", @@ -187,9 +181,7 @@ span_tree: │ } │ output: { │ "finishReason": "stop", - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "text": "One, two, three.", │ "warnings": [] │ } @@ -329,11 +321,8 @@ span_tree: │ } │ }, │ "finishReason": "tool-calls", - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -379,7 +368,6 @@ span_tree: │ "finishReason": "tool-calls", │ "isContinued": false, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -555,9 +543,7 @@ span_tree: │ │ "reasoningTokens": 0 │ │ } │ │ }, - │ │ "rawResponse": { - │ │ "headers": "" - │ │ }, + │ │ "rawResponse": {}, │ │ "response": { │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", @@ -591,12 +577,9 @@ span_tree: │ │ "prompt_tokens": 87 │ │ } │ └── get_weather [tool] - │ input: [ - │ { - │ "location": "Paris, France" - │ }, - │ {} - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── ai-sdk-generate-object-operation │ metadata: { @@ -641,11 +624,8 @@ span_tree: │ "object": { │ "city": "Paris" │ }, - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "response": { - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -711,9 +691,7 @@ span_tree: │ "reasoningTokens": 0 │ } │ }, - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "response": { │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", @@ -783,9 +761,7 @@ span_tree: "object": { "city": "Paris" }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "warnings": [] } metadata: { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-wrapped.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-wrapped.span-tree.json index 5455e638d..c76040a83 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-wrapped.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-wrapped.span-tree.json @@ -42,9 +42,7 @@ "reasoningTokens": 0 } }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { "id": "", "modelId": "gpt-4o-mini-2024-07-18", @@ -93,11 +91,8 @@ } }, "finishReason": "stop", - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { - "headers": "", "id": "", "messages": [ { @@ -124,7 +119,6 @@ "finishReason": "stop", "isContinued": false, "response": { - "headers": "", "id": "", "messages": [ { @@ -249,9 +243,7 @@ }, "output": { "finishReason": "stop", - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "text": "One, two, three.", "warnings": [] }, @@ -381,9 +373,7 @@ "reasoningTokens": 0 } }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { "id": "", "modelId": "gpt-4o-mini-2024-07-18", @@ -421,12 +411,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - {} - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], @@ -471,11 +458,8 @@ } }, "finishReason": "tool-calls", - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { - "headers": "", "id": "", "messages": [ { @@ -521,7 +505,6 @@ "finishReason": "tool-calls", "isContinued": false, "response": { - "headers": "", "id": "", "messages": [ { @@ -704,9 +687,7 @@ "reasoningTokens": 0 } }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { "id": "", "modelId": "gpt-4o-mini-2024-07-18", @@ -778,11 +759,8 @@ "object": { "city": "Paris" }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "response": { - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -922,9 +900,7 @@ "object": { "city": "Paris" }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "warnings": [] }, "metadata": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-wrapped.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-wrapped.span-tree.txt index 9cf6df0f3..980d3472c 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-wrapped.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v3-wrapped.span-tree.txt @@ -32,11 +32,8 @@ span_tree: │ } │ }, │ "finishReason": "stop", - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -63,7 +60,6 @@ span_tree: │ "finishReason": "stop", │ "isContinued": false, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -137,9 +133,7 @@ span_tree: │ "reasoningTokens": 0 │ } │ }, - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "response": { │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", @@ -187,9 +181,7 @@ span_tree: │ } │ output: { │ "finishReason": "stop", - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "text": "One, two, three.", │ "warnings": [] │ } @@ -329,11 +321,8 @@ span_tree: │ } │ }, │ "finishReason": "tool-calls", - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -379,7 +368,6 @@ span_tree: │ "finishReason": "tool-calls", │ "isContinued": false, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -555,9 +543,7 @@ span_tree: │ │ "reasoningTokens": 0 │ │ } │ │ }, - │ │ "rawResponse": { - │ │ "headers": "" - │ │ }, + │ │ "rawResponse": {}, │ │ "response": { │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", @@ -591,12 +577,9 @@ span_tree: │ │ "prompt_tokens": 87 │ │ } │ └── get_weather [tool] - │ input: [ - │ { - │ "location": "Paris, France" - │ }, - │ {} - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── ai-sdk-generate-object-operation │ metadata: { @@ -641,11 +624,8 @@ span_tree: │ "object": { │ "city": "Paris" │ }, - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "response": { - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -711,9 +691,7 @@ span_tree: │ "reasoningTokens": 0 │ } │ }, - │ "rawResponse": { - │ "headers": "" - │ }, + │ "rawResponse": {}, │ "response": { │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", @@ -783,9 +761,7 @@ span_tree: "object": { "city": "Paris" }, - "rawResponse": { - "headers": "" - }, + "rawResponse": {}, "warnings": [] } metadata: { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.json index db7a47c5d..f3ff81462 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.json @@ -79,8 +79,7 @@ }, "total_tokens": 20 } - }, - "headers": "" + } }, "response": { "id": "", @@ -141,7 +140,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -180,7 +178,6 @@ "reasoningDetails": [], "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -317,8 +314,7 @@ }, "total_tokens": 88 } - }, - "headers": "" + } }, "response": { "id": "", @@ -401,7 +397,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -440,7 +435,6 @@ "reasoningDetails": [], "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -741,8 +735,7 @@ }, "total_tokens": 103 } - }, - "headers": "" + } }, "response": { "id": "", @@ -781,20 +774,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], @@ -850,7 +832,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -905,7 +886,6 @@ "reasoningDetails": [], "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -1136,8 +1116,7 @@ }, "total_tokens": 64 } - }, - "headers": "" + } }, "response": { "id": "", @@ -1221,7 +1200,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.txt index f46eabdf3..f55043c04 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.txt @@ -43,7 +43,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -82,7 +81,6 @@ span_tree: │ "reasoningDetails": [], │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -195,8 +193,7 @@ span_tree: │ }, │ "total_tokens": 20 │ } - │ }, - │ "headers": "" + │ } │ }, │ "response": { │ "id": "", @@ -283,7 +280,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -322,7 +318,6 @@ span_tree: │ "reasoningDetails": [], │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -442,8 +437,7 @@ span_tree: │ }, │ "total_tokens": 88 │ } - │ }, - │ "headers": "" + │ } │ }, │ "response": { │ "id": "", @@ -640,7 +634,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -695,7 +688,6 @@ span_tree: │ "reasoningDetails": [], │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -919,8 +911,7 @@ span_tree: │ │ }, │ │ "total_tokens": 103 │ │ } - │ │ }, - │ │ "headers": "" + │ │ } │ │ }, │ │ "response": { │ │ "id": "", @@ -955,20 +946,9 @@ span_tree: │ │ "prompt_tokens": 87 │ │ } │ └── get_weather [tool] - │ input: [ - │ { - │ "location": "Paris, France" - │ }, - │ { - │ "messages": [ - │ { - │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ "role": "user" - │ } - │ ], - │ "toolCallId": "" - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── ai-sdk-generate-object-operation │ metadata: { @@ -1024,7 +1004,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -1137,8 +1116,7 @@ span_tree: │ }, │ "total_tokens": 64 │ } - │ }, - │ "headers": "" + │ } │ }, │ "response": { │ "id": "", diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.json index db7a47c5d..f3ff81462 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.json @@ -79,8 +79,7 @@ }, "total_tokens": 20 } - }, - "headers": "" + } }, "response": { "id": "", @@ -141,7 +140,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -180,7 +178,6 @@ "reasoningDetails": [], "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -317,8 +314,7 @@ }, "total_tokens": 88 } - }, - "headers": "" + } }, "response": { "id": "", @@ -401,7 +397,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -440,7 +435,6 @@ "reasoningDetails": [], "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -741,8 +735,7 @@ }, "total_tokens": 103 } - }, - "headers": "" + } }, "response": { "id": "", @@ -781,20 +774,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], @@ -850,7 +832,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -905,7 +886,6 @@ "reasoningDetails": [], "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -1136,8 +1116,7 @@ }, "total_tokens": 64 } - }, - "headers": "" + } }, "response": { "id": "", @@ -1221,7 +1200,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.txt index f46eabdf3..f55043c04 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.txt @@ -43,7 +43,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -82,7 +81,6 @@ span_tree: │ "reasoningDetails": [], │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -195,8 +193,7 @@ span_tree: │ }, │ "total_tokens": 20 │ } - │ }, - │ "headers": "" + │ } │ }, │ "response": { │ "id": "", @@ -283,7 +280,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -322,7 +318,6 @@ span_tree: │ "reasoningDetails": [], │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -442,8 +437,7 @@ span_tree: │ }, │ "total_tokens": 88 │ } - │ }, - │ "headers": "" + │ } │ }, │ "response": { │ "id": "", @@ -640,7 +634,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -695,7 +688,6 @@ span_tree: │ "reasoningDetails": [], │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -919,8 +911,7 @@ span_tree: │ │ }, │ │ "total_tokens": 103 │ │ } - │ │ }, - │ │ "headers": "" + │ │ } │ │ }, │ │ "response": { │ │ "id": "", @@ -955,20 +946,9 @@ span_tree: │ │ "prompt_tokens": 87 │ │ } │ └── get_weather [tool] - │ input: [ - │ { - │ "location": "Paris, France" - │ }, - │ { - │ "messages": [ - │ { - │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ "role": "user" - │ } - │ ], - │ "toolCallId": "" - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── ai-sdk-generate-object-operation │ metadata: { @@ -1024,7 +1004,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -1137,8 +1116,7 @@ span_tree: │ }, │ "total_tokens": 64 │ } - │ }, - │ "headers": "" + │ } │ }, │ "response": { │ "id": "", diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.json index 6803adc37..9b5055573 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.json @@ -16,9 +16,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -54,7 +51,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -131,7 +127,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -174,7 +169,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -259,9 +253,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 32, "prompt": [ { @@ -313,7 +304,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -428,7 +418,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -471,7 +460,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -695,9 +683,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 128, "prompt": [ { @@ -763,7 +748,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -799,20 +783,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -820,9 +793,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 128, "prompt": [ { @@ -920,7 +890,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -956,52 +925,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1009,9 +935,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 128, "prompt": [ { @@ -1141,7 +1064,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -1177,84 +1099,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1262,9 +1109,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 128, "prompt": [ { @@ -1426,7 +1270,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -1462,116 +1305,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], @@ -1654,7 +1390,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -1825,7 +1560,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -1908,7 +1642,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2023,7 +1756,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2170,7 +1902,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2402,9 +2133,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -2445,7 +2173,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2527,7 +2254,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2570,7 +2296,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2641,9 +2366,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -2684,7 +2406,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2766,7 +2487,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2809,7 +2529,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2877,9 +2596,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -2920,7 +2636,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -3002,7 +2717,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3045,7 +2759,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3119,9 +2832,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3174,7 +2884,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "claude-haiku-4-5-20251001" }, @@ -3265,7 +2974,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3313,7 +3021,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3376,9 +3083,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3431,7 +3135,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "claude-haiku-4-5-20251001" }, @@ -3522,7 +3225,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3570,7 +3272,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3630,9 +3331,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3685,7 +3383,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "claude-haiku-4-5-20251001" }, @@ -3776,7 +3473,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3824,7 +3520,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3893,9 +3588,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3931,7 +3623,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -4098,31 +3789,6 @@ }, "user": null }, - "headers": { - "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - "alt-svc": "h3=\":443\"; ma=86400", - "cf-cache-status": "DYNAMIC", - "cf-ray": "", - "connection": "keep-alive", - "content-type": "application/json", - "date": "", - "openai-organization": "braintrust-data", - "openai-processing-ms": "", - "openai-project": "", - "openai-version": "", - "server": "cloudflare", - "set-cookie": "", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-ratelimit-limit-requests": "30000", - "x-ratelimit-limit-tokens": "150000000", - "x-ratelimit-remaining-requests": "", - "x-ratelimit-remaining-tokens": "", - "x-ratelimit-reset-requests": "", - "x-ratelimit-reset-tokens": "", - "x-request-id": "" - }, "id": "", "messages": [ { @@ -4255,31 +3921,6 @@ }, "user": null }, - "headers": { - "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - "alt-svc": "h3=\":443\"; ma=86400", - "cf-cache-status": "DYNAMIC", - "cf-ray": "", - "connection": "keep-alive", - "content-type": "application/json", - "date": "", - "openai-organization": "braintrust-data", - "openai-processing-ms": "", - "openai-project": "", - "openai-version": "", - "server": "cloudflare", - "set-cookie": "", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-ratelimit-limit-requests": "30000", - "x-ratelimit-limit-tokens": "150000000", - "x-ratelimit-remaining-requests": "", - "x-ratelimit-remaining-tokens": "", - "x-ratelimit-reset-requests": "", - "x-ratelimit-reset-tokens": "", - "x-request-id": "" - }, "id": "", "messages": [ { @@ -4356,9 +3997,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 32, "prompt": [ { @@ -4410,7 +4048,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -4492,7 +4129,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -4666,7 +4302,82 @@ { "name": "generateText", "type": "function", - "children": [], + "children": [ + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 24, + "prompt": [ + { + "content": "You are a terse assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "Reply with exactly HELLO and no punctuation.", + "type": "text" + } + ], + "role": "user" + } + ] + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "id": "", + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokens": 26, + "outputTokens": 3, + "reasoningTokens": 0, + "totalTokens": 29 + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": "stop", + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 3, + "prompt_cached_tokens": 0, + "prompt_tokens": 26, + "reasoning_tokens": 0, + "tokens": 29 + } + } + ], "input": { "maxOutputTokens": 24, "messages": [ @@ -4716,7 +4427,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4759,7 +4469,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4816,92 +4525,6 @@ }, "model": "gpt-4o-mini-2024-07-18", "provider": "openai.responses" - }, - "metrics": { - "completion_reasoning_tokens": 0, - "completion_tokens": 3, - "prompt_cached_tokens": 0, - "prompt_tokens": 26, - "reasoning_tokens": 0, - "tokens": 29 - } - }, - { - "name": "doGenerate", - "type": "llm", - "children": [], - "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, - "maxOutputTokens": 24, - "prompt": [ - { - "content": "You are a terse assistant.", - "role": "system" - }, - { - "content": [ - { - "text": "Reply with exactly HELLO and no punctuation.", - "type": "text" - } - ], - "role": "user" - } - ] - }, - "output": { - "content": [ - { - "providerMetadata": { - "openai": { - "itemId": "" - } - }, - "text": "HELLO", - "type": "text" - } - ], - "finishReason": "stop", - "providerMetadata": { - "openai": { - "responseId": "", - "serviceTier": "default" - } - }, - "response": { - "body": "", - "headers": "", - "id": "", - "modelId": "gpt-4o-mini-2024-07-18", - "timestamp": "" - }, - "usage": { - "cachedInputTokens": 0, - "inputTokens": 26, - "outputTokens": 3, - "reasoningTokens": 0, - "totalTokens": 29 - }, - "warnings": [] - }, - "metadata": { - "braintrust": { - "integration_name": "ai-sdk", - "sdk_language": "typescript" - }, - "finish_reason": "stop", - "model": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" - }, - "metrics": { - "completion_reasoning_tokens": 0, - "completion_tokens": 3, - "prompt_cached_tokens": 0, - "prompt_tokens": 26, - "reasoning_tokens": 0, - "tokens": 29 } } ], @@ -4935,7 +4558,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4978,7 +4600,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -5053,7 +4674,62 @@ { "name": "streamText", "type": "function", - "children": [], + "children": [ + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "includeRawChunks": false, + "maxOutputTokens": 24, + "prompt": [ + { + "content": "You are a terse assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "Reply with exactly STREAM HELLO and no punctuation.", + "type": "text" + } + ], + "role": "user" + } + ] + }, + "output": { + "finishReason": "stop", + "text": "STREAM HELLO", + "toolCalls": [], + "usage": { + "cachedInputTokens": 0, + "inputTokens": 27, + "outputTokens": 4, + "reasoningTokens": 0, + "totalTokens": 31 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": "stop", + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 4, + "prompt_cached_tokens": 0, + "prompt_tokens": 27, + "reasoning_tokens": 0, + "time_to_first_token": 0, + "tokens": 31 + } + } + ], "input": { "maxOutputTokens": 24, "messages": [ @@ -5097,60 +4773,6 @@ "metrics": { "time_to_first_token": 0 } - }, - { - "name": "doStream", - "type": "llm", - "children": [], - "input": { - "includeRawChunks": false, - "maxOutputTokens": 24, - "prompt": [ - { - "content": "You are a terse assistant.", - "role": "system" - }, - { - "content": [ - { - "text": "Reply with exactly STREAM HELLO and no punctuation.", - "type": "text" - } - ], - "role": "user" - } - ] - }, - "output": { - "finishReason": "stop", - "text": "STREAM HELLO", - "toolCalls": [], - "usage": { - "cachedInputTokens": 0, - "inputTokens": 27, - "outputTokens": 4, - "reasoningTokens": 0, - "totalTokens": 31 - } - }, - "metadata": { - "braintrust": { - "integration_name": "ai-sdk", - "sdk_language": "typescript" - }, - "finish_reason": "stop", - "model": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" - }, - "metrics": { - "completion_reasoning_tokens": 0, - "completion_tokens": 4, - "prompt_cached_tokens": 0, - "prompt_tokens": 27, - "reasoning_tokens": 0, - "time_to_first_token": 0, - "tokens": 31 - } } ], "input": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.txt index b4dabc5bf..be4fa8036 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.txt @@ -55,7 +55,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -98,7 +97,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -158,9 +156,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -196,7 +191,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -320,7 +314,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -363,7 +356,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -423,9 +415,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 32, │ "prompt": [ │ { @@ -477,7 +466,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -719,7 +707,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -890,7 +877,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -973,7 +959,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1088,7 +1073,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1235,7 +1219,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1453,9 +1436,6 @@ span_tree: │ } │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -1521,7 +1501,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -1553,26 +1532,12 @@ span_tree: │ │ "tokens": 102 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -1670,7 +1635,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -1702,58 +1666,12 @@ span_tree: │ │ "tokens": 141 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -1883,7 +1801,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -1915,90 +1832,12 @@ span_tree: │ │ "tokens": 180 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -2160,7 +1999,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -2192,116 +2030,9 @@ span_tree: │ │ "tokens": 219 │ │ } │ └── get_weather [tool] - │ input: [ - │ { - │ "location": "Paris, France" - │ }, - │ { - │ "messages": [ - │ { - │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ "role": "user" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ } - │ ], - │ "toolCallId": "" - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── generateText [function] │ input: { @@ -2353,7 +2084,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -2396,7 +2126,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -2456,9 +2185,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -2499,7 +2225,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -2585,7 +2310,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -2628,7 +2352,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -2688,9 +2411,6 @@ span_tree: │ │ } │ │ └── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 24, │ │ "prompt": [ │ │ { @@ -2731,7 +2451,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -2812,7 +2531,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -2855,7 +2573,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -2915,9 +2632,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -2958,7 +2672,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -3051,7 +2764,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3099,7 +2811,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3151,9 +2862,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -3206,7 +2914,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, @@ -3301,7 +3008,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -3349,7 +3055,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -3401,9 +3106,6 @@ span_tree: │ │ } │ │ └── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 24, │ │ "prompt": [ │ │ { @@ -3456,7 +3158,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "claude-haiku-4-5-20251001" │ │ }, @@ -3546,7 +3247,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3594,7 +3294,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3646,9 +3345,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -3701,7 +3397,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, @@ -3869,31 +3564,6 @@ span_tree: │ }, │ "user": null │ }, - │ "headers": { - │ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - │ "alt-svc": "h3=\":443\"; ma=86400", - │ "cf-cache-status": "DYNAMIC", - │ "cf-ray": "", - │ "connection": "keep-alive", - │ "content-type": "application/json", - │ "date": "", - │ "openai-organization": "braintrust-data", - │ "openai-processing-ms": "", - │ "openai-project": "", - │ "openai-version": "", - │ "server": "cloudflare", - │ "set-cookie": "", - │ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - │ "transfer-encoding": "chunked", - │ "x-content-type-options": "nosniff", - │ "x-ratelimit-limit-requests": "30000", - │ "x-ratelimit-limit-tokens": "150000000", - │ "x-ratelimit-remaining-requests": "", - │ "x-ratelimit-remaining-tokens": "", - │ "x-ratelimit-reset-requests": "", - │ "x-ratelimit-reset-tokens": "", - │ "x-request-id": "" - │ }, │ "id": "", │ "messages": [ │ { @@ -4026,31 +3696,6 @@ span_tree: │ }, │ "user": null │ }, - │ "headers": { - │ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - │ "alt-svc": "h3=\":443\"; ma=86400", - │ "cf-cache-status": "DYNAMIC", - │ "cf-ray": "", - │ "connection": "keep-alive", - │ "content-type": "application/json", - │ "date": "", - │ "openai-organization": "braintrust-data", - │ "openai-processing-ms": "", - │ "openai-project": "", - │ "openai-version": "", - │ "server": "cloudflare", - │ "set-cookie": "", - │ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - │ "transfer-encoding": "chunked", - │ "x-content-type-options": "nosniff", - │ "x-ratelimit-limit-requests": "30000", - │ "x-ratelimit-limit-tokens": "150000000", - │ "x-ratelimit-remaining-requests": "", - │ "x-ratelimit-remaining-tokens": "", - │ "x-ratelimit-reset-requests": "", - │ "x-ratelimit-reset-tokens": "", - │ "x-request-id": "" - │ }, │ "id": "", │ "messages": [ │ { @@ -4110,9 +3755,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -4148,7 +3790,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -4234,7 +3875,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -4258,9 +3898,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 32, │ "prompt": [ │ { @@ -4312,7 +3949,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -4501,7 +4137,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -4544,7 +4179,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -4602,193 +4236,41 @@ span_tree: │ "model": "gpt-4o-mini-2024-07-18", │ "provider": "openai.responses" │ } - │ ├── generateText [function] - │ │ input: { - │ │ "maxOutputTokens": 24, - │ │ "messages": [ - │ │ { - │ │ "content": "Reply with exactly HELLO and no punctuation.", - │ │ "role": "user" - │ │ } - │ │ ], - │ │ "model": { - │ │ "config": { - │ │ "fileIdPrefixes": [ - │ │ "file-" - │ │ ], - │ │ "provider": "openai.responses" - │ │ }, - │ │ "modelId": "gpt-4o-mini-2024-07-18", - │ │ "specificationVersion": "v2", - │ │ "supportedUrls": { - │ │ "application/pdf": [ - │ │ {} - │ │ ], - │ │ "image/*": [ - │ │ {} - │ │ ] - │ │ } - │ │ }, - │ │ "system": "You are a terse assistant." - │ │ } - │ │ output: { - │ │ "content": [ - │ │ { - │ │ "providerMetadata": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "text": "HELLO", - │ │ "type": "text" - │ │ } - │ │ ], - │ │ "finishReason": "stop", - │ │ "providerMetadata": { - │ │ "openai": { - │ │ "responseId": "", - │ │ "serviceTier": "default" - │ │ } - │ │ }, - │ │ "response": { - │ │ "body": "", - │ │ "headers": "", - │ │ "id": "", - │ │ "messages": [ - │ │ { - │ │ "content": [ - │ │ { - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "text": "HELLO", - │ │ "type": "text" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ } - │ │ ], - │ │ "modelId": "gpt-4o-mini-2024-07-18", - │ │ "timestamp": "" - │ │ }, - │ │ "steps": [ - │ │ { - │ │ "content": [ - │ │ { - │ │ "providerMetadata": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "text": "HELLO", - │ │ "type": "text" - │ │ } - │ │ ], - │ │ "finishReason": "stop", - │ │ "providerMetadata": { - │ │ "openai": { - │ │ "responseId": "", - │ │ "serviceTier": "default" - │ │ } - │ │ }, - │ │ "response": { - │ │ "body": "", - │ │ "headers": "", - │ │ "id": "", - │ │ "messages": [ - │ │ { - │ │ "content": [ - │ │ { - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "text": "HELLO", - │ │ "type": "text" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ } - │ │ ], - │ │ "modelId": "gpt-4o-mini-2024-07-18", - │ │ "timestamp": "" - │ │ }, - │ │ "usage": { - │ │ "cachedInputTokens": 0, - │ │ "inputTokens": 26, - │ │ "outputTokens": 3, - │ │ "reasoningTokens": 0, - │ │ "totalTokens": 29 - │ │ }, - │ │ "warnings": [] - │ │ } - │ │ ], - │ │ "text": "HELLO", - │ │ "toolCalls": [], - │ │ "toolResults": [], - │ │ "totalUsage": { - │ │ "cachedInputTokens": 0, - │ │ "inputTokens": 26, - │ │ "outputTokens": 3, - │ │ "reasoningTokens": 0, - │ │ "totalTokens": 29 - │ │ }, - │ │ "usage": { - │ │ "cachedInputTokens": 0, - │ │ "inputTokens": 26, - │ │ "outputTokens": 3, - │ │ "reasoningTokens": 0, - │ │ "totalTokens": 29 - │ │ }, - │ │ "warnings": [] - │ │ } - │ │ metadata: { - │ │ "braintrust": { - │ │ "integration_name": "ai-sdk", - │ │ "sdk_language": "typescript" - │ │ }, - │ │ "model": "gpt-4o-mini-2024-07-18", - │ │ "provider": "openai.responses" - │ │ } - │ │ metrics: { - │ │ "completion_reasoning_tokens": 0, - │ │ "completion_tokens": 3, - │ │ "prompt_cached_tokens": 0, - │ │ "prompt_tokens": 26, - │ │ "reasoning_tokens": 0, - │ │ "tokens": 29 - │ │ } - │ └── doGenerate [llm] + │ └── generateText [function] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, - │ "prompt": [ + │ "messages": [ │ { - │ "content": "You are a terse assistant.", - │ "role": "system" + │ "content": "Reply with exactly HELLO and no punctuation.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "config": { + │ "fileIdPrefixes": [ + │ "file-" + │ ], + │ "provider": "openai.responses" │ }, - │ { - │ "content": [ - │ { - │ "text": "Reply with exactly HELLO and no punctuation.", - │ "type": "text" - │ } + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "specificationVersion": "v2", + │ "supportedUrls": { + │ "application/pdf": [ + │ {} │ ], - │ "role": "user" + │ "image/*": [ + │ {} + │ ] │ } - │ ] + │ }, + │ "system": "You are a terse assistant." │ } │ output: { │ "content": [ │ { │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, │ "text": "HELLO", @@ -4798,17 +4280,94 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", - │ "headers": "", - │ "id": "", + │ "id": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, + │ "steps": [ + │ { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "id": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "cachedInputTokens": 0, + │ "inputTokens": 26, + │ "outputTokens": 3, + │ "reasoningTokens": 0, + │ "totalTokens": 29 + │ }, + │ "warnings": [] + │ } + │ ], + │ "text": "HELLO", + │ "toolCalls": [], + │ "toolResults": [], + │ "totalUsage": { + │ "cachedInputTokens": 0, + │ "inputTokens": 26, + │ "outputTokens": 3, + │ "reasoningTokens": 0, + │ "totalTokens": 29 + │ }, │ "usage": { │ "cachedInputTokens": 0, │ "inputTokens": 26, @@ -4823,18 +4382,79 @@ span_tree: │ "integration_name": "ai-sdk", │ "sdk_language": "typescript" │ }, - │ "finish_reason": "stop", │ "model": "gpt-4o-mini-2024-07-18", │ "provider": "openai.responses" │ } - │ metrics: { - │ "completion_reasoning_tokens": 0, - │ "completion_tokens": 3, - │ "prompt_cached_tokens": 0, - │ "prompt_tokens": 26, - │ "reasoning_tokens": 0, - │ "tokens": 29 - │ } + │ └── doGenerate [llm] + │ input: { + │ "maxOutputTokens": 24, + │ "prompt": [ + │ { + │ "content": "You are a terse assistant.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Reply with exactly HELLO and no punctuation.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "id": "", + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "cachedInputTokens": 0, + │ "inputTokens": 26, + │ "outputTokens": 3, + │ "reasoningTokens": 0, + │ "totalTokens": 29 + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "finish_reason": "stop", + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_reasoning_tokens": 0, + │ "completion_tokens": 3, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 26, + │ "reasoning_tokens": 0, + │ "tokens": 29 + │ } └── ai-sdk-agent-stream-operation metadata: { "operation": "agent-stream", @@ -4865,97 +4485,97 @@ span_tree: metrics: { "time_to_first_token": 0 } - ├── streamText [function] - │ input: { - │ "maxOutputTokens": 24, - │ "messages": [ - │ { - │ "content": "Reply with exactly STREAM HELLO and no punctuation.", - │ "role": "user" - │ } - │ ], - │ "model": { - │ "config": { - │ "fileIdPrefixes": [ - │ "file-" - │ ], - │ "provider": "openai.responses" - │ }, - │ "modelId": "gpt-4o-mini-2024-07-18", - │ "specificationVersion": "v2", - │ "supportedUrls": { - │ "application/pdf": [ - │ {} - │ ], - │ "image/*": [ - │ {} - │ ] - │ } - │ }, - │ "system": "You are a terse assistant." - │ } - │ output: { - │ "finishReason": "stop", - │ "text": "STREAM HELLO" - │ } - │ metadata: { - │ "braintrust": { - │ "integration_name": "ai-sdk", - │ "sdk_language": "typescript" - │ }, - │ "model": "gpt-4o-mini-2024-07-18", - │ "provider": "openai.responses" - │ } - │ metrics: { - │ "time_to_first_token": 0 - │ } - └── doStream [llm] + └── streamText [function] input: { - "includeRawChunks": false, "maxOutputTokens": 24, - "prompt": [ + "messages": [ { - "content": "You are a terse assistant.", - "role": "system" + "content": "Reply with exactly STREAM HELLO and no punctuation.", + "role": "user" + } + ], + "model": { + "config": { + "fileIdPrefixes": [ + "file-" + ], + "provider": "openai.responses" }, - { - "content": [ - { - "text": "Reply with exactly STREAM HELLO and no punctuation.", - "type": "text" - } + "modelId": "gpt-4o-mini-2024-07-18", + "specificationVersion": "v2", + "supportedUrls": { + "application/pdf": [ + {} ], - "role": "user" + "image/*": [ + {} + ] } - ] + }, + "system": "You are a terse assistant." } output: { "finishReason": "stop", - "text": "STREAM HELLO", - "toolCalls": [], - "usage": { - "cachedInputTokens": 0, - "inputTokens": 27, - "outputTokens": 4, - "reasoningTokens": 0, - "totalTokens": 31 - } + "text": "STREAM HELLO" } metadata: { "braintrust": { "integration_name": "ai-sdk", "sdk_language": "typescript" }, - "finish_reason": "stop", "model": "gpt-4o-mini-2024-07-18", "provider": "openai.responses" } metrics: { - "completion_reasoning_tokens": 0, - "completion_tokens": 4, - "prompt_cached_tokens": 0, - "prompt_tokens": 27, - "reasoning_tokens": 0, - "time_to_first_token": 0, - "tokens": 31 + "time_to_first_token": 0 } + └── doStream [llm] + input: { + "includeRawChunks": false, + "maxOutputTokens": 24, + "prompt": [ + { + "content": "You are a terse assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "Reply with exactly STREAM HELLO and no punctuation.", + "type": "text" + } + ], + "role": "user" + } + ] + } + output: { + "finishReason": "stop", + "text": "STREAM HELLO", + "toolCalls": [], + "usage": { + "cachedInputTokens": 0, + "inputTokens": 27, + "outputTokens": 4, + "reasoningTokens": 0, + "totalTokens": 31 + } + } + metadata: { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": "stop", + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + metrics: { + "completion_reasoning_tokens": 0, + "completion_tokens": 4, + "prompt_cached_tokens": 0, + "prompt_tokens": 27, + "reasoning_tokens": 0, + "time_to_first_token": 0, + "tokens": 31 + } diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.json index ecb82904e..871bf877e 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.json @@ -16,9 +16,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -54,7 +51,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -131,7 +127,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -174,7 +169,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -259,9 +253,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 32, "prompt": [ { @@ -313,7 +304,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -428,7 +418,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -471,7 +460,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -695,9 +683,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 128, "prompt": [ { @@ -763,7 +748,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -799,20 +783,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -820,9 +793,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 128, "prompt": [ { @@ -920,7 +890,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -956,52 +925,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1009,9 +935,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 128, "prompt": [ { @@ -1141,7 +1064,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -1177,84 +1099,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1262,9 +1109,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 128, "prompt": [ { @@ -1426,7 +1270,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -1462,116 +1305,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], @@ -1654,7 +1390,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -1825,7 +1560,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -1908,7 +1642,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2023,7 +1756,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2170,7 +1902,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2405,9 +2136,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -2448,7 +2176,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2530,7 +2257,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2573,7 +2299,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2641,9 +2366,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -2684,7 +2406,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2766,7 +2487,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2809,7 +2529,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2886,9 +2605,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -2941,7 +2657,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "claude-haiku-4-5-20251001" }, @@ -3032,7 +2747,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3080,7 +2794,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3140,9 +2853,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3195,7 +2905,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "claude-haiku-4-5-20251001" }, @@ -3286,7 +2995,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3334,7 +3042,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3403,9 +3110,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3441,7 +3145,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -3608,31 +3311,6 @@ }, "user": null }, - "headers": { - "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - "alt-svc": "h3=\":443\"; ma=86400", - "cf-cache-status": "DYNAMIC", - "cf-ray": "", - "connection": "keep-alive", - "content-type": "application/json", - "date": "", - "openai-organization": "braintrust-data", - "openai-processing-ms": "", - "openai-project": "", - "openai-version": "", - "server": "cloudflare", - "set-cookie": "", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-ratelimit-limit-requests": "30000", - "x-ratelimit-limit-tokens": "150000000", - "x-ratelimit-remaining-requests": "", - "x-ratelimit-remaining-tokens": "", - "x-ratelimit-reset-requests": "", - "x-ratelimit-reset-tokens": "", - "x-request-id": "" - }, "id": "", "messages": [ { @@ -3765,31 +3443,6 @@ }, "user": null }, - "headers": { - "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - "alt-svc": "h3=\":443\"; ma=86400", - "cf-cache-status": "DYNAMIC", - "cf-ray": "", - "connection": "keep-alive", - "content-type": "application/json", - "date": "", - "openai-organization": "braintrust-data", - "openai-processing-ms": "", - "openai-project": "", - "openai-version": "", - "server": "cloudflare", - "set-cookie": "", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-ratelimit-limit-requests": "30000", - "x-ratelimit-limit-tokens": "150000000", - "x-ratelimit-remaining-requests": "", - "x-ratelimit-remaining-tokens": "", - "x-ratelimit-reset-requests": "", - "x-ratelimit-reset-tokens": "", - "x-request-id": "" - }, "id": "", "messages": [ { @@ -3866,9 +3519,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 32, "prompt": [ { @@ -3920,7 +3570,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -4002,7 +3651,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -4178,9 +3826,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/5.0.82" - }, "maxOutputTokens": 24, "prompt": [ { @@ -4219,7 +3864,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -4301,7 +3945,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4344,7 +3987,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.txt index 5a5b66e26..18460e48e 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.txt @@ -55,7 +55,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -98,7 +97,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -158,9 +156,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -196,7 +191,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -320,7 +314,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -363,7 +356,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -423,9 +415,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 32, │ "prompt": [ │ { @@ -477,7 +466,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -719,7 +707,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -890,7 +877,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -973,7 +959,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1088,7 +1073,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1235,7 +1219,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1453,9 +1436,6 @@ span_tree: │ } │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -1521,7 +1501,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -1553,26 +1532,12 @@ span_tree: │ │ "tokens": 102 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -1670,7 +1635,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -1702,58 +1666,12 @@ span_tree: │ │ "tokens": 141 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -1883,7 +1801,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -1915,90 +1832,12 @@ span_tree: │ │ "tokens": 180 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -2160,7 +1999,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -2192,116 +2030,9 @@ span_tree: │ │ "tokens": 219 │ │ } │ └── get_weather [tool] - │ input: [ - │ { - │ "location": "Paris, France" - │ }, - │ { - │ "messages": [ - │ { - │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ "role": "user" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ } - │ ], - │ "toolCallId": "" - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── ai-sdk-openai-cache-operation │ metadata: { @@ -2358,7 +2089,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -2401,7 +2131,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -2461,9 +2190,6 @@ span_tree: │ │ } │ │ └── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 24, │ │ "prompt": [ │ │ { @@ -2504,7 +2230,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -2585,7 +2310,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -2628,7 +2352,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -2688,9 +2411,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -2731,7 +2451,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -2829,7 +2548,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -2877,7 +2595,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -2929,9 +2646,6 @@ span_tree: │ │ } │ │ └── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/5.0.82" - │ │ }, │ │ "maxOutputTokens": 24, │ │ "prompt": [ │ │ { @@ -2984,7 +2698,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "claude-haiku-4-5-20251001" │ │ }, @@ -3074,7 +2787,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3122,7 +2834,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3174,9 +2885,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -3229,7 +2937,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, @@ -3397,31 +3104,6 @@ span_tree: │ }, │ "user": null │ }, - │ "headers": { - │ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - │ "alt-svc": "h3=\":443\"; ma=86400", - │ "cf-cache-status": "DYNAMIC", - │ "cf-ray": "", - │ "connection": "keep-alive", - │ "content-type": "application/json", - │ "date": "", - │ "openai-organization": "braintrust-data", - │ "openai-processing-ms": "", - │ "openai-project": "", - │ "openai-version": "", - │ "server": "cloudflare", - │ "set-cookie": "", - │ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - │ "transfer-encoding": "chunked", - │ "x-content-type-options": "nosniff", - │ "x-ratelimit-limit-requests": "30000", - │ "x-ratelimit-limit-tokens": "150000000", - │ "x-ratelimit-remaining-requests": "", - │ "x-ratelimit-remaining-tokens": "", - │ "x-ratelimit-reset-requests": "", - │ "x-ratelimit-reset-tokens": "", - │ "x-request-id": "" - │ }, │ "id": "", │ "messages": [ │ { @@ -3554,31 +3236,6 @@ span_tree: │ }, │ "user": null │ }, - │ "headers": { - │ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - │ "alt-svc": "h3=\":443\"; ma=86400", - │ "cf-cache-status": "DYNAMIC", - │ "cf-ray": "", - │ "connection": "keep-alive", - │ "content-type": "application/json", - │ "date": "", - │ "openai-organization": "braintrust-data", - │ "openai-processing-ms": "", - │ "openai-project": "", - │ "openai-version": "", - │ "server": "cloudflare", - │ "set-cookie": "", - │ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - │ "transfer-encoding": "chunked", - │ "x-content-type-options": "nosniff", - │ "x-ratelimit-limit-requests": "30000", - │ "x-ratelimit-limit-tokens": "150000000", - │ "x-ratelimit-remaining-requests": "", - │ "x-ratelimit-remaining-tokens": "", - │ "x-ratelimit-reset-requests": "", - │ "x-ratelimit-reset-tokens": "", - │ "x-request-id": "" - │ }, │ "id": "", │ "messages": [ │ { @@ -3638,9 +3295,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -3676,7 +3330,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -3762,7 +3415,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -3786,9 +3438,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 32, │ "prompt": [ │ { @@ -3840,7 +3489,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -4048,7 +3696,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -4091,7 +3738,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -4151,9 +3797,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/5.0.82" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -4192,7 +3835,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json index 6b66782d8..e227e1886 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json @@ -16,9 +16,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -56,7 +53,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -141,6 +137,7 @@ } ], "finishReason": "stop", + "output": "PARIS", "providerMetadata": { "openai": { "responseId": "", @@ -149,7 +146,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -192,7 +188,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -321,9 +316,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 32, "prompt": [ { @@ -377,7 +369,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -483,6 +474,9 @@ } ], "finishReason": "stop", + "output": { + "answer": "4" + }, "providerMetadata": { "openai": { "responseId": "", @@ -491,7 +485,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -534,7 +527,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -863,9 +855,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 128, "prompt": [ { @@ -933,7 +922,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -985,20 +973,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1006,9 +983,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 128, "prompt": [ { @@ -1113,7 +1087,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -1165,57 +1138,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1223,9 +1148,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 128, "prompt": [ { @@ -1367,7 +1289,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -1419,94 +1340,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1514,9 +1350,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 128, "prompt": [ { @@ -1695,7 +1528,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -1747,131 +1579,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], @@ -1959,7 +1669,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2155,7 +1864,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2266,7 +1974,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2414,7 +2121,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2599,7 +2305,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2900,9 +2605,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -2945,7 +2647,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -3035,6 +2736,7 @@ } ], "finishReason": "stop", + "output": "CACHE_OK", "providerMetadata": { "openai": { "responseId": "", @@ -3043,7 +2745,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3086,7 +2787,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3201,9 +2901,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3246,7 +2943,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -3336,6 +3032,7 @@ } ], "finishReason": "stop", + "output": "CACHE_OK", "providerMetadata": { "openai": { "responseId": "", @@ -3344,7 +3041,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3387,7 +3083,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3499,9 +3194,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3544,7 +3236,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -3634,6 +3325,7 @@ } ], "finishReason": "stop", + "output": "CACHE_OK", "providerMetadata": { "openai": { "responseId": "", @@ -3642,7 +3334,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3685,7 +3376,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3803,9 +3493,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3861,7 +3548,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "claude-haiku-4-5-20251001" }, @@ -3948,6 +3634,7 @@ } ], "finishReason": "stop", + "output": "CACHE_OK", "providerMetadata": { "anthropic": { "cacheCreationInputTokens": 0, @@ -3971,7 +3658,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4020,7 +3706,6 @@ "rawFinishReason": "end_turn", "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4125,9 +3810,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -4183,7 +3865,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "claude-haiku-4-5-20251001" }, @@ -4270,6 +3951,7 @@ } ], "finishReason": "stop", + "output": "CACHE_OK", "providerMetadata": { "anthropic": { "cacheCreationInputTokens": 0, @@ -4293,7 +3975,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4342,7 +4023,6 @@ "rawFinishReason": "end_turn", "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4444,9 +4124,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -4502,7 +4179,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "claude-haiku-4-5-20251001" }, @@ -4589,6 +4265,7 @@ } ], "finishReason": "stop", + "output": "CACHE_OK", "providerMetadata": { "anthropic": { "cacheCreationInputTokens": 0, @@ -4612,7 +4289,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4661,7 +4337,6 @@ "rawFinishReason": "end_turn", "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4772,9 +4447,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -4812,7 +4484,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -4897,6 +4568,7 @@ } ], "finishReason": "stop", + "output": "DENIED", "providerMetadata": { "openai": { "responseId": "", @@ -4995,31 +4667,6 @@ }, "user": null }, - "headers": { - "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - "alt-svc": "h3=\":443\"; ma=86400", - "cf-cache-status": "DYNAMIC", - "cf-ray": "", - "connection": "keep-alive", - "content-type": "application/json", - "date": "", - "openai-organization": "braintrust-data", - "openai-processing-ms": "", - "openai-project": "", - "openai-version": "", - "server": "cloudflare", - "set-cookie": "", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-ratelimit-limit-requests": "30000", - "x-ratelimit-limit-tokens": "150000000", - "x-ratelimit-remaining-requests": "", - "x-ratelimit-remaining-tokens": "", - "x-ratelimit-reset-requests": "", - "x-ratelimit-reset-tokens": "", - "x-request-id": "" - }, "id": "", "messages": [ { @@ -5152,31 +4799,6 @@ }, "user": null }, - "headers": { - "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - "alt-svc": "h3=\":443\"; ma=86400", - "cf-cache-status": "DYNAMIC", - "cf-ray": "", - "connection": "keep-alive", - "content-type": "application/json", - "date": "", - "openai-organization": "braintrust-data", - "openai-processing-ms": "", - "openai-project": "", - "openai-version": "", - "server": "cloudflare", - "set-cookie": "", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-ratelimit-limit-requests": "30000", - "x-ratelimit-limit-tokens": "150000000", - "x-ratelimit-remaining-requests": "", - "x-ratelimit-remaining-tokens": "", - "x-ratelimit-reset-requests": "", - "x-ratelimit-reset-tokens": "", - "x-request-id": "" - }, "id": "", "messages": [ { @@ -5297,9 +4919,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 32, "prompt": [ { @@ -5353,7 +4972,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -5451,7 +5069,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -5661,7 +5278,96 @@ { "name": "generateText", "type": "function", - "children": [], + "children": [ + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 24, + "prompt": [ + { + "content": [ + { + "text": "Reply with exactly HELLO and no punctuation.", + "type": "text" + } + ], + "role": "user" + } + ] + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "finishReason": { + "unified": "stop" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "id": "", + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 16, + "total": 16 + }, + "outputTokens": { + "reasoning": 0, + "text": 3, + "total": 3 + }, + "raw": { + "input_tokens": 16, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 3, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "stop" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 3, + "prompt_cached_tokens": 0, + "prompt_tokens": 16, + "reasoning_tokens": 0 + } + } + ], "input": { "maxOutputTokens": 24, "messages": [ @@ -5702,6 +5408,7 @@ } ], "finishReason": "stop", + "output": "HELLO", "providerMetadata": { "openai": { "responseId": "", @@ -5710,7 +5417,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -5753,7 +5459,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -5854,106 +5559,6 @@ }, "model": "gpt-4o-mini-2024-07-18", "provider": "openai.responses" - }, - "metrics": { - "completion_reasoning_tokens": 0, - "completion_tokens": 3, - "prompt_cached_tokens": 0, - "prompt_tokens": 16, - "reasoning_tokens": 0, - "tokens": 19 - } - }, - { - "name": "doGenerate", - "type": "llm", - "children": [], - "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, - "maxOutputTokens": 24, - "prompt": [ - { - "content": [ - { - "text": "Reply with exactly HELLO and no punctuation.", - "type": "text" - } - ], - "role": "user" - } - ] - }, - "output": { - "content": [ - { - "providerMetadata": { - "openai": { - "itemId": "" - } - }, - "text": "HELLO", - "type": "text" - } - ], - "finishReason": { - "unified": "stop" - }, - "providerMetadata": { - "openai": { - "responseId": "", - "serviceTier": "default" - } - }, - "response": { - "body": "", - "headers": "", - "id": "", - "modelId": "gpt-4o-mini-2024-07-18", - "timestamp": "" - }, - "usage": { - "inputTokens": { - "cacheRead": 0, - "noCache": 16, - "total": 16 - }, - "outputTokens": { - "reasoning": 0, - "text": 3, - "total": 3 - }, - "raw": { - "input_tokens": 16, - "input_tokens_details": { - "cached_tokens": 0 - }, - "output_tokens": 3, - "output_tokens_details": { - "reasoning_tokens": 0 - } - } - }, - "warnings": [] - }, - "metadata": { - "braintrust": { - "integration_name": "ai-sdk", - "sdk_language": "typescript" - }, - "finish_reason": { - "unified": "stop" - }, - "model": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" - }, - "metrics": { - "completion_reasoning_tokens": 0, - "completion_tokens": 3, - "prompt_cached_tokens": 0, - "prompt_tokens": 16, - "reasoning_tokens": 0 } } ], @@ -5979,6 +5584,7 @@ } ], "finishReason": "stop", + "output": "HELLO", "providerMetadata": { "openai": { "responseId": "", @@ -5987,7 +5593,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -6030,7 +5635,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -6149,7 +5753,76 @@ { "name": "streamText", "type": "function", - "children": [], + "children": [ + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "includeRawChunks": false, + "maxOutputTokens": 24, + "prompt": [ + { + "content": [ + { + "text": "Reply with exactly STREAM HELLO and no punctuation.", + "type": "text" + } + ], + "role": "user" + } + ] + }, + "output": { + "finishReason": { + "unified": "stop" + }, + "text": "STREAM HELLO", + "toolCalls": [], + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 17, + "total": 17 + }, + "outputTokens": { + "reasoning": 0, + "text": 4, + "total": 4 + }, + "raw": { + "input_tokens": 17, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 4, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "stop" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 4, + "prompt_cached_tokens": 0, + "prompt_tokens": 17, + "reasoning_tokens": 0, + "time_to_first_token": 0 + } + } + ], "input": { "maxOutputTokens": 24, "messages": [ @@ -6192,74 +5865,6 @@ "metrics": { "time_to_first_token": 0 } - }, - { - "name": "doStream", - "type": "llm", - "children": [], - "input": { - "includeRawChunks": false, - "maxOutputTokens": 24, - "prompt": [ - { - "content": [ - { - "text": "Reply with exactly STREAM HELLO and no punctuation.", - "type": "text" - } - ], - "role": "user" - } - ] - }, - "output": { - "finishReason": { - "unified": "stop" - }, - "text": "STREAM HELLO", - "toolCalls": [], - "usage": { - "inputTokens": { - "cacheRead": 0, - "noCache": 17, - "total": 17 - }, - "outputTokens": { - "reasoning": 0, - "text": 4, - "total": 4 - }, - "raw": { - "input_tokens": 17, - "input_tokens_details": { - "cached_tokens": 0 - }, - "output_tokens": 4, - "output_tokens_details": { - "reasoning_tokens": 0 - } - } - } - }, - "metadata": { - "braintrust": { - "integration_name": "ai-sdk", - "sdk_language": "typescript" - }, - "finish_reason": { - "unified": "stop" - }, - "model": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" - }, - "metrics": { - "completion_reasoning_tokens": 0, - "completion_tokens": 4, - "prompt_cached_tokens": 0, - "prompt_tokens": 17, - "reasoning_tokens": 0, - "time_to_first_token": 0 - } } ], "input": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt index 3eb2a95d1..d7173ca6b 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt @@ -47,6 +47,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "PARIS", │ "providerMetadata": { │ "openai": { │ "responseId": "", @@ -55,7 +56,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -98,7 +98,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -202,9 +201,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -242,7 +238,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -357,6 +352,9 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": { + │ "answer": "4" + │ }, │ "providerMetadata": { │ "openai": { │ "responseId": "", @@ -365,7 +363,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -408,7 +405,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -512,9 +508,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 32, │ "prompt": [ │ { @@ -568,7 +561,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -884,7 +876,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1080,7 +1071,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1191,7 +1181,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1339,7 +1328,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1524,7 +1512,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1811,9 +1798,6 @@ span_tree: │ } │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -1881,7 +1865,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -1929,26 +1912,12 @@ span_tree: │ │ "reasoning_tokens": 0 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -2053,7 +2022,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -2101,63 +2069,12 @@ span_tree: │ │ "reasoning_tokens": 0 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -2299,7 +2216,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -2347,100 +2263,12 @@ span_tree: │ │ "reasoning_tokens": 0 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -2619,7 +2447,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -2667,131 +2494,9 @@ span_tree: │ │ "reasoning_tokens": 0 │ │ } │ └── get_weather [tool] - │ input: [ - │ { - │ "location": "Paris, France" - │ }, - │ { - │ "messages": [ - │ { - │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ "role": "user" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ } - │ ], - │ "toolCallId": "" - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── generateText [function] │ input: { @@ -2835,6 +2540,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "CACHE_OK", │ "providerMetadata": { │ "openai": { │ "responseId": "", @@ -2843,7 +2549,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -2886,7 +2591,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -2990,9 +2694,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -3035,7 +2736,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -3129,6 +2829,7 @@ span_tree: │ │ } │ │ ], │ │ "finishReason": "stop", + │ │ "output": "CACHE_OK", │ │ "providerMetadata": { │ │ "openai": { │ │ "responseId": "", @@ -3137,7 +2838,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -3180,7 +2880,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -3284,9 +2983,6 @@ span_tree: │ │ } │ │ └── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 24, │ │ "prompt": [ │ │ { @@ -3329,7 +3025,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -3418,6 +3113,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "CACHE_OK", │ "providerMetadata": { │ "openai": { │ "responseId": "", @@ -3426,7 +3122,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3469,7 +3164,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3573,9 +3267,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -3618,7 +3309,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -3704,6 +3394,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "CACHE_OK", │ "providerMetadata": { │ "anthropic": { │ "cacheCreationInputTokens": 0, @@ -3727,7 +3418,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3776,7 +3466,6 @@ span_tree: │ "rawFinishReason": "end_turn", │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3870,9 +3559,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -3928,7 +3614,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, @@ -4019,6 +3704,7 @@ span_tree: │ │ } │ │ ], │ │ "finishReason": "stop", + │ │ "output": "CACHE_OK", │ │ "providerMetadata": { │ │ "anthropic": { │ │ "cacheCreationInputTokens": 0, @@ -4042,7 +3728,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -4091,7 +3776,6 @@ span_tree: │ │ "rawFinishReason": "end_turn", │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -4185,9 +3869,6 @@ span_tree: │ │ } │ │ └── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 24, │ │ "prompt": [ │ │ { @@ -4243,7 +3924,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "claude-haiku-4-5-20251001" │ │ }, @@ -4329,6 +4009,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "CACHE_OK", │ "providerMetadata": { │ "anthropic": { │ "cacheCreationInputTokens": 0, @@ -4352,7 +4033,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -4401,7 +4081,6 @@ span_tree: │ "rawFinishReason": "end_turn", │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -4495,9 +4174,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -4553,7 +4229,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, @@ -4642,6 +4317,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "DENIED", │ "providerMetadata": { │ "openai": { │ "responseId": "", @@ -4740,31 +4416,6 @@ span_tree: │ }, │ "user": null │ }, - │ "headers": { - │ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - │ "alt-svc": "h3=\":443\"; ma=86400", - │ "cf-cache-status": "DYNAMIC", - │ "cf-ray": "", - │ "connection": "keep-alive", - │ "content-type": "application/json", - │ "date": "", - │ "openai-organization": "braintrust-data", - │ "openai-processing-ms": "", - │ "openai-project": "", - │ "openai-version": "", - │ "server": "cloudflare", - │ "set-cookie": "", - │ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - │ "transfer-encoding": "chunked", - │ "x-content-type-options": "nosniff", - │ "x-ratelimit-limit-requests": "30000", - │ "x-ratelimit-limit-tokens": "150000000", - │ "x-ratelimit-remaining-requests": "", - │ "x-ratelimit-remaining-tokens": "", - │ "x-ratelimit-reset-requests": "", - │ "x-ratelimit-reset-tokens": "", - │ "x-request-id": "" - │ }, │ "id": "", │ "messages": [ │ { @@ -4897,31 +4548,6 @@ span_tree: │ }, │ "user": null │ }, - │ "headers": { - │ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - │ "alt-svc": "h3=\":443\"; ma=86400", - │ "cf-cache-status": "DYNAMIC", - │ "cf-ray": "", - │ "connection": "keep-alive", - │ "content-type": "application/json", - │ "date": "", - │ "openai-organization": "braintrust-data", - │ "openai-processing-ms": "", - │ "openai-project": "", - │ "openai-version": "", - │ "server": "cloudflare", - │ "set-cookie": "", - │ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - │ "transfer-encoding": "chunked", - │ "x-content-type-options": "nosniff", - │ "x-ratelimit-limit-requests": "30000", - │ "x-ratelimit-limit-tokens": "150000000", - │ "x-ratelimit-remaining-requests": "", - │ "x-ratelimit-remaining-tokens": "", - │ "x-ratelimit-reset-requests": "", - │ "x-ratelimit-reset-tokens": "", - │ "x-request-id": "" - │ }, │ "id": "", │ "messages": [ │ { @@ -5025,9 +4651,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -5065,7 +4688,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -5167,7 +4789,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -5209,9 +4830,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 32, │ "prompt": [ │ { @@ -5265,7 +4883,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -5480,6 +5097,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "HELLO", │ "providerMetadata": { │ "openai": { │ "responseId": "", @@ -5488,7 +5106,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -5531,7 +5148,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -5633,265 +5249,176 @@ span_tree: │ "model": "gpt-4o-mini-2024-07-18", │ "provider": "openai.responses" │ } - │ ├── generateText [function] - │ │ input: { - │ │ "maxOutputTokens": 24, - │ │ "messages": [ - │ │ { - │ │ "content": "Reply with exactly HELLO and no punctuation.", - │ │ "role": "user" - │ │ } - │ │ ], - │ │ "model": { - │ │ "config": { - │ │ "fileIdPrefixes": [ - │ │ "file-" - │ │ ], - │ │ "provider": "openai.responses" - │ │ }, - │ │ "modelId": "gpt-4o-mini-2024-07-18", - │ │ "specificationVersion": "v3", - │ │ "supportedUrls": { - │ │ "application/pdf": [ - │ │ {} - │ │ ], - │ │ "image/*": [ - │ │ {} - │ │ ] - │ │ } - │ │ } - │ │ } - │ │ output: { - │ │ "content": [ - │ │ { - │ │ "providerMetadata": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "text": "HELLO", - │ │ "type": "text" - │ │ } - │ │ ], - │ │ "finishReason": "stop", - │ │ "providerMetadata": { - │ │ "openai": { - │ │ "responseId": "", - │ │ "serviceTier": "default" - │ │ } - │ │ }, - │ │ "response": { - │ │ "body": "", - │ │ "headers": "", - │ │ "id": "", - │ │ "messages": [ - │ │ { - │ │ "content": [ - │ │ { - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "text": "HELLO", - │ │ "type": "text" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ } - │ │ ], - │ │ "modelId": "gpt-4o-mini-2024-07-18", - │ │ "timestamp": "" - │ │ }, - │ │ "steps": [ - │ │ { - │ │ "content": [ - │ │ { - │ │ "providerMetadata": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "text": "HELLO", - │ │ "type": "text" - │ │ } - │ │ ], - │ │ "finishReason": "stop", - │ │ "providerMetadata": { - │ │ "openai": { - │ │ "responseId": "", - │ │ "serviceTier": "default" - │ │ } - │ │ }, - │ │ "response": { - │ │ "body": "", - │ │ "headers": "", - │ │ "id": "", - │ │ "messages": [ - │ │ { - │ │ "content": [ - │ │ { - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "text": "HELLO", - │ │ "type": "text" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ } - │ │ ], - │ │ "modelId": "gpt-4o-mini-2024-07-18", - │ │ "timestamp": "" - │ │ }, - │ │ "usage": { - │ │ "cachedInputTokens": 0, - │ │ "inputTokenDetails": { - │ │ "cacheReadTokens": 0, - │ │ "noCacheTokens": 16 - │ │ }, - │ │ "inputTokens": 16, - │ │ "outputTokenDetails": { - │ │ "reasoningTokens": 0, - │ │ "textTokens": 3 - │ │ }, - │ │ "outputTokens": 3, - │ │ "raw": { - │ │ "input_tokens": 16, - │ │ "input_tokens_details": { - │ │ "cached_tokens": 0 - │ │ }, - │ │ "output_tokens": 3, - │ │ "output_tokens_details": { - │ │ "reasoning_tokens": 0 - │ │ } - │ │ }, - │ │ "reasoningTokens": 0, - │ │ "totalTokens": 19 - │ │ }, - │ │ "warnings": [] - │ │ } - │ │ ], - │ │ "text": "HELLO", - │ │ "toolCalls": [], - │ │ "toolResults": [], - │ │ "totalUsage": { - │ │ "cachedInputTokens": 0, - │ │ "inputTokenDetails": { - │ │ "cacheReadTokens": 0, - │ │ "noCacheTokens": 16 - │ │ }, - │ │ "inputTokens": 16, - │ │ "outputTokenDetails": { - │ │ "reasoningTokens": 0, - │ │ "textTokens": 3 - │ │ }, - │ │ "outputTokens": 3, - │ │ "reasoningTokens": 0, - │ │ "totalTokens": 19 - │ │ }, - │ │ "usage": { - │ │ "cachedInputTokens": 0, - │ │ "inputTokenDetails": { - │ │ "cacheReadTokens": 0, - │ │ "noCacheTokens": 16 - │ │ }, - │ │ "inputTokens": 16, - │ │ "outputTokenDetails": { - │ │ "reasoningTokens": 0, - │ │ "textTokens": 3 - │ │ }, - │ │ "outputTokens": 3, - │ │ "raw": { - │ │ "input_tokens": 16, - │ │ "input_tokens_details": { - │ │ "cached_tokens": 0 - │ │ }, - │ │ "output_tokens": 3, - │ │ "output_tokens_details": { - │ │ "reasoning_tokens": 0 - │ │ } - │ │ }, - │ │ "reasoningTokens": 0, - │ │ "totalTokens": 19 - │ │ }, - │ │ "warnings": [] - │ │ } - │ │ metadata: { - │ │ "braintrust": { - │ │ "integration_name": "ai-sdk", - │ │ "sdk_language": "typescript" - │ │ }, - │ │ "model": "gpt-4o-mini-2024-07-18", - │ │ "provider": "openai.responses" - │ │ } - │ │ metrics: { - │ │ "completion_reasoning_tokens": 0, - │ │ "completion_tokens": 3, - │ │ "prompt_cached_tokens": 0, - │ │ "prompt_tokens": 16, - │ │ "reasoning_tokens": 0, - │ │ "tokens": 19 - │ │ } - │ └── doGenerate [llm] + │ └── generateText [function] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, - │ "prompt": [ + │ "messages": [ │ { - │ "content": [ - │ { - │ "text": "Reply with exactly HELLO and no punctuation.", - │ "type": "text" - │ } - │ ], + │ "content": "Reply with exactly HELLO and no punctuation.", │ "role": "user" │ } - │ ] + │ ], + │ "model": { + │ "config": { + │ "fileIdPrefixes": [ + │ "file-" + │ ], + │ "provider": "openai.responses" + │ }, + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "specificationVersion": "v3", + │ "supportedUrls": { + │ "application/pdf": [ + │ {} + │ ], + │ "image/*": [ + │ {} + │ ] + │ } + │ } │ } │ output: { │ "content": [ │ { │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, │ "text": "HELLO", │ "type": "text" │ } │ ], - │ "finishReason": { - │ "unified": "stop" - │ }, + │ "finishReason": "stop", + │ "output": "HELLO", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", - │ "headers": "", - │ "id": "", + │ "id": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, + │ "steps": [ + │ { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "id": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "cachedInputTokens": 0, + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 16 + │ }, + │ "inputTokens": 16, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 3 + │ }, + │ "outputTokens": 3, + │ "raw": { + │ "input_tokens": 16, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 3, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "reasoningTokens": 0, + │ "totalTokens": 19 + │ }, + │ "warnings": [] + │ } + │ ], + │ "text": "HELLO", + │ "toolCalls": [], + │ "toolResults": [], + │ "totalUsage": { + │ "cachedInputTokens": 0, + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 16 + │ }, + │ "inputTokens": 16, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 3 + │ }, + │ "outputTokens": 3, + │ "reasoningTokens": 0, + │ "totalTokens": 19 + │ }, │ "usage": { - │ "inputTokens": { - │ "cacheRead": 0, - │ "noCache": 16, - │ "total": 16 + │ "cachedInputTokens": 0, + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 16 │ }, - │ "outputTokens": { - │ "reasoning": 0, - │ "text": 3, - │ "total": 3 + │ "inputTokens": 16, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 3 │ }, + │ "outputTokens": 3, │ "raw": { │ "input_tokens": 16, │ "input_tokens_details": { @@ -5901,7 +5428,9 @@ span_tree: │ "output_tokens_details": { │ "reasoning_tokens": 0 │ } - │ } + │ }, + │ "reasoningTokens": 0, + │ "totalTokens": 19 │ }, │ "warnings": [] │ } @@ -5910,19 +5439,93 @@ span_tree: │ "integration_name": "ai-sdk", │ "sdk_language": "typescript" │ }, - │ "finish_reason": { - │ "unified": "stop" - │ }, │ "model": "gpt-4o-mini-2024-07-18", │ "provider": "openai.responses" │ } - │ metrics: { - │ "completion_reasoning_tokens": 0, - │ "completion_tokens": 3, - │ "prompt_cached_tokens": 0, - │ "prompt_tokens": 16, - │ "reasoning_tokens": 0 - │ } + │ └── doGenerate [llm] + │ input: { + │ "maxOutputTokens": 24, + │ "prompt": [ + │ { + │ "content": [ + │ { + │ "text": "Reply with exactly HELLO and no punctuation.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": { + │ "unified": "stop" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "id": "", + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "inputTokens": { + │ "cacheRead": 0, + │ "noCache": 16, + │ "total": 16 + │ }, + │ "outputTokens": { + │ "reasoning": 0, + │ "text": 3, + │ "total": 3 + │ }, + │ "raw": { + │ "input_tokens": 16, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 3, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ } + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "finish_reason": { + │ "unified": "stop" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_reasoning_tokens": 0, + │ "completion_tokens": 3, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 16, + │ "reasoning_tokens": 0 + │ } └── ai-sdk-agent-stream-operation metadata: { "operation": "agent-stream", @@ -5953,110 +5556,110 @@ span_tree: metrics: { "time_to_first_token": 0 } - ├── streamText [function] - │ input: { - │ "maxOutputTokens": 24, - │ "messages": [ - │ { - │ "content": "Reply with exactly STREAM HELLO and no punctuation.", - │ "role": "user" - │ } - │ ], - │ "model": { - │ "config": { - │ "fileIdPrefixes": [ - │ "file-" - │ ], - │ "provider": "openai.responses" - │ }, - │ "modelId": "gpt-4o-mini-2024-07-18", - │ "specificationVersion": "v3", - │ "supportedUrls": { - │ "application/pdf": [ - │ {} - │ ], - │ "image/*": [ - │ {} - │ ] - │ } - │ } - │ } - │ output: { - │ "finishReason": "stop", - │ "text": "STREAM HELLO" - │ } - │ metadata: { - │ "braintrust": { - │ "integration_name": "ai-sdk", - │ "sdk_language": "typescript" - │ }, - │ "model": "gpt-4o-mini-2024-07-18", - │ "provider": "openai.responses" - │ } - │ metrics: { - │ "time_to_first_token": 0 - │ } - └── doStream [llm] + └── streamText [function] input: { - "includeRawChunks": false, "maxOutputTokens": 24, - "prompt": [ + "messages": [ { - "content": [ - { - "text": "Reply with exactly STREAM HELLO and no punctuation.", - "type": "text" - } - ], + "content": "Reply with exactly STREAM HELLO and no punctuation.", "role": "user" } - ] - } - output: { - "finishReason": { - "unified": "stop" - }, - "text": "STREAM HELLO", - "toolCalls": [], - "usage": { - "inputTokens": { - "cacheRead": 0, - "noCache": 17, - "total": 17 - }, - "outputTokens": { - "reasoning": 0, - "text": 4, - "total": 4 + ], + "model": { + "config": { + "fileIdPrefixes": [ + "file-" + ], + "provider": "openai.responses" }, - "raw": { - "input_tokens": 17, - "input_tokens_details": { - "cached_tokens": 0 - }, - "output_tokens": 4, - "output_tokens_details": { - "reasoning_tokens": 0 - } + "modelId": "gpt-4o-mini-2024-07-18", + "specificationVersion": "v3", + "supportedUrls": { + "application/pdf": [ + {} + ], + "image/*": [ + {} + ] } } } + output: { + "finishReason": "stop", + "text": "STREAM HELLO" + } metadata: { "braintrust": { "integration_name": "ai-sdk", "sdk_language": "typescript" }, - "finish_reason": { - "unified": "stop" - }, "model": "gpt-4o-mini-2024-07-18", "provider": "openai.responses" } metrics: { - "completion_reasoning_tokens": 0, - "completion_tokens": 4, - "prompt_cached_tokens": 0, - "prompt_tokens": 17, - "reasoning_tokens": 0, "time_to_first_token": 0 } + └── doStream [llm] + input: { + "includeRawChunks": false, + "maxOutputTokens": 24, + "prompt": [ + { + "content": [ + { + "text": "Reply with exactly STREAM HELLO and no punctuation.", + "type": "text" + } + ], + "role": "user" + } + ] + } + output: { + "finishReason": { + "unified": "stop" + }, + "text": "STREAM HELLO", + "toolCalls": [], + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 17, + "total": 17 + }, + "outputTokens": { + "reasoning": 0, + "text": 4, + "total": 4 + }, + "raw": { + "input_tokens": 17, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 4, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } + } + metadata: { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "stop" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + metrics: { + "completion_reasoning_tokens": 0, + "completion_tokens": 4, + "prompt_cached_tokens": 0, + "prompt_tokens": 17, + "reasoning_tokens": 0, + "time_to_first_token": 0 + } diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json index a8614ef52..11c6b6a01 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json @@ -16,9 +16,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -56,7 +53,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -141,6 +137,7 @@ } ], "finishReason": "stop", + "output": "PARIS", "providerMetadata": { "openai": { "responseId": "", @@ -149,7 +146,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -192,7 +188,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -321,9 +316,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 32, "prompt": [ { @@ -377,7 +369,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -483,6 +474,9 @@ } ], "finishReason": "stop", + "output": { + "answer": "4" + }, "providerMetadata": { "openai": { "responseId": "", @@ -491,7 +485,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -534,7 +527,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -863,9 +855,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 128, "prompt": [ { @@ -933,7 +922,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -985,20 +973,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1006,9 +983,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 128, "prompt": [ { @@ -1113,7 +1087,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -1165,57 +1138,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1223,9 +1148,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 128, "prompt": [ { @@ -1367,7 +1289,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -1419,94 +1340,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1514,9 +1350,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 128, "prompt": [ { @@ -1695,7 +1528,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -1747,131 +1579,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - { - "messages": [ - { - "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - "role": "user" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolCallId": "", - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ], - "toolCallId": "" - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], @@ -1959,7 +1669,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2155,7 +1864,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2266,7 +1974,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2414,7 +2121,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2599,7 +2305,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -2903,9 +2608,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -2948,7 +2650,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -3038,6 +2739,7 @@ } ], "finishReason": "stop", + "output": "CACHE_OK", "providerMetadata": { "openai": { "responseId": "", @@ -3046,7 +2748,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3089,7 +2790,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3201,9 +2901,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3246,7 +2943,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -3336,6 +3032,7 @@ } ], "finishReason": "stop", + "output": "CACHE_OK", "providerMetadata": { "openai": { "responseId": "", @@ -3344,7 +3041,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3387,7 +3083,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3508,9 +3203,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3566,7 +3258,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "claude-haiku-4-5-20251001" }, @@ -3653,6 +3344,7 @@ } ], "finishReason": "stop", + "output": "CACHE_OK", "providerMetadata": { "anthropic": { "cacheCreationInputTokens": 0, @@ -3676,7 +3368,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3725,7 +3416,6 @@ "rawFinishReason": "end_turn", "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -3827,9 +3517,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -3885,7 +3572,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "claude-haiku-4-5-20251001" }, @@ -3972,6 +3658,7 @@ } ], "finishReason": "stop", + "output": "CACHE_OK", "providerMetadata": { "anthropic": { "cacheCreationInputTokens": 0, @@ -3995,7 +3682,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4044,7 +3730,6 @@ "rawFinishReason": "end_turn", "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -4155,9 +3840,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -4195,7 +3877,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -4280,6 +3961,7 @@ } ], "finishReason": "stop", + "output": "DENIED", "providerMetadata": { "openai": { "responseId": "", @@ -4378,31 +4060,6 @@ }, "user": null }, - "headers": { - "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - "alt-svc": "h3=\":443\"; ma=86400", - "cf-cache-status": "DYNAMIC", - "cf-ray": "", - "connection": "keep-alive", - "content-type": "application/json", - "date": "", - "openai-organization": "braintrust-data", - "openai-processing-ms": "", - "openai-project": "", - "openai-version": "", - "server": "cloudflare", - "set-cookie": "", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-ratelimit-limit-requests": "30000", - "x-ratelimit-limit-tokens": "150000000", - "x-ratelimit-remaining-requests": "", - "x-ratelimit-remaining-tokens": "", - "x-ratelimit-reset-requests": "", - "x-ratelimit-reset-tokens": "", - "x-request-id": "" - }, "id": "", "messages": [ { @@ -4535,31 +4192,6 @@ }, "user": null }, - "headers": { - "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - "alt-svc": "h3=\":443\"; ma=86400", - "cf-cache-status": "DYNAMIC", - "cf-ray": "", - "connection": "keep-alive", - "content-type": "application/json", - "date": "", - "openai-organization": "braintrust-data", - "openai-processing-ms": "", - "openai-project": "", - "openai-version": "", - "server": "cloudflare", - "set-cookie": "", - "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "transfer-encoding": "chunked", - "x-content-type-options": "nosniff", - "x-ratelimit-limit-requests": "30000", - "x-ratelimit-limit-tokens": "150000000", - "x-ratelimit-remaining-requests": "", - "x-ratelimit-remaining-tokens": "", - "x-ratelimit-reset-requests": "", - "x-ratelimit-reset-tokens": "", - "x-request-id": "" - }, "id": "", "messages": [ { @@ -4680,9 +4312,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 32, "prompt": [ { @@ -4736,7 +4365,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -4834,7 +4462,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -5046,9 +4673,6 @@ "type": "llm", "children": [], "input": { - "headers": { - "user-agent": "ai/6.0.1" - }, "maxOutputTokens": 24, "prompt": [ { @@ -5085,7 +4709,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -5175,6 +4798,7 @@ } ], "finishReason": "stop", + "output": "HELLO", "providerMetadata": { "openai": { "responseId": "", @@ -5183,7 +4807,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { @@ -5226,7 +4849,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "messages": [ { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt index af8cceaa1..6d802cd11 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt @@ -47,6 +47,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "PARIS", │ "providerMetadata": { │ "openai": { │ "responseId": "", @@ -55,7 +56,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -98,7 +98,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -202,9 +201,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -242,7 +238,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -357,6 +352,9 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": { + │ "answer": "4" + │ }, │ "providerMetadata": { │ "openai": { │ "responseId": "", @@ -365,7 +363,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -408,7 +405,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -512,9 +508,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 32, │ "prompt": [ │ { @@ -568,7 +561,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -884,7 +876,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1080,7 +1071,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1191,7 +1181,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1339,7 +1328,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1524,7 +1512,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1811,9 +1798,6 @@ span_tree: │ } │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -1881,7 +1865,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -1929,26 +1912,12 @@ span_tree: │ │ "reasoning_tokens": 0 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -2053,7 +2022,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -2101,63 +2069,12 @@ span_tree: │ │ "reasoning_tokens": 0 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -2299,7 +2216,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -2347,100 +2263,12 @@ span_tree: │ │ "reasoning_tokens": 0 │ │ } │ ├── get_weather [tool] - │ │ input: [ - │ │ { - │ │ "location": "Paris, France" - │ │ }, - │ │ { - │ │ "messages": [ - │ │ { - │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ │ "role": "user" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolCallId": "", - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ], - │ │ "toolCallId": "" - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 128, │ │ "prompt": [ │ │ { @@ -2619,7 +2447,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -2667,131 +2494,9 @@ span_tree: │ │ "reasoning_tokens": 0 │ │ } │ └── get_weather [tool] - │ input: [ - │ { - │ "location": "Paris, France" - │ }, - │ { - │ "messages": [ - │ { - │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", - │ "role": "user" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolCallId": "", - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ } - │ ], - │ "toolCallId": "" - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── ai-sdk-openai-cache-operation │ metadata: { @@ -2840,6 +2545,7 @@ span_tree: │ │ } │ │ ], │ │ "finishReason": "stop", + │ │ "output": "CACHE_OK", │ │ "providerMetadata": { │ │ "openai": { │ │ "responseId": "", @@ -2848,7 +2554,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -2891,7 +2596,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -2995,9 +2699,6 @@ span_tree: │ │ } │ │ └── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 24, │ │ "prompt": [ │ │ { @@ -3040,7 +2741,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" @@ -3129,6 +2829,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "CACHE_OK", │ "providerMetadata": { │ "openai": { │ "responseId": "", @@ -3137,7 +2838,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3180,7 +2880,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3284,9 +2983,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -3329,7 +3025,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -3420,6 +3115,7 @@ span_tree: │ │ } │ │ ], │ │ "finishReason": "stop", + │ │ "output": "CACHE_OK", │ │ "providerMetadata": { │ │ "anthropic": { │ │ "cacheCreationInputTokens": 0, @@ -3443,7 +3139,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -3492,7 +3187,6 @@ span_tree: │ │ "rawFinishReason": "end_turn", │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "messages": [ │ │ { @@ -3586,9 +3280,6 @@ span_tree: │ │ } │ │ └── doGenerate [llm] │ │ input: { - │ │ "headers": { - │ │ "user-agent": "ai/6.0.1" - │ │ }, │ │ "maxOutputTokens": 24, │ │ "prompt": [ │ │ { @@ -3644,7 +3335,6 @@ span_tree: │ │ }, │ │ "response": { │ │ "body": "", - │ │ "headers": "", │ │ "id": "", │ │ "modelId": "claude-haiku-4-5-20251001" │ │ }, @@ -3730,6 +3420,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "CACHE_OK", │ "providerMetadata": { │ "anthropic": { │ "cacheCreationInputTokens": 0, @@ -3753,7 +3444,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3802,7 +3492,6 @@ span_tree: │ "rawFinishReason": "end_turn", │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -3896,9 +3585,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -3954,7 +3640,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, @@ -4043,6 +3728,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "DENIED", │ "providerMetadata": { │ "openai": { │ "responseId": "", @@ -4141,31 +3827,6 @@ span_tree: │ }, │ "user": null │ }, - │ "headers": { - │ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - │ "alt-svc": "h3=\":443\"; ma=86400", - │ "cf-cache-status": "DYNAMIC", - │ "cf-ray": "", - │ "connection": "keep-alive", - │ "content-type": "application/json", - │ "date": "", - │ "openai-organization": "braintrust-data", - │ "openai-processing-ms": "", - │ "openai-project": "", - │ "openai-version": "", - │ "server": "cloudflare", - │ "set-cookie": "", - │ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - │ "transfer-encoding": "chunked", - │ "x-content-type-options": "nosniff", - │ "x-ratelimit-limit-requests": "30000", - │ "x-ratelimit-limit-tokens": "150000000", - │ "x-ratelimit-remaining-requests": "", - │ "x-ratelimit-remaining-tokens": "", - │ "x-ratelimit-reset-requests": "", - │ "x-ratelimit-reset-tokens": "", - │ "x-request-id": "" - │ }, │ "id": "", │ "messages": [ │ { @@ -4298,31 +3959,6 @@ span_tree: │ }, │ "user": null │ }, - │ "headers": { - │ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", - │ "alt-svc": "h3=\":443\"; ma=86400", - │ "cf-cache-status": "DYNAMIC", - │ "cf-ray": "", - │ "connection": "keep-alive", - │ "content-type": "application/json", - │ "date": "", - │ "openai-organization": "braintrust-data", - │ "openai-processing-ms": "", - │ "openai-project": "", - │ "openai-version": "", - │ "server": "cloudflare", - │ "set-cookie": "", - │ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - │ "transfer-encoding": "chunked", - │ "x-content-type-options": "nosniff", - │ "x-ratelimit-limit-requests": "30000", - │ "x-ratelimit-limit-tokens": "150000000", - │ "x-ratelimit-remaining-requests": "", - │ "x-ratelimit-remaining-tokens": "", - │ "x-ratelimit-reset-requests": "", - │ "x-ratelimit-reset-tokens": "", - │ "x-request-id": "" - │ }, │ "id": "", │ "messages": [ │ { @@ -4426,9 +4062,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -4466,7 +4099,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -4568,7 +4200,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -4610,9 +4241,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 32, │ "prompt": [ │ { @@ -4666,7 +4294,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -4900,6 +4527,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", + │ "output": "HELLO", │ "providerMetadata": { │ "openai": { │ "responseId": "", @@ -4908,7 +4536,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -4951,7 +4578,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -5055,9 +4681,6 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { - │ "headers": { - │ "user-agent": "ai/6.0.1" - │ }, │ "maxOutputTokens": 24, │ "prompt": [ │ { @@ -5094,7 +4717,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.json index da5979c79..3555a086f 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.json @@ -86,9 +86,6 @@ } ], "input": { - "headers": { - "user-agent": "ai/7.0.0" - }, "maxOutputTokens": 24, "maxRetries": 2, "messages": [ @@ -123,7 +120,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -171,7 +167,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -357,9 +352,6 @@ } ], "input": { - "headers": { - "user-agent": "ai/7.0.0" - }, "maxOutputTokens": 32, "maxRetries": 2, "messages": [ @@ -412,7 +404,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -460,7 +451,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -672,7 +662,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -720,7 +709,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -1647,9 +1635,6 @@ } ], "input": { - "headers": { - "user-agent": "ai/7.0.0" - }, "maxOutputTokens": 128, "maxRetries": 2, "messages": [ @@ -1807,7 +1792,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -1897,7 +1881,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -2013,7 +1996,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -2129,7 +2111,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -2245,7 +2226,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -2512,7 +2492,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2560,9 +2539,6 @@ } ], "input": { - "headers": { - "user-agent": "ai/7.0.0" - }, "maxOutputTokens": 32, "maxRetries": 2, "model": { @@ -2599,7 +2575,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2677,7 +2652,6 @@ } }, "response": { - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2760,7 +2734,6 @@ } }, "response": { - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2804,12 +2777,1036 @@ "operation": "stream-object", "testRunId": "" } + }, + { + "name": "ai-sdk-workflow-agent-stream-operation", + "children": [ + { + "name": "WorkflowAgent.stream", + "type": "function", + "children": [ + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "text" + } + ], + "role": "user" + } + ] + }, + "output": { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": { + "id": "" + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 84 + }, + "inputTokens": 84, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 84, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 92 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "temperature": 0 + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + ] + }, + "metrics": { + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 84, + "tokens": 92 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolCallId": "", + "toolName": "get_weather" + }, + "metrics": { + "duration_ms": 0 + } + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": { + "id": "" + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 123 + }, + "inputTokens": 123, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 123, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 131 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "temperature": 0 + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + ] + }, + "metrics": { + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 123, + "tokens": 131 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolCallId": "", + "toolName": "get_weather" + }, + "metrics": { + "duration_ms": 0 + } + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": { + "id": "" + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 162 + }, + "inputTokens": 162, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 162, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 170 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "temperature": 0 + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + ] + }, + "metrics": { + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 162, + "tokens": 170 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolCallId": "", + "toolName": "get_weather" + }, + "metrics": { + "duration_ms": 0 + } + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": { + "id": "" + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 201 + }, + "inputTokens": 201, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 201, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 209 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "temperature": 0 + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + ] + }, + "metrics": { + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 201, + "tokens": 209 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolCallId": "", + "toolName": "get_weather" + }, + "metrics": { + "duration_ms": 0 + } + } + ], + "input": { + "messages": [ + { + "content": "Use get_weather for Paris, France, then reply with one short sentence.", + "role": "user" + } + ] + }, + "output": { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "steps": [ + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 0, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 84 + }, + "inputTokens": 84, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 84, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 92 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 1, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 123 + }, + "inputTokens": 123, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 123, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 131 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 2, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 162 + }, + "inputTokens": 162, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 162, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 170 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 3, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 201 + }, + "inputTokens": 201, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 201, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 209 + }, + "warnings": [] + } + ], + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "totalUsage": { + "inputTokens": 570, + "outputTokens": 32, + "totalTokens": 602 + }, + "usage": { + "inputTokens": 570, + "outputTokens": 32, + "totalTokens": 602 + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "maxRetries": 2, + "temperature": 0, + "toolChoice": "required" + }, + "provider": "openai.responses", + "tools": { + "get_weather": { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + } + } + } + ], + "metadata": { + "operation": "workflow-agent-stream", + "testRunId": "" + } } ], "metadata": { "aiSdkVersion": "7.0.0", "scenario": "ai-sdk-instrumentation", - "testRunId": "" + "testRunId": "", + "workflowVersion": "1.0.8" } } ] diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.txt index e75d0d1d0..cb1dca6af 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.txt @@ -3,7 +3,8 @@ span_tree: metadata: { "aiSdkVersion": "7.0.0", "scenario": "ai-sdk-instrumentation", - "testRunId": "" + "testRunId": "", + "workflowVersion": "1.0.8" } ├── ai-sdk-generate-operation │ metadata: { @@ -12,9 +13,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "headers": { - │ "user-agent": "ai/7.0.0" - │ }, │ "maxOutputTokens": 24, │ "maxRetries": 2, │ "messages": [ @@ -49,7 +47,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -97,7 +94,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -267,9 +263,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "headers": { - │ "user-agent": "ai/7.0.0" - │ }, │ "maxOutputTokens": 32, │ "maxRetries": 2, │ "messages": [ @@ -322,7 +315,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -370,7 +362,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -569,7 +560,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -617,7 +607,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -896,9 +885,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "headers": { - │ "user-agent": "ai/7.0.0" - │ }, │ "maxOutputTokens": 128, │ "maxRetries": 2, │ "messages": [ @@ -1056,7 +1042,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1146,7 +1131,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1262,7 +1246,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1378,7 +1361,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1494,7 +1476,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -2377,9 +2358,6 @@ span_tree: │ } │ └── generateObject [function] │ input: { - │ "headers": { - │ "user-agent": "ai/7.0.0" - │ }, │ "maxOutputTokens": 32, │ "maxRetries": 2, │ "model": { @@ -2416,7 +2394,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -2478,7 +2455,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -2523,151 +2499,1131 @@ span_tree: │ "prompt_tokens": 38, │ "tokens": 44 │ } - └── ai-sdk-stream-object-operation + ├── ai-sdk-stream-object-operation + │ metadata: { + │ "operation": "stream-object", + │ "testRunId": "" + │ } + │ └── streamObject [function] + │ input: { + │ "maxOutputTokens": 32, + │ "maxRetries": 2, + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ }, + │ "output": "object", + │ "prompt": "Stream JSON with {\"city\":\"Paris\"}.", + │ "schema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "city": { + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "city" + │ ], + │ "type": "object" + │ }, + │ "temperature": 0 + │ } + │ output: { + │ "finishReason": "stop", + │ "object": { + │ "city": "Paris" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "id": "", + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 38 + │ }, + │ "inputTokens": 38, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 6 + │ }, + │ "outputTokens": 6, + │ "raw": { + │ "input_tokens": 38, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 6, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 44 + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ └── doStream [llm] + │ input: { + │ "prompt": [ + │ { + │ "content": [ + │ { + │ "text": "Stream JSON with {\"city\":\"Paris\"}.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ } + │ ] + │ } + │ output: { + │ "finishReason": "stop", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "id": "", + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "text": "{\"city\":\"Paris\"}", + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 38 + │ }, + │ "inputTokens": 38, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 6 + │ }, + │ "outputTokens": 6, + │ "raw": { + │ "input_tokens": 38, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 6, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 44 + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_tokens": 6, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 38, + │ "tokens": 44 + │ } + └── ai-sdk-workflow-agent-stream-operation metadata: { - "operation": "stream-object", + "operation": "workflow-agent-stream", "testRunId": "" } - └── streamObject [function] + └── WorkflowAgent.stream [function] input: { - "maxOutputTokens": 32, - "maxRetries": 2, - "model": { - "modelId": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" - }, - "output": "object", - "prompt": "Stream JSON with {\"city\":\"Paris\"}.", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "properties": { - "city": { - "type": "string" - } - }, - "required": [ - "city" - ], - "type": "object" - }, - "temperature": 0 + "messages": [ + { + "content": "Use get_weather for Paris, France, then reply with one short sentence.", + "role": "user" + } + ] } output: { - "finishReason": "stop", - "object": { - "city": "Paris" - }, + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, + "request": { + "messages": [] + }, "response": { - "headers": "", - "id": "", + "id": "", + "messages": [], "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, - "usage": { - "inputTokenDetails": { - "cacheReadTokens": 0, - "noCacheTokens": 38 + "steps": [ + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 0, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 84 + }, + "inputTokens": 84, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 84, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 92 + }, + "warnings": [] }, - "inputTokens": 38, - "outputTokenDetails": { - "reasoningTokens": 0, - "textTokens": 6 + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 1, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 123 + }, + "inputTokens": 123, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 123, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 131 + }, + "warnings": [] }, - "outputTokens": 6, - "raw": { - "input_tokens": 38, - "input_tokens_details": { - "cached_tokens": 0 + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" }, - "output_tokens": 6, - "output_tokens_details": { - "reasoning_tokens": 0 - } + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 2, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 162 + }, + "inputTokens": 162, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 162, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 170 + }, + "warnings": [] }, - "totalTokens": 44 - }, - "warnings": [] - } - metadata: { - "braintrust": { - "integration_name": "ai-sdk", - "sdk_language": "typescript" - }, - "model": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" - } - └── doStream [llm] - input: { - "prompt": [ + { + "callId": "", + "content": [ { - "content": [ - { - "text": "Stream JSON with {\"city\":\"Paris\"}.", - "type": "text" - } - ], - "role": "user" + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" } - ] - } - output: { - "finishReason": "stop", + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, + "request": { + "messages": [] + }, "response": { - "headers": "", - "id": "", + "id": "", + "messages": [], "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, - "text": "{\"city\":\"Paris\"}", + "runtimeContext": {}, + "stepNumber": 3, + "toolsContext": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, - "noCacheTokens": 38 + "noCacheTokens": 201 }, - "inputTokens": 38, + "inputTokens": 201, "outputTokenDetails": { "reasoningTokens": 0, - "textTokens": 6 + "textTokens": 8 }, - "outputTokens": 6, + "outputTokens": 8, "raw": { - "input_tokens": 38, + "input_tokens": 201, "input_tokens_details": { "cached_tokens": 0 }, - "output_tokens": 6, + "output_tokens": 8, "output_tokens_details": { "reasoning_tokens": 0 } }, - "totalTokens": 44 + "totalTokens": 209 }, "warnings": [] } + ], + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "totalUsage": { + "inputTokens": 570, + "outputTokens": 32, + "totalTokens": 602 + }, + "usage": { + "inputTokens": 570, + "outputTokens": 32, + "totalTokens": 602 + }, + "warnings": [] + } + metadata: { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "maxRetries": 2, + "temperature": 0, + "toolChoice": "required" + }, + "provider": "openai.responses", + "tools": { + "get_weather": { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + } + } + ├── doGenerate [llm] + │ input: { + │ "messages": [ + │ { + │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "response": { + │ "id": "" + │ }, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 84 + │ }, + │ "inputTokens": 84, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 84, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 92 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "options": { + │ "maxOutputTokens": 96, + │ "temperature": 0 + │ }, + │ "provider": "openai.responses", + │ "tools": [ + │ { + │ "description": "Get the weather for a location", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "location": { + │ "description": "The city and country", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "location" + │ ], + │ "type": "object" + │ } + │ } + │ ] + │ } + │ metrics: { + │ "completion_tokens": 8, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 84, + │ "tokens": 92 + │ } + ├── get_weather [tool] + │ input: { + │ "location": "Paris, France" + │ } + │ output: { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather" + │ } + │ metrics: { + │ "duration_ms": 0 + │ } + ├── doGenerate [llm] + │ input: { + │ "messages": [ + │ { + │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "response": { + │ "id": "" + │ }, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 123 + │ }, + │ "inputTokens": 123, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 123, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 131 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "options": { + │ "maxOutputTokens": 96, + │ "temperature": 0 + │ }, + │ "provider": "openai.responses", + │ "tools": [ + │ { + │ "description": "Get the weather for a location", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "location": { + │ "description": "The city and country", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "location" + │ ], + │ "type": "object" + │ } + │ } + │ ] + │ } + │ metrics: { + │ "completion_tokens": 8, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 123, + │ "tokens": 131 + │ } + ├── get_weather [tool] + │ input: { + │ "location": "Paris, France" + │ } + │ output: { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather" + │ } + │ metrics: { + │ "duration_ms": 0 + │ } + ├── doGenerate [llm] + │ input: { + │ "messages": [ + │ { + │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "response": { + │ "id": "" + │ }, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 162 + │ }, + │ "inputTokens": 162, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 162, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 170 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "options": { + │ "maxOutputTokens": 96, + │ "temperature": 0 + │ }, + │ "provider": "openai.responses", + │ "tools": [ + │ { + │ "description": "Get the weather for a location", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "location": { + │ "description": "The city and country", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "location" + │ ], + │ "type": "object" + │ } + │ } + │ ] + │ } + │ metrics: { + │ "completion_tokens": 8, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 162, + │ "tokens": 170 + │ } + ├── get_weather [tool] + │ input: { + │ "location": "Paris, France" + │ } + │ output: { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather" + │ } + │ metrics: { + │ "duration_ms": 0 + │ } + ├── doGenerate [llm] + │ input: { + │ "messages": [ + │ { + │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "response": { + │ "id": "" + │ }, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 201 + │ }, + │ "inputTokens": 201, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 201, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 209 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "options": { + │ "maxOutputTokens": 96, + │ "temperature": 0 + │ }, + │ "provider": "openai.responses", + │ "tools": [ + │ { + │ "description": "Get the weather for a location", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "location": { + │ "description": "The city and country", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "location" + │ ], + │ "type": "object" + │ } + │ } + │ ] + │ } + │ metrics: { + │ "completion_tokens": 8, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 201, + │ "tokens": 209 + │ } + └── get_weather [tool] + input: { + "location": "Paris, France" + } + output: { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } metadata: { "braintrust": { "integration_name": "ai-sdk", "sdk_language": "typescript" }, - "model": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" + "toolCallId": "", + "toolName": "get_weather" } metrics: { - "completion_tokens": 6, - "prompt_cached_tokens": 0, - "prompt_tokens": 38, - "tokens": 44 + "duration_ms": 0 } diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.json index da5979c79..3715ea7e7 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.json @@ -86,9 +86,6 @@ } ], "input": { - "headers": { - "user-agent": "ai/7.0.0" - }, "maxOutputTokens": 24, "maxRetries": 2, "messages": [ @@ -123,7 +120,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -171,7 +167,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -357,9 +352,6 @@ } ], "input": { - "headers": { - "user-agent": "ai/7.0.0" - }, "maxOutputTokens": 32, "maxRetries": 2, "messages": [ @@ -412,7 +404,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -460,7 +451,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -672,7 +662,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -720,7 +709,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -1647,9 +1635,6 @@ } ], "input": { - "headers": { - "user-agent": "ai/7.0.0" - }, "maxOutputTokens": 128, "maxRetries": 2, "messages": [ @@ -1807,7 +1792,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -1897,7 +1881,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -2013,7 +1996,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -2129,7 +2111,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -2245,7 +2226,6 @@ } }, "response": { - "headers": "", "id": "", "messages": [ { @@ -2512,7 +2492,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2560,9 +2539,6 @@ } ], "input": { - "headers": { - "user-agent": "ai/7.0.0" - }, "maxOutputTokens": 32, "maxRetries": 2, "model": { @@ -2599,7 +2575,6 @@ }, "response": { "body": "", - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2677,7 +2652,6 @@ } }, "response": { - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2760,7 +2734,6 @@ } }, "response": { - "headers": "", "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" @@ -2804,12 +2777,1231 @@ "operation": "stream-object", "testRunId": "" } + }, + { + "name": "ai-sdk-workflow-agent-stream-operation", + "children": [ + { + "name": "WorkflowAgent.stream", + "type": "function", + "children": [ + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "text" + } + ], + "role": "user" + } + ] + }, + "output": { + "finishReason": { + "unified": "tool-calls" + }, + "text": "", + "toolCalls": [ + { + "input": "{\"location\":\"Paris, France\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 84, + "total": 84 + }, + "outputTokens": { + "reasoning": 0, + "text": 8, + "total": 8 + }, + "raw": { + "input_tokens": 84, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "includeRawChunks": false, + "maxOutputTokens": 96, + "temperature": 0, + "toolChoice": { + "type": "required" + } + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather", + "type": "function" + } + ] + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 84, + "reasoning_tokens": 0 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "finishReason": { + "unified": "tool-calls" + }, + "text": "", + "toolCalls": [ + { + "input": "{\"location\":\"Paris, France\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 123, + "total": 123 + }, + "outputTokens": { + "reasoning": 0, + "text": 8, + "total": 8 + }, + "raw": { + "input_tokens": 123, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "includeRawChunks": false, + "maxOutputTokens": 96, + "temperature": 0, + "toolChoice": { + "type": "required" + } + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather", + "type": "function" + } + ] + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 123, + "reasoning_tokens": 0 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "finishReason": { + "unified": "tool-calls" + }, + "text": "", + "toolCalls": [ + { + "input": "{\"location\":\"Paris, France\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 162, + "total": 162 + }, + "outputTokens": { + "reasoning": 0, + "text": 8, + "total": 8 + }, + "raw": { + "input_tokens": 162, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "includeRawChunks": false, + "maxOutputTokens": 96, + "temperature": 0, + "toolChoice": { + "type": "required" + } + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather", + "type": "function" + } + ] + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 162, + "reasoning_tokens": 0 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "finishReason": { + "unified": "tool-calls" + }, + "text": "", + "toolCalls": [ + { + "input": "{\"location\":\"Paris, France\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 201, + "total": 201 + }, + "outputTokens": { + "reasoning": 0, + "text": 8, + "total": 8 + }, + "raw": { + "input_tokens": 201, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "includeRawChunks": false, + "maxOutputTokens": 96, + "temperature": 0, + "toolChoice": { + "type": "required" + } + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather", + "type": "function" + } + ] + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 201, + "reasoning_tokens": 0 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + } + ], + "input": { + "messages": [ + { + "content": "Use get_weather for Paris, France, then reply with one short sentence.", + "role": "user" + } + ] + }, + "output": { + "messages": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "steps": [ + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "reasoning": [], + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 0, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 84 + }, + "inputTokens": 84, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 84, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 92 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "reasoning": [], + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 1, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 123 + }, + "inputTokens": 123, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 123, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 131 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "reasoning": [], + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 2, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 162 + }, + "inputTokens": 162, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 162, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 170 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "reasoning": [], + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 3, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 201 + }, + "inputTokens": 201, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 201, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 209 + }, + "warnings": [] + } + ], + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [ + { + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "stopWhen": "[Function]", + "temperature": 0, + "toolChoice": "required" + }, + "provider": "openai.responses", + "tools": { + "get_weather": { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + } + } + } + ], + "metadata": { + "operation": "workflow-agent-stream", + "testRunId": "" + } } ], "metadata": { "aiSdkVersion": "7.0.0", "scenario": "ai-sdk-instrumentation", - "testRunId": "" + "testRunId": "", + "workflowVersion": "1.0.8" } } ] diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.txt index e75d0d1d0..bc7d2a443 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.txt @@ -3,7 +3,8 @@ span_tree: metadata: { "aiSdkVersion": "7.0.0", "scenario": "ai-sdk-instrumentation", - "testRunId": "" + "testRunId": "", + "workflowVersion": "1.0.8" } ├── ai-sdk-generate-operation │ metadata: { @@ -12,9 +13,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "headers": { - │ "user-agent": "ai/7.0.0" - │ }, │ "maxOutputTokens": 24, │ "maxRetries": 2, │ "messages": [ @@ -49,7 +47,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -97,7 +94,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -267,9 +263,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "headers": { - │ "user-agent": "ai/7.0.0" - │ }, │ "maxOutputTokens": 32, │ "maxRetries": 2, │ "messages": [ @@ -322,7 +315,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -370,7 +362,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -569,7 +560,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -617,7 +607,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -896,9 +885,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "headers": { - │ "user-agent": "ai/7.0.0" - │ }, │ "maxOutputTokens": 128, │ "maxRetries": 2, │ "messages": [ @@ -1056,7 +1042,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1146,7 +1131,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1262,7 +1246,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1378,7 +1361,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -1494,7 +1476,6 @@ span_tree: │ } │ }, │ "response": { - │ "headers": "", │ "id": "", │ "messages": [ │ { @@ -2377,9 +2358,6 @@ span_tree: │ } │ └── generateObject [function] │ input: { - │ "headers": { - │ "user-agent": "ai/7.0.0" - │ }, │ "maxOutputTokens": 32, │ "maxRetries": 2, │ "model": { @@ -2416,7 +2394,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -2478,7 +2455,6 @@ span_tree: │ }, │ "response": { │ "body": "", - │ "headers": "", │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" @@ -2523,151 +2499,1326 @@ span_tree: │ "prompt_tokens": 38, │ "tokens": 44 │ } - └── ai-sdk-stream-object-operation + ├── ai-sdk-stream-object-operation + │ metadata: { + │ "operation": "stream-object", + │ "testRunId": "" + │ } + │ └── streamObject [function] + │ input: { + │ "maxOutputTokens": 32, + │ "maxRetries": 2, + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ }, + │ "output": "object", + │ "prompt": "Stream JSON with {\"city\":\"Paris\"}.", + │ "schema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "city": { + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "city" + │ ], + │ "type": "object" + │ }, + │ "temperature": 0 + │ } + │ output: { + │ "finishReason": "stop", + │ "object": { + │ "city": "Paris" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "id": "", + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 38 + │ }, + │ "inputTokens": 38, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 6 + │ }, + │ "outputTokens": 6, + │ "raw": { + │ "input_tokens": 38, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 6, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 44 + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ └── doStream [llm] + │ input: { + │ "prompt": [ + │ { + │ "content": [ + │ { + │ "text": "Stream JSON with {\"city\":\"Paris\"}.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ } + │ ] + │ } + │ output: { + │ "finishReason": "stop", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "id": "", + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "text": "{\"city\":\"Paris\"}", + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 38 + │ }, + │ "inputTokens": 38, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 6 + │ }, + │ "outputTokens": 6, + │ "raw": { + │ "input_tokens": 38, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 6, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 44 + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_tokens": 6, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 38, + │ "tokens": 44 + │ } + └── ai-sdk-workflow-agent-stream-operation metadata: { - "operation": "stream-object", + "operation": "workflow-agent-stream", "testRunId": "" } - └── streamObject [function] + └── WorkflowAgent.stream [function] input: { - "maxOutputTokens": 32, - "maxRetries": 2, - "model": { - "modelId": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" - }, - "output": "object", - "prompt": "Stream JSON with {\"city\":\"Paris\"}.", - "schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "properties": { - "city": { - "type": "string" - } - }, - "required": [ - "city" - ], - "type": "object" - }, - "temperature": 0 + "messages": [ + { + "content": "Use get_weather for Paris, France, then reply with one short sentence.", + "role": "user" + } + ] } output: { - "finishReason": "stop", - "object": { - "city": "Paris" - }, - "providerMetadata": { - "openai": { - "responseId": "", - "serviceTier": "default" - } - }, - "response": { - "headers": "", - "id": "", - "modelId": "gpt-4o-mini-2024-07-18", - "timestamp": "" - }, - "usage": { - "inputTokenDetails": { - "cacheReadTokens": 0, - "noCacheTokens": 38 + "messages": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" }, - "inputTokens": 38, - "outputTokenDetails": { - "reasoningTokens": 0, - "textTokens": 6 + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "text" + } + ], + "role": "user" }, - "outputTokens": 6, - "raw": { - "input_tokens": 38, - "input_tokens_details": { - "cached_tokens": 0 - }, - "output_tokens": 6, - "output_tokens_details": { - "reasoning_tokens": 0 - } + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" }, - "totalTokens": 44 - }, - "warnings": [] - } - metadata: { - "braintrust": { - "integration_name": "ai-sdk", - "sdk_language": "typescript" - }, - "model": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" - } - └── doStream [llm] - input: { - "prompt": [ + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ { - "content": [ - { - "text": "Stream JSON with {\"city\":\"Paris\"}.", - "type": "text" + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 } - ], - "role": "user" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" } - ] + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" } - output: { - "finishReason": "stop", + ], + "steps": [ + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "reasoning": [], + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 0, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 84 + }, + "inputTokens": 84, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 84, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 92 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "reasoning": [], + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 1, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 123 + }, + "inputTokens": 123, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 123, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 131 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "reasoning": [], + "request": { + "messages": [] + }, + "response": { + "id": "", + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 2, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 162 + }, + "inputTokens": 162, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 162, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 170 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, + "reasoning": [], + "request": { + "messages": [] + }, "response": { - "headers": "", - "id": "", + "id": "", + "messages": [], "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, - "text": "{\"city\":\"Paris\"}", + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 3, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, - "noCacheTokens": 38 + "noCacheTokens": 201 }, - "inputTokens": 38, + "inputTokens": 201, "outputTokenDetails": { "reasoningTokens": 0, - "textTokens": 6 + "textTokens": 8 }, - "outputTokens": 6, + "outputTokens": 8, "raw": { - "input_tokens": 38, + "input_tokens": 201, "input_tokens_details": { "cached_tokens": 0 }, - "output_tokens": 6, + "output_tokens": 8, "output_tokens_details": { "reasoning_tokens": 0 } }, - "totalTokens": 44 + "totalTokens": 209 }, "warnings": [] } - metadata: { - "braintrust": { - "integration_name": "ai-sdk", - "sdk_language": "typescript" + ], + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [ + { + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 }, - "model": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" + "toolCallId": "", + "toolName": "get_weather", + "type": "tool-result" } - metrics: { - "completion_tokens": 6, - "prompt_cached_tokens": 0, - "prompt_tokens": 38, - "tokens": 44 + ] + } + metadata: { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "stopWhen": "[Function]", + "temperature": 0, + "toolChoice": "required" + }, + "provider": "openai.responses", + "tools": { + "get_weather": { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + } + } + ├── doStream [llm] + │ input: { + │ "messages": [ + │ { + │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ } + │ ] + │ } + │ output: { + │ "finishReason": { + │ "unified": "tool-calls" + │ }, + │ "text": "", + │ "toolCalls": [ + │ { + │ "input": "{\"location\":\"Paris, France\"}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "usage": { + │ "inputTokens": { + │ "cacheRead": 0, + │ "noCache": 84, + │ "total": 84 + │ }, + │ "outputTokens": { + │ "reasoning": 0, + │ "text": 8, + │ "total": 8 + │ }, + │ "raw": { + │ "input_tokens": 84, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ } + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "finish_reason": { + │ "unified": "tool-calls" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "options": { + │ "includeRawChunks": false, + │ "maxOutputTokens": 96, + │ "temperature": 0, + │ "toolChoice": { + │ "type": "required" + │ } + │ }, + │ "provider": "openai.responses", + │ "tools": [ + │ { + │ "description": "Get the weather for a location", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "location": { + │ "description": "The city and country", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "location" + │ ], + │ "type": "object" + │ }, + │ "name": "get_weather", + │ "type": "function" + │ } + │ ] + │ } + │ metrics: { + │ "completion_reasoning_tokens": 0, + │ "completion_tokens": 8, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 84, + │ "reasoning_tokens": 0 + │ } + ├── get_weather [tool] + │ input: { + │ "location": "Paris, France" + │ } + │ output: { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + ├── doStream [llm] + │ input: { + │ "messages": [ + │ { + │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ] + │ } + │ output: { + │ "finishReason": { + │ "unified": "tool-calls" + │ }, + │ "text": "", + │ "toolCalls": [ + │ { + │ "input": "{\"location\":\"Paris, France\"}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "usage": { + │ "inputTokens": { + │ "cacheRead": 0, + │ "noCache": 123, + │ "total": 123 + │ }, + │ "outputTokens": { + │ "reasoning": 0, + │ "text": 8, + │ "total": 8 + │ }, + │ "raw": { + │ "input_tokens": 123, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ } + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "finish_reason": { + │ "unified": "tool-calls" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "options": { + │ "includeRawChunks": false, + │ "maxOutputTokens": 96, + │ "temperature": 0, + │ "toolChoice": { + │ "type": "required" + │ } + │ }, + │ "provider": "openai.responses", + │ "tools": [ + │ { + │ "description": "Get the weather for a location", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "location": { + │ "description": "The city and country", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "location" + │ ], + │ "type": "object" + │ }, + │ "name": "get_weather", + │ "type": "function" + │ } + │ ] + │ } + │ metrics: { + │ "completion_reasoning_tokens": 0, + │ "completion_tokens": 8, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 123, + │ "reasoning_tokens": 0 + │ } + ├── get_weather [tool] + │ input: { + │ "location": "Paris, France" + │ } + │ output: { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + ├── doStream [llm] + │ input: { + │ "messages": [ + │ { + │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ] + │ } + │ output: { + │ "finishReason": { + │ "unified": "tool-calls" + │ }, + │ "text": "", + │ "toolCalls": [ + │ { + │ "input": "{\"location\":\"Paris, France\"}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "usage": { + │ "inputTokens": { + │ "cacheRead": 0, + │ "noCache": 162, + │ "total": 162 + │ }, + │ "outputTokens": { + │ "reasoning": 0, + │ "text": 8, + │ "total": 8 + │ }, + │ "raw": { + │ "input_tokens": 162, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ } + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "finish_reason": { + │ "unified": "tool-calls" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "options": { + │ "includeRawChunks": false, + │ "maxOutputTokens": 96, + │ "temperature": 0, + │ "toolChoice": { + │ "type": "required" + │ } + │ }, + │ "provider": "openai.responses", + │ "tools": [ + │ { + │ "description": "Get the weather for a location", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "location": { + │ "description": "The city and country", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "location" + │ ], + │ "type": "object" + │ }, + │ "name": "get_weather", + │ "type": "function" + │ } + │ ] + │ } + │ metrics: { + │ "completion_reasoning_tokens": 0, + │ "completion_tokens": 8, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 162, + │ "reasoning_tokens": 0 + │ } + ├── get_weather [tool] + │ input: { + │ "location": "Paris, France" + │ } + │ output: { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + ├── doStream [llm] + │ input: { + │ "messages": [ + │ { + │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ] + │ } + │ output: { + │ "finishReason": { + │ "unified": "tool-calls" + │ }, + │ "text": "", + │ "toolCalls": [ + │ { + │ "input": "{\"location\":\"Paris, France\"}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolCallId": "", + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "usage": { + │ "inputTokens": { + │ "cacheRead": 0, + │ "noCache": 201, + │ "total": 201 + │ }, + │ "outputTokens": { + │ "reasoning": 0, + │ "text": 8, + │ "total": 8 + │ }, + │ "raw": { + │ "input_tokens": 201, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ } + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "finish_reason": { + │ "unified": "tool-calls" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "options": { + │ "includeRawChunks": false, + │ "maxOutputTokens": 96, + │ "temperature": 0, + │ "toolChoice": { + │ "type": "required" + │ } + │ }, + │ "provider": "openai.responses", + │ "tools": [ + │ { + │ "description": "Get the weather for a location", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "location": { + │ "description": "The city and country", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "location" + │ ], + │ "type": "object" + │ }, + │ "name": "get_weather", + │ "type": "function" + │ } + │ ] + │ } + │ metrics: { + │ "completion_reasoning_tokens": 0, + │ "completion_tokens": 8, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 201, + │ "reasoning_tokens": 0 + │ } + └── get_weather [tool] + input: { + "location": "Paris, France" + } + output: { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 } diff --git a/e2e/scenarios/ai-sdk-instrumentation/assertions.ts b/e2e/scenarios/ai-sdk-instrumentation/assertions.ts index 1f464db53..6d5064b7a 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/assertions.ts +++ b/e2e/scenarios/ai-sdk-instrumentation/assertions.ts @@ -184,6 +184,30 @@ function findModelChildren( }); } +function findModelDescendants( + capturedEvents: CapturedLogEvent[], + parentId: string | undefined, +) { + if (!parentId) { + return []; + } + + const descendantIds = new Set([parentId]); + for (const event of capturedEvents) { + if (event.span.parentIds.some((id) => descendantIds.has(id))) { + descendantIds.add(event.span.id); + } + } + + return capturedEvents.filter((event) => { + const name = event.span.name ?? ""; + return ( + event.span.parentIds.some((id) => descendantIds.has(id)) && + (name === "doGenerate" || name === "doStream") + ); + }); +} + function findParentSpan( events: CapturedLogEvent[], name: string, @@ -342,7 +366,7 @@ function findAgentGenerateTrace( `${agentSpanName}.generate`, operation?.span.id, ); - const modelChildren = findModelChildren(events, parent?.span.id); + const modelChildren = findModelDescendants(events, parent?.span.id); return { latestChild: latestEvent(modelChildren), @@ -362,7 +386,7 @@ function findAgentStreamTrace( `${agentSpanName}.stream`, operation?.span.id, ); - const modelChildren = findModelChildren(events, parent?.span.id); + const modelChildren = findModelDescendants(events, parent?.span.id); return { latestChild: latestEvent(modelChildren), @@ -788,6 +812,7 @@ export function defineAISDKInstrumentationAssertions(options: { supportsRerank: boolean; supportsStreamObject: boolean; supportsToolExecution: boolean; + supportsWorkflowAgent?: boolean; testFileUrl: string; timeoutMs: number; }): void { @@ -1227,6 +1252,42 @@ export function defineAISDKInstrumentationAssertions(options: { } } + if (options.supportsWorkflowAgent) { + test("captures trace for WorkflowAgent.stream()", testConfig, () => { + const root = findLatestSpan(events, ROOT_NAME); + const trace = findWorkflowAgentTrace(events); + + expectOperationParentedByRoot(trace.operation, root); + expect(operationName(trace.operation)).toBe("workflow-agent-stream"); + expect(findAllSpans(events, "WorkflowAgent.stream")).toHaveLength(1); + expect(trace.workflowSpans).toHaveLength(1); + expectAISDKParentSpan(trace.parent); + expect(hasPromptLikeInput(trace.parent?.input)).toBe(true); + expect( + hasSemanticOutput(trace.parent?.output, [ + "messages", + "steps", + "text", + "toolCalls", + "toolResults", + ]), + ).toBe(true); + expect(trace.modelChildren.length).toBeGreaterThanOrEqual(1); + trace.modelChildren.forEach(expectAISDKModelChildSpan); + expect(trace.toolSpans.length).toBeGreaterThanOrEqual(1); + expect(trace.toolSpans[0]?.input).toMatchObject({ + location: expect.any(String), + }); + expect(trace.toolSpans[0]?.output).toBeDefined(); + expect(collectToolCallNames(trace.parent?.output)).toContain( + "get_weather", + ); + expect(collectToolResultNames(trace.parent?.output)).toContain( + "get_weather", + ); + }); + } + if (options.supportsDenyOutputOverrideScenario) { test( "captures denyOutputPaths override on instrumentation events", @@ -1259,3 +1320,26 @@ export function defineAISDKInstrumentationAssertions(options: { }); }); } + +function findWorkflowAgentTrace(events: CapturedLogEvent[]) { + const operation = findLatestSpan( + events, + "ai-sdk-workflow-agent-stream-operation", + ); + const workflowSpans = findChildSpans( + events, + "WorkflowAgent.stream", + operation?.span.id, + ); + const parent = latestEvent(workflowSpans); + const modelChildren = findModelChildren(events, parent?.span.id); + const toolSpans = findChildSpans(events, "get_weather", parent?.span.id); + + return { + modelChildren, + operation, + parent, + toolSpans, + workflowSpans, + }; +} diff --git a/e2e/scenarios/ai-sdk-instrumentation/package.json b/e2e/scenarios/ai-sdk-instrumentation/package.json index b5da44c4c..7a35bfbe0 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/package.json +++ b/e2e/scenarios/ai-sdk-instrumentation/package.json @@ -13,6 +13,8 @@ "ai-sdk-openai-v7": "@ai-sdk/openai@4.0.0-beta.44", "ai-sdk-cohere-v5": "@ai-sdk/cohere@2", "ai-sdk-cohere-v6": "@ai-sdk/cohere@3", + "ai-sdk-workflow-v1": "@ai-sdk/workflow@1", + "ai": "7.0.8", "ai-sdk-v3": "ai@3", "ai-sdk-v4": "ai@4", "ai-sdk-v5": "ai@5", @@ -31,6 +33,8 @@ "ai-sdk-openai-v7": "npm:@ai-sdk/openai@4.0.0-beta.44", "ai-sdk-cohere-v5": "npm:@ai-sdk/cohere@2.0.7", "ai-sdk-cohere-v6": "npm:@ai-sdk/cohere@3.0.7", + "ai-sdk-workflow-v1": "npm:@ai-sdk/workflow@1.0.8", + "ai": "7.0.8", "ai-sdk-v3": "npm:ai@3.4.33", "ai-sdk-v4": "npm:ai@4.3.19", "ai-sdk-v5": "npm:ai@5.0.82", diff --git a/e2e/scenarios/ai-sdk-instrumentation/pnpm-lock.yaml b/e2e/scenarios/ai-sdk-instrumentation/pnpm-lock.yaml index 4d7e89b67..437fdb392 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/pnpm-lock.yaml +++ b/e2e/scenarios/ai-sdk-instrumentation/pnpm-lock.yaml @@ -13,6 +13,9 @@ importers: .: dependencies: + ai: + specifier: 7.0.8 + version: 7.0.8(zod@3.25.76) ai-sdk-anthropic-v5: specifier: npm:@ai-sdk/anthropic@2.0.74 version: '@ai-sdk/anthropic@2.0.74(zod@3.25.76)' @@ -55,6 +58,9 @@ importers: ai-sdk-v7: specifier: npm:ai@7.0.0 version: ai@7.0.0(zod@3.25.76) + ai-sdk-workflow-v1: + specifier: npm:@ai-sdk/workflow@1.0.8 + version: '@ai-sdk/workflow@1.0.8(zod@3.25.76)' zod: specifier: 3.25.76 version: 3.25.76 @@ -103,6 +109,12 @@ packages: peerDependencies: zod: ^3.25.76 || ^4.1.8 + '@ai-sdk/gateway@4.0.6': + resolution: {integrity: sha512-8GjssUxXeTd8tst2fYXNOFbtNNZFv3sG7aq7wKnQYrU2eB3JFR7np6o4F3Snp/fy/rJZSeH28LvjSWq5wkdL8Q==} + engines: {node: '>=22'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + '@ai-sdk/openai@0.0.62': resolution: {integrity: sha512-qNQmTgZXGS3xyd6XsDGEMLWV3Ag3uAVPJxHVkZLDZ7Dubmgs3Mp8iupkwZ7JhD7TIBx8yifyyBuE1dnE70v8Ig==} engines: {node: '>=18'} @@ -211,6 +223,12 @@ packages: peerDependencies: zod: ^3.25.76 || ^4.1.8 + '@ai-sdk/provider-utils@5.0.2': + resolution: {integrity: sha512-EcmdjJb7yggsZPCbS3MFBpvAUnKaPW+QvanU5GzF00XCq0bqqAmvJ3MN19ejlmOETbW8sJNiq6qam48wTcbUNw==} + engines: {node: '>=22'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + '@ai-sdk/provider@0.0.23': resolution: {integrity: sha512-oAc49O5+xypVrKM7EUU5P/Y4DUL4JZUWVxhejoAVOTOl3WZUEWsMbP3QZR+TrimQIsS0WR/n9UuF6U0jPdp0tQ==} engines: {node: '>=18'} @@ -255,6 +273,10 @@ packages: resolution: {integrity: sha512-SMijtjVHs38n0dMkTcNuGrnStiF76OhAqS0R+ZX4iXUnuPPyTxQoVcF8Xuf2AoBB5rqndTId5FVT05bgqD5KsA==} engines: {node: '>=18'} + '@ai-sdk/provider@4.0.1': + resolution: {integrity: sha512-6p3C/vGqVIjcptBu1DnVd/BZJ2wWmV9TUv9192vT6ZvT9KNED8EwRTqyqFpoQZKgSbMDSvBSq3dqR524Nt/Crw==} + engines: {node: '>=22'} + '@ai-sdk/react@0.0.70': resolution: {integrity: sha512-GnwbtjW4/4z7MleLiW+TOZC2M29eCg1tOUpuEiYFMmFNZK8mkrqM0PFZMo6UsYeUYMWqEOOcPOU9OQVJMJh7IQ==} engines: {node: '>=18'} @@ -319,6 +341,12 @@ packages: vue: optional: true + '@ai-sdk/workflow@1.0.8': + resolution: {integrity: sha512-cCRvGNq3PORnsnE6DsWg8EltWCyC/Wu3QHOGRpN1pgtNrkeX+WbRZ6IX4JC6b7ibFC4hJUNzEunM+1yPkJ16kQ==} + engines: {node: '>=22'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + '@babel/helper-string-parser@7.29.7': resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} engines: {node: '>=6.9.0'} @@ -471,6 +499,15 @@ packages: peerDependencies: zod: ^3.25.76 || ^4.1.8 + ai@7.0.8: + resolution: {integrity: sha512-vTEKl6fDBZ2IxBXTRaZOajf9W2Ev57Ju8iKtUvqlmDk8Z9BrEP4c22SWJsg1RcWHSFmJMSBa/s5dlUBHUq3YwA==} + engines: {node: '>=22'} + peerDependencies: + zod: ^3.25.76 || ^4.1.8 + + ajv@8.20.0: + resolution: {integrity: sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==} + aria-query@5.3.1: resolution: {integrity: sha512-Z/ZeOgVl7bcSYZ/u/rh0fOpvEpq//LZmdbkXyc7syVzjPAhfOa9ebsdTSjEBDU4vs5nC98Kfduj1uFo0qyET3g==} engines: {node: '>= 0.4'} @@ -526,9 +563,18 @@ packages: resolution: {integrity: sha512-70QWGkr4snxr0OXLRWsFLeRBIRPuQOvt4s8QYjmUlmlkyTZkRqS7EDVRZtzU3TiyDbXSzaOeF0XUKy8PchzukQ==} engines: {node: '>=18.0.0'} + fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + + fast-uri@3.1.3: + resolution: {integrity: sha512-i70LwGWUduXqzicKXWshooq+sWL1K3WUU5rKZNG/0i3a1OSoX3HqhH5WbWwTmqWfor4urUakGPiRQcleRZTwOg==} + is-reference@3.0.3: resolution: {integrity: sha512-ixkJoqQvAP88E6wLydLGGqCJsrFUnqoH6HnaczB8XmDH1oaWU+xxdptvikTgaEhtZ53Ky6YXiBuUI2WXLMCwjw==} + json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + json-schema@0.4.0: resolution: {integrity: sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==} @@ -564,6 +610,10 @@ packages: resolution: {integrity: sha512-sfWGGfavi0xr8Pg0sVsyHMAOziVYKgPLNrS7ig+ivMNb3wbCBw3KxtflsGBAwD3gYQlE/AEZsTLgToRrSCjb0Q==} engines: {node: '>=0.10.0'} + require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + secure-json-parse@2.7.0: resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} @@ -668,6 +718,13 @@ snapshots: '@vercel/oidc': 3.2.0 zod: 3.25.76 + '@ai-sdk/gateway@4.0.6(zod@3.25.76)': + dependencies: + '@ai-sdk/provider': 4.0.1 + '@ai-sdk/provider-utils': 5.0.2(zod@3.25.76) + '@vercel/oidc': 3.2.0 + zod: 3.25.76 + '@ai-sdk/openai@0.0.62(zod@3.25.76)': dependencies: '@ai-sdk/provider': 0.0.23 @@ -788,6 +845,14 @@ snapshots: eventsource-parser: 3.0.8 zod: 3.25.76 + '@ai-sdk/provider-utils@5.0.2(zod@3.25.76)': + dependencies: + '@ai-sdk/provider': 4.0.1 + '@standard-schema/spec': 1.1.0 + '@workflow/serde': 4.1.0 + eventsource-parser: 3.0.8 + zod: 3.25.76 + '@ai-sdk/provider@0.0.23': dependencies: json-schema: 0.4.0 @@ -832,6 +897,10 @@ snapshots: dependencies: json-schema: 0.4.0 + '@ai-sdk/provider@4.0.1': + dependencies: + json-schema: 0.4.0 + '@ai-sdk/react@0.0.70(react@19.2.6)(zod@3.25.76)': dependencies: '@ai-sdk/provider-utils': 1.0.22(zod@3.25.76) @@ -896,6 +965,14 @@ snapshots: transitivePeerDependencies: - zod + '@ai-sdk/workflow@1.0.8(zod@3.25.76)': + dependencies: + '@ai-sdk/provider': 4.0.1 + '@ai-sdk/provider-utils': 5.0.2(zod@3.25.76) + ai: 7.0.8(zod@3.25.76) + ajv: 8.20.0 + zod: 3.25.76 + '@babel/helper-string-parser@7.29.7': {} '@babel/helper-validator-identifier@7.29.7': {} @@ -1065,6 +1142,20 @@ snapshots: '@ai-sdk/provider-utils': 5.0.0(zod@3.25.76) zod: 3.25.76 + ai@7.0.8(zod@3.25.76): + dependencies: + '@ai-sdk/gateway': 4.0.6(zod@3.25.76) + '@ai-sdk/provider': 4.0.1 + '@ai-sdk/provider-utils': 5.0.2(zod@3.25.76) + zod: 3.25.76 + + ajv@8.20.0: + dependencies: + fast-deep-equal: 3.1.3 + fast-uri: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + aria-query@5.3.1: {} axobject-query@4.1.0: {} @@ -1095,10 +1186,16 @@ snapshots: eventsource-parser@3.0.8: {} + fast-deep-equal@3.1.3: {} + + fast-uri@3.1.3: {} + is-reference@3.0.3: dependencies: '@types/estree': 1.0.9 + json-schema-traverse@1.0.0: {} + json-schema@0.4.0: {} jsondiffpatch@0.6.0: @@ -1127,6 +1224,8 @@ snapshots: react@19.2.6: {} + require-from-string@2.0.2: {} + secure-json-parse@2.7.0: {} source-map-js@1.2.1: {} diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7-explicit.mjs b/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7-explicit.mjs new file mode 100644 index 000000000..6ee046dd4 --- /dev/null +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7-explicit.mjs @@ -0,0 +1,38 @@ +import { createOpenAI, openai } from "ai-sdk-openai-v7"; +import * as workflowAI from "ai"; +import * as ai from "ai-sdk-v7"; +import * as workflow from "ai-sdk-workflow-v1"; +import { braintrustAISDKTelemetry, wrapAISDK } from "braintrust"; +import { + getInstalledPackageVersion, + runMain, +} from "../../helpers/provider-runtime.mjs"; +import { runAutoAISDKInstrumentation } from "./scenario.impl.mjs"; + +ai.registerTelemetry(braintrustAISDKTelemetry()); + +runMain(async () => + runAutoAISDKInstrumentation({ + ai, + createOpenAI, + maxTokensKey: "maxOutputTokens", + openai, + sdkVersion: await getInstalledPackageVersion(import.meta.url, "ai-sdk-v7"), + supportsDenyOutputOverrideScenario: false, + supportsEmbedMany: true, + supportsGenerateObject: true, + supportsOpenAICacheScenario: false, + supportsOutputObjectScenario: true, + supportsProviderCacheAssertions: false, + supportsRerank: false, + supportsStreamObject: true, + supportsToolExecution: true, + workflow: wrapAISDK(workflow), + workflowAI, + workflowVersion: await getInstalledPackageVersion( + import.meta.url, + "ai-sdk-workflow-v1", + ), + toolSchemaKey: "inputSchema", + }), +); diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7.mjs b/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7.mjs index 8b228015f..0f2a4aefa 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7.mjs +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7.mjs @@ -1,5 +1,7 @@ import { createOpenAI, openai } from "ai-sdk-openai-v7"; +import * as workflowAI from "ai"; import * as ai from "ai-sdk-v7"; +import * as workflow from "ai-sdk-workflow-v1"; import { getInstalledPackageVersion } from "../../helpers/provider-runtime.mjs"; import { runAutoAISDKInstrumentationOrExit } from "./scenario.impl.mjs"; @@ -18,5 +20,11 @@ runAutoAISDKInstrumentationOrExit({ supportsRerank: false, supportsStreamObject: true, supportsToolExecution: true, + workflow, + workflowAI, + workflowVersion: await getInstalledPackageVersion( + import.meta.url, + "ai-sdk-workflow-v1", + ), toolSchemaKey: "inputSchema", }); diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs b/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs index f84ef8c03..681a25124 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs @@ -98,8 +98,9 @@ export const AI_SDK_SCENARIO_SPECS = [ supportsRerank: false, supportsStreamObject: true, supportsToolExecution: true, + supportsWorkflowAgent: true, toolSchemaKey: "inputSchema", - wrapperEntry: "scenario.ai-sdk-v7.ts", + wrapperEntry: "scenario.ai-sdk-v7-explicit.mjs", wrapperSnapshotSuffix: "explicit", wrapperTestName: "explicit telemetry", }, @@ -198,6 +199,51 @@ function createWeatherTool(ai, schemaKey) { }); } +async function runWorkflowAgentStreamOperation({ + ai, + instrumentedWorkflow, + openaiModel, +}) { + await runOperation( + "ai-sdk-workflow-agent-stream-operation", + "workflow-agent-stream", + async () => { + const agent = new instrumentedWorkflow.WorkflowAgent({ + instructions: + "You are a terse weather assistant. Use tools before answering.", + model: openaiModel, + tools: { + get_weather: ai.tool({ + description: "Get the weather for a location", + inputSchema: z.object({ + location: z.string().describe("The city and country"), + }), + execute: async ({ location }) => ({ + condition: "sunny", + location, + temperatureC: 22, + }), + }), + }, + }); + + await agent.stream({ + messages: [ + { + role: "user", + content: + "Use get_weather for Paris, France, then reply with one short sentence.", + }, + ], + stopWhen: ai.stepCountIs(4), + temperature: 0, + toolChoice: "required", + maxOutputTokens: 96, + }); + }, + ); +} + async function runAISDKInstrumentationScenario( options, { decorateAI, flushCount, flushDelayMs } = {}, @@ -532,12 +578,23 @@ async function runAISDKInstrumentationScenario( }, ); } + + if (options.workflow) { + await runWorkflowAgentStreamOperation({ + ai: options.workflowAI ?? options.ai, + instrumentedWorkflow: options.workflow, + openaiModel, + }); + } }, flushCount, flushDelayMs, metadata: { aiSdkVersion: options.sdkVersion, scenario: SCENARIO_NAME, + ...(options.workflowVersion + ? { workflowVersion: options.workflowVersion } + : {}), }, projectNameBase: "e2e-ai-sdk-instrumentation", rootName: ROOT_NAME, diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.test.ts b/e2e/scenarios/ai-sdk-instrumentation/scenario.test.ts index ceb03ac14..c5d4e08e7 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.test.ts +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.test.ts @@ -67,6 +67,7 @@ describe.concurrent("variants", () => { supportsRerank: scenario.supportsRerank !== false, supportsStreamObject: scenario.supportsStreamObject, supportsToolExecution: scenario.supportsToolExecution, + supportsWorkflowAgent: scenario.supportsWorkflowAgent, sdkMajorVersion, testFileUrl: import.meta.url, timeoutMs: AI_SDK_SCENARIO_TIMEOUT_MS, @@ -98,6 +99,7 @@ describe.concurrent("variants", () => { supportsRerank: scenario.supportsRerank !== false, supportsStreamObject: scenario.supportsStreamObject, supportsToolExecution: scenario.supportsToolExecution, + supportsWorkflowAgent: scenario.supportsWorkflowAgent, sdkMajorVersion, testFileUrl: import.meta.url, timeoutMs: AI_SDK_SCENARIO_TIMEOUT_MS, diff --git a/js/src/auto-instrumentations/configs/ai-sdk.ts b/js/src/auto-instrumentations/configs/ai-sdk.ts index 4db293fed..710121553 100644 --- a/js/src/auto-instrumentations/configs/ai-sdk.ts +++ b/js/src/auto-instrumentations/configs/ai-sdk.ts @@ -210,6 +210,18 @@ export const aiSDKConfigs: InstrumentationConfig[] = [ kind: "Sync", }, }, + { + channelName: aiSDKChannels.v7CreateTelemetryDispatcher.channelName, + module: { + name: "ai", + versionRange: ">=7.0.0-0 <8.0.0", + filePath: "dist/internal/index.js", + }, + functionQuery: { + functionName: "createTelemetryDispatcher", + kind: "Sync", + }, + }, // streamObject - async function (v3 only, before the sync refactor in v4) { diff --git a/js/src/instrumentation/core/channel-tracing.ts b/js/src/instrumentation/core/channel-tracing.ts index 2f2d49e62..a45002bab 100644 --- a/js/src/instrumentation/core/channel-tracing.ts +++ b/js/src/instrumentation/core/channel-tracing.ts @@ -113,6 +113,13 @@ export type StreamingChannelSpanConfig = span: Span; startTime: number; }) => void; + onError?: (args: { + channelName: string; + error: Error; + event: AsyncEndOf | ErrorOf; + span: Span; + startTime: number; + }) => void; }; export type SyncStreamChannelSpanConfig = @@ -374,6 +381,31 @@ function runStreamingCompletionHook(args: { } } +function runStreamingErrorHook(args: { + channelName: string; + config: StreamingChannelSpanConfig; + error: Error; + event: AsyncEndOf | ErrorOf; + span: Span; + startTime: number; +}): void { + if (!args.config.onError) { + return; + } + + try { + args.config.onError({ + channelName: args.channelName, + error: args.error, + event: args.event, + span: args.span, + startTime: args.startTime, + }); + } catch (error) { + debugLogger.error(`Error in onError hook for ${args.channelName}:`, error); + } +} + export function traceAsyncChannel( channel: TChannel, config: AsyncChannelSpanConfig, @@ -571,6 +603,14 @@ export function traceStreamingChannel( } }, onError: (error: Error) => { + runStreamingErrorHook({ + channelName, + config, + error, + event: asyncEndEvent, + span, + startTime, + }); span.log({ error: error.message, }); @@ -638,6 +678,17 @@ export function traceStreamingChannel( } }, error: (event) => { + const spanData = states.get(event as object); + if (spanData) { + runStreamingErrorHook({ + channelName, + config, + error: (event as ErrorOf).error, + event: event as ErrorOf, + span: spanData.span, + startTime: spanData.startTime, + }); + } logErrorAndEnd(states, event as ErrorOf); }, }; diff --git a/js/src/instrumentation/plugins/ai-sdk-channels.ts b/js/src/instrumentation/plugins/ai-sdk-channels.ts index 316a83734..4ae2fea9f 100644 --- a/js/src/instrumentation/plugins/ai-sdk-channels.ts +++ b/js/src/instrumentation/plugins/ai-sdk-channels.ts @@ -140,6 +140,15 @@ export const aiSDKChannels = defineChannels("ai", { channelName: "ToolLoopAgent.stream", kind: "async", }), + workflowAgentStream: channel< + [AISDKCallParams], + AISDKStreamResult, + AISDKChannelContext, + unknown + >({ + channelName: "WorkflowAgent.stream", + kind: "async", + }), v7CreateTelemetryDispatcher: channel< [AISDKV7CreateTelemetryDispatcherArgs], AISDKV7TelemetryDispatcher diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts index 90497a2dc..05d47edfd 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts @@ -16,7 +16,8 @@ import { Logger, TestBackgroundLogger, } from "../../logger"; -import { wrapAISDK } from "../../wrappers/ai-sdk"; +import { wrapAISDK, wrapAgentClass } from "../../wrappers/ai-sdk"; +import { workflowAgentWrapperSpanCountForTesting } from "../../wrappers/ai-sdk/workflow-agent-context"; import { aiSDKChannels } from "./ai-sdk-channels"; try { @@ -155,6 +156,360 @@ describe("AI SDK streaming instrumentation", () => { expect(doStreamSpan?.output?.text).toBe("DELAYED"); }); + test("wrapAISDK and wrapAgentClass instrument WorkflowAgent.stream", async () => { + expect(await backgroundLogger.drain()).toHaveLength(0); + expect(workflowAgentWrapperSpanCountForTesting()).toBe(0); + + class WorkflowAgent { + #_name: string; + + constructor(options: { name: string }) { + this.#_name = options.name; + } + + getName() { + return this.#_name; + } + + async stream(params: any) { + return { + messages: params.messages, + steps: [], + text: `Streamed by ${this.#_name}`, + }; + } + } + + const wrappedWorkflow = wrapAISDK({ WorkflowAgent }); + const namespaceAgent = new wrappedWorkflow.WorkflowAgent({ + name: "NamespaceWorkflowAgent", + }); + + expect(namespaceAgent.getName()).toBe("NamespaceWorkflowAgent"); + await namespaceAgent.stream({ + headers: { authorization: "secret" }, + maxOutputTokens: 12, + messages: [{ role: "user", content: "Hello" }], + stopWhen: () => true, + }); + expect(workflowAgentWrapperSpanCountForTesting()).toBe(0); + + const WrappedWorkflowAgent = wrapAgentClass(WorkflowAgent); + const directlyWrappedAgent = new WrappedWorkflowAgent({ + name: "DirectWorkflowAgent", + }); + + expect(directlyWrappedAgent.getName()).toBe("DirectWorkflowAgent"); + await directlyWrappedAgent.stream({ + headers: { authorization: "secret" }, + maxOutputTokens: 12, + messages: [{ role: "user", content: "Hello again" }], + stopWhen: () => true, + }); + expect(workflowAgentWrapperSpanCountForTesting()).toBe(0); + + const spans = (await backgroundLogger.drain()) as any[]; + const workflowSpans = spans.filter( + (span) => span.span_attributes?.name === "WorkflowAgent.stream", + ); + + expect(workflowSpans).toHaveLength(2); + for (const span of workflowSpans) { + expect(span.span_attributes).toMatchObject({ + type: "function", + name: "WorkflowAgent.stream", + }); + expect(span.input).toMatchObject({ + messages: expect.any(Array), + }); + expect(span.input).not.toHaveProperty("headers"); + expect(span.input).not.toHaveProperty("maxOutputTokens"); + expect(span.input).not.toHaveProperty("stopWhen"); + expect(span.metadata).toMatchObject({ + options: { + maxOutputTokens: 12, + stopWhen: "[Function]", + }, + }); + expect(span.metadata.options).not.toHaveProperty("headers"); + expect(span.output).toBeDefined(); + } + }); + + test("wrapAISDK unregisters WorkflowAgent spans when stream creation fails", async () => { + expect(await backgroundLogger.drain()).toHaveLength(0); + expect(workflowAgentWrapperSpanCountForTesting()).toBe(0); + + class WorkflowAgent { + async stream() { + throw new Error("workflow stream failed"); + } + } + + const wrappedWorkflow = wrapAISDK({ WorkflowAgent }); + const agent = new wrappedWorkflow.WorkflowAgent(); + + await expect( + agent.stream({ + messages: [{ role: "user", content: "Hello" }], + }), + ).rejects.toThrow("workflow stream failed"); + + expect(workflowAgentWrapperSpanCountForTesting()).toBe(0); + }); + + test("wrapAISDK records WorkflowAgent instance tool spans", async () => { + expect(await backgroundLogger.drain()).toHaveLength(0); + + class WorkflowAgent { + model: any; + tools: any; + + constructor(options: { model: any; tools: any }) { + this.model = options.model; + this.tools = options.tools; + } + + async stream(params: any) { + await this.model.doGenerate({ + headers: { authorization: "secret" }, + maxOutputTokens: 8, + messages: params.messages, + temperature: 0, + }); + const output = await this.tools.get_weather.execute({ + location: "Vienna, Austria", + }); + return { + messages: params.messages, + steps: [ + { + toolCalls: [ + { + toolCallId: "tool-1", + toolName: "get_weather", + input: { location: "Vienna, Austria" }, + }, + ], + toolResults: [ + { + toolCallId: "tool-1", + toolName: "get_weather", + output, + }, + ], + }, + ], + toolCalls: [ + { + toolCallId: "tool-1", + toolName: "get_weather", + input: { location: "Vienna, Austria" }, + }, + ], + toolResults: [ + { + toolCallId: "tool-1", + toolName: "get_weather", + output, + }, + ], + }; + } + } + + const wrappedWorkflow = wrapAISDK({ WorkflowAgent }); + const agent = new wrappedWorkflow.WorkflowAgent({ + model: { + modelId: "mock-workflow-model", + provider: "mock-provider", + doGenerate: async () => ({ + text: "Calling get_weather.", + usage: { + inputTokens: 4, + outputTokens: 3, + totalTokens: 7, + }, + }), + }, + tools: { + get_weather: { + execute: async ({ location }: { location: string }) => ({ + condition: "sunny", + location, + temperatureC: 21, + }), + }, + }, + }); + + await agent.stream({ + headers: { authorization: "secret" }, + maxOutputTokens: 12, + messages: [{ role: "user", content: "Use get_weather." }], + }); + + const spans = (await backgroundLogger.drain()) as any[]; + const workflowSpan = spans.find( + (span) => span.span_attributes?.name === "WorkflowAgent.stream", + ); + const modelSpan = spans.find( + (span) => span.span_attributes?.name === "doGenerate", + ); + const toolSpan = spans.find( + (span) => span.span_attributes?.name === "get_weather", + ); + + expect(workflowSpan).toBeDefined(); + expect(modelSpan).toMatchObject({ + input: { messages: [{ role: "user", content: "Use get_weather." }] }, + metadata: { + options: { + maxOutputTokens: 8, + temperature: 0, + }, + }, + output: { text: "Calling get_weather." }, + span_attributes: { name: "doGenerate", type: "llm" }, + span_parents: [workflowSpan?.span_id], + }); + expect(workflowSpan.input).toEqual({ + messages: [{ role: "user", content: "Use get_weather." }], + }); + expect(workflowSpan.metadata.options).toMatchObject({ + maxOutputTokens: 12, + }); + expect(workflowSpan.input).not.toHaveProperty("headers"); + expect(workflowSpan.metadata.options).not.toHaveProperty("headers"); + expect(modelSpan.input).not.toHaveProperty("headers"); + expect(modelSpan.metadata.options).not.toHaveProperty("headers"); + expect(toolSpan).toMatchObject({ + input: { location: "Vienna, Austria" }, + output: { + condition: "sunny", + location: "Vienna, Austria", + temperatureC: 21, + }, + span_attributes: { name: "get_weather", type: "tool" }, + span_parents: [workflowSpan?.span_id], + }); + }); + + test("wrapAISDK parents concurrent WorkflowAgent child spans to the active stream", async () => { + expect(await backgroundLogger.drain()).toHaveLength(0); + + let releaseA!: () => void; + let releaseB!: () => void; + const gateA = new Promise((resolve) => { + releaseA = resolve; + }); + const gateB = new Promise((resolve) => { + releaseB = resolve; + }); + + class WorkflowAgent { + model: any; + tools: any; + + constructor(options: { model: any; tools: any }) { + this.model = options.model; + this.tools = options.tools; + } + + async stream(params: any) { + await params.beforeTool; + const generated = await this.model.doGenerate({ + messages: params.messages, + }); + const weather = await this.tools.get_weather.execute({ + run: params.run, + }); + return { + messages: params.messages, + text: `${generated.text} ${weather.run}`, + }; + } + } + + const wrappedWorkflow = wrapAISDK({ WorkflowAgent }); + const agent = new wrappedWorkflow.WorkflowAgent({ + model: { + modelId: "mock-workflow-model", + provider: "mock-provider", + doGenerate: async ({ messages }: any) => ({ + text: messages[0].content, + usage: { + inputTokens: 4, + outputTokens: 2, + totalTokens: 6, + }, + }), + }, + tools: { + get_weather: { + execute: async ({ run }: { run: string }) => { + if (run === "B") { + await sleep(20); + } + return { run }; + }, + }, + }, + }); + + const runA = agent.stream({ + beforeTool: gateA, + messages: [{ role: "user", content: "Run A" }], + run: "A", + }); + const runB = agent.stream({ + beforeTool: gateB, + messages: [{ role: "user", content: "Run B" }], + run: "B", + }); + + releaseA(); + releaseB(); + await Promise.all([runA, runB]); + + const spans = (await backgroundLogger.drain()) as any[]; + const workflowA = spans.find( + (span) => + span.span_attributes?.name === "WorkflowAgent.stream" && + JSON.stringify(span.input).includes("Run A"), + ); + const workflowB = spans.find( + (span) => + span.span_attributes?.name === "WorkflowAgent.stream" && + JSON.stringify(span.input).includes("Run B"), + ); + const modelA = spans.find( + (span) => + span.span_attributes?.name === "doGenerate" && + JSON.stringify(span.input).includes("Run A"), + ); + const modelB = spans.find( + (span) => + span.span_attributes?.name === "doGenerate" && + JSON.stringify(span.input).includes("Run B"), + ); + const toolA = spans.find( + (span) => + span.span_attributes?.name === "get_weather" && span.input?.run === "A", + ); + const toolB = spans.find( + (span) => + span.span_attributes?.name === "get_weather" && span.input?.run === "B", + ); + + expect(workflowA).toBeDefined(); + expect(workflowB).toBeDefined(); + expect(modelA?.span_parents).toEqual([workflowA?.span_id]); + expect(modelB?.span_parents).toEqual([workflowB?.span_id]); + expect(toolA?.span_parents).toEqual([workflowA?.span_id]); + expect(toolB?.span_parents).toEqual([workflowB?.span_id]); + }); + test("streamText time_to_first_token counts streamed tool input arguments", async () => { expect(await backgroundLogger.drain()).toHaveLength(0); diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts index a2abd7d4e..019c66781 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts @@ -4,8 +4,10 @@ const telemetryMocks = vi.hoisted(() => ({ braintrustAISDKTelemetry: vi.fn(), telemetry: {} as { executeTool?: ReturnType; + onAbort?: ReturnType; onEnd?: ReturnType; onStart?: ReturnType; + onStepEnd?: ReturnType; }, })); @@ -24,6 +26,7 @@ import { AISDKPlugin } from "./ai-sdk-plugin"; import { Attachment } from "../../logger"; import iso from "../../isomorph"; import { serializeAISDKToolsForLogging } from "../../wrappers/ai-sdk/tool-serialization"; +import { BRAINTRUST_AI_SDK_V7_OPERATION_KEY as AI_SDK_V7_OPERATION_KEY } from "../../vendor-sdk-types/ai-sdk-v7-telemetry"; const mockNewTracingChannel = iso.newTracingChannel as ReturnType; type MockTracingChannel = { @@ -45,8 +48,10 @@ describe("AISDKPlugin", () => { mockChannels.clear(); telemetryMocks.telemetry = { executeTool: vi.fn(({ execute }) => execute()), + onAbort: vi.fn(), onEnd: vi.fn(), onStart: vi.fn(), + onStepEnd: vi.fn(), }; telemetryMocks.braintrustAISDKTelemetry.mockReturnValue( telemetryMocks.telemetry, @@ -128,12 +133,16 @@ describe("AISDKPlugin", () => { it("patches dispatcher callbacks through the standard channel", async () => { const existingOnEnd = vi.fn(); const existingOnStart = vi.fn(); + const existingOnStepEnd = vi.fn(); + const existingOnAbort = vi.fn(); const originalExecute = vi.fn(async () => "done"); const existingExecuteTool = vi.fn(({ execute }) => execute()); const dispatcher = { executeTool: existingExecuteTool, + onAbort: existingOnAbort, onEnd: existingOnEnd, onStart: existingOnStart, + onStepEnd: existingOnStepEnd, }; plugin.enable(); @@ -168,6 +177,26 @@ describe("AISDKPlugin", () => { operationId: "ai.generateText", }); + await dispatcher.onStepEnd({ + callId: "call-1", + operationId: "ai.workflowAgent.stream", + }); + expect(existingOnStepEnd).toHaveBeenCalledTimes(1); + expect(telemetryMocks.telemetry.onStepEnd).toHaveBeenCalledWith({ + callId: "call-1", + operationId: "ai.workflowAgent.stream", + }); + + await dispatcher.onAbort({ + callId: "call-1", + operationId: "ai.workflowAgent.stream", + }); + expect(existingOnAbort).toHaveBeenCalledTimes(1); + expect(telemetryMocks.telemetry.onAbort).toHaveBeenCalledWith({ + callId: "call-1", + operationId: "ai.workflowAgent.stream", + }); + await expect( dispatcher.executeTool({ callId: "call-1", @@ -180,6 +209,67 @@ describe("AISDKPlugin", () => { expect(originalExecute).toHaveBeenCalledTimes(1); }); + it("stamps a stable unique operation key on each dispatcher", async () => { + const dispatcherA = { + executeTool: vi.fn(({ execute }) => execute()), + onAbort: vi.fn(), + onStart: vi.fn(), + }; + const dispatcherB = { + executeTool: vi.fn(({ execute }) => execute()), + onStart: vi.fn(), + }; + + plugin.enable(); + + const channel = mockChannels.get( + "orchestrion:ai:createTelemetryDispatcher", + ); + channel?.handlers[0]?.end({ + arguments: [{ telemetry: {} }], + result: dispatcherA, + }); + channel?.handlers[0]?.end({ + arguments: [{ telemetry: {} }], + result: dispatcherB, + }); + + await dispatcherA.onStart({ + callId: "workflow-agent", + operationId: "ai.workflowAgent.stream", + }); + await dispatcherB.onStart({ + callId: "workflow-agent", + operationId: "ai.workflowAgent.stream", + }); + await dispatcherA.onAbort({ + callId: "workflow-agent", + operationId: "ai.workflowAgent.stream", + }); + await dispatcherB.executeTool({ + callId: "workflow-agent", + execute: async () => "done", + toolCallId: "tool-b", + }); + + const runAStart = telemetryMocks.telemetry.onStart?.mock.calls[0]?.[0]; + const runBStart = telemetryMocks.telemetry.onStart?.mock.calls[1]?.[0]; + const runAAbort = telemetryMocks.telemetry.onAbort?.mock.calls[0]?.[0]; + const runBTool = telemetryMocks.telemetry.executeTool?.mock.calls[0]?.[0]; + + expect(runAStart?.[AI_SDK_V7_OPERATION_KEY]).toEqual(expect.any(String)); + expect(runBStart?.[AI_SDK_V7_OPERATION_KEY]).toEqual(expect.any(String)); + expect(runAStart?.[AI_SDK_V7_OPERATION_KEY]).not.toBe( + runBStart?.[AI_SDK_V7_OPERATION_KEY], + ); + expect(runAAbort?.[AI_SDK_V7_OPERATION_KEY]).toBe( + runAStart?.[AI_SDK_V7_OPERATION_KEY], + ); + expect(runBTool?.[AI_SDK_V7_OPERATION_KEY]).toBe( + runBStart?.[AI_SDK_V7_OPERATION_KEY], + ); + }); + it("patches each dispatcher once and respects telemetry opt-out", () => { const dispatcher = { onStart: vi.fn(), diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.ts index 5d09a989c..7759d117c 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.ts @@ -14,7 +14,7 @@ import { isPromiseLike, } from "../../../util/index"; import { getCurrentUnixTimestamp } from "../../util"; -import { Attachment, type Span, withCurrent } from "../../logger"; +import { Attachment, currentSpan, type Span, withCurrent } from "../../logger"; import { convertDataToBlob, getExtensionFromMediaType, @@ -22,6 +22,10 @@ import { import { normalizeAISDKLoggedOutput } from "../../wrappers/ai-sdk/normalize-logged-output"; import { serializeAISDKToolsForLogging } from "../../wrappers/ai-sdk/tool-serialization"; import { braintrustAISDKTelemetry } from "../../wrappers/ai-sdk/telemetry"; +import { + registerWorkflowAgentWrapperSpan, + unregisterWorkflowAgentWrapperSpan, +} from "../../wrappers/ai-sdk/workflow-agent-context"; import { zodToJsonSchema } from "../../zod/utils"; import { aiSDKChannels } from "./ai-sdk-channels"; import type { @@ -30,6 +34,7 @@ import type { AISDKEmbedParams, AISDKEmbeddingResult, AISDKLanguageModel, + AISDKMessage, AISDKModel, AISDKModelStreamChunk, AISDKOutputObject, @@ -42,6 +47,7 @@ import type { AISDKUsage, } from "../../vendor-sdk-types/ai-sdk"; import type { AISDKV7Telemetry } from "../../vendor-sdk-types/ai-sdk-v7-telemetry"; +import { BRAINTRUST_AI_SDK_V7_OPERATION_KEY as AI_SDK_V7_OPERATION_KEY } from "../../vendor-sdk-types/ai-sdk-v7-telemetry"; export interface AISDKPluginConfig { /** @@ -78,6 +84,7 @@ const AUTO_PATCHED_V7_TELEMETRY_DISPATCHER = Symbol.for( const RUNTIME_DENY_OUTPUT_PATHS = Symbol.for( "braintrust.ai-sdk.deny-output-paths", ); +let aiSDKV7TelemetryOperationCounter = 0; const AI_SDK_V7_TELEMETRY_CALLBACKS = [ "onStart", @@ -87,6 +94,7 @@ const AI_SDK_V7_TELEMETRY_CALLBACKS = [ "onToolExecutionStart", "onToolExecutionEnd", "onChunk", + "onStepEnd", "onStepFinish", "onObjectStepStart", "onObjectStepEnd", @@ -95,6 +103,7 @@ const AI_SDK_V7_TELEMETRY_CALLBACKS = [ "onRerankStart", "onRerankEnd", "onEnd", + "onAbort", "onError", ] as const; @@ -114,6 +123,7 @@ const AI_SDK_V7_TELEMETRY_CALLBACKS = [ * - Agent.stream (async method returning stream) * - ToolLoopAgent.generate (async method) * - ToolLoopAgent.stream (async method returning stream) + * - WorkflowAgent.stream (async method returning stream) * * The plugin automatically extracts: * - Model and provider information @@ -328,7 +338,9 @@ export class AISDKPlugin extends BasePlugin { name: "Agent.generate", type: SpanTypeAttribute.FUNCTION, extractInput: ([params], event, span) => - prepareAISDKCallInput(params, event, span, denyOutputPaths), + prepareAISDKCallInput(params, event, span, denyOutputPaths, { + agentOwner: true, + }), extractOutput: (result, endEvent) => { finalizeAISDKChildTracing(endEvent as { [key: string]: unknown }); return processAISDKOutput( @@ -348,7 +360,9 @@ export class AISDKPlugin extends BasePlugin { name: "Agent.stream", type: SpanTypeAttribute.FUNCTION, extractInput: ([params], event, span) => - prepareAISDKCallInput(params, event, span, denyOutputPaths), + prepareAISDKCallInput(params, event, span, denyOutputPaths, { + agentOwner: true, + }), extractOutput: (result, endEvent) => processAISDKOutput( result, @@ -374,7 +388,9 @@ export class AISDKPlugin extends BasePlugin { name: "Agent.stream", type: SpanTypeAttribute.FUNCTION, extractInput: ([params], event, span) => - prepareAISDKCallInput(params, event, span, denyOutputPaths), + prepareAISDKCallInput(params, event, span, denyOutputPaths, { + agentOwner: true, + }), patchResult: ({ endEvent, result, span, startTime }) => patchAISDKStreamingResult({ defaultDenyOutputPaths: denyOutputPaths, @@ -392,7 +408,9 @@ export class AISDKPlugin extends BasePlugin { name: "ToolLoopAgent.generate", type: SpanTypeAttribute.FUNCTION, extractInput: ([params], event, span) => - prepareAISDKCallInput(params, event, span, denyOutputPaths), + prepareAISDKCallInput(params, event, span, denyOutputPaths, { + agentOwner: true, + }), extractOutput: (result, endEvent) => { finalizeAISDKChildTracing(endEvent as { [key: string]: unknown }); return processAISDKOutput( @@ -412,7 +430,9 @@ export class AISDKPlugin extends BasePlugin { name: "ToolLoopAgent.stream", type: SpanTypeAttribute.FUNCTION, extractInput: ([params], event, span) => - prepareAISDKCallInput(params, event, span, denyOutputPaths), + prepareAISDKCallInput(params, event, span, denyOutputPaths, { + agentOwner: true, + }), extractOutput: (result, endEvent) => processAISDKOutput( result, @@ -431,6 +451,47 @@ export class AISDKPlugin extends BasePlugin { }), }), ); + + // WorkflowAgent.stream - async method returning stream + this.unsubscribers.push( + traceStreamingChannel(aiSDKChannels.workflowAgentStream, { + name: "WorkflowAgent.stream", + type: SpanTypeAttribute.FUNCTION, + extractInput: ([params], event, span) => + prepareAISDKWorkflowAgentStreamInput( + params, + event, + span, + denyOutputPaths, + ), + extractOutput: (result, endEvent) => { + finalizeAISDKChildTracing(endEvent as { [key: string]: unknown }); + return processAISDKOutput( + result, + resolveDenyOutputPaths(endEvent, denyOutputPaths), + ); + }, + extractMetrics: (result, _startTime, endEvent) => + extractTopLevelAISDKMetrics(result, endEvent), + aggregateChunks: aggregateAISDKChunks, + onComplete: ({ span }) => { + unregisterWorkflowAgentWrapperSpan(span); + }, + onError: ({ event, span }) => { + finalizeAISDKChildTracing(event as { [key: string]: unknown }); + unregisterWorkflowAgentWrapperSpan(span); + }, + patchResult: ({ endEvent, result, span, startTime }) => + patchAISDKStreamingResult({ + defaultDenyOutputPaths: denyOutputPaths, + endEvent, + onComplete: () => unregisterWorkflowAgentWrapperSpan(span), + result, + span, + startTime, + }), + }), + ); } } @@ -470,6 +531,32 @@ function patchAISDKV7TelemetryDispatcher( return; } dispatcherRecord[AUTO_PATCHED_V7_TELEMETRY_DISPATCHER] = true; + let operationKey: string | undefined; + + const eventWithOperationKey = (event: unknown): unknown => { + if (!isObject(event)) { + return event; + } + + const eventRecord = event as Record; + const callId = + typeof eventRecord.callId === "string" ? eventRecord.callId : "unknown"; + operationKey ??= `${callId}:${++aiSDKV7TelemetryOperationCounter}`; + + try { + Object.defineProperty(eventRecord, AI_SDK_V7_OPERATION_KEY, { + configurable: true, + enumerable: false, + value: operationKey, + }); + return event; + } catch { + return { + ...(event as Record), + [AI_SDK_V7_OPERATION_KEY]: operationKey, + }; + } + }; for (const key of AI_SDK_V7_TELEMETRY_CALLBACKS) { const braintrustCallback = telemetry[key]; @@ -483,7 +570,10 @@ function patchAISDKV7TelemetryDispatcher( typeof existingCallback === "function" ? existingCallback.call(dispatcher, event) : undefined; - const braintrustResult = braintrustCallback.call(telemetry, event as any); + const braintrustResult = braintrustCallback.call( + telemetry, + eventWithOperationKey(event) as any, + ); const pending = [existingResult, braintrustResult].filter(isPromiseLike); if (pending.length > 0) { @@ -505,6 +595,7 @@ function patchAISDKV7TelemetryDispatcher( }) => braintrustExecuteTool.call(telemetry, { ...args, + ...(operationKey ? { [AI_SDK_V7_OPERATION_KEY]: operationKey } : {}), execute: () => typeof existingExecuteTool === "function" ? existingExecuteTool.call(dispatcher, args) @@ -546,7 +637,7 @@ function resolveDenyOutputPaths( return defaultDenyOutputPaths; } -interface ProcessCallInputSyncResult { +export interface ProcessCallInputSyncResult { input: AISDKCallParams; outputPromise?: Promise<{ output: { @@ -684,6 +775,7 @@ const processInputAttachmentsSync = ( if (!input) return { input }; const processed: AISDKCallParams = { ...input }; + delete processed.headers; if (input.messages && Array.isArray(input.messages)) { processed.messages = input.messages.map(processMessage); @@ -742,7 +834,10 @@ const processInputAttachmentsSync = ( processed.prepareCall = "[Function]"; } - return { input: processed, outputPromise }; + return { + input: removeHeadersDeep(processed) as AISDKCallParams, + outputPromise, + }; }; const processMessage = (message: any): any => { @@ -950,6 +1045,26 @@ export function processAISDKCallInput( return processInputAttachmentsSync(params); } +export function processAISDKWorkflowAgentCallInput( + params: AISDKCallParams, +): ProcessCallInputSyncResult { + const processed = processAISDKCallInput(params); + return { + ...processed, + input: extractMessagesInput(processed.input), + }; +} + +export function processAISDKWorkflowAgentModelCallInput( + params: AISDKCallParams, +): ProcessCallInputSyncResult { + const processed = processAISDKCallInput(params); + return { + ...processed, + input: extractMessagesInput(processed.input), + }; +} + function prepareAISDKCallInput( params: AISDKCallParams, event: { @@ -960,6 +1075,7 @@ function prepareAISDKCallInput( }, span: Span, defaultDenyOutputPaths: string[], + childTracingOptions: AISDKChildTracingOptions = {}, ): { input: unknown; metadata: Record; @@ -987,6 +1103,43 @@ function prepareAISDKCallInput( span, defaultDenyOutputPaths, event.aiSDK, + childTracingOptions, + ); + event.modelWrapped = childTracing.modelWrapped; + if (childTracing.cleanup) { + event.__braintrust_ai_sdk_cleanup = childTracing.cleanup; + } + + return { + input, + metadata, + }; +} + +function prepareAISDKWorkflowAgentStreamInput( + params: AISDKCallParams, + event: { + aiSDK?: AISDK; + denyOutputPaths?: string[]; + self?: unknown; + [key: string]: unknown; + }, + span: Span, + defaultDenyOutputPaths: string[], +): { + input: unknown; + metadata: Record; +} { + registerWorkflowAgentWrapperSpan(span); + const { input } = processAISDKWorkflowAgentCallInput(params); + const metadata = extractWorkflowMetadataFromCallParams(params, event.self); + const childTracing = prepareAISDKChildTracing( + params, + event.self, + span, + defaultDenyOutputPaths, + event.aiSDK, + { agentOwner: true, workflowAgent: true }, ); event.modelWrapped = childTracing.modelWrapped; if (childTracing.cleanup) { @@ -1053,6 +1206,10 @@ function hasModelChildTracing(event?: { [key: string]: unknown }): boolean { ); } +function serializeToolExecutionInput(args: unknown[]): unknown { + return args.length > 0 ? args[0] : args; +} + export function createAISDKIntegrationMetadata(): Record { return { braintrust: { @@ -1076,6 +1233,19 @@ function resolveModelFromSelf(self?: unknown): AISDKModel | undefined { : undefined; } +function resolveToolsFromSelf(self?: unknown): AISDKTools | undefined { + if (!self || typeof self !== "object") { + return undefined; + } + + const selfRecord = self as { + settings?: { tools?: AISDKTools }; + tools?: AISDKTools; + }; + + return selfRecord.tools ?? selfRecord.settings?.tools; +} + function extractBaseMetadata( model: AISDKModel | undefined, self?: unknown, @@ -1098,13 +1268,158 @@ function extractMetadataFromCallParams( self?: unknown, ): Record { const metadata = extractBaseMetadata(params.model, self); - const tools = serializeAISDKToolsForLogging(params.tools); + const tools = serializeAISDKToolsForLogging( + params.tools ?? resolveToolsFromSelf(self), + ); if (tools) { metadata.tools = tools; } return metadata; } +export function extractWorkflowMetadataFromCallParams( + params: AISDKCallParams, + self?: unknown, +): Record { + const processed = processAISDKCallInput(params).input; + const metadata = extractMetadataFromCallParams(processed, self); + const options = extractAISDKCallOptionsForMetadata(processed); + if (Object.keys(options).length > 0) { + metadata.options = options; + } + return metadata; +} + +function extractMessagesInput(params: AISDKCallParams): AISDKCallParams { + if (Array.isArray(params.messages)) { + return { messages: params.messages }; + } + + if (Array.isArray(params.prompt)) { + return { messages: params.prompt }; + } + + if (params.prompt && typeof params.prompt === "object") { + return { messages: [params.prompt as AISDKMessage] }; + } + + return {}; +} + +function extractAISDKCallOptionsForMetadata( + params: AISDKCallParams, +): Record { + const options: Record = {}; + const inputOrTopLevelKeys = new Set([ + "model", + "messages", + "prompt", + "system", + "tools", + "headers", + "abortSignal", + "signal", + ]); + + for (const [key, value] of Object.entries(params)) { + if ( + inputOrTopLevelKeys.has(key) || + key === "__proto__" || + key === "constructor" || + key === "prototype" || + (/^on[A-Z]/.test(key) && typeof value === "function") + ) { + continue; + } + + const sanitized = sanitizeAISDKMetadataValue(value); + if (sanitized !== undefined) { + options[key] = sanitized; + } + } + + return options; +} + +function sanitizeAISDKMetadataValue(value: unknown, depth = 0): unknown { + if (value === undefined) { + return undefined; + } + + if (typeof value === "function") { + return "[Function]"; + } + + if (value === null || typeof value !== "object") { + return value; + } + + if (isPromiseLike(value)) { + return "[Promise]"; + } + + if (typeof AbortSignal !== "undefined" && value instanceof AbortSignal) { + return "[AbortSignal]"; + } + + if (depth >= 8) { + return "[Object]"; + } + + if (Array.isArray(value)) { + return value + .map((item) => sanitizeAISDKMetadataValue(item, depth + 1)) + .filter((item) => item !== undefined); + } + + if (!isObject(value)) { + return value; + } + + const sanitized: Record = {}; + for (const [key, nested] of Object.entries(value)) { + if ( + key === "__proto__" || + key === "constructor" || + key === "prototype" || + key.toLowerCase() === "headers" + ) { + continue; + } + + const sanitizedNested = sanitizeAISDKMetadataValue(nested, depth + 1); + if (sanitizedNested !== undefined) { + sanitized[key] = sanitizedNested; + } + } + + return sanitized; +} + +function buildAISDKModelStartEvent( + callOptions: AISDKCallParams, + baseMetadata: Record, + options: { workflowAgent?: boolean }, +): { + input: unknown; + metadata: Record; +} { + if (!options.workflowAgent) { + return { + input: processAISDKCallInput(callOptions).input, + metadata: baseMetadata, + }; + } + + return { + input: processAISDKWorkflowAgentModelCallInput(callOptions).input, + metadata: { + ...baseMetadata, + ...extractWorkflowMetadataFromCallParams(callOptions), + }, + }; +} + function extractMetadataFromEmbedParams( params: AISDKEmbedParams, self?: unknown, @@ -1128,12 +1443,132 @@ function extractMetadataFromRerankParams( return metadata; } +type AISDKChildTracingOptions = { + agentOwner?: boolean; + workflowAgent?: boolean; +}; + +type AISDKModelPatchEntry = { + activeSpanIds: Set; + baseMetadata: Record; + childTracingOptions: AISDKChildTracingOptions; + denyOutputPaths: string[]; + parentSpan: Span; +}; + +type AISDKModelPatchState = { + entries: AISDKModelPatchEntry[]; + originalDoGenerate: NonNullable; + originalDoStream?: AISDKLanguageModel["doStream"]; +}; + +type AISDKToolPatchEntry = { + activeSpanIds: Set; + childTracingOptions: AISDKChildTracingOptions; + name: string; + parentSpan: Span; +}; + +type AISDKToolPatchState = { + entries: AISDKToolPatchEntry[]; + originalExecute: (...args: unknown[]) => unknown; +}; + +function activeAISDKChildPatchEntry< + TEntry extends { activeSpanIds: Set; parentSpan: Span }, +>(entries: TEntry[]): TEntry | undefined { + const activeSpan = currentSpan(); + const activeSpanId = activeSpan.spanId; + if (activeSpanId) { + for (let index = entries.length - 1; index >= 0; index -= 1) { + const entry = entries[index]; + if (entry?.activeSpanIds.has(activeSpanId)) { + return entry; + } + } + } + + const activeParentSpanIds = activeSpan.spanParents ?? []; + for (let index = entries.length - 1; index >= 0; index -= 1) { + const entry = entries[index]; + if ( + entry?.parentSpan.spanId && + activeParentSpanIds.includes(entry.parentSpan.spanId) + ) { + return entry; + } + } + + for (let index = entries.length - 1; index >= 0; index -= 1) { + const entry = entries[index]; + if (entry?.parentSpan.spanId === activeSpanId) { + return entry; + } + } + + return entries[entries.length - 1]; +} + +function attachNestedAISDKChildPatchEntry< + TEntry extends { activeSpanIds: Set; parentSpan: Span }, +>(entries: TEntry[], nestedSpan: Span, cleanup: Array<() => void>): boolean { + const activeSpanId = currentSpan().spanId; + if (!activeSpanId || activeSpanId === nestedSpan.spanId) { + return false; + } + + for (let index = entries.length - 1; index >= 0; index -= 1) { + const entry = entries[index]; + if ( + entry?.parentSpan.spanId === activeSpanId || + entry?.activeSpanIds.has(activeSpanId) + ) { + entry.activeSpanIds.add(nestedSpan.spanId); + cleanup.push(() => { + entry.activeSpanIds.delete(nestedSpan.spanId); + }); + return true; + } + } + + return false; +} + +function shadowActiveAISDKChildPatchEntry< + TEntry extends { activeSpanIds: Set; parentSpan: Span }, +>( + entries: TEntry[], + entry: TEntry, + nestedSpan: Span, + cleanup: Array<() => void>, +) { + const activeSpanId = currentSpan().spanId; + if (!activeSpanId || activeSpanId === nestedSpan.spanId) { + return; + } + + for (let index = entries.length - 1; index >= 0; index -= 1) { + const existingEntry = entries[index]; + if ( + existingEntry?.parentSpan.spanId === activeSpanId || + existingEntry?.activeSpanIds.has(activeSpanId) + ) { + entry.activeSpanIds.add(activeSpanId); + cleanup.push(() => { + entry.activeSpanIds.delete(activeSpanId); + }); + return; + } + } +} + function prepareAISDKChildTracing( params: AISDKCallParams, self: unknown, parentSpan: Span, denyOutputPaths: string[], aiSDK?: AISDK, + childTracingOptions: AISDKChildTracingOptions = {}, ): { cleanup?: () => void; modelWrapped: boolean; @@ -1151,34 +1586,92 @@ function prepareAISDKChildTracing( !resolvedModel || typeof resolvedModel !== "object" || typeof resolvedModel.doGenerate !== "function" || - patchedModels.has(resolvedModel) || - (resolvedModel as { [AUTO_PATCHED_MODEL]?: boolean })[AUTO_PATCHED_MODEL] + patchedModels.has(resolvedModel) ) { return resolvedModel; } patchedModels.add(resolvedModel); - (resolvedModel as { [AUTO_PATCHED_MODEL]?: boolean })[AUTO_PATCHED_MODEL] = - true; modelWrapped = true; + const modelRecord = resolvedModel as AISDKLanguageModel & { + [AUTO_PATCHED_MODEL]?: AISDKModelPatchState; + }; + const entry: AISDKModelPatchEntry = { + activeSpanIds: new Set([parentSpan.spanId]), + baseMetadata: buildAISDKChildMetadata(resolvedModel), + childTracingOptions, + denyOutputPaths, + parentSpan, + }; + const cleanupModelEntry = (state: AISDKModelPatchState) => { + const index = state.entries.indexOf(entry); + if (index >= 0) { + state.entries.splice(index, 1); + } + if (state.entries.length > 0) { + return; + } + resolvedModel.doGenerate = state.originalDoGenerate; + resolvedModel.doStream = state.originalDoStream; + delete modelRecord[AUTO_PATCHED_MODEL]; + }; + const existingState = modelRecord[AUTO_PATCHED_MODEL]; + if (existingState) { + if ( + childTracingOptions.agentOwner && + attachNestedAISDKChildPatchEntry( + existingState.entries, + parentSpan, + cleanup, + ) + ) { + return resolvedModel; + } + + if (!childTracingOptions.agentOwner) { + shadowActiveAISDKChildPatchEntry( + existingState.entries, + entry, + parentSpan, + cleanup, + ); + } + + existingState.entries.push(entry); + cleanup.push(() => { + cleanupModelEntry(existingState); + }); + return resolvedModel; + } + const originalDoGenerate = resolvedModel.doGenerate; const originalDoStream = resolvedModel.doStream; - const baseMetadata = buildAISDKChildMetadata(resolvedModel); + const state: AISDKModelPatchState = { + entries: [entry], + originalDoGenerate, + originalDoStream, + }; + modelRecord[AUTO_PATCHED_MODEL] = state; resolvedModel.doGenerate = async function doGeneratePatched( - options: AISDKCallParams, + callOptions: AISDKCallParams, ) { - return parentSpan.traced( + const activeEntry = activeAISDKChildPatchEntry(state.entries); + if (!activeEntry) { + return Reflect.apply(originalDoGenerate, resolvedModel, [callOptions]); + } + + return activeEntry.parentSpan.traced( async (span) => { const result = await Reflect.apply( originalDoGenerate, resolvedModel, - [options], + [callOptions], ); span.log({ - output: processAISDKOutput(result, denyOutputPaths), + output: processAISDKOutput(result, activeEntry.denyOutputPaths), metrics: extractTokenMetrics(result), ...buildResolvedMetadataPayload(result), }); @@ -1190,32 +1683,43 @@ function prepareAISDKChildTracing( spanAttributes: { type: SpanTypeAttribute.LLM, }, - event: { - input: processAISDKCallInput(options).input, - metadata: baseMetadata, - }, + event: buildAISDKModelStartEvent( + callOptions, + activeEntry.baseMetadata, + { + workflowAgent: activeEntry.childTracingOptions.workflowAgent, + }, + ), }, ); }; if (originalDoStream) { resolvedModel.doStream = async function doStreamPatched( - options: AISDKCallParams, + callOptions: AISDKCallParams, ) { - const span = parentSpan.startSpan({ + const activeEntry = activeAISDKChildPatchEntry(state.entries); + if (!activeEntry) { + return Reflect.apply(originalDoStream, resolvedModel, [callOptions]); + } + + const span = activeEntry.parentSpan.startSpan({ name: "doStream", spanAttributes: { type: SpanTypeAttribute.LLM, }, - event: { - input: processAISDKCallInput(options).input, - metadata: baseMetadata, - }, + event: buildAISDKModelStartEvent( + callOptions, + activeEntry.baseMetadata, + { + workflowAgent: activeEntry.childTracingOptions.workflowAgent, + }, + ), }); const streamStartTime = getCurrentUnixTimestamp(); const result = await withCurrent(span, () => - Reflect.apply(originalDoStream, resolvedModel, [options]), + Reflect.apply(originalDoStream, resolvedModel, [callOptions]), ); // firstChunkTime !== streamStartTime because the first few chunks may be actual bookkeeping stuff for the SDK // instead of actual LLM output that can be streamed to users. @@ -1283,7 +1787,10 @@ function prepareAISDKChildTracing( } const metrics = extractTokenMetrics(output as AISDKResult); - if (firstChunkTime !== undefined) { + if ( + firstChunkTime !== undefined && + !activeEntry.childTracingOptions.workflowAgent + ) { metrics.time_to_first_token = Math.max( firstChunkTime - streamStartTime, 1e-6, @@ -1293,7 +1800,7 @@ function prepareAISDKChildTracing( span.log({ output: processAISDKOutput( output as AISDKResult, - denyOutputPaths, + activeEntry.denyOutputPaths, ), metrics, ...buildResolvedMetadataPayload(output as AISDKResult), @@ -1313,13 +1820,7 @@ function prepareAISDKChildTracing( } cleanup.push(() => { - resolvedModel.doGenerate = originalDoGenerate; - if (originalDoStream) { - resolvedModel.doStream = originalDoStream; - } - delete (resolvedModel as { [AUTO_PATCHED_MODEL]?: boolean })[ - AUTO_PATCHED_MODEL - ]; + cleanupModelEntry(state); }); return resolvedModel; @@ -1331,27 +1832,84 @@ function prepareAISDKChildTracing( typeof tool !== "object" || !("execute" in tool) || typeof tool.execute !== "function" || - patchedTools.has(tool) || - (tool as { [AUTO_PATCHED_TOOL]?: boolean })[AUTO_PATCHED_TOOL] + patchedTools.has(tool) ) { return; } patchedTools.add(tool); - (tool as { [AUTO_PATCHED_TOOL]?: boolean })[AUTO_PATCHED_TOOL] = true; - const originalExecute = tool.execute; + const toolRecord = tool as AISDKTool & { + [AUTO_PATCHED_TOOL]?: AISDKToolPatchState; + execute: (...args: unknown[]) => unknown; + }; + const entry: AISDKToolPatchEntry = { + activeSpanIds: new Set([parentSpan.spanId]), + childTracingOptions, + name, + parentSpan, + }; + const cleanupToolEntry = (state: AISDKToolPatchState) => { + const index = state.entries.indexOf(entry); + if (index >= 0) { + state.entries.splice(index, 1); + } + if (state.entries.length > 0) { + return; + } + tool.execute = state.originalExecute; + delete toolRecord[AUTO_PATCHED_TOOL]; + }; + const existingState = toolRecord[AUTO_PATCHED_TOOL]; + if (existingState) { + if ( + childTracingOptions.agentOwner && + attachNestedAISDKChildPatchEntry( + existingState.entries, + parentSpan, + cleanup, + ) + ) { + return; + } + + if (!childTracingOptions.agentOwner) { + shadowActiveAISDKChildPatchEntry( + existingState.entries, + entry, + parentSpan, + cleanup, + ); + } + + existingState.entries.push(entry); + cleanup.push(() => { + cleanupToolEntry(existingState); + }); + return; + } + + const originalExecute = toolRecord.execute; + const state: AISDKToolPatchState = { + entries: [entry], + originalExecute, + }; + toolRecord[AUTO_PATCHED_TOOL] = state; tool.execute = function executePatched(...args: unknown[]) { + const activeEntry = activeAISDKChildPatchEntry(state.entries); const result = Reflect.apply(originalExecute, this, args); + if (!activeEntry) { + return result; + } if (isAsyncGenerator(result)) { return (async function* () { - const span = parentSpan.startSpan({ - name, + const span = activeEntry.parentSpan.startSpan({ + name: activeEntry.name, spanAttributes: { type: SpanTypeAttribute.TOOL, }, }); - span.log({ input: args.length === 1 ? args[0] : args }); + span.log({ input: serializeToolExecutionInput(args) }); try { let lastValue: unknown; @@ -1369,15 +1927,15 @@ function prepareAISDKChildTracing( })(); } - return parentSpan.traced( + return activeEntry.parentSpan.traced( async (span) => { - span.log({ input: args.length === 1 ? args[0] : args }); + span.log({ input: serializeToolExecutionInput(args) }); const awaitedResult = await result; span.log({ output: awaitedResult }); return awaitedResult; }, { - name, + name: activeEntry.name, spanAttributes: { type: SpanTypeAttribute.TOOL, }, @@ -1386,8 +1944,7 @@ function prepareAISDKChildTracing( }; cleanup.push(() => { - tool.execute = originalExecute; - delete (tool as { [AUTO_PATCHED_TOOL]?: boolean })[AUTO_PATCHED_TOOL]; + cleanupToolEntry(state); }); }; @@ -1426,6 +1983,7 @@ function prepareAISDKChildTracing( if (self && typeof self === "object") { const selfRecord = self as { model?: AISDKModel; + tools?: AISDKTools; settings?: { model?: AISDKModel; tools?: AISDKTools }; }; @@ -1440,6 +1998,10 @@ function prepareAISDKChildTracing( } } + if (selfRecord.tools !== undefined) { + patchTools(selfRecord.tools); + } + if (selfRecord.settings && typeof selfRecord.settings === "object") { if (selfRecord.settings.model !== undefined) { const patchedSettingsModel = patchModel(selfRecord.settings.model); @@ -1612,11 +2174,19 @@ function isAISDKContentAsyncIterableChunk(chunk: unknown): boolean { function patchAISDKStreamingResult(args: { defaultDenyOutputPaths: string[]; endEvent: { denyOutputPaths?: string[]; [key: string]: unknown }; + onComplete?: () => void; result: AISDKResult; span: Span; startTime: number; }): boolean { - const { defaultDenyOutputPaths, endEvent, result, span, startTime } = args; + const { + defaultDenyOutputPaths, + endEvent, + onComplete, + result, + span, + startTime, + } = args; if (!result || typeof result !== "object") { return false; @@ -1624,6 +2194,16 @@ function patchAISDKStreamingResult(args: { const resultRecord = result as Record; attachKnownResultPromiseHandlers(resultRecord); + let finalized = false; + const finalize = () => { + if (finalized) { + return; + } + finalized = true; + finalizeAISDKChildTracing(endEvent); + span.end(); + onComplete?.(); + }; if (isReadableStreamLike(resultRecord.baseStream)) { let firstChunkTime: number | undefined; @@ -1640,28 +2220,31 @@ function patchAISDKStreamingResult(args: { controller.enqueue(chunk); }, async flush() { - const metrics = extractTopLevelAISDKMetrics(result, endEvent); - if ( - metrics.time_to_first_token === undefined && - firstChunkTime !== undefined - ) { - metrics.time_to_first_token = firstChunkTime - startTime; - } - - const output = await processAISDKStreamingOutput( - result, - resolveDenyOutputPaths(endEvent, defaultDenyOutputPaths), - ); - const metadata = buildResolvedMetadataPayload(result).metadata; - - span.log({ - output, - ...(metadata ? { metadata } : {}), - metrics, - }); + try { + const metrics = extractTopLevelAISDKMetrics(result, endEvent); + if ( + metrics.time_to_first_token === undefined && + firstChunkTime !== undefined + ) { + metrics.time_to_first_token = firstChunkTime - startTime; + } - finalizeAISDKChildTracing(endEvent); - span.end(); + const output = await processAISDKStreamingOutput( + result, + resolveDenyOutputPaths(endEvent, defaultDenyOutputPaths), + ); + const metadata = buildResolvedMetadataPayload(result).metadata; + + span.log({ + output, + ...(metadata ? { metadata } : {}), + metrics, + }); + } catch (error) { + span.log({ error: toLoggedError(error) }); + } finally { + finalize(); + } }, }), ); @@ -1697,34 +2280,37 @@ function patchAISDKStreamingResult(args: { } }, onComplete: async () => { - const metrics = extractTopLevelAISDKMetrics(result, endEvent); - if ( - metrics.time_to_first_token === undefined && - firstChunkTime !== undefined - ) { - metrics.time_to_first_token = firstChunkTime - startTime; - } + try { + const metrics = extractTopLevelAISDKMetrics(result, endEvent); + if ( + metrics.time_to_first_token === undefined && + firstChunkTime !== undefined + ) { + metrics.time_to_first_token = firstChunkTime - startTime; + } - const output = await processAISDKStreamingOutput( - result, - resolveDenyOutputPaths(endEvent, defaultDenyOutputPaths), - ); - const metadata = buildResolvedMetadataPayload(result).metadata; + const output = await processAISDKStreamingOutput( + result, + resolveDenyOutputPaths(endEvent, defaultDenyOutputPaths), + ); + const metadata = buildResolvedMetadataPayload(result).metadata; - span.log({ - output, - ...(metadata ? { metadata } : {}), - metrics, - }); - finalizeAISDKChildTracing(endEvent); - span.end(); + span.log({ + output, + ...(metadata ? { metadata } : {}), + metrics, + }); + } catch (error) { + span.log({ error: toLoggedError(error) }); + } finally { + finalize(); + } }, onError: (error) => { span.log({ error: error.message, }); - finalizeAISDKChildTracing(endEvent); - span.end(); + finalize(); }, }); @@ -1968,6 +2554,31 @@ function isAsyncGenerator(value: unknown): value is AsyncGenerator { ); } +function removeHeadersDeep(value: unknown): unknown { + if (Array.isArray(value)) { + return value.map((item) => removeHeadersDeep(item)); + } + + if (!isObject(value)) { + return value; + } + + const prototype = Object.getPrototypeOf(value); + if (prototype !== Object.prototype && prototype !== null) { + return value; + } + + const sanitized: Record = {}; + for (const [key, nested] of Object.entries(value)) { + if (key.toLowerCase() === "headers") { + continue; + } + sanitized[key] = removeHeadersDeep(nested); + } + + return sanitized; +} + /** * Process AI SDK output, omitting specified paths. */ @@ -1980,7 +2591,9 @@ export function processAISDKOutput( const merged = extractSerializableOutputFields(output); // Apply omit to remove unwanted paths - return normalizeAISDKLoggedOutput(omit(merged, denyOutputPaths)); + return normalizeAISDKLoggedOutput( + removeHeadersDeep(omit(merged, denyOutputPaths)), + ); } export function processAISDKEmbeddingOutput( @@ -2283,7 +2896,9 @@ function extractGetterValues( const getterNames = [ "content", + "messages", "text", + "output", "object", "value", "values", @@ -2332,7 +2947,9 @@ function extractSerializableOutputFields( ): Record { const serialized: Record = {}; const directFieldNames = [ + "messages", "steps", + "output", "request", "responseMessages", "warnings", diff --git a/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts b/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts index 4218aa407..276028885 100644 --- a/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts @@ -1,7 +1,18 @@ import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; -import { _exportsForTestingOnly, currentSpan, initLogger } from "../../logger"; +import { + _exportsForTestingOnly, + currentSpan, + initLogger, + startSpan, + withCurrent, +} from "../../logger"; import { configureNode } from "../../node/config"; import { braintrustAISDKTelemetry } from "../../wrappers/ai-sdk/telemetry"; +import { + registerWorkflowAgentWrapperSpan, + unregisterWorkflowAgentWrapperSpan, +} from "../../wrappers/ai-sdk/workflow-agent-context"; +import { BRAINTRUST_AI_SDK_V7_OPERATION_KEY as AI_SDK_V7_OPERATION_KEY } from "../../vendor-sdk-types/ai-sdk-v7-telemetry"; try { configureNode(); @@ -266,6 +277,328 @@ describe("braintrustAISDKTelemetry", () => { expect(modelCall?.output).toMatchObject({ text: "OK" }); }); + it("normalizes WorkflowAgent stream operation names", async () => { + const telemetry = braintrustAISDKTelemetry(); + + telemetry.onStart?.({ + callId: "workflow-agent", + headers: { authorization: "secret" }, + maxOutputTokens: 32, + operationId: "ai.workflowAgent.stream", + provider: "openai", + modelId: "gpt-4.1-mini", + temperature: 0, + messages: [{ role: "user", content: "Use the weather tool." }], + toolChoice: "required", + tools: { + get_weather: { + description: "Get weather for a location", + }, + }, + }); + telemetry.onLanguageModelCallStart?.({ + callId: "workflow-agent", + headers: { authorization: "secret" }, + maxOutputTokens: 32, + provider: "openai", + modelId: "gpt-4.1-mini", + temperature: 0, + prompt: [{ role: "user", content: "Use the weather tool." }], + toolChoice: "required", + }); + telemetry.onLanguageModelCallEnd?.({ + callId: "workflow-agent", + provider: "openai", + modelId: "gpt-4.1-mini", + text: "It is sunny.", + usage: { + inputTokens: 8, + outputTokens: 4, + totalTokens: 12, + }, + }); + telemetry.onToolExecutionStart?.({ + toolCall: { + toolCallId: "tool-workflow", + toolName: "get_weather", + input: { location: "Vienna, Austria" }, + }, + }); + telemetry.onToolExecutionEnd?.({ + durationMs: 12, + output: { + condition: "sunny", + location: "Vienna, Austria", + temperatureC: 21, + }, + success: true, + toolCall: { + toolCallId: "tool-workflow", + toolName: "get_weather", + }, + }); + telemetry.onEnd?.({ + callId: "workflow-agent", + finishReason: "stop", + messages: [{ role: "assistant", content: "It is sunny." }], + operationId: "ai.workflowAgent.stream", + steps: [], + text: "It is sunny.", + totalUsage: { + inputTokens: 8, + outputTokens: 4, + totalTokens: 12, + }, + }); + + const spans = (await backgroundLogger.drain()) as Array< + Record + >; + const operation = spans.find( + (span) => span.span_attributes?.name === "WorkflowAgent.stream", + ); + const tool = spans.find( + (span) => span.span_attributes?.name === "get_weather", + ); + const model = spans.find( + (span) => span.span_attributes?.name === "doGenerate", + ); + + expect(operation).toMatchObject({ + span_attributes: { + type: "function", + name: "WorkflowAgent.stream", + }, + input: { + messages: [{ role: "user", content: "Use the weather tool." }], + }, + metadata: { + provider: "openai", + model: "gpt-4.1-mini", + options: { + maxOutputTokens: 32, + temperature: 0, + toolChoice: "required", + }, + tools: { + get_weather: { + description: "Get weather for a location", + }, + }, + }, + output: { + text: "It is sunny.", + }, + }); + expect(operation?.input).not.toHaveProperty("headers"); + expect(operation?.input).not.toHaveProperty("maxOutputTokens"); + expect(operation?.metadata?.options).not.toHaveProperty("headers"); + expect(model).toMatchObject({ + span_attributes: { + type: "llm", + name: "doGenerate", + }, + input: { + messages: [{ role: "user", content: "Use the weather tool." }], + }, + metadata: { + provider: "openai", + model: "gpt-4.1-mini", + options: { + maxOutputTokens: 32, + temperature: 0, + toolChoice: "required", + }, + }, + span_parents: [operation?.span_id], + }); + expect(model?.input).not.toHaveProperty("headers"); + expect(model?.metadata?.options).not.toHaveProperty("headers"); + expect(tool).toMatchObject({ + span_attributes: { + type: "tool", + name: "get_weather", + }, + input: { location: "Vienna, Austria" }, + output: { + condition: "sunny", + location: "Vienna, Austria", + temperatureC: 21, + }, + metrics: { duration_ms: 12 }, + span_parents: [operation?.span_id], + }); + }); + + it("does not create telemetry child spans for wrapper-owned WorkflowAgent streams", async () => { + const telemetry = braintrustAISDKTelemetry(); + const wrapperSpan = startSpan({ name: "WorkflowAgent.stream" }); + registerWorkflowAgentWrapperSpan(wrapperSpan); + + try { + withCurrent(wrapperSpan, () => { + telemetry.onStart?.({ + callId: "workflow-agent", + messages: [{ role: "user", content: "Use the weather tool." }], + operationId: "ai.workflowAgent.stream", + }); + telemetry.onLanguageModelCallStart?.({ + callId: "workflow-agent", + prompt: [{ role: "user", content: "Use the weather tool." }], + }); + telemetry.onLanguageModelCallEnd?.({ + callId: "workflow-agent", + text: "Calling get_weather.", + }); + telemetry.onToolExecutionStart?.({ + toolCall: { + toolCallId: "tool-workflow", + toolName: "get_weather", + input: { location: "Vienna, Austria" }, + }, + }); + telemetry.onToolExecutionEnd?.({ + output: { condition: "sunny" }, + success: true, + toolCall: { + toolCallId: "tool-workflow", + toolName: "get_weather", + }, + }); + telemetry.onEnd?.({ + callId: "workflow-agent", + operationId: "ai.workflowAgent.stream", + text: "It is sunny.", + }); + }); + } finally { + unregisterWorkflowAgentWrapperSpan(wrapperSpan); + wrapperSpan.end(); + } + + const spans = (await backgroundLogger.drain()) as Array< + Record + >; + + expect( + spans.filter((span) => span.span_attributes?.name === "doGenerate"), + ).toHaveLength(0); + expect( + spans.filter((span) => span.span_attributes?.name === "get_weather"), + ).toHaveLength(0); + }); + + it("keeps concurrent WorkflowAgent streams with shared callIds separate", async () => { + const telemetry = braintrustAISDKTelemetry(); + const callId = "workflow-agent"; + const runA = "workflow-agent:run-a"; + const runB = "workflow-agent:run-b"; + + telemetry.onStart?.({ + [AI_SDK_V7_OPERATION_KEY]: runA, + callId, + messages: [{ role: "user", content: "First workflow run" }], + operationId: "ai.workflowAgent.stream", + }); + telemetry.onStart?.({ + [AI_SDK_V7_OPERATION_KEY]: runB, + callId, + messages: [{ role: "user", content: "Second workflow run" }], + operationId: "ai.workflowAgent.stream", + }); + + telemetry.onLanguageModelCallStart?.({ + [AI_SDK_V7_OPERATION_KEY]: runA, + callId, + prompt: [{ role: "user", content: "First workflow run" }], + }); + telemetry.onLanguageModelCallEnd?.({ + [AI_SDK_V7_OPERATION_KEY]: runA, + callId, + text: "First answer", + }); + telemetry.onLanguageModelCallStart?.({ + [AI_SDK_V7_OPERATION_KEY]: runB, + callId, + prompt: [{ role: "user", content: "Second workflow run" }], + }); + telemetry.onLanguageModelCallEnd?.({ + [AI_SDK_V7_OPERATION_KEY]: runB, + callId, + text: "Calling get_weather.", + }); + + telemetry.onToolExecutionStart?.({ + [AI_SDK_V7_OPERATION_KEY]: runB, + toolCall: { + toolCallId: "tool-run-b", + toolName: "get_weather", + input: { location: "Vienna, Austria" }, + }, + }); + telemetry.onToolExecutionEnd?.({ + [AI_SDK_V7_OPERATION_KEY]: runB, + output: { condition: "sunny" }, + success: true, + toolCall: { + toolCallId: "tool-run-b", + toolName: "get_weather", + }, + }); + + telemetry.onEnd?.({ + [AI_SDK_V7_OPERATION_KEY]: runA, + callId, + messages: [{ role: "assistant", content: "First answer" }], + operationId: "ai.workflowAgent.stream", + text: "First answer", + }); + telemetry.onEnd?.({ + [AI_SDK_V7_OPERATION_KEY]: runB, + callId, + messages: [{ role: "assistant", content: "Second answer" }], + operationId: "ai.workflowAgent.stream", + text: "Second answer", + }); + + const spans = (await backgroundLogger.drain()) as Array< + Record + >; + const workflowSpans = spans.filter( + (span) => span.span_attributes?.name === "WorkflowAgent.stream", + ); + const firstWorkflow = workflowSpans.find((span) => + JSON.stringify(span.input).includes("First workflow run"), + ); + const secondWorkflow = workflowSpans.find((span) => + JSON.stringify(span.input).includes("Second workflow run"), + ); + const firstModel = spans.find( + (span) => + span.span_attributes?.name === "doGenerate" && + JSON.stringify(span.input).includes("First workflow run"), + ); + const secondModel = spans.find( + (span) => + span.span_attributes?.name === "doGenerate" && + JSON.stringify(span.input).includes("Second workflow run"), + ); + const tool = spans.find( + (span) => span.span_attributes?.name === "get_weather", + ); + + expect(workflowSpans).toHaveLength(2); + expect(firstWorkflow?.output).toMatchObject({ text: "First answer" }); + expect(secondWorkflow?.output).toMatchObject({ text: "Second answer" }); + expect(firstModel?.span_parents).toEqual([firstWorkflow?.span_id]); + expect(secondModel?.span_parents).toEqual([secondWorkflow?.span_id]); + expect(tool).toMatchObject({ + input: { location: "Vienna, Austria" }, + output: { condition: "sunny" }, + span_parents: [secondWorkflow?.span_id], + }); + }); + it("honors recordInputs and recordOutputs", async () => { const telemetry = braintrustAISDKTelemetry(); @@ -387,6 +720,57 @@ describe("braintrustAISDKTelemetry", () => { expect(await backgroundLogger.drain()).toHaveLength(0); }); + it("ends open child spans when an operation aborts", async () => { + const telemetry = braintrustAISDKTelemetry(); + const callId = "call-abort"; + const reason = new Error("user aborted stream"); + + telemetry.onStart?.({ + callId, + operationId: "ai.streamText", + }); + telemetry.onLanguageModelCallStart?.({ + callId, + prompt: [{ role: "user", content: "Reply slowly." }], + }); + telemetry.onToolExecutionStart?.({ + callId, + toolCall: { + toolCallId: "tool-abort", + toolName: "lookupWeather", + input: { city: "Vienna" }, + }, + }); + + telemetry.onAbort?.({ callId, reason }); + + const spans = (await backgroundLogger.drain()) as Array< + Record + >; + const errorSpans = spans.filter((span) => + String(span.error).includes("user aborted stream"), + ); + + expect(errorSpans).toHaveLength(3); + expect(errorSpans.map((span) => span.span_attributes?.name)).toEqual( + expect.arrayContaining(["streamText", "doStream", "lookupWeather"]), + ); + + telemetry.onLanguageModelCallEnd?.({ callId, text: "late" }); + telemetry.onToolExecutionEnd?.({ + callId, + toolCall: { toolCallId: "tool-abort", toolName: "lookupWeather" }, + toolOutput: { type: "tool-result", output: "late" }, + }); + telemetry.onEnd?.({ + callId, + operationId: "ai.streamText", + text: "late", + }); + + expect(await backgroundLogger.drain()).toHaveLength(0); + }); + it("ends superseded retry child spans before successful finish", async () => { const telemetry = braintrustAISDKTelemetry(); diff --git a/js/src/vendor-sdk-types/ai-sdk-common.ts b/js/src/vendor-sdk-types/ai-sdk-common.ts index f2cb9311f..98617b851 100644 --- a/js/src/vendor-sdk-types/ai-sdk-common.ts +++ b/js/src/vendor-sdk-types/ai-sdk-common.ts @@ -265,7 +265,7 @@ export type AISDKGenerateFunction = ( export type AISDKStreamFunction = (params: AISDKCallParams) => AISDKResult; export interface AISDKAgentInstance { - settings: AISDKCallParams; + settings?: AISDKCallParams; generate: AISDKGenerateFunction; stream: AISDKStreamFunction; constructor: { @@ -278,6 +278,18 @@ export interface AISDKAgentClass { new (...args: unknown[]): AISDKAgentInstance; } +export interface AISDKWorkflowAgentInstance { + stream: AISDKStreamFunction; + constructor: { + name: string; + }; + [key: string]: unknown; +} + +export interface AISDKWorkflowAgentClass { + new (...args: unknown[]): AISDKWorkflowAgentInstance; +} + export interface AISDKProviderResolver { languageModel?: (modelId: string) => AISDKLanguageModel; [key: string]: unknown; diff --git a/js/src/vendor-sdk-types/ai-sdk-v7-telemetry.ts b/js/src/vendor-sdk-types/ai-sdk-v7-telemetry.ts index 49b621f0d..a63e44d33 100644 --- a/js/src/vendor-sdk-types/ai-sdk-v7-telemetry.ts +++ b/js/src/vendor-sdk-types/ai-sdk-v7-telemetry.ts @@ -12,6 +12,10 @@ export interface AISDKV7TelemetryOptions { functionId?: string; } +export const BRAINTRUST_AI_SDK_V7_OPERATION_KEY = Symbol.for( + "braintrust.ai-sdk.v7.telemetry-operation-key", +); + export interface AISDKV7ModelInfo { provider?: string; modelId?: string; @@ -21,12 +25,14 @@ export interface AISDKV7OperationEvent extends AISDKV7TelemetryOptions, AISDKV7ModelInfo { callId: string; operationId: string; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; [key: string]: unknown; } export interface AISDKV7LanguageModelCallStartEvent extends AISDKV7TelemetryOptions, AISDKV7ModelInfo { callId: string; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; [key: string]: unknown; } @@ -37,6 +43,7 @@ export interface AISDKV7LanguageModelCallEndEvent finishReason?: unknown; responseId?: string; usage?: unknown; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; [key: string]: unknown; } @@ -45,6 +52,7 @@ export interface AISDKV7ObjectStepStartEvent callId: string; promptMessages?: unknown; stepNumber?: number; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; [key: string]: unknown; } @@ -59,6 +67,7 @@ export interface AISDKV7ObjectStepEndEvent response?: unknown; usage?: unknown; warnings?: unknown; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; [key: string]: unknown; } @@ -68,6 +77,7 @@ export interface AISDKV7EmbedStartEvent embedCallId: string; operationId: string; values: unknown[]; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; [key: string]: unknown; } @@ -79,6 +89,7 @@ export interface AISDKV7EmbedEndEvent embeddings?: unknown[]; usage?: unknown; values?: unknown[]; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; [key: string]: unknown; } @@ -88,6 +99,7 @@ export interface AISDKV7RerankStartEvent documents?: unknown[]; query?: string; topN?: number; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; [key: string]: unknown; } @@ -95,6 +107,7 @@ export interface AISDKV7RerankEndEvent extends AISDKV7TelemetryOptions, AISDKV7ModelInfo { callId: string; ranking?: Array<{ index?: number; relevanceScore?: number }>; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; [key: string]: unknown; } @@ -106,9 +119,10 @@ export interface AISDKV7ToolCall { } export interface AISDKV7ToolExecutionStartEvent extends AISDKV7TelemetryOptions { - callId: string; + callId?: string; toolCall: AISDKV7ToolCall; toolContext?: unknown; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; [key: string]: unknown; } @@ -120,10 +134,14 @@ export interface AISDKV7ToolOutput { } export interface AISDKV7ToolExecutionEndEvent extends AISDKV7TelemetryOptions { - callId: string; + callId?: string; durationMs?: number; + error?: unknown; + output?: unknown; + success?: boolean; toolCall: AISDKV7ToolCall; toolOutput?: AISDKV7ToolOutput; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; [key: string]: unknown; } @@ -161,13 +179,16 @@ export interface AISDKV7Telemetry { event: AISDKV7ToolExecutionEndEvent, ) => void | PromiseLike; onChunk?: (event: AISDKV7ChunkEvent) => void | PromiseLike; + onStepEnd?: (event: unknown) => void | PromiseLike; onStepFinish?: (event: unknown) => void | PromiseLike; onEnd?: (event: AISDKV7OperationEvent) => void | PromiseLike; + onAbort?: (event: unknown) => void | PromiseLike; onError?: (event: unknown) => void | PromiseLike; executeTool?: (options: { callId: string; toolCallId: string; execute: () => PromiseLike; + [BRAINTRUST_AI_SDK_V7_OPERATION_KEY]?: string; }) => PromiseLike; } diff --git a/js/src/vendor-sdk-types/ai-sdk.ts b/js/src/vendor-sdk-types/ai-sdk.ts index 6bc261a08..15513a2c5 100644 --- a/js/src/vendor-sdk-types/ai-sdk.ts +++ b/js/src/vendor-sdk-types/ai-sdk.ts @@ -30,6 +30,8 @@ import type { AISDKTools, AISDKTokenBucket, AISDKUsage, + AISDKWorkflowAgentClass, + AISDKWorkflowAgentInstance, } from "./ai-sdk-common"; import type { AISDKV3 } from "./ai-sdk-v3"; import type { AISDKV4 } from "./ai-sdk-v4"; @@ -76,4 +78,6 @@ export type { AISDKTools, AISDKTokenBucket, AISDKUsage, + AISDKWorkflowAgentClass, + AISDKWorkflowAgentInstance, }; diff --git a/js/src/wrappers/ai-sdk/ai-sdk.ts b/js/src/wrappers/ai-sdk/ai-sdk.ts index f2f5cc92a..562d2e205 100644 --- a/js/src/wrappers/ai-sdk/ai-sdk.ts +++ b/js/src/wrappers/ai-sdk/ai-sdk.ts @@ -13,7 +13,9 @@ import type { AISDKRerankFunction, AISDKRerankParams, AISDKStreamFunction, + AISDKWorkflowAgentClass, } from "../../vendor-sdk-types/ai-sdk"; +import { currentWorkflowAgentWrapperSpan } from "./workflow-agent-context"; interface WrapAISDKOptions { denyOutputPaths?: string[]; @@ -137,6 +139,7 @@ export function wrapAISDK(aiSDK: T, options: WrapAISDKOptions = {}): T { case "Agent": case "Experimental_Agent": case "ToolLoopAgent": + case "WorkflowAgent": return original ? wrapAgentClass(original, options) : original; } return original; @@ -148,7 +151,9 @@ export const wrapAgentClass = ( AgentClass: any, options: WrapAISDKOptions = {}, ): any => { - const typedAgentClass = AgentClass as AISDKAgentClass; + const typedAgentClass = AgentClass as + | AISDKAgentClass + | AISDKWorkflowAgentClass; return new Proxy(typedAgentClass, { construct(target, args, newTarget) { @@ -161,11 +166,15 @@ export const wrapAgentClass = ( get(instanceTarget, prop, instanceReceiver) { const original = Reflect.get(instanceTarget, prop, instanceTarget); - if (prop === "generate") { + if ( + prop === "generate" && + typeof original === "function" && + instanceTarget.constructor.name !== "WorkflowAgent" + ) { return wrapAgentGenerate(original, instanceTarget, options); } - if (prop === "stream") { + if (prop === "stream" && typeof original === "function") { return wrapAgentStream(original, instanceTarget, options); } @@ -189,7 +198,7 @@ const wrapAgentGenerate = ( const defaultName = `${instance.constructor.name}.generate`; return async (params: AISDKCallParams & SpanInfo) => makeGenerateTextWrapper( - aiSDKChannels.generateText, + generateChannelForAgent(instance.constructor.name), defaultName, generate.bind(instance), { @@ -200,29 +209,62 @@ const wrapAgentGenerate = ( )({ ...instance.settings, ...params }); }; +function generateChannelForAgent(agentName: string) { + if (agentName === "ToolLoopAgent") { + return aiSDKChannels.toolLoopAgentGenerate; + } + + return aiSDKChannels.agentGenerate; +} + const wrapAgentStream = ( stream: AISDKStreamFunction, instance: AISDKAgentInstance, options: WrapAISDKOptions = {}, ) => { const defaultName = `${instance.constructor.name}.stream`; - return (params: AISDKCallParams & SpanInfo) => - makeStreamWrapper( - aiSDKChannels.agentStream, - defaultName, - stream.bind(instance), - { - self: instance, - spanType: SpanTypeAttribute.FUNCTION, - }, - options, - )({ ...instance.settings, ...params }); + return (params: AISDKCallParams & SpanInfo) => { + const workflowAgent = instance.constructor.name === "WorkflowAgent"; + + if (workflowAgent && currentWorkflowAgentWrapperSpan()) { + const { span_info: _spanInfo, ...cleanParams } = params; + return stream.call(instance, { ...instance.settings, ...cleanParams }); + } + + const trace = () => + makeStreamWrapper( + streamChannelForAgent(instance.constructor.name), + defaultName, + stream.bind(instance), + { + self: instance, + spanType: SpanTypeAttribute.FUNCTION, + }, + options, + )({ ...instance.settings, ...params }); + + return trace(); + }; }; +function streamChannelForAgent(agentName: string) { + if (agentName === "ToolLoopAgent") { + return aiSDKChannels.toolLoopAgentStream; + } + + if (agentName === "WorkflowAgent") { + return aiSDKChannels.workflowAgentStream; + } + + return aiSDKChannels.agentStream; +} + const makeGenerateTextWrapper = ( channel: | typeof aiSDKChannels.generateText - | typeof aiSDKChannels.generateObject, + | typeof aiSDKChannels.generateObject + | typeof aiSDKChannels.agentGenerate + | typeof aiSDKChannels.toolLoopAgentGenerate, name: string, generateText: AISDKGenerateFunction, contextOptions: { @@ -384,7 +426,8 @@ const makeStreamWrapper = ( | typeof aiSDKChannels.streamText | typeof aiSDKChannels.streamObject | typeof aiSDKChannels.agentStream - | typeof aiSDKChannels.toolLoopAgentStream, + | typeof aiSDKChannels.toolLoopAgentStream + | typeof aiSDKChannels.workflowAgentStream, name: string, streamText: AISDKStreamFunction, contextOptions: { diff --git a/js/src/wrappers/ai-sdk/telemetry.ts b/js/src/wrappers/ai-sdk/telemetry.ts index c42ef9204..9ec7506fa 100644 --- a/js/src/wrappers/ai-sdk/telemetry.ts +++ b/js/src/wrappers/ai-sdk/telemetry.ts @@ -7,11 +7,14 @@ import { logError, startSpan, withCurrent, type Span } from "../../logger"; import { createAISDKIntegrationMetadata, DEFAULT_DENY_OUTPUT_PATHS, + extractWorkflowMetadataFromCallParams, extractTokenMetrics, processAISDKCallInput, processAISDKEmbeddingOutput, processAISDKOutput, processAISDKRerankOutput, + processAISDKWorkflowAgentCallInput, + processAISDKWorkflowAgentModelCallInput, serializeModelWithProvider, } from "../../instrumentation/plugins/ai-sdk-plugin"; import type { @@ -27,17 +30,22 @@ import type { AISDKV7Telemetry, AISDKV7TelemetryOptions, } from "../../vendor-sdk-types/ai-sdk-v7-telemetry"; +import { BRAINTRUST_AI_SDK_V7_OPERATION_KEY as AI_SDK_V7_OPERATION_KEY } from "../../vendor-sdk-types/ai-sdk-v7-telemetry"; +import { currentWorkflowAgentWrapperSpan } from "./workflow-agent-context"; type OperationState = { + callId: string; firstChunkTime?: number; hadModelChild: boolean; operationName: string; + operationKey: string; + ownsSpan: boolean; span: Span; startTime: number; }; type CallSpanState = { - callId: string; + operationKey: string; span: Span; }; @@ -51,11 +59,13 @@ type EmbedSpanState = CallSpanState & { */ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { const operations = new Map(); + const operationKeysByCallId = new Map(); const modelSpans = new Map(); const objectSpans = new Map(); const embedSpans = new Map(); const rerankSpans = new Map(); const toolSpans = new Map(); + let workflowAgentOperationCounter = 0; const runSafely = (name: string, callback: () => void) => { try { @@ -67,31 +77,225 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { }; const startChildSpan = ( - callId: string, + operationKey: string, name: string, type: SpanTypeAttribute, event?: { input?: unknown; metadata?: Record }, ) => { - const parent = operations.get(callId)?.span; + const parent = operations.get(operationKey)?.span; const spanArgs = { name, spanAttributes: { type }, ...(event ? { event } : {}), }; const span = parent ? parent.startSpan(spanArgs) : startSpan(spanArgs); - const state = operations.get(callId); + const state = operations.get(operationKey); if (state && type === SpanTypeAttribute.LLM) { state.hadModelChild = true; } return span; }; + const registerOperation = (state: OperationState): void => { + operations.set(state.operationKey, state); + const keys = operationKeysByCallId.get(state.callId) ?? []; + keys.push(state.operationKey); + operationKeysByCallId.set(state.callId, keys); + }; + + const deleteOperation = (operationKey: string): void => { + const state = operations.get(operationKey); + if (!state) { + return; + } + + operations.delete(operationKey); + const keys = operationKeysByCallId.get(state.callId); + if (!keys) { + return; + } + + const index = keys.indexOf(operationKey); + if (index >= 0) { + keys.splice(index, 1); + } + if (keys.length === 0) { + operationKeysByCallId.delete(state.callId); + } + }; + + const explicitOperationKey = (event: unknown): string | undefined => { + if (!isObject(event)) { + return undefined; + } + + const key = (event as { [AI_SDK_V7_OPERATION_KEY]?: unknown })[ + AI_SDK_V7_OPERATION_KEY + ]; + return typeof key === "string" ? key : undefined; + }; + + const createOperationKey = ( + event: AISDKV7OperationEvent, + operationName: string, + ): string => { + const explicit = explicitOperationKey(event); + if (explicit) { + return explicit; + } + + if (operationName === "WorkflowAgent.stream") { + workflowAgentOperationCounter += 1; + return `${event.callId}:${workflowAgentOperationCounter}`; + } + + return event.callId; + }; + + const operationKeyForCallId = ( + callId: string, + mode: "active" | "finish" = "active", + ): string | undefined => { + const keys = operationKeysByCallId.get(callId); + if (!keys || keys.length === 0) { + return operations.has(callId) ? callId : undefined; + } + + if (keys.length === 1) { + return keys[0]; + } + + const wrapperSpan = currentWorkflowAgentWrapperSpan(); + if (wrapperSpan?.spanId) { + const key = keys.find( + (candidate) => + operations.get(candidate)?.span.spanId === wrapperSpan.spanId, + ); + if (key) { + return key; + } + } + + return mode === "finish" ? keys[0] : keys[keys.length - 1]; + }; + + const operationKeyFromEvent = ( + event: { callId?: unknown } | unknown, + mode: "active" | "finish" = "active", + ): string | undefined => { + const explicit = explicitOperationKey(event); + if (explicit && operations.has(explicit)) { + return explicit; + } + + if (isObject(event)) { + const callId = (event as { callId?: unknown }).callId; + if (typeof callId === "string") { + return operationKeyForCallId(callId, mode) ?? callId; + } + } + + const wrapperSpan = currentWorkflowAgentWrapperSpan(); + if (wrapperSpan?.spanId) { + for (const [operationKey, state] of operations) { + if ( + state.operationName === "WorkflowAgent.stream" && + state.span.spanId === wrapperSpan.spanId + ) { + return operationKey; + } + } + } + + // WorkflowAgent uses this callId on the operation, but omits it from + // tool start/end callbacks in @ai-sdk/workflow@1.0.x. + const workflowAgentKeys = operationKeysByCallId.get("workflow-agent"); + if (workflowAgentKeys?.length === 1) { + return workflowAgentKeys[0]; + } + + if (operations.size === 1) { + return operations.keys().next().value; + } + + return undefined; + }; + + const closeOpenChildSpans = (operationKey: string, error?: unknown): void => { + const openModelSpans = modelSpans.get(operationKey); + if (openModelSpans) { + for (const span of openModelSpans) { + if (error !== undefined) { + logError(span, error); + } + span.end(); + } + modelSpans.delete(operationKey); + } + + const openObjectSpan = objectSpans.get(operationKey); + if (openObjectSpan) { + if (error !== undefined) { + logError(openObjectSpan, error); + } + openObjectSpan.end(); + objectSpans.delete(operationKey); + } + + for (const [embedCallId, embedState] of embedSpans) { + if (embedState.operationKey === operationKey) { + if (error !== undefined) { + logError(embedState.span, error); + } + embedState.span.end(); + embedSpans.delete(embedCallId); + } + } + + const openRerankSpan = rerankSpans.get(operationKey); + if (openRerankSpan) { + if (error !== undefined) { + logError(openRerankSpan, error); + } + openRerankSpan.end(); + rerankSpans.delete(operationKey); + } + + for (const [toolCallId, toolState] of toolSpans) { + if (toolState.operationKey === operationKey) { + if (error !== undefined) { + logError(toolState.span, error); + } + toolState.span.end(); + toolSpans.delete(toolCallId); + } + } + }; + + const abortReasonFromEvent = (event: unknown): unknown => { + if (isObject(event)) { + const abortEvent = event as { error?: unknown; reason?: unknown }; + if (abortEvent.error !== undefined) { + return abortEvent.error; + } + if (abortEvent.reason !== undefined) { + return abortEvent.reason; + } + } + + return new Error("AI SDK operation aborted"); + }; + + const shouldSkipTelemetryChildren = (state?: OperationState): boolean => + state?.operationName === "WorkflowAgent.stream" && !state.ownsSpan; + const onObjectStepEnd = ( event: Parameters>[0], ) => { runSafely("onObjectStepEnd", () => { - const span = objectSpans.get(event.callId); - if (!span) { + const operationKey = operationKeyFromEvent(event); + const span = operationKey ? objectSpans.get(operationKey) : undefined; + if (!operationKey || !span) { return; } @@ -108,7 +312,7 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { metrics: extractTokenMetrics(result), }); span.end(); - objectSpans.delete(event.callId); + objectSpans.delete(operationKey); }); }; @@ -145,8 +349,9 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { event: Parameters>[0], ) => { runSafely("onRerankEnd", () => { - const span = rerankSpans.get(event.callId); - if (!span) { + const operationKey = operationKeyFromEvent(event); + const span = operationKey ? rerankSpans.get(operationKey) : undefined; + if (!operationKey || !span) { return; } @@ -167,7 +372,7 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { : {}), }); span.end(); - rerankSpans.delete(event.callId); + rerankSpans.delete(operationKey); }); }; @@ -175,16 +380,24 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { event: Parameters>[0], ) => { runSafely("onEnd", () => { - const state = operations.get(event.callId); + const operationKey = operationKeyFromEvent(event, "finish"); + const state = operationKey ? operations.get(operationKey) : undefined; if (!state) { return; } + if (!state.ownsSpan) { + deleteOperation(state.operationKey); + return; + } const result = finishResult(event, state.operationName); const metrics: Record = state.hadModelChild ? {} : extractTokenMetrics(result); - const timeToFirstToken = extractTimeToFirstToken(result, state); + const timeToFirstToken = + state.operationName === "WorkflowAgent.stream" + ? undefined + : extractTimeToFirstToken(result, state); if (timeToFirstToken !== undefined) { metrics.time_to_first_token = timeToFirstToken; } @@ -198,7 +411,7 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { metrics, }); state.span.end(); - operations.delete(event.callId); + deleteOperation(state.operationKey); }); }; @@ -206,30 +419,63 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { onStart(event) { runSafely("onStart", () => { const operationName = operationNameFromId(event.operationId); - const span = startSpan({ - name: operationName, - spanAttributes: { type: SpanTypeAttribute.FUNCTION }, - }); - - operations.set(event.callId, { + const workflowAgent = operationName === "WorkflowAgent.stream"; + const wrapperSpan = workflowAgent + ? currentWorkflowAgentWrapperSpan() + : undefined; + const ownsSpan = !wrapperSpan; + const span = ownsSpan + ? startSpan({ + name: operationName, + spanAttributes: { type: SpanTypeAttribute.FUNCTION }, + }) + : wrapperSpan; + const operationKey = createOperationKey(event, operationName); + + registerOperation({ + callId: event.callId, hadModelChild: false, operationName, + operationKey, + ownsSpan, span, startTime: getCurrentUnixTimestamp(), }); - const metadata = metadataFromEvent(event); + if (!ownsSpan) { + return; + } + + let metadata = metadataFromEvent(event); const logPayload: { input?: unknown; metadata: Record; } = { metadata }; + const workflowAgentCallInput = workflowAgent + ? operationInput(event, operationName) + : undefined; + if (workflowAgentCallInput) { + metadata = { + ...metadata, + ...extractWorkflowMetadataFromCallParams(workflowAgentCallInput), + }; + logPayload.metadata = metadata; + } + if (shouldRecordInputs(event)) { - const { input, outputPromise } = processAISDKCallInput( - operationInput(event, operationName), - ); + const callInput = + workflowAgentCallInput ?? operationInput(event, operationName); + const { input, outputPromise } = workflowAgent + ? processAISDKWorkflowAgentCallInput(callInput) + : processAISDKCallInput(callInput); logPayload.input = input; - if (outputPromise && input && typeof input === "object") { + if ( + outputPromise && + !workflowAgent && + input && + typeof input === "object" + ) { outputPromise .then((resolvedData) => { span.log({ @@ -251,47 +497,65 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { onLanguageModelCallStart(event) { runSafely("onLanguageModelCallStart", () => { - const state = operations.get(event.callId); - const openSpans = modelSpans.get(event.callId); - if (openSpans) { + const operationKey = operationKeyFromEvent(event); + const state = operationKey ? operations.get(operationKey) : undefined; + if (shouldSkipTelemetryChildren(state)) { + return; + } + const operationName = state?.operationName ?? "generateText"; + const callInput = operationInput(event, operationName); + const workflowAgent = operationName === "WorkflowAgent.stream"; + const openSpans = operationKey + ? modelSpans.get(operationKey) + : undefined; + if (operationKey && openSpans) { for (const span of openSpans) { span.end(); } - modelSpans.delete(event.callId); + modelSpans.delete(operationKey); } const span = startChildSpan( - event.callId, - state?.operationName === "streamText" ? "doStream" : "doGenerate", + operationKey ?? event.callId, + operationName === "streamText" ? "doStream" : "doGenerate", SpanTypeAttribute.LLM, { ...(shouldRecordInputs(event) ? { - input: processAISDKCallInput( - operationInput( - event, - state?.operationName ?? "generateText", - ), - ).input, + input: workflowAgent + ? processAISDKWorkflowAgentModelCallInput(callInput).input + : processAISDKCallInput(callInput).input, } : {}), - metadata: metadataFromEvent(event), + metadata: workflowAgent + ? { + ...metadataFromEvent(event), + ...extractWorkflowMetadataFromCallParams(callInput), + } + : metadataFromEvent(event), }, ); - const spans = modelSpans.get(event.callId) ?? []; + const spanKey = operationKey ?? event.callId; + const spans = modelSpans.get(spanKey) ?? []; spans.push(span); - modelSpans.set(event.callId, spans); + modelSpans.set(spanKey, spans); }); }, onLanguageModelCallEnd(event) { runSafely("onLanguageModelCallEnd", () => { - const span = shiftModelSpan(modelSpans, event.callId); + const operationKey = operationKeyFromEvent(event); + const state = operationKey ? operations.get(operationKey) : undefined; + if (shouldSkipTelemetryChildren(state)) { + return; + } + const span = operationKey + ? shiftModelSpan(modelSpans, operationKey) + : undefined; if (!span) { return; } - const state = operations.get(event.callId); const timeToFirstOutputMs = safePerformance(event)?.timeToFirstOutputMs; if ( state?.operationName === "streamText" && @@ -319,15 +583,21 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { onObjectStepStart(event) { runSafely("onObjectStepStart", () => { - const state = operations.get(event.callId); - const openSpan = objectSpans.get(event.callId); - if (openSpan) { + const operationKey = operationKeyFromEvent(event); + const state = operationKey ? operations.get(operationKey) : undefined; + if (shouldSkipTelemetryChildren(state)) { + return; + } + const openSpan = operationKey + ? objectSpans.get(operationKey) + : undefined; + if (operationKey && openSpan) { openSpan.end(); - objectSpans.delete(event.callId); + objectSpans.delete(operationKey); } const span = startChildSpan( - event.callId, + operationKey ?? event.callId, state?.operationName === "streamObject" ? "doStream" : "doGenerate", SpanTypeAttribute.LLM, { @@ -341,7 +611,7 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { metadata: metadataFromEvent(event), }, ); - objectSpans.set(event.callId, span); + objectSpans.set(operationKey ?? event.callId, span); }); }, @@ -349,10 +619,14 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { onEmbedStart(event) { runSafely("onEmbedStart", () => { - const state = operations.get(event.callId); + const operationKey = operationKeyFromEvent(event); + const state = operationKey ? operations.get(operationKey) : undefined; + if (shouldSkipTelemetryChildren(state)) { + return; + } for (const [embedCallId, embedState] of embedSpans) { if ( - embedState.callId === event.callId && + embedState.operationKey === operationKey && (state?.operationName === "embed" || embedState.values === event.values) ) { @@ -362,7 +636,7 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { } const span = startChildSpan( - event.callId, + operationKey ?? event.callId, "doEmbed", SpanTypeAttribute.LLM, { @@ -377,7 +651,7 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { }, ); embedSpans.set(event.embedCallId, { - callId: event.callId, + operationKey: operationKey ?? event.callId, span, values: event.values, }); @@ -388,14 +662,21 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { onRerankStart(event) { runSafely("onRerankStart", () => { - const openSpan = rerankSpans.get(event.callId); - if (openSpan) { + const operationKey = operationKeyFromEvent(event); + const state = operationKey ? operations.get(operationKey) : undefined; + if (shouldSkipTelemetryChildren(state)) { + return; + } + const openSpan = operationKey + ? rerankSpans.get(operationKey) + : undefined; + if (operationKey && openSpan) { openSpan.end(); - rerankSpans.delete(event.callId); + rerankSpans.delete(operationKey); } const span = startChildSpan( - event.callId, + operationKey ?? event.callId, "doRerank", SpanTypeAttribute.LLM, { @@ -411,7 +692,7 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { metadata: metadataFromEvent(event), }, ); - rerankSpans.set(event.callId, span); + rerankSpans.set(operationKey ?? event.callId, span); }); }, @@ -419,13 +700,18 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { onToolExecutionStart(event) { runSafely("onToolExecutionStart", () => { + const operationKey = operationKeyFromEvent(event); + const state = operationKey ? operations.get(operationKey) : undefined; + if (shouldSkipTelemetryChildren(state)) { + return; + } const toolCallId = event.toolCall.toolCallId; - if (!toolCallId) { + if (!operationKey || !toolCallId) { return; } const span = startChildSpan( - event.callId, + operationKey, event.toolCall.toolName || "tool", SpanTypeAttribute.TOOL, { @@ -443,7 +729,7 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { }, }, ); - toolSpans.set(toolCallId, { callId: event.callId, span }); + toolSpans.set(toolCallId, { operationKey, span }); }); }, @@ -456,22 +742,30 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { } const toolOutput = event.toolOutput; - if (toolOutput?.type === "tool-error") { + const workflowToolError = + (event as { success?: unknown }).success === false && "error" in event + ? (event as { error?: unknown }).error + : undefined; + + if ( + toolOutput?.type === "tool-error" || + workflowToolError !== undefined + ) { + const error = toolOutput?.error ?? workflowToolError; state.span.log({ - error: - toolOutput.error instanceof Error - ? toolOutput.error.message - : String(toolOutput?.error), + error: error instanceof Error ? error.message : String(error), metrics: typeof event.durationMs === "number" ? { duration_ms: event.durationMs } : {}, }); } else { + const output = + toolOutput && "output" in toolOutput + ? toolOutput.output + : (event as { output?: unknown }).output; state.span.log({ - ...(shouldRecordOutputs(event) - ? { output: toolOutput?.output } - : {}), + ...(shouldRecordOutputs(event) ? { output } : {}), metrics: typeof event.durationMs === "number" ? { duration_ms: event.durationMs } @@ -489,7 +783,8 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { if (!callId) { return; } - const state = operations.get(callId); + const operationKey = operationKeyForCallId(callId); + const state = operationKey ? operations.get(operationKey) : undefined; if (!state || state.firstChunkTime !== undefined) { return; } @@ -499,65 +794,42 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { onEnd, + onAbort(event) { + runSafely("onAbort", () => { + const operationKey = operationKeyFromEvent(event, "finish"); + const state = operationKey ? operations.get(operationKey) : undefined; + if (!operationKey || !state) { + return; + } + + const error = abortReasonFromEvent(event); + closeOpenChildSpans(operationKey, error); + if (state.ownsSpan) { + logError(state.span, error); + state.span.end(); + } + deleteOperation(operationKey); + }); + }, + onError(event) { runSafely("onError", () => { const errorEvent = isObject(event) ? (event as { callId?: unknown; error?: unknown }) : {}; - const callId = - typeof errorEvent.callId === "string" ? errorEvent.callId : undefined; - if (!callId) { - return; - } - - const state = operations.get(callId); - if (!state) { + const operationKey = operationKeyFromEvent(errorEvent, "finish"); + const state = operationKey ? operations.get(operationKey) : undefined; + if (!operationKey || !state) { return; } const error = errorEvent.error ?? event; - const openModelSpans = modelSpans.get(callId); - if (openModelSpans) { - for (const span of openModelSpans) { - logError(span, error); - span.end(); - } - modelSpans.delete(callId); + closeOpenChildSpans(operationKey, error); + if (state.ownsSpan) { + logError(state.span, error); + state.span.end(); } - - const openObjectSpan = objectSpans.get(callId); - if (openObjectSpan) { - logError(openObjectSpan, error); - openObjectSpan.end(); - objectSpans.delete(callId); - } - - for (const [embedCallId, embedState] of embedSpans) { - if (embedState.callId === callId) { - logError(embedState.span, error); - embedState.span.end(); - embedSpans.delete(embedCallId); - } - } - - const openRerankSpan = rerankSpans.get(callId); - if (openRerankSpan) { - logError(openRerankSpan, error); - openRerankSpan.end(); - rerankSpans.delete(callId); - } - - for (const [toolCallId, toolState] of toolSpans) { - if (toolState.callId === callId) { - logError(toolState.span, error); - toolState.span.end(); - toolSpans.delete(toolCallId); - } - } - - logError(state.span, error); - state.span.end(); - operations.delete(callId); + deleteOperation(operationKey); }); }, @@ -577,6 +849,10 @@ function shouldRecordOutputs(event: AISDKV7TelemetryOptions): boolean { } function operationNameFromId(operationId: string | undefined): string { + if (operationId === "ai.workflowAgent.stream") { + return "WorkflowAgent.stream"; + } + return operationId?.startsWith("ai.") ? operationId.slice("ai.".length) : operationId || "ai-sdk"; diff --git a/js/src/wrappers/ai-sdk/workflow-agent-context.ts b/js/src/wrappers/ai-sdk/workflow-agent-context.ts new file mode 100644 index 000000000..cb602bb62 --- /dev/null +++ b/js/src/wrappers/ai-sdk/workflow-agent-context.ts @@ -0,0 +1,33 @@ +import { _internalGetGlobalState, type Span } from "../../logger"; + +const workflowAgentWrapperSpans = new Map(); + +export function registerWorkflowAgentWrapperSpan(span: Span): void { + if (span.spanId) { + workflowAgentWrapperSpans.set(span.spanId, span); + } +} + +export function unregisterWorkflowAgentWrapperSpan(span: Span): void { + if (span.spanId) { + workflowAgentWrapperSpans.delete(span.spanId); + } +} + +export function workflowAgentWrapperSpanCountForTesting(): number { + return workflowAgentWrapperSpans.size; +} + +export function currentWorkflowAgentWrapperSpan(): Span | undefined { + const parentSpanIds = + _internalGetGlobalState().contextManager.getParentSpanIds()?.spanParents ?? + []; + for (const parentSpanId of parentSpanIds) { + const span = workflowAgentWrapperSpans.get(parentSpanId); + if (span) { + return span; + } + } + + return undefined; +} From 365e480c6f86a8cd22a7b4d4309cfef154cee6a5 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 1 Jul 2026 13:24:23 +0200 Subject: [PATCH 2/9] cs --- .changeset/violet-vans-design.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/violet-vans-design.md diff --git a/.changeset/violet-vans-design.md b/.changeset/violet-vans-design.md new file mode 100644 index 000000000..f63f63729 --- /dev/null +++ b/.changeset/violet-vans-design.md @@ -0,0 +1,5 @@ +--- +"braintrust": minor +--- + +feat(ai-sdk): Add Workflow Agent instrumentation From 256285c80a68364e2dbcabe1b80d0ee58590227c Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 2 Jul 2026 12:31:29 +0200 Subject: [PATCH 3/9] fixes --- .../plugins/ai-sdk-plugin.streaming.test.ts | 170 ++++++++ .../plugins/ai-sdk-plugin.test.ts | 210 ++++++++- .../instrumentation/plugins/ai-sdk-plugin.ts | 409 +++++++++++++----- .../plugins/ai-sdk-v7-telemetry.test.ts | 96 ++++ js/src/instrumentation/registry.test.ts | 5 + js/src/wrappers/ai-sdk/telemetry.ts | 39 +- 6 files changed, 816 insertions(+), 113 deletions(-) diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts index 05d47edfd..e580452ec 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts @@ -19,6 +19,7 @@ import { import { wrapAISDK, wrapAgentClass } from "../../wrappers/ai-sdk"; import { workflowAgentWrapperSpanCountForTesting } from "../../wrappers/ai-sdk/workflow-agent-context"; import { aiSDKChannels } from "./ai-sdk-channels"; +import { AISDKPlugin } from "./ai-sdk-plugin"; try { configureNode(); @@ -258,6 +259,95 @@ describe("AI SDK streaming instrumentation", () => { expect(workflowAgentWrapperSpanCountForTesting()).toBe(0); }); + test("wrapAISDK unregisters WorkflowAgent spans when textStream is cancelled early", async () => { + expect(await backgroundLogger.drain()).toHaveLength(0); + expect(workflowAgentWrapperSpanCountForTesting()).toBe(0); + + class WorkflowAgent { + async stream(params: any) { + return { + messages: params.messages, + steps: [], + baseStream: new ReadableStream({ + start(controller) { + controller.enqueue({ type: "text-delta", delta: "first" }); + }, + }), + textStream: (async function* () { + yield "first"; + yield "second"; + })(), + }; + } + } + + const wrappedWorkflow = wrapAISDK({ WorkflowAgent }); + const agent = new wrappedWorkflow.WorkflowAgent(); + const result = await agent.stream({ + messages: [{ role: "user", content: "Hello" }], + }); + + let text = ""; + for await (const chunk of result.textStream) { + text += chunk; + break; + } + + expect(text).toBe("first"); + expect(workflowAgentWrapperSpanCountForTesting()).toBe(0); + + const spans = (await backgroundLogger.drain()) as any[]; + expect( + spans.find( + (span) => span.span_attributes?.name === "WorkflowAgent.stream", + ), + ).toBeDefined(); + }); + + test("wrapAISDK unregisters WorkflowAgent spans when baseStream is cancelled", async () => { + expect(await backgroundLogger.drain()).toHaveLength(0); + expect(workflowAgentWrapperSpanCountForTesting()).toBe(0); + + let cancelReason: unknown; + class WorkflowAgent { + async stream(params: any) { + return { + messages: params.messages, + steps: [], + baseStream: new ReadableStream({ + start(controller) { + controller.enqueue({ type: "text-delta", delta: "first" }); + }, + cancel(reason) { + cancelReason = reason; + }, + }), + }; + } + } + + const wrappedWorkflow = wrapAISDK({ WorkflowAgent }); + const agent = new wrappedWorkflow.WorkflowAgent(); + const result = await agent.stream({ + messages: [{ role: "user", content: "Hello" }], + }); + + const reader = result.baseStream.getReader(); + const first = await reader.read(); + expect(first.done).toBe(false); + await reader.cancel("done early"); + + expect(cancelReason).toBe("done early"); + expect(workflowAgentWrapperSpanCountForTesting()).toBe(0); + + const spans = (await backgroundLogger.drain()) as any[]; + expect( + spans.find( + (span) => span.span_attributes?.name === "WorkflowAgent.stream", + ), + ).toBeDefined(); + }); + test("wrapAISDK records WorkflowAgent instance tool spans", async () => { expect(await backgroundLogger.drain()).toHaveLength(0); @@ -571,4 +661,84 @@ describe("AI SDK streaming instrumentation", () => { contentDelayMs / 1000 / 2, ); }); + + test("baseStream patch preserves derived stream getters", async () => { + expect(await backgroundLogger.drain()).toHaveLength(0); + + const plugin = new AISDKPlugin(); + plugin.enable(); + + try { + let chunkSent = false; + const result = (await aiSDKChannels.streamText.tracePromise( + async () => { + const resultRecord = { + baseStream: new ReadableStream({ + pull(controller) { + if (chunkSent) { + controller.close(); + return; + } + + chunkSent = true; + controller.enqueue({ + type: "text-delta", + id: "text-1", + delta: "fresh", + }); + }, + }), + text: Promise.resolve("fresh"), + } as any; + + Object.defineProperty(resultRecord, "textStream", { + configurable: true, + enumerable: true, + get() { + const [textBranch, baseBranch] = this.baseStream.tee(); + this.baseStream = baseBranch; + return textBranch.pipeThrough( + new TransformStream({ + transform(chunk: any, controller) { + if (chunk.type === "text-delta") { + controller.enqueue(chunk.delta); + } + }, + }), + ); + }, + }); + + return resultRecord; + }, + { + arguments: [ + { + model: "mock-stream-model", + prompt: "Reply with fresh.", + }, + ], + } as any, + )) as any; + + expect( + Object.getOwnPropertyDescriptor(result, "textStream")?.get, + ).toEqual(expect.any(Function)); + + let firstText = ""; + for await (const chunk of result.textStream) { + firstText += chunk; + } + + let secondText = ""; + for await (const chunk of result.textStream) { + secondText += chunk; + } + + expect(firstText).toBe("fresh"); + expect(secondText).toBe("fresh"); + } finally { + plugin.disable(); + } + }); }); diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts index 019c66781..8aef1ddf0 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts @@ -22,7 +22,11 @@ vi.mock("../../wrappers/ai-sdk/telemetry", () => ({ braintrustAISDKTelemetry: telemetryMocks.braintrustAISDKTelemetry, })); -import { AISDKPlugin } from "./ai-sdk-plugin"; +import { + AISDKPlugin, + DEFAULT_DENY_OUTPUT_PATHS, + processAISDKOutput as processAISDKOutputActual, +} from "./ai-sdk-plugin"; import { Attachment } from "../../logger"; import iso from "../../isomorph"; import { serializeAISDKToolsForLogging } from "../../wrappers/ai-sdk/tool-serialization"; @@ -153,7 +157,7 @@ describe("AISDKPlugin", () => { expect(channel?.subscribe).toHaveBeenCalledTimes(1); channel?.handlers[0]?.end({ - arguments: [{ telemetry: { recordInputs: true } }], + arguments: [{ telemetry: {} }], result: dispatcher, }); @@ -209,6 +213,61 @@ describe("AISDKPlugin", () => { expect(originalExecute).toHaveBeenCalledTimes(1); }); + it("passes AI SDK v7 telemetry redaction options to Braintrust callbacks", async () => { + const existingOnStart = vi.fn(); + const dispatcher = { + onEnd: vi.fn(), + onStart: existingOnStart, + }; + + plugin.enable(); + + const channel = mockChannels.get( + "orchestrion:ai:createTelemetryDispatcher", + ); + channel?.handlers[0]?.end({ + arguments: [ + { + telemetry: { + functionId: "redacted-function", + recordInputs: false, + recordOutputs: false, + }, + }, + ], + result: dispatcher, + }); + + const startEvent = { + callId: "call-redacted", + messages: [{ role: "user", content: "hidden input" }], + operationId: "ai.generateText", + }; + await dispatcher.onStart(startEvent); + await dispatcher.onEnd({ + callId: "call-redacted", + operationId: "ai.generateText", + text: "hidden output", + }); + + expect(existingOnStart).toHaveBeenCalledWith(startEvent); + expect(telemetryMocks.telemetry.onStart).toHaveBeenCalledWith( + expect.objectContaining({ + functionId: "redacted-function", + recordInputs: false, + recordOutputs: false, + }), + ); + expect(telemetryMocks.telemetry.onEnd).toHaveBeenCalledWith( + expect.objectContaining({ + functionId: "redacted-function", + recordInputs: false, + recordOutputs: false, + }), + ); + expect(startEvent).not.toHaveProperty("recordInputs"); + }); + it("stamps a stable unique operation key on each dispatcher", async () => { const dispatcherA = { executeTool: vi.fn(({ execute }) => execute()), @@ -1120,6 +1179,153 @@ describe("AI SDK utility functions", () => { expect(result.roundtrips[0].response.data).toBe("ok"); }); + it("preserves user headers fields while omitting configured transport headers", () => { + const output = { + text: "Hello", + object: { + headers: { "x-user-data": "keep" }, + }, + content: [ + { + type: "text", + text: "Hello", + headers: { source: "tool-payload" }, + }, + ], + request: { + headers: { authorization: "secret" }, + body: "secret-request-body", + providerPayload: { + headers: { authorization: "nested-request-secret" }, + }, + }, + response: { + headers: { authorization: "secret" }, + body: "secret-body", + id: "response-id", + messages: [ + { + role: "assistant", + content: [ + { + type: "provider-result", + result: { + headers: { authorization: "nested-secret" }, + id: "nested-provider-response-id", + }, + }, + ], + }, + ], + }, + rawResponse: { + headers: { authorization: "secret" }, + }, + responses: [ + { + headers: { authorization: "secret" }, + id: "provider-response-id", + }, + ], + roundtrips: [ + { + request: { + headers: { authorization: "secret" }, + body: "secret-roundtrip-request-body", + providerPayload: { + headers: { authorization: "nested-roundtrip-request-secret" }, + }, + }, + response: { + headers: { authorization: "secret" }, + id: "roundtrip-response-id", + }, + }, + ], + steps: [ + { + request: { + headers: { authorization: "secret" }, + body: "secret-step-request-body", + providerPayload: { + headers: { authorization: "nested-step-request-secret" }, + }, + }, + response: { + headers: { authorization: "secret" }, + body: "secret-step-body", + id: "step-response-id", + messages: [ + { + role: "assistant", + content: [ + { + type: "provider-result", + result: { + headers: { authorization: "nested-step-secret" }, + id: "nested-step-provider-response-id", + }, + }, + ], + }, + ], + }, + output: { + headers: { "x-user-data": "keep-step" }, + }, + responses: [ + { + headers: { authorization: "secret" }, + id: "step-provider-response-id", + }, + ], + }, + ], + }; + + const result = processAISDKOutputActual( + output as any, + DEFAULT_DENY_OUTPUT_PATHS, + ) as Record; + + expect(result.object.headers).toEqual({ "x-user-data": "keep" }); + expect(result.content[0].headers).toEqual({ source: "tool-payload" }); + expect(result.steps[0].output.headers).toEqual({ + "x-user-data": "keep-step", + }); + const serializedResult = JSON.stringify(result); + expect(serializedResult).not.toContain("secret-request-body"); + expect(serializedResult).not.toContain("secret-roundtrip-request-body"); + expect(serializedResult).not.toContain("secret-step-request-body"); + expect(serializedResult).not.toContain("authorization"); + expect(result.request).not.toHaveProperty("headers"); + expect(result.request.providerPayload).not.toHaveProperty("headers"); + expect(result.response).not.toHaveProperty("headers"); + expect(result.response.body).toBe(""); + expect(result.response.messages[0].content[0].result).not.toHaveProperty( + "headers", + ); + expect(result.rawResponse).not.toHaveProperty("headers"); + expect(result.responses[0]).not.toHaveProperty("headers"); + if (result.roundtrips) { + expect(result.roundtrips[0].request).not.toHaveProperty("headers"); + expect(result.roundtrips[0].request.providerPayload).not.toHaveProperty( + "headers", + ); + expect(result.roundtrips[0].response).not.toHaveProperty("headers"); + } + expect(result.steps[0].request).not.toHaveProperty("headers"); + expect(result.steps[0].request.providerPayload).not.toHaveProperty( + "headers", + ); + expect(result.steps[0].response).not.toHaveProperty("headers"); + expect(result.steps[0].response.body).toBe(""); + expect( + result.steps[0].response.messages[0].content[0].result, + ).not.toHaveProperty("headers"); + expect(result.steps[0].responses[0]).not.toHaveProperty("headers"); + }); + it("should handle null output", () => { const result = processAISDKOutput(null, []); expect(result).toBeNull(); diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.ts index 7759d117c..c0486a337 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.ts @@ -46,7 +46,10 @@ import type { AISDKTools, AISDKUsage, } from "../../vendor-sdk-types/ai-sdk"; -import type { AISDKV7Telemetry } from "../../vendor-sdk-types/ai-sdk-v7-telemetry"; +import type { + AISDKV7Telemetry, + AISDKV7TelemetryOptions, +} from "../../vendor-sdk-types/ai-sdk-v7-telemetry"; import { BRAINTRUST_AI_SDK_V7_OPERATION_KEY as AI_SDK_V7_OPERATION_KEY } from "../../vendor-sdk-types/ai-sdk-v7-telemetry"; export interface AISDKPluginConfig { @@ -64,14 +67,19 @@ export interface AISDKPluginConfig { export const DEFAULT_DENY_OUTPUT_PATHS: string[] = [ // v3 "roundtrips[].request.body", + "roundtrips[].request.headers", "roundtrips[].response.headers", "rawResponse.headers", "responseMessages", // v5 "request.body", + "request.headers", + "responses[].headers", "response.body", "response.headers", "steps[].request.body", + "steps[].request.headers", + "steps[].responses[].headers", "steps[].response.body", "steps[].response.headers", ]; @@ -85,6 +93,17 @@ const RUNTIME_DENY_OUTPUT_PATHS = Symbol.for( "braintrust.ai-sdk.deny-output-paths", ); let aiSDKV7TelemetryOperationCounter = 0; +const TRANSPORT_PAYLOAD_ROOT_PATHS = [ + "rawResponse", + "request", + "response", + "responses[]", + "roundtrips[].request", + "roundtrips[].response", + "steps[].request", + "steps[].response", + "steps[].responses[]", +]; const AI_SDK_V7_TELEMETRY_CALLBACKS = [ "onStart", @@ -507,7 +526,11 @@ function subscribeToAISDKV7TelemetryDispatcher(): () => void { return; } - patchAISDKV7TelemetryDispatcher(event.result, telemetry); + patchAISDKV7TelemetryDispatcher( + event.result, + telemetry, + telemetryOptions, + ); }, }; @@ -521,6 +544,7 @@ function subscribeToAISDKV7TelemetryDispatcher(): () => void { function patchAISDKV7TelemetryDispatcher( dispatcher: unknown, telemetry: AISDKV7Telemetry, + telemetryOptions?: AISDKV7TelemetryOptions, ): void { if (!isObject(dispatcher)) { return; @@ -532,6 +556,16 @@ function patchAISDKV7TelemetryDispatcher( } dispatcherRecord[AUTO_PATCHED_V7_TELEMETRY_DISPATCHER] = true; let operationKey: string | undefined; + const telemetryEventFields: AISDKV7TelemetryOptions = {}; + if (typeof telemetryOptions?.recordInputs === "boolean") { + telemetryEventFields.recordInputs = telemetryOptions.recordInputs; + } + if (typeof telemetryOptions?.recordOutputs === "boolean") { + telemetryEventFields.recordOutputs = telemetryOptions.recordOutputs; + } + if (typeof telemetryOptions?.functionId === "string") { + telemetryEventFields.functionId = telemetryOptions.functionId; + } const eventWithOperationKey = (event: unknown): unknown => { if (!isObject(event)) { @@ -543,6 +577,25 @@ function patchAISDKV7TelemetryDispatcher( typeof eventRecord.callId === "string" ? eventRecord.callId : "unknown"; operationKey ??= `${callId}:${++aiSDKV7TelemetryOperationCounter}`; + if (Object.keys(telemetryEventFields).length > 0) { + const augmentedEvent = { + ...telemetryEventFields, + ...(event as Record), + }; + try { + Object.defineProperty(augmentedEvent, AI_SDK_V7_OPERATION_KEY, { + configurable: true, + enumerable: false, + value: operationKey, + }); + } catch { + (augmentedEvent as Record)[ + AI_SDK_V7_OPERATION_KEY + ] = operationKey; + } + return augmentedEvent; + } + try { Object.defineProperty(eventRecord, AI_SDK_V7_OPERATION_KEY, { configurable: true, @@ -2204,11 +2257,142 @@ function patchAISDKStreamingResult(args: { span.end(); onComplete?.(); }; + let outputLogged = false; + const logStreamingOutput = async (firstChunkTime?: number) => { + if (outputLogged) { + return; + } + outputLogged = true; + + try { + const metrics = extractTopLevelAISDKMetrics(result, endEvent); + if ( + metrics.time_to_first_token === undefined && + firstChunkTime !== undefined + ) { + metrics.time_to_first_token = firstChunkTime - startTime; + } + + const output = await processAISDKStreamingOutput( + result, + resolveDenyOutputPaths(endEvent, defaultDenyOutputPaths), + ); + const metadata = buildResolvedMetadataPayload(result).metadata; + + span.log({ + output, + ...(metadata ? { metadata } : {}), + metrics, + }); + } catch (error) { + span.log({ error: toLoggedError(error) }); + } finally { + finalize(); + } + }; + const createAsyncIterableHooks = () => { + let firstChunkTime: number | undefined; + + return { + onChunk: (chunk: unknown) => { + if ( + firstChunkTime === undefined && + isAISDKContentAsyncIterableChunk(chunk) + ) { + firstChunkTime = getCurrentUnixTimestamp(); + } + }, + onComplete: async () => { + await logStreamingOutput(firstChunkTime); + }, + onError: (error: Error) => { + if (!outputLogged) { + outputLogged = true; + span.log({ + error: error.message, + }); + } + finalize(); + }, + onCancel: finalize, + }; + }; + const patchAsyncIterableField = (field: string): boolean => { + let descriptorOwner: object | null = resultRecord; + let descriptor: PropertyDescriptor | undefined; + while (descriptorOwner) { + descriptor = Object.getOwnPropertyDescriptor(descriptorOwner, field); + if (descriptor) { + break; + } + descriptorOwner = Object.getPrototypeOf(descriptorOwner); + } + + if ( + !descriptor || + (descriptorOwner === resultRecord && !descriptor.configurable) + ) { + return false; + } + + if ("value" in descriptor) { + if (!isAsyncIterable(descriptor.value)) { + return false; + } + + try { + Object.defineProperty(resultRecord, field, { + configurable: + descriptorOwner === resultRecord ? descriptor.configurable : true, + enumerable: descriptor.enumerable, + value: createPatchedAsyncIterable( + descriptor.value, + createAsyncIterableHooks(), + ), + writable: descriptor.writable, + }); + return true; + } catch { + return false; + } + } + + if (typeof descriptor.get !== "function") { + return false; + } + + const originalGet = descriptor.get; + const originalSet = descriptor.set; + try { + Object.defineProperty(resultRecord, field, { + configurable: + descriptorOwner === resultRecord ? descriptor.configurable : true, + enumerable: descriptor.enumerable, + get() { + const stream = originalGet.call(this); + return isAsyncIterable(stream) + ? createPatchedAsyncIterable(stream, createAsyncIterableHooks()) + : stream; + }, + ...(originalSet + ? { + set(value: unknown) { + originalSet.call(this, value); + }, + } + : {}), + }); + return true; + } catch { + return false; + } + }; + let patched = false; if (isReadableStreamLike(resultRecord.baseStream)) { let firstChunkTime: number | undefined; - const wrappedBaseStream = resultRecord.baseStream.pipeThrough( + const transformedBaseStream = resultRecord.baseStream.pipeThrough( new TransformStream({ transform(chunk, controller) { if ( @@ -2220,34 +2404,35 @@ function patchAISDKStreamingResult(args: { controller.enqueue(chunk); }, async flush() { - try { - const metrics = extractTopLevelAISDKMetrics(result, endEvent); - if ( - metrics.time_to_first_token === undefined && - firstChunkTime !== undefined - ) { - metrics.time_to_first_token = firstChunkTime - startTime; - } - - const output = await processAISDKStreamingOutput( - result, - resolveDenyOutputPaths(endEvent, defaultDenyOutputPaths), - ); - const metadata = buildResolvedMetadataPayload(result).metadata; - - span.log({ - output, - ...(metadata ? { metadata } : {}), - metrics, - }); - } catch (error) { - span.log({ error: toLoggedError(error) }); - } finally { - finalize(); - } + await logStreamingOutput(firstChunkTime); }, }), ); + const reader = transformedBaseStream.getReader(); + const wrappedBaseStream = new ReadableStream({ + async pull(controller) { + try { + const { done, value } = await reader.read(); + if (done) { + controller.close(); + return; + } + + controller.enqueue(value); + } catch (error) { + span.log({ error: toLoggedError(error) }); + finalize(); + controller.error(error); + } + }, + async cancel(reason) { + try { + finalize(); + } finally { + await reader.cancel(reason); + } + }, + }); Object.defineProperty(resultRecord, "baseStream", { configurable: true, @@ -2256,72 +2441,19 @@ function patchAISDKStreamingResult(args: { writable: true, }); - return true; + patched = true; } - const streamField = findAsyncIterableField(resultRecord, [ + for (const field of [ "partialObjectStream", "textStream", "fullStream", "stream", - ]); - if (!streamField) { - return false; + ]) { + patched = patchAsyncIterableField(field) || patched; } - let firstChunkTime: number | undefined; - const wrappedStream = createPatchedAsyncIterable(streamField.stream, { - onChunk: (chunk) => { - if ( - firstChunkTime === undefined && - isAISDKContentAsyncIterableChunk(chunk) - ) { - firstChunkTime = getCurrentUnixTimestamp(); - } - }, - onComplete: async () => { - try { - const metrics = extractTopLevelAISDKMetrics(result, endEvent); - if ( - metrics.time_to_first_token === undefined && - firstChunkTime !== undefined - ) { - metrics.time_to_first_token = firstChunkTime - startTime; - } - - const output = await processAISDKStreamingOutput( - result, - resolveDenyOutputPaths(endEvent, defaultDenyOutputPaths), - ); - const metadata = buildResolvedMetadataPayload(result).metadata; - - span.log({ - output, - ...(metadata ? { metadata } : {}), - metrics, - }); - } catch (error) { - span.log({ error: toLoggedError(error) }); - } finally { - finalize(); - } - }, - onError: (error) => { - span.log({ - error: error.message, - }); - finalize(); - }, - }); - - Object.defineProperty(resultRecord, streamField.field, { - configurable: true, - enumerable: true, - value: wrappedStream, - writable: true, - }); - - return true; + return patched; } function attachKnownResultPromiseHandlers( @@ -2367,27 +2499,10 @@ function isReadableStreamLike(value: unknown): value is { ); } -function findAsyncIterableField( - result: Record, - candidateFields: string[], -): { field: string; stream: AsyncIterable } | null { - for (const field of candidateFields) { - try { - const stream = result[field]; - if (isAsyncIterable(stream)) { - return { field, stream }; - } - } catch { - // Ignore getter failures. - } - } - - return null; -} - function createPatchedAsyncIterable( stream: AsyncIterable, hooks: { + onCancel?: () => void | Promise; onChunk: (chunk: unknown) => void; onComplete: () => Promise; onError: (error: Error) => void; @@ -2395,17 +2510,28 @@ function createPatchedAsyncIterable( ): AsyncIterable { return { async *[Symbol.asyncIterator]() { + let completed = false; try { for await (const chunk of stream) { hooks.onChunk(chunk); yield chunk; } + completed = true; await hooks.onComplete(); } catch (error) { + completed = true; hooks.onError( error instanceof Error ? error : new Error(String(error)), ); throw error; + } finally { + if (!completed) { + try { + await hooks.onCancel?.(); + } catch { + // Ignore cleanup errors so stream cancellation keeps its behavior. + } + } } }, }; @@ -2589,11 +2715,65 @@ export function processAISDKOutput( if (!output) return output; const merged = extractSerializableOutputFields(output); - - // Apply omit to remove unwanted paths - return normalizeAISDKLoggedOutput( - removeHeadersDeep(omit(merged, denyOutputPaths)), + const deleteOutputPaths = denyOutputPaths.filter((path) => + path.toLowerCase().endsWith("headers"), ); + const sanitized = omit(merged, denyOutputPaths, deleteOutputPaths); + + // Transport payloads can contain nested provider request/response headers; keep + // user/model/tool payload fields named "headers" outside these roots intact. + for (const path of TRANSPORT_PAYLOAD_ROOT_PATHS) { + const stack: Array<{ + obj: Record | unknown[] | undefined; + keys: (string | number)[]; + }> = [{ obj: sanitized, keys: parsePath(path) }]; + + while (stack.length > 0) { + const entry = stack.pop(); + if (!entry || entry.keys.length === 0) { + continue; + } + + const firstKey = entry.keys[0]; + const remainingKeys = entry.keys.slice(1); + + if (firstKey === "[]") { + if (Array.isArray(entry.obj)) { + for (const item of entry.obj) { + stack.push({ + obj: item as Record | unknown[] | undefined, + keys: remainingKeys, + }); + } + } + continue; + } + + if ( + !entry.obj || + typeof entry.obj !== "object" || + !(firstKey in entry.obj) + ) { + continue; + } + + const record = entry.obj as Record; + if (remainingKeys.length === 0) { + record[firstKey] = removeHeadersDeep(record[firstKey]); + continue; + } + + stack.push({ + obj: record[firstKey] as + | Record + | unknown[] + | undefined, + keys: remainingKeys, + }); + } + } + + return normalizeAISDKLoggedOutput(sanitized); } export function processAISDKEmbeddingOutput( @@ -3212,6 +3392,7 @@ function parsePath(path: string): (string | number)[] { function omitAtPath( obj: Record | unknown[] | undefined, keys: (string | number)[], + deleteLeaf = false, ): void { if (keys.length === 0) return; @@ -3225,13 +3406,18 @@ function omitAtPath( omitAtPath( item as Record | unknown[] | undefined, remainingKeys, + deleteLeaf, ); } }); } } else if (remainingKeys.length === 0) { if (obj && typeof obj === "object" && firstKey in obj) { - (obj as Record)[firstKey] = ""; + if (deleteLeaf) { + delete (obj as Record)[firstKey]; + } else { + (obj as Record)[firstKey] = ""; + } } } else { if (obj && typeof obj === "object" && firstKey in obj) { @@ -3241,6 +3427,7 @@ function omitAtPath( | unknown[] | undefined, remainingKeys, + deleteLeaf, ); } } @@ -3252,12 +3439,14 @@ function omitAtPath( function omit( obj: Record, paths: string[], + deletePaths: string[] = [], ): Record { const result = deepCopy(obj); + const deletePathSet = new Set(deletePaths); for (const path of paths) { const keys = parsePath(path); - omitAtPath(result, keys); + omitAtPath(result, keys, deletePathSet.has(path)); } return result; diff --git a/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts b/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts index 276028885..1f77608bc 100644 --- a/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts @@ -599,6 +599,102 @@ describe("braintrustAISDKTelemetry", () => { }); }); + it("keeps concurrent direct WorkflowAgent telemetry separated without dispatcher keys", async () => { + const telemetry = braintrustAISDKTelemetry(); + const callId = "workflow-agent"; + const sleep = (ms: number) => + new Promise((resolve) => setTimeout(resolve, ms)); + + const runWorkflow = async (label: "First" | "Second", delayMs: number) => { + telemetry.onStart?.({ + callId, + messages: [{ role: "user", content: `${label} workflow run` }], + operationId: "ai.workflowAgent.stream", + }); + + await sleep(delayMs); + + telemetry.onLanguageModelCallStart?.({ + callId, + prompt: [{ role: "user", content: `${label} workflow run` }], + }); + telemetry.onLanguageModelCallEnd?.({ + callId, + text: `${label} model answer`, + }); + telemetry.onToolExecutionStart?.({ + toolCall: { + toolCallId: `tool-${label}`, + toolName: "get_weather", + input: { location: label }, + }, + }); + telemetry.onToolExecutionEnd?.({ + output: { condition: label }, + success: true, + toolCall: { + toolCallId: `tool-${label}`, + toolName: "get_weather", + }, + }); + telemetry.onEnd?.({ + callId, + messages: [{ role: "assistant", content: `${label} answer` }], + operationId: "ai.workflowAgent.stream", + text: `${label} answer`, + }); + }; + + await Promise.all([runWorkflow("First", 20), runWorkflow("Second", 0)]); + + const spans = (await backgroundLogger.drain()) as Array< + Record + >; + const workflowSpans = spans.filter( + (span) => span.span_attributes?.name === "WorkflowAgent.stream", + ); + const firstWorkflow = workflowSpans.find((span) => + JSON.stringify(span.input).includes("First workflow run"), + ); + const secondWorkflow = workflowSpans.find((span) => + JSON.stringify(span.input).includes("Second workflow run"), + ); + const firstModel = spans.find( + (span) => + span.span_attributes?.name === "doGenerate" && + JSON.stringify(span.input).includes("First workflow run"), + ); + const secondModel = spans.find( + (span) => + span.span_attributes?.name === "doGenerate" && + JSON.stringify(span.input).includes("Second workflow run"), + ); + const firstTool = spans.find( + (span) => + span.span_attributes?.name === "get_weather" && + span.input?.location === "First", + ); + const secondTool = spans.find( + (span) => + span.span_attributes?.name === "get_weather" && + span.input?.location === "Second", + ); + + expect(workflowSpans).toHaveLength(2); + expect(firstWorkflow?.output).toMatchObject({ text: "First answer" }); + expect(secondWorkflow?.output).toMatchObject({ text: "Second answer" }); + expect(firstModel?.span_parents).toEqual([firstWorkflow?.span_id]); + expect(secondModel?.span_parents).toEqual([secondWorkflow?.span_id]); + expect(firstTool).toMatchObject({ + output: { condition: "First" }, + span_parents: [firstWorkflow?.span_id], + }); + expect(secondTool).toMatchObject({ + output: { condition: "Second" }, + span_parents: [secondWorkflow?.span_id], + }); + }); + it("honors recordInputs and recordOutputs", async () => { const telemetry = braintrustAISDKTelemetry(); diff --git a/js/src/instrumentation/registry.test.ts b/js/src/instrumentation/registry.test.ts index f56374051..4fa54be93 100644 --- a/js/src/instrumentation/registry.test.ts +++ b/js/src/instrumentation/registry.test.ts @@ -4,6 +4,11 @@ import { describe, it, expect, beforeEach, afterEach, vi } from "vitest"; vi.mock("../isomorph", () => ({ default: { newTracingChannel: vi.fn(), + newAsyncLocalStorage: vi.fn(() => ({ + enterWith: vi.fn(), + getStore: vi.fn(() => undefined), + run: vi.fn((_store: unknown, callback: () => unknown) => callback()), + })), getEnv: vi.fn(() => undefined), buildType: "node", }, diff --git a/js/src/wrappers/ai-sdk/telemetry.ts b/js/src/wrappers/ai-sdk/telemetry.ts index 9ec7506fa..2c5af3629 100644 --- a/js/src/wrappers/ai-sdk/telemetry.ts +++ b/js/src/wrappers/ai-sdk/telemetry.ts @@ -24,6 +24,7 @@ import type { AISDKResult, AISDKRerankResult, } from "../../vendor-sdk-types/ai-sdk"; +import iso from "../../isomorph"; import type { AISDKV7LanguageModelCallStartEvent, AISDKV7OperationEvent, @@ -60,6 +61,9 @@ type EmbedSpanState = CallSpanState & { export function braintrustAISDKTelemetry(): AISDKV7Telemetry { const operations = new Map(); const operationKeysByCallId = new Map(); + const workflowOperationKeyStore = iso.newAsyncLocalStorage< + string | undefined + >(); const modelSpans = new Map(); const objectSpans = new Map(); const embedSpans = new Map(); @@ -110,6 +114,13 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { } operations.delete(operationKey); + if (workflowOperationKeyStore.getStore() === operationKey) { + // TODO(luca): Replace ALS.enterWith() with ALS.run() once direct + // telemetry can wrap the full WorkflowAgent callback lifecycle. + // eslint-disable-next-line no-restricted-syntax -- Existing ALS.enterWith() usage tracked by the TODO above. + workflowOperationKeyStore.enterWith(undefined); + } + const keys = operationKeysByCallId.get(state.callId); if (!keys) { return; @@ -176,6 +187,15 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { } } + const workflowOperationKey = workflowOperationKeyStore.getStore(); + if (workflowOperationKey && keys.includes(workflowOperationKey)) { + return workflowOperationKey; + } + + if (callId === "workflow-agent") { + return undefined; + } + return mode === "finish" ? keys[0] : keys[keys.length - 1]; }; @@ -191,10 +211,18 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { if (isObject(event)) { const callId = (event as { callId?: unknown }).callId; if (typeof callId === "string") { - return operationKeyForCallId(callId, mode) ?? callId; + return ( + operationKeyForCallId(callId, mode) ?? + (callId === "workflow-agent" ? undefined : callId) + ); } } + const workflowOperationKey = workflowOperationKeyStore.getStore(); + if (workflowOperationKey && operations.has(workflowOperationKey)) { + return workflowOperationKey; + } + const wrapperSpan = currentWorkflowAgentWrapperSpan(); if (wrapperSpan?.spanId) { for (const [operationKey, state] of operations) { @@ -446,6 +474,15 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { return; } + if (workflowAgent) { + // Direct registerTelemetry() calls do not receive the hidden + // dispatcher operation key used by auto-instrumentation. + // TODO(luca): Replace ALS.enterWith() with ALS.run() once direct + // telemetry can wrap the full WorkflowAgent callback lifecycle. + // eslint-disable-next-line no-restricted-syntax -- Existing ALS.enterWith() usage tracked by the TODO above. + workflowOperationKeyStore.enterWith(operationKey); + } + let metadata = metadataFromEvent(event); const logPayload: { input?: unknown; From de16ddb1404a14ee69a79703a6fb98e7eecf538d Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 2 Jul 2026 16:00:10 +0200 Subject: [PATCH 4/9] fix --- .../ai-sdk-instrumentation/assertions.ts | 9 +++- .../instrumentation/plugins/ai-sdk-plugin.ts | 43 +++++++++++++------ 2 files changed, 39 insertions(+), 13 deletions(-) diff --git a/e2e/scenarios/ai-sdk-instrumentation/assertions.ts b/e2e/scenarios/ai-sdk-instrumentation/assertions.ts index 6d5064b7a..d1f42445c 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/assertions.ts +++ b/e2e/scenarios/ai-sdk-instrumentation/assertions.ts @@ -1285,6 +1285,10 @@ export function defineAISDKInstrumentationAssertions(options: { expect(collectToolResultNames(trace.parent?.output)).toContain( "get_weather", ); + expect(trace.parent?.span.ended).toBe(true); + expect(trace.modelChildren.every((child) => child.span.ended)).toBe( + true, + ); }); } @@ -1332,7 +1336,10 @@ function findWorkflowAgentTrace(events: CapturedLogEvent[]) { operation?.span.id, ); const parent = latestEvent(workflowSpans); - const modelChildren = findModelChildren(events, parent?.span.id); + const modelChildren = [ + ...findChildSpans(events, "doGenerate", parent?.span.id), + ...findChildSpans(events, "doStream", parent?.span.id), + ]; const toolSpans = findChildSpans(events, "get_weather", parent?.span.id); return { diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.ts index c0486a337..c4f6ef268 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.ts @@ -1506,6 +1506,7 @@ type AISDKModelPatchEntry = { baseMetadata: Record; childTracingOptions: AISDKChildTracingOptions; denyOutputPaths: string[]; + openSpans: Set; parentSpan: Span; }; @@ -1615,6 +1616,13 @@ function shadowActiveAISDKChildPatchEntry< } } +function closeOpenAISDKModelPatchSpans(entry: AISDKModelPatchEntry): void { + for (const span of entry.openSpans) { + span.end(); + } + entry.openSpans.clear(); +} + function prepareAISDKChildTracing( params: AISDKCallParams, self: unknown, @@ -1655,9 +1663,11 @@ function prepareAISDKChildTracing( baseMetadata: buildAISDKChildMetadata(resolvedModel), childTracingOptions, denyOutputPaths, + openSpans: new Set(), parentSpan, }; const cleanupModelEntry = (state: AISDKModelPatchState) => { + closeOpenAISDKModelPatchSpans(entry); const index = state.entries.indexOf(entry); if (index >= 0) { state.entries.splice(index, 1); @@ -1715,21 +1725,27 @@ function prepareAISDKChildTracing( return Reflect.apply(originalDoGenerate, resolvedModel, [callOptions]); } + closeOpenAISDKModelPatchSpans(activeEntry); return activeEntry.parentSpan.traced( async (span) => { - const result = await Reflect.apply( - originalDoGenerate, - resolvedModel, - [callOptions], - ); - - span.log({ - output: processAISDKOutput(result, activeEntry.denyOutputPaths), - metrics: extractTokenMetrics(result), - ...buildResolvedMetadataPayload(result), - }); + activeEntry.openSpans.add(span); + try { + const result = await Reflect.apply( + originalDoGenerate, + resolvedModel, + [callOptions], + ); + + span.log({ + output: processAISDKOutput(result, activeEntry.denyOutputPaths), + metrics: extractTokenMetrics(result), + ...buildResolvedMetadataPayload(result), + }); - return result; + return result; + } finally { + activeEntry.openSpans.delete(span); + } }, { name: "doGenerate", @@ -1756,6 +1772,7 @@ function prepareAISDKChildTracing( return Reflect.apply(originalDoStream, resolvedModel, [callOptions]); } + closeOpenAISDKModelPatchSpans(activeEntry); const span = activeEntry.parentSpan.startSpan({ name: "doStream", spanAttributes: { @@ -1769,6 +1786,7 @@ function prepareAISDKChildTracing( }, ), }); + activeEntry.openSpans.add(span); const streamStartTime = getCurrentUnixTimestamp(); const result = await withCurrent(span, () => @@ -1858,6 +1876,7 @@ function prepareAISDKChildTracing( metrics, ...buildResolvedMetadataPayload(output as AISDKResult), }); + activeEntry.openSpans.delete(span); span.end(); break; } From 0dfa517a9d85a17dd9a91e508090d5628f79ce37 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Thu, 2 Jul 2026 17:39:42 +0200 Subject: [PATCH 5/9] fixes --- .../plugins/ai-sdk-plugin.streaming.test.ts | 63 +++++++++++++++ .../instrumentation/plugins/ai-sdk-plugin.ts | 76 ++++++++++++++++--- 2 files changed, 130 insertions(+), 9 deletions(-) diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts index e580452ec..6ae90ef4a 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts @@ -741,4 +741,67 @@ describe("AI SDK streaming instrumentation", () => { plugin.disable(); } }); + + test("async iterable stream accessors preserve ReadableStream methods", async () => { + expect(await backgroundLogger.drain()).toHaveLength(0); + + const plugin = new AISDKPlugin(); + plugin.enable(); + + try { + const result = (await aiSDKChannels.streamText.tracePromise( + async () => { + const resultRecord = { + stream: new ReadableStream({ + start(controller) { + controller.enqueue("v7"); + controller.close(); + }, + }), + text: Promise.resolve("v7"), + } as any; + + Object.defineProperty(resultRecord, "textStream", { + configurable: true, + enumerable: true, + get() { + return this.stream.pipeThrough( + new TransformStream({ + transform(chunk: string, controller) { + controller.enqueue(chunk.toUpperCase()); + }, + }), + ); + }, + }); + + return resultRecord; + }, + { + arguments: [ + { + model: "mock-v7-stream-model", + prompt: "Reply with v7.", + }, + ], + } as any, + )) as any; + + expect(result.stream.pipeThrough).toEqual(expect.any(Function)); + expect(result.stream.getReader).toEqual(expect.any(Function)); + + const textStream = result.textStream; + expect(textStream.pipeThrough).toEqual(expect.any(Function)); + expect(textStream.getReader).toEqual(expect.any(Function)); + + const reader = textStream.getReader(); + const first = await reader.read(); + const second = await reader.read(); + + expect(first).toEqual({ done: false, value: "V7" }); + expect(second).toEqual({ done: true, value: undefined }); + } finally { + plugin.disable(); + } + }); }); diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.ts index c4f6ef268..f723f8450 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.ts @@ -2336,6 +2336,10 @@ function patchAISDKStreamingResult(args: { onCancel: finalize, }; }; + const patchAsyncIterable = (stream: AsyncIterable) => + isReadableStreamLike(stream) + ? createPatchedReadableStream(stream, createAsyncIterableHooks()) + : createPatchedAsyncIterable(stream, createAsyncIterableHooks()); const patchAsyncIterableField = (field: string): boolean => { let descriptorOwner: object | null = resultRecord; let descriptor: PropertyDescriptor | undefined; @@ -2364,10 +2368,7 @@ function patchAISDKStreamingResult(args: { configurable: descriptorOwner === resultRecord ? descriptor.configurable : true, enumerable: descriptor.enumerable, - value: createPatchedAsyncIterable( - descriptor.value, - createAsyncIterableHooks(), - ), + value: patchAsyncIterable(descriptor.value), writable: descriptor.writable, }); return true; @@ -2389,9 +2390,7 @@ function patchAISDKStreamingResult(args: { enumerable: descriptor.enumerable, get() { const stream = originalGet.call(this); - return isAsyncIterable(stream) - ? createPatchedAsyncIterable(stream, createAsyncIterableHooks()) - : stream; + return isAsyncIterable(stream) ? patchAsyncIterable(stream) : stream; }, ...(originalSet ? { @@ -2508,16 +2507,75 @@ function attachKnownResultPromiseHandlers( } } -function isReadableStreamLike(value: unknown): value is { +type ReadableStreamLike = { + cancel?: (reason?: unknown) => Promise; + getReader(): ReadableStreamDefaultReader; pipeThrough(transform: TransformStream): ReadableStream; -} { +}; + +function isReadableStreamLike(value: unknown): value is ReadableStreamLike { return ( value != null && typeof value === "object" && + typeof (value as { getReader?: unknown }).getReader === "function" && typeof (value as { pipeThrough?: unknown }).pipeThrough === "function" ); } +function createPatchedReadableStream( + stream: ReadableStreamLike, + hooks: { + onCancel?: () => void | Promise; + onChunk: (chunk: unknown) => void; + onComplete: () => Promise; + onError: (error: Error) => void; + }, +): ReadableStream { + let reader: ReadableStreamDefaultReader | undefined; + let completed = false; + + return new ReadableStream({ + async pull(controller) { + reader ??= stream.getReader(); + + try { + const { done, value } = await reader.read(); + if (done) { + completed = true; + await hooks.onComplete(); + controller.close(); + return; + } + + hooks.onChunk(value); + controller.enqueue(value); + } catch (error) { + completed = true; + hooks.onError( + error instanceof Error ? error : new Error(String(error)), + ); + controller.error(error); + } + }, + async cancel(reason) { + if (!completed) { + completed = true; + try { + await hooks.onCancel?.(); + } catch { + // Ignore cleanup errors so stream cancellation keeps its behavior. + } + } + + if (reader) { + await reader.cancel(reason); + } else if (stream.cancel) { + await stream.cancel(reason); + } + }, + }); +} + function createPatchedAsyncIterable( stream: AsyncIterable, hooks: { From 5bd3bbffbde3ff247a611343c938ca6dc5cc2683 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Fri, 3 Jul 2026 17:31:31 +0200 Subject: [PATCH 6/9] fix --- .../plugins/ai-sdk-plugin.test.ts | 37 +++++++++++++++++++ .../instrumentation/plugins/ai-sdk-plugin.ts | 19 ++++++---- 2 files changed, 48 insertions(+), 8 deletions(-) diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts index d74b0b7b8..a9236bdac 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts @@ -329,6 +329,43 @@ describe("AISDKPlugin", () => { ); }); + it("preserves existing dispatcher callback return and rejection semantics", async () => { + const rejection = new Error("user telemetry failed"); + let rejectExisting: (error: Error) => void; + const existingPromise = new Promise((_resolve, reject) => { + rejectExisting = reject; + }); + const existingOnStart = vi.fn(() => existingPromise); + telemetryMocks.telemetry.onStart = vi.fn(() => + Promise.reject(new Error("braintrust telemetry failed")), + ); + const dispatcher = { + onStart: existingOnStart, + }; + + plugin.enable(); + + const channel = mockChannels.get( + "orchestrion:ai:createTelemetryDispatcher", + ); + channel?.handlers[0]?.end({ + arguments: [{ telemetry: {} }], + result: dispatcher, + }); + + const returned = dispatcher.onStart({ + callId: "call-reject", + operationId: "ai.generateText", + }); + + expect(returned).toBe(existingPromise); + expect(existingOnStart).toHaveBeenCalledTimes(1); + expect(telemetryMocks.telemetry.onStart).toHaveBeenCalledTimes(1); + + rejectExisting!(rejection); + await expect(returned).rejects.toBe(rejection); + }); + it("patches each dispatcher once and respects telemetry opt-out", () => { const dispatcher = { onStart: vi.fn(), diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.ts index d5fb4735d..1e1a1ff6c 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.ts @@ -623,15 +623,18 @@ function patchAISDKV7TelemetryDispatcher( typeof existingCallback === "function" ? existingCallback.call(dispatcher, event) : undefined; - const braintrustResult = braintrustCallback.call( - telemetry, - eventWithOperationKey(event) as any, - ); - const pending = [existingResult, braintrustResult].filter(isPromiseLike); - - if (pending.length > 0) { - return Promise.allSettled(pending).then(() => undefined); + try { + const braintrustResult = braintrustCallback.call( + telemetry, + eventWithOperationKey(event) as any, + ); + if (isPromiseLike(braintrustResult)) { + void Promise.resolve(braintrustResult).catch(() => undefined); + } + } catch { + // Keep Braintrust telemetry isolated from the user's callback path. } + return existingResult; }; } From 1b92f56f0ced54053e730cce899ec810513f8da8 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 6 Jul 2026 11:24:21 +0200 Subject: [PATCH 7/9] fix(ai-sdk): sanitize workflow agent inputs --- .../__cassettes__/ai-sdk-v7.cassette.json | 1159 +++++++-------- .../ai-sdk-v6-auto-hook.span-tree.json | 2 +- .../ai-sdk-v6-auto-hook.span-tree.txt | 2 +- .../ai-sdk-v6-wrapped.span-tree.json | 2 +- .../ai-sdk-v6-wrapped.span-tree.txt | 2 +- .../ai-sdk-v7-auto-hook.span-tree.json | 997 +++++++++++++ .../ai-sdk-v7-auto-hook.span-tree.txt | 1066 +++++++++++++- .../ai-sdk-v7-explicit.span-tree.json | 1193 ++++++++++++++++ .../ai-sdk-v7-explicit.span-tree.txt | 1260 ++++++++++++++++- .../ai-sdk-instrumentation/assertions.ts | 129 +- .../ai-sdk-instrumentation/scenario.impl.mjs | 53 +- .../plugins/ai-sdk-plugin.streaming.test.ts | 18 +- .../plugins/ai-sdk-plugin.test.ts | 91 ++ .../instrumentation/plugins/ai-sdk-plugin.ts | 148 +- .../plugins/ai-sdk-v7-telemetry.test.ts | 77 +- js/src/vendor-sdk-types/ai-sdk-common.ts | 4 +- js/src/wrappers/ai-sdk/telemetry.ts | 55 +- 17 files changed, 5357 insertions(+), 901 deletions(-) diff --git a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.json b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.json index 87aa0eeed..704556497 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v7.cassette.json @@ -1,13 +1,10 @@ { - "meta": { - "createdAt": "2026-06-15T13:08:33.188Z" - }, "entries": [ { "callIndex": 0, "id": "9aa262365558ebc2", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:36:50.233Z", + "recordedAt": "2026-07-06T08:53:25.361Z", "request": { "body": { "kind": "json", @@ -40,11 +37,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1782905810, - "created_at": 1782905809, + "completed_at": 1783328005, + "created_at": 1783328004, "error": null, "frequency_penalty": 0, - "id": "resp_0348ef0bcf29c7a9006a44fbd19e6481a1a6bf4c1982861b47", + "id": "resp_08330a3aa71fd2ea006a4b6d04d31c81a2adc1b192c3d86d36", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -63,7 +60,7 @@ "type": "output_text" } ], - "id": "msg_0348ef0bcf29c7a9006a44fbd2130c81a1b57271d385ab73b6", + "id": "msg_08330a3aa71fd2ea006a4b6d05328881a29690b891c24d255f", "role": "assistant", "status": "completed", "type": "message" @@ -131,13 +128,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451d7d7b4a5a6b-VIE", + "cf-ray": "a16d60fd79765aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:36:50 GMT", + "date": "Mon, 06 Jul 2026 08:53:25 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "655", + "openai-processing-ms": "559", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -151,7 +148,7 @@ "x-ratelimit-remaining-tokens": "149999962", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "f1d6c868-7785-4ae3-9ea0-d60be05b745f" + "x-request-id": "ac58db47-746a-47f9-856d-429423dea797" }, "status": 200, "statusText": "OK" @@ -161,7 +158,7 @@ "callIndex": 1, "id": "9e077c56377ca81c", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:36:51.426Z", + "recordedAt": "2026-07-06T08:53:26.245Z", "request": { "body": { "kind": "json", @@ -212,11 +209,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1782905811, - "created_at": 1782905810, + "completed_at": 1783328006, + "created_at": 1783328005, "error": null, "frequency_penalty": 0, - "id": "resp_04b05ea9abbdaf41006a44fbd27738819ebae857af0d3bd794", + "id": "resp_0bdf0712f92a4636006a4b6d058d7c8191872b5e6b8eb3cc01", "incomplete_details": null, "instructions": null, "max_output_tokens": 32, @@ -235,7 +232,7 @@ "type": "output_text" } ], - "id": "msg_04b05ea9abbdaf41006a44fbd30c24819e97d83368a212ffa5", + "id": "msg_0bdf0712f92a4636006a4b6d0610cc8191ad947e13c4143eed", "role": "assistant", "status": "completed", "type": "message" @@ -316,13 +313,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451d82dd1d5a6b-VIE", + "cf-ray": "a16d61021d465aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:36:51 GMT", + "date": "Mon, 06 Jul 2026 08:53:26 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1000", + "openai-processing-ms": "700", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -333,10 +330,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999937", + "x-ratelimit-remaining-tokens": "149999935", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "1737e2b1-3b49-477b-8287-d7627795ae57" + "x-request-id": "a27dc479-aba2-4323-9c85-42370a8f489c" }, "status": 200, "statusText": "OK" @@ -346,7 +343,7 @@ "callIndex": 2, "id": "bdbf85bb8f9015c8", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:36:52.400Z", + "recordedAt": "2026-07-06T08:53:27.526Z", "request": { "body": { "kind": "json", @@ -375,20 +372,20 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0b9c56d090cafe02006a44fbd3a5b481a0809da4876a70b3e5\",\"object\":\"response\",\"created_at\":1782905811,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", - "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0b9c56d090cafe02006a44fbd3a5b481a0809da4876a70b3e5\",\"object\":\"response\",\"created_at\":1782905811,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", - "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}", - "event: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"One\",\"item_id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"logprobs\":[],\"obfuscation\":\"TS0gW9dnuWRap\",\"output_index\":0,\"sequence_number\":4}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"logprobs\":[],\"obfuscation\":\"VFJbHuFkWkWaejM\",\"output_index\":0,\"sequence_number\":5}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" two\",\"item_id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"logprobs\":[],\"obfuscation\":\"R9NsOD2ZrAhK\",\"output_index\":0,\"sequence_number\":6}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"logprobs\":[],\"obfuscation\":\"OzoL78ZCdl4i2i0\",\"output_index\":0,\"sequence_number\":7}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" three\",\"item_id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"logprobs\":[],\"obfuscation\":\"avL7DCNlgv\",\"output_index\":0,\"sequence_number\":8}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"logprobs\":[],\"obfuscation\":\"qxurc5sy78vmaLj\",\"output_index\":0,\"sequence_number\":9}", - "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":10,\"text\":\"One, two, three.\"}", - "event: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"},\"sequence_number\":11}", - "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"}],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":12}", - "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0b9c56d090cafe02006a44fbd3a5b481a0809da4876a70b3e5\",\"object\":\"response\",\"created_at\":1782905811,\"status\":\"completed\",\"background\":false,\"completed_at\":1782905812,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"msg_0b9c56d090cafe02006a44fbd42e8c81a08c65b55aaeef3780\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":22,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":7,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":29},\"user\":null,\"metadata\":{}},\"sequence_number\":13}" + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_059c6f0039554967006a4b6d06ca1481a1a05e6f1c4f213ec4\",\"object\":\"response\",\"created_at\":1783328006,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_059c6f0039554967006a4b6d06ca1481a1a05e6f1c4f213ec4\",\"object\":\"response\",\"created_at\":1783328006,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"One\",\"item_id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"logprobs\":[],\"obfuscation\":\"1i0hcTX0rW78S\",\"output_index\":0,\"sequence_number\":4}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"logprobs\":[],\"obfuscation\":\"r1z2uLpHvpRmlMy\",\"output_index\":0,\"sequence_number\":5}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" two\",\"item_id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"logprobs\":[],\"obfuscation\":\"mAYuxm3oQlOt\",\"output_index\":0,\"sequence_number\":6}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"logprobs\":[],\"obfuscation\":\"gG6yrC9dYOXPnfu\",\"output_index\":0,\"sequence_number\":7}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" three\",\"item_id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"logprobs\":[],\"obfuscation\":\"hLETIrXwkM\",\"output_index\":0,\"sequence_number\":8}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"logprobs\":[],\"obfuscation\":\"LrlAfYpXpmv76Gy\",\"output_index\":0,\"sequence_number\":9}", + "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":10,\"text\":\"One, two, three.\"}", + "event: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"},\"sequence_number\":11}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"}],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":12}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_059c6f0039554967006a4b6d06ca1481a1a05e6f1c4f213ec4\",\"object\":\"response\",\"created_at\":1783328006,\"status\":\"completed\",\"background\":false,\"completed_at\":1783328007,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"msg_059c6f0039554967006a4b6d073e7081a1a9700578a824d5be\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"One, two, three.\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":22,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":7,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":29},\"user\":null,\"metadata\":{}},\"sequence_number\":13}" ], "kind": "sse" }, @@ -396,12 +393,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451d8a3f5a5a6b-VIE", + "cf-ray": "a16d6107a9995aad-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Wed, 01 Jul 2026 11:36:51 GMT", + "date": "Mon, 06 Jul 2026 08:53:26 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "129", + "openai-processing-ms": "343", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -409,7 +406,7 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "83e34dc6-c6b7-4bd7-be80-bb48ac896348" + "x-request-id": "b9bea91a-bab9-971d-ba50-6a5dcb1a54bf" }, "status": 200, "statusText": "OK" @@ -419,7 +416,7 @@ "callIndex": 0, "id": "49a95bf2b3466013", "matchKey": "POST api.openai.com/v1/embeddings", - "recordedAt": "2026-07-01T11:36:52.623Z", + "recordedAt": "2026-07-06T08:53:27.757Z", "request": { "body": { "kind": "json", @@ -1007,13 +1004,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451d9079245a6b-VIE", + "cf-ray": "a16d610fa80c5aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:36:52 GMT", + "date": "Mon, 06 Jul 2026 08:53:27 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "68", + "openai-processing-ms": "75", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1028,7 +1025,7 @@ "x-ratelimit-remaining-tokens": "9999993", "x-ratelimit-reset-requests": "6ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "b4a842ba-4420-4fd0-be72-cc00164c83d9" + "x-request-id": "ff774c96-46e7-4109-8347-79e71b35cec4" }, "status": 200, "statusText": "OK" @@ -1038,7 +1035,7 @@ "callIndex": 1, "id": "fcc3d17c88f1552b", "matchKey": "POST api.openai.com/v1/embeddings", - "recordedAt": "2026-07-01T11:36:52.837Z", + "recordedAt": "2026-07-06T08:53:28.014Z", "request": { "body": { "kind": "json", @@ -1067,13 +1064,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451d91c9875a6b-VIE", + "cf-ray": "a16d611119235aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:36:52 GMT", + "date": "Mon, 06 Jul 2026 08:53:28 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "76", + "openai-processing-ms": "83", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1088,7 +1085,7 @@ "x-ratelimit-remaining-tokens": "9999985", "x-ratelimit-reset-requests": "6ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "cd17b8fe-5d3f-4b3a-8e19-965528fa7643" + "x-request-id": "352d49f9-cdf2-4cb5-97f9-e6ae7cfe793e" }, "status": 200, "statusText": "OK" @@ -1098,7 +1095,7 @@ "callIndex": 3, "id": "e09f32cc805b35e9", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:36:53.803Z", + "recordedAt": "2026-07-06T08:53:28.994Z", "request": { "body": { "kind": "json", @@ -1155,11 +1152,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1782905813, - "created_at": 1782905813, + "completed_at": 1783328008, + "created_at": 1783328008, "error": null, "frequency_penalty": 0, - "id": "resp_0d1670a4a982ae06006a44fbd50dd4819ca2bc96afa7993544", + "id": "resp_0caab4837986b3f6006a4b6d0835dc81a29648f60128b5682c", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1171,8 +1168,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_2Q7v9joZrNYZM7MGcOJ7m0Kr", - "id": "fc_0d1670a4a982ae06006a44fbd5a3bc819c94f9d101027baa9c", + "call_id": "call_uPHoh5wVkNKZDjSCr3lPK1Z5", + "id": "fc_0caab4837986b3f6006a4b6d08c37c81a2bb30cd909a4d987c", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1259,13 +1256,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451d9309eb5a6b-VIE", + "cf-ray": "a16d6112aa355aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:36:53 GMT", + "date": "Mon, 06 Jul 2026 08:53:29 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "780", + "openai-processing-ms": "784", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1276,10 +1273,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999687", + "x-ratelimit-remaining-tokens": "149999690", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "f7672a23-8157-4391-9117-b7a2795d1198" + "x-request-id": "d0f4cc66-d61f-4bb8-be06-3a834aeebcd0" }, "status": 200, "statusText": "OK" @@ -1287,9 +1284,9 @@ }, { "callIndex": 4, - "id": "ac165a19d6cc00c6", + "id": "9b6a4c88a394b4f0", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:36:54.765Z", + "recordedAt": "2026-07-06T08:53:29.923Z", "request": { "body": { "kind": "json", @@ -1309,11 +1306,11 @@ "role": "user" }, { - "id": "fc_0d1670a4a982ae06006a44fbd5a3bc819c94f9d101027baa9c", + "id": "fc_0caab4837986b3f6006a4b6d08c37c81a2bb30cd909a4d987c", "type": "item_reference" }, { - "call_id": "call_2Q7v9joZrNYZM7MGcOJ7m0Kr", + "call_id": "call_uPHoh5wVkNKZDjSCr3lPK1Z5", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1355,11 +1352,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1782905814, - "created_at": 1782905814, + "completed_at": 1783328009, + "created_at": 1783328009, "error": null, "frequency_penalty": 0, - "id": "resp_0d1670a4a982ae06006a44fbd5ff34819c86ef100a58b377b5", + "id": "resp_0caab4837986b3f6006a4b6d09332481a288cca120db162bd0", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1371,8 +1368,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_J2mBiH5mXs6wRrpj5za8jTbl", - "id": "fc_0d1670a4a982ae06006a44fbd69938819cbce2cd7ca7e4aa82", + "call_id": "call_b2lYM8hPhHxrfckl6q6sCCTM", + "id": "fc_0caab4837986b3f6006a4b6d09a92c81a281d78cc11a7c1ee6", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1459,13 +1456,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451d98fba15a6b-VIE", + "cf-ray": "a16d6118bfca5aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:36:54 GMT", + "date": "Mon, 06 Jul 2026 08:53:29 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "803", + "openai-processing-ms": "724", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1479,7 +1476,7 @@ "x-ratelimit-remaining-tokens": "149999650", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "e58ea406-fd31-408a-8dca-9a98622087d1" + "x-request-id": "211242b1-c91a-4d2d-ba76-441c83f3aaa9" }, "status": 200, "statusText": "OK" @@ -1487,9 +1484,9 @@ }, { "callIndex": 5, - "id": "9953f150c1ffa8a0", + "id": "ae415b8842be2ef3", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:36:56.030Z", + "recordedAt": "2026-07-06T08:53:31.120Z", "request": { "body": { "kind": "json", @@ -1509,20 +1506,20 @@ "role": "user" }, { - "id": "fc_0d1670a4a982ae06006a44fbd5a3bc819c94f9d101027baa9c", + "id": "fc_0caab4837986b3f6006a4b6d08c37c81a2bb30cd909a4d987c", "type": "item_reference" }, { - "call_id": "call_2Q7v9joZrNYZM7MGcOJ7m0Kr", + "call_id": "call_uPHoh5wVkNKZDjSCr3lPK1Z5", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0d1670a4a982ae06006a44fbd69938819cbce2cd7ca7e4aa82", + "id": "fc_0caab4837986b3f6006a4b6d09a92c81a281d78cc11a7c1ee6", "type": "item_reference" }, { - "call_id": "call_J2mBiH5mXs6wRrpj5za8jTbl", + "call_id": "call_b2lYM8hPhHxrfckl6q6sCCTM", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1564,11 +1561,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1782905815, - "created_at": 1782905815, + "completed_at": 1783328010, + "created_at": 1783328010, "error": null, "frequency_penalty": 0, - "id": "resp_0d1670a4a982ae06006a44fbd6f700819cb7ac7acf214ce1d8", + "id": "resp_0caab4837986b3f6006a4b6d0a212481a2a92808d995b1e13e", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1580,8 +1577,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_EyyNRQfPYeHhb9lc8TNZ6WtZ", - "id": "fc_0d1670a4a982ae06006a44fbd7c610819cb4841356f23c3429", + "call_id": "call_tlq2OdrQF8d7RsHw1f9kOjgm", + "id": "fc_0caab4837986b3f6006a4b6d0aacdc81a2be14bc16ed684d76", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1668,13 +1665,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451d9efdf95a6b-VIE", + "cf-ray": "a16d611eac8e5aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:36:56 GMT", + "date": "Mon, 06 Jul 2026 08:53:31 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1099", + "openai-processing-ms": "999", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1685,10 +1682,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999612", + "x-ratelimit-remaining-tokens": "149999610", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "f29f86b4-fa2a-4168-8945-db203ca8ca05" + "x-request-id": "dcca3c6a-9195-4a30-a312-1ff18980bd0a" }, "status": 200, "statusText": "OK" @@ -1696,9 +1693,9 @@ }, { "callIndex": 6, - "id": "bf0ae6643e03845d", + "id": "9f78724fde1e3868", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:36:57.177Z", + "recordedAt": "2026-07-06T08:53:32.169Z", "request": { "body": { "kind": "json", @@ -1718,29 +1715,29 @@ "role": "user" }, { - "id": "fc_0d1670a4a982ae06006a44fbd5a3bc819c94f9d101027baa9c", + "id": "fc_0caab4837986b3f6006a4b6d08c37c81a2bb30cd909a4d987c", "type": "item_reference" }, { - "call_id": "call_2Q7v9joZrNYZM7MGcOJ7m0Kr", + "call_id": "call_uPHoh5wVkNKZDjSCr3lPK1Z5", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0d1670a4a982ae06006a44fbd69938819cbce2cd7ca7e4aa82", + "id": "fc_0caab4837986b3f6006a4b6d09a92c81a281d78cc11a7c1ee6", "type": "item_reference" }, { - "call_id": "call_J2mBiH5mXs6wRrpj5za8jTbl", + "call_id": "call_b2lYM8hPhHxrfckl6q6sCCTM", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0d1670a4a982ae06006a44fbd7c610819cb4841356f23c3429", + "id": "fc_0caab4837986b3f6006a4b6d0aacdc81a2be14bc16ed684d76", "type": "item_reference" }, { - "call_id": "call_EyyNRQfPYeHhb9lc8TNZ6WtZ", + "call_id": "call_tlq2OdrQF8d7RsHw1f9kOjgm", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1782,11 +1779,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1782905817, - "created_at": 1782905816, + "completed_at": 1783328012, + "created_at": 1783328011, "error": null, "frequency_penalty": 0, - "id": "resp_0d1670a4a982ae06006a44fbd8401c819ca9812b93377bfe47", + "id": "resp_0caab4837986b3f6006a4b6d0b5a9881a2930159c9c160222f", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1798,8 +1795,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_m9y7HRD5gRKrWDTEZXJOTdm6", - "id": "fc_0d1670a4a982ae06006a44fbd8efd4819cb6b504cf8fbc2cfc", + "call_id": "call_KYYvnyVTxE0db1wyzGVFcYU8", + "id": "fc_0caab4837986b3f6006a4b6d0bf69481a28e1594f775c219ba", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1886,13 +1883,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451da6f9325a6b-VIE", + "cf-ray": "a16d61263b0b5aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:36:57 GMT", + "date": "Mon, 06 Jul 2026 08:53:32 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "964", + "openai-processing-ms": "826", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1906,7 +1903,7 @@ "x-ratelimit-remaining-tokens": "149999572", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "063a6d44-dea2-4039-88c5-257076e01b2d" + "x-request-id": "92470d24-a2e0-47b9-a2b4-5d4479b92169" }, "status": 200, "statusText": "OK" @@ -1916,7 +1913,7 @@ "callIndex": 7, "id": "d22bae6c42006c81", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:36:57.945Z", + "recordedAt": "2026-07-06T08:53:33.095Z", "request": { "body": { "kind": "json", @@ -1967,11 +1964,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1782905817, - "created_at": 1782905817, + "completed_at": 1783328012, + "created_at": 1783328012, "error": null, "frequency_penalty": 0, - "id": "resp_07d0eacb5e020f19006a44fbd9638c8191bf06a3346592d6d4", + "id": "resp_003585194981413b006a4b6d0c5fb481a2ba6831476429edaf", "incomplete_details": null, "instructions": null, "max_output_tokens": 32, @@ -1990,7 +1987,7 @@ "type": "output_text" } ], - "id": "msg_07d0eacb5e020f19006a44fbd9cd088191a86403d6e5e83780", + "id": "msg_003585194981413b006a4b6d0cd2ec81a2a5bd89e6f6b8a596", "role": "assistant", "status": "completed", "type": "message" @@ -2071,13 +2068,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451dae0b145a6b-VIE", + "cf-ray": "a16d612ca8305aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:36:58 GMT", + "date": "Mon, 06 Jul 2026 08:53:33 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "588", + "openai-processing-ms": "731", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2091,7 +2088,7 @@ "x-ratelimit-remaining-tokens": "149999942", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "0c9b409a-3a76-498e-847f-a6f8b8b0a32b" + "x-request-id": "fb0920af-5187-4814-a672-0f116571ab5a" }, "status": 200, "statusText": "OK" @@ -2101,7 +2098,7 @@ "callIndex": 8, "id": "6d0eec1cfcef015d", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:36:58.917Z", + "recordedAt": "2026-07-06T08:53:34.025Z", "request": { "body": { "kind": "json", @@ -2148,19 +2145,19 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0f2b6bcc380a0fa0006a44fbda2d208192a2aadb0ba544e277\",\"object\":\"response\",\"created_at\":1782905818,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", - "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0f2b6bcc380a0fa0006a44fbda2d208192a2aadb0ba544e277\",\"object\":\"response\",\"created_at\":1782905818,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", - "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_0f2b6bcc380a0fa0006a44fbdac0f88192a9cf5e86637b442d\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}", - "event: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_0f2b6bcc380a0fa0006a44fbdac0f88192a9cf5e86637b442d\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"{\\\"\",\"item_id\":\"msg_0f2b6bcc380a0fa0006a44fbdac0f88192a9cf5e86637b442d\",\"logprobs\":[],\"obfuscation\":\"2DliUQjkuLhdNV\",\"output_index\":0,\"sequence_number\":4}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"city\",\"item_id\":\"msg_0f2b6bcc380a0fa0006a44fbdac0f88192a9cf5e86637b442d\",\"logprobs\":[],\"obfuscation\":\"1HdUFHZ9vH30\",\"output_index\":0,\"sequence_number\":5}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\":\\\"\",\"item_id\":\"msg_0f2b6bcc380a0fa0006a44fbdac0f88192a9cf5e86637b442d\",\"logprobs\":[],\"obfuscation\":\"dvUetfHZwh9cp\",\"output_index\":0,\"sequence_number\":6}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"Paris\",\"item_id\":\"msg_0f2b6bcc380a0fa0006a44fbdac0f88192a9cf5e86637b442d\",\"logprobs\":[],\"obfuscation\":\"EUsYDfvOvNR\",\"output_index\":0,\"sequence_number\":7}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\"}\",\"item_id\":\"msg_0f2b6bcc380a0fa0006a44fbdac0f88192a9cf5e86637b442d\",\"logprobs\":[],\"obfuscation\":\"gpCUzuQR1TaHJZ\",\"output_index\":0,\"sequence_number\":8}", - "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0f2b6bcc380a0fa0006a44fbdac0f88192a9cf5e86637b442d\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":9,\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}", - "event: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_0f2b6bcc380a0fa0006a44fbdac0f88192a9cf5e86637b442d\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"},\"sequence_number\":10}", - "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_0f2b6bcc380a0fa0006a44fbdac0f88192a9cf5e86637b442d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":11}", - "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0f2b6bcc380a0fa0006a44fbda2d208192a2aadb0ba544e277\",\"object\":\"response\",\"created_at\":1782905818,\"status\":\"completed\",\"background\":false,\"completed_at\":1782905818,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"msg_0f2b6bcc380a0fa0006a44fbdac0f88192a9cf5e86637b442d\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":38,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":6,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":44},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0e3e39a329d01370006a4b6d0d47d0819db59a5d3fc8acd6b1\",\"object\":\"response\",\"created_at\":1783328013,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0e3e39a329d01370006a4b6d0d47d0819db59a5d3fc8acd6b1\",\"object\":\"response\",\"created_at\":1783328013,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_0e3e39a329d01370006a4b6d0dd8ec819db912cdc945eafd3a\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_0e3e39a329d01370006a4b6d0dd8ec819db912cdc945eafd3a\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"{\\\"\",\"item_id\":\"msg_0e3e39a329d01370006a4b6d0dd8ec819db912cdc945eafd3a\",\"logprobs\":[],\"obfuscation\":\"yWGpZd99sDs70T\",\"output_index\":0,\"sequence_number\":4}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"city\",\"item_id\":\"msg_0e3e39a329d01370006a4b6d0dd8ec819db912cdc945eafd3a\",\"logprobs\":[],\"obfuscation\":\"16GhzskcFZTK\",\"output_index\":0,\"sequence_number\":5}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\":\\\"\",\"item_id\":\"msg_0e3e39a329d01370006a4b6d0dd8ec819db912cdc945eafd3a\",\"logprobs\":[],\"obfuscation\":\"LCim3MlHAEzck\",\"output_index\":0,\"sequence_number\":6}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"Paris\",\"item_id\":\"msg_0e3e39a329d01370006a4b6d0dd8ec819db912cdc945eafd3a\",\"logprobs\":[],\"obfuscation\":\"DymF0o0Tv1u\",\"output_index\":0,\"sequence_number\":7}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\"}\",\"item_id\":\"msg_0e3e39a329d01370006a4b6d0dd8ec819db912cdc945eafd3a\",\"logprobs\":[],\"obfuscation\":\"GcdTqXNYXaZcHR\",\"output_index\":0,\"sequence_number\":8}", + "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0e3e39a329d01370006a4b6d0dd8ec819db912cdc945eafd3a\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":9,\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}", + "event: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_0e3e39a329d01370006a4b6d0dd8ec819db912cdc945eafd3a\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"},\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_0e3e39a329d01370006a4b6d0dd8ec819db912cdc945eafd3a\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0e3e39a329d01370006a4b6d0d47d0819db59a5d3fc8acd6b1\",\"object\":\"response\",\"created_at\":1783328013,\"status\":\"completed\",\"background\":false,\"completed_at\":1783328013,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":32,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"msg_0e3e39a329d01370006a4b6d0dd8ec819db912cdc945eafd3a\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"{\\\"city\\\":\\\"Paris\\\"}\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"json_schema\",\"description\":null,\"name\":\"response\",\"schema\":{\"type\":\"object\",\"properties\":{\"city\":{\"type\":\"string\"}},\"required\":[\"city\"],\"additionalProperties\":false},\"strict\":true},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":38,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":6,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":44},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" ], "kind": "sse" }, @@ -2168,12 +2165,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451db2ec825a6b-VIE", + "cf-ray": "a16d61326cea5aad-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Wed, 01 Jul 2026 11:36:58 GMT", + "date": "Mon, 06 Jul 2026 08:53:33 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "183", + "openai-processing-ms": "153", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2181,7 +2178,7 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "038452fa-ef3f-4fa7-9905-b960091f7fb9" + "x-request-id": "fde2d8bf-fcf0-45ae-a8ad-cea0c9518525" }, "status": 200, "statusText": "OK" @@ -2191,7 +2188,7 @@ "callIndex": 9, "id": "3f08b53881e505ce", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:37:00.098Z", + "recordedAt": "2026-07-06T08:53:34.935Z", "request": { "body": { "kind": "json", @@ -2227,11 +2224,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1782905819, - "created_at": 1782905819, + "completed_at": 1783328014, + "created_at": 1783328014, "error": null, "frequency_penalty": 0, - "id": "resp_0a0c15d796c6a34f006a44fbdb2284819fb736e3e820c1a23b", + "id": "resp_04dc557d9132a956006a4b6d0e412481a38f3691b337903577", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -2250,7 +2247,7 @@ "type": "output_text" } ], - "id": "msg_0a0c15d796c6a34f006a44fbdbc284819fb41f32c54acf1f53", + "id": "msg_04dc557d9132a956006a4b6d0eb4ac81a386e45b83baf9f982", "role": "assistant", "status": "completed", "type": "message" @@ -2318,13 +2315,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451db8fe9d5a6b-VIE", + "cf-ray": "a16d61382a4f5aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:37:00 GMT", + "date": "Mon, 06 Jul 2026 08:53:34 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "908", + "openai-processing-ms": "727", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2338,7 +2335,7 @@ "x-ratelimit-remaining-tokens": "149999955", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "04232a6b-5e31-45df-82dd-a90abcd939c6" + "x-request-id": "5c886032-1b82-493f-b6c4-5163897458d5" }, "status": 200, "statusText": "OK" @@ -2348,7 +2345,7 @@ "callIndex": 10, "id": "d026123ce87dfbca", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:37:01.278Z", + "recordedAt": "2026-07-06T08:53:35.966Z", "request": { "body": { "kind": "json", @@ -2380,17 +2377,17 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0e769a01cfb03e99006a44fbdc61dc819fb50fcb4e64cab6ba\",\"object\":\"response\",\"created_at\":1782905820,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":24,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", - "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0e769a01cfb03e99006a44fbdc61dc819fb50fcb4e64cab6ba\",\"object\":\"response\",\"created_at\":1782905820,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":24,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", - "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_0e769a01cfb03e99006a44fbdd1c34819f847b257326c553a3\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}", - "event: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_0e769a01cfb03e99006a44fbdd1c34819f847b257326c553a3\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"STREAM\",\"item_id\":\"msg_0e769a01cfb03e99006a44fbdd1c34819f847b257326c553a3\",\"logprobs\":[],\"obfuscation\":\"hTnuV2wiJV\",\"output_index\":0,\"sequence_number\":4}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" HEL\",\"item_id\":\"msg_0e769a01cfb03e99006a44fbdd1c34819f847b257326c553a3\",\"logprobs\":[],\"obfuscation\":\"BHAgzgld0ZoK\",\"output_index\":0,\"sequence_number\":5}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"LO\",\"item_id\":\"msg_0e769a01cfb03e99006a44fbdd1c34819f847b257326c553a3\",\"logprobs\":[],\"obfuscation\":\"XjE1Ce8MJwWqVW\",\"output_index\":0,\"sequence_number\":6}", - "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0e769a01cfb03e99006a44fbdd1c34819f847b257326c553a3\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":7,\"text\":\"STREAM HELLO\"}", - "event: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_0e769a01cfb03e99006a44fbdd1c34819f847b257326c553a3\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"STREAM HELLO\"},\"sequence_number\":8}", - "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_0e769a01cfb03e99006a44fbdd1c34819f847b257326c553a3\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"STREAM HELLO\"}],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":9}", - "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0e769a01cfb03e99006a44fbdc61dc819fb50fcb4e64cab6ba\",\"object\":\"response\",\"created_at\":1782905820,\"status\":\"completed\",\"background\":false,\"completed_at\":1782905821,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":24,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"msg_0e769a01cfb03e99006a44fbdd1c34819f847b257326c553a3\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"STREAM HELLO\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":27,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":4,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":31},\"user\":null,\"metadata\":{}},\"sequence_number\":10}" + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0fdfc89918dfb647006a4b6d0f1c448191be0936749c3a47eb\",\"object\":\"response\",\"created_at\":1783328015,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":24,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0fdfc89918dfb647006a4b6d0f1c448191be0936749c3a47eb\",\"object\":\"response\",\"created_at\":1783328015,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":24,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":1,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"msg_0fdfc89918dfb647006a4b6d0fc00c8191aa908f3f0ef2c92c\",\"type\":\"message\",\"status\":\"in_progress\",\"content\":[],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.content_part.added\ndata: {\"type\":\"response.content_part.added\",\"content_index\":0,\"item_id\":\"msg_0fdfc89918dfb647006a4b6d0fc00c8191aa908f3f0ef2c92c\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"\"},\"sequence_number\":3}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"STREAM\",\"item_id\":\"msg_0fdfc89918dfb647006a4b6d0fc00c8191aa908f3f0ef2c92c\",\"logprobs\":[],\"obfuscation\":\"EpB2gtNkAs\",\"output_index\":0,\"sequence_number\":4}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\" HEL\",\"item_id\":\"msg_0fdfc89918dfb647006a4b6d0fc00c8191aa908f3f0ef2c92c\",\"logprobs\":[],\"obfuscation\":\"SSohZL0w9RNn\",\"output_index\":0,\"sequence_number\":5}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"LO\",\"item_id\":\"msg_0fdfc89918dfb647006a4b6d0fc00c8191aa908f3f0ef2c92c\",\"logprobs\":[],\"obfuscation\":\"UtKesBmgN7Wvvm\",\"output_index\":0,\"sequence_number\":6}", + "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0fdfc89918dfb647006a4b6d0fc00c8191aa908f3f0ef2c92c\",\"logprobs\":[],\"output_index\":0,\"sequence_number\":7,\"text\":\"STREAM HELLO\"}", + "event: response.content_part.done\ndata: {\"type\":\"response.content_part.done\",\"content_index\":0,\"item_id\":\"msg_0fdfc89918dfb647006a4b6d0fc00c8191aa908f3f0ef2c92c\",\"output_index\":0,\"part\":{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"STREAM HELLO\"},\"sequence_number\":8}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"msg_0fdfc89918dfb647006a4b6d0fc00c8191aa908f3f0ef2c92c\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"STREAM HELLO\"}],\"role\":\"assistant\"},\"output_index\":0,\"sequence_number\":9}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0fdfc89918dfb647006a4b6d0f1c448191be0936749c3a47eb\",\"object\":\"response\",\"created_at\":1783328015,\"status\":\"completed\",\"background\":false,\"completed_at\":1783328015,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":24,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"msg_0fdfc89918dfb647006a4b6d0fc00c8191aa908f3f0ef2c92c\",\"type\":\"message\",\"status\":\"completed\",\"content\":[{\"type\":\"output_text\",\"annotations\":[],\"logprobs\":[],\"text\":\"STREAM HELLO\"}],\"role\":\"assistant\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":1,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"auto\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":27,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":4,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":31},\"user\":null,\"metadata\":{}},\"sequence_number\":10}" ], "kind": "sse" }, @@ -2398,12 +2395,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451dc058b05a6b-VIE", + "cf-ray": "a16d613ddef85aad-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Wed, 01 Jul 2026 11:37:00 GMT", + "date": "Mon, 06 Jul 2026 08:53:35 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "245", + "openai-processing-ms": "215", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2411,7 +2408,7 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "470f07ce-d6bf-49d8-9e80-3e076c946f99" + "x-request-id": "6af124a7-87b3-47d0-a7b8-901c2998a309" }, "status": 200, "statusText": "OK" @@ -2421,7 +2418,7 @@ "callIndex": 11, "id": "34ad62d7c96775e7", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:37:04.625Z", + "recordedAt": "2026-07-06T08:53:37.756Z", "request": { "body": { "kind": "json", @@ -2521,11 +2518,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1782905824, - "created_at": 1782905821, + "completed_at": 1783328017, + "created_at": 1783328016, "error": null, "frequency_penalty": 0, - "id": "resp_05a90b95f7a788b5006a44fbdd814c81a3baad795e58c3a0e1", + "id": "resp_0e66d4cf3b44aa7f006a4b6d10291481a2b12b390c95d5211a", "incomplete_details": null, "instructions": null, "max_output_tokens": 256, @@ -2537,16 +2534,16 @@ "output": [ { "arguments": "{\"item\":\"laptop\",\"store\":\"StoreA\"}", - "call_id": "call_8GGuS9G3qXOu0uQjVEsKgw1t", - "id": "fc_05a90b95f7a788b5006a44fbe05b4c81a3b5987ee6fd97b39f", + "call_id": "call_qRuXzm1GdT1ybr2tWRFjAvX7", + "id": "fc_0e66d4cf3b44aa7f006a4b6d11a20481a2861ceb3b6811d1b6", "name": "get_store_price", "status": "completed", "type": "function_call" }, { "arguments": "{\"item\":\"laptop\",\"store\":\"StoreB\"}", - "call_id": "call_lLjZSipWvTnUgrfgIhcwNsBk", - "id": "fc_05a90b95f7a788b5006a44fbe05b6481a38c617a786b550ef3", + "call_id": "call_hITB5sbet06fDK494deB5ZIz", + "id": "fc_0e66d4cf3b44aa7f006a4b6d11a21881a28cbf7de8a8e33987", "name": "get_store_price", "status": "completed", "type": "function_call" @@ -2659,13 +2656,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451dc7cb805a6b-VIE", + "cf-ray": "a16d61445cdc5aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:37:04 GMT", + "date": "Mon, 06 Jul 2026 08:53:37 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "3170", + "openai-processing-ms": "1604", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2679,7 +2676,7 @@ "x-ratelimit-remaining-tokens": "149999610", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "0d0edd0f-d34b-41f6-bf81-c4924d539f1f" + "x-request-id": "f9f16014-5e8d-4941-8e99-1df4baae54be" }, "status": 200, "statusText": "OK" @@ -2687,9 +2684,9 @@ }, { "callIndex": 12, - "id": "9f95a51ba8770b2c", + "id": "6ddea796e2e4a7cc", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:37:06.632Z", + "recordedAt": "2026-07-06T08:53:38.809Z", "request": { "body": { "kind": "json", @@ -2727,20 +2724,20 @@ "role": "user" }, { - "id": "fc_05a90b95f7a788b5006a44fbe05b4c81a3b5987ee6fd97b39f", + "id": "fc_0e66d4cf3b44aa7f006a4b6d11a20481a2861ceb3b6811d1b6", "type": "item_reference" }, { - "id": "fc_05a90b95f7a788b5006a44fbe05b6481a38c617a786b550ef3", + "id": "fc_0e66d4cf3b44aa7f006a4b6d11a21881a28cbf7de8a8e33987", "type": "item_reference" }, { - "call_id": "call_8GGuS9G3qXOu0uQjVEsKgw1t", + "call_id": "call_qRuXzm1GdT1ybr2tWRFjAvX7", "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", "type": "function_call_output" }, { - "call_id": "call_lLjZSipWvTnUgrfgIhcwNsBk", + "call_id": "call_hITB5sbet06fDK494deB5ZIz", "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", "type": "function_call_output" } @@ -2807,11 +2804,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1782905826, - "created_at": 1782905825, + "completed_at": 1783328018, + "created_at": 1783328017, "error": null, "frequency_penalty": 0, - "id": "resp_05a90b95f7a788b5006a44fbe111fc81a3af1e565785a2640c", + "id": "resp_0e66d4cf3b44aa7f006a4b6d11edcc81a289056b28896bd29b", "incomplete_details": null, "instructions": null, "max_output_tokens": 256, @@ -2823,8 +2820,8 @@ "output": [ { "arguments": "{\"discountCode\":\"SAVE20\",\"total\":999}", - "call_id": "call_1fMn3W7IWFXGflea0D6gbIW0", - "id": "fc_05a90b95f7a788b5006a44fbe210fc81a3b1afb5c0bda84357", + "call_id": "call_ctBQl0V8LZYr2ghBNzEbmtNW", + "id": "fc_0e66d4cf3b44aa7f006a4b6d128a6481a2a78d18759b1ec966", "name": "apply_discount", "status": "completed", "type": "function_call" @@ -2937,13 +2934,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451ddcaa4e5a6b-VIE", + "cf-ray": "a16d614f7ddc5aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:37:06 GMT", + "date": "Mon, 06 Jul 2026 08:53:38 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1806", + "openai-processing-ms": "887", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2957,7 +2954,7 @@ "x-ratelimit-remaining-tokens": "149999522", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "459dc5f6-acb9-474b-991a-5181e7dac227" + "x-request-id": "66efab58-48de-4948-b683-79d1232307ff" }, "status": 200, "statusText": "OK" @@ -2965,9 +2962,9 @@ }, { "callIndex": 13, - "id": "058eaddbb1690160", + "id": "0e183332ea3f5ed7", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-07-01T11:37:09.462Z", + "recordedAt": "2026-07-06T08:53:46.606Z", "request": { "body": { "kind": "json", @@ -3005,29 +3002,29 @@ "role": "user" }, { - "id": "fc_05a90b95f7a788b5006a44fbe05b4c81a3b5987ee6fd97b39f", + "id": "fc_0e66d4cf3b44aa7f006a4b6d11a20481a2861ceb3b6811d1b6", "type": "item_reference" }, { - "id": "fc_05a90b95f7a788b5006a44fbe05b6481a38c617a786b550ef3", + "id": "fc_0e66d4cf3b44aa7f006a4b6d11a21881a28cbf7de8a8e33987", "type": "item_reference" }, { - "call_id": "call_8GGuS9G3qXOu0uQjVEsKgw1t", + "call_id": "call_qRuXzm1GdT1ybr2tWRFjAvX7", "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", "type": "function_call_output" }, { - "call_id": "call_lLjZSipWvTnUgrfgIhcwNsBk", + "call_id": "call_hITB5sbet06fDK494deB5ZIz", "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", "type": "function_call_output" }, { - "id": "fc_05a90b95f7a788b5006a44fbe210fc81a3b1afb5c0bda84357", + "id": "fc_0e66d4cf3b44aa7f006a4b6d128a6481a2a78d18759b1ec966", "type": "item_reference" }, { - "call_id": "call_1fMn3W7IWFXGflea0D6gbIW0", + "call_id": "call_ctBQl0V8LZYr2ghBNzEbmtNW", "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", "type": "function_call_output" } @@ -3094,11 +3091,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1782905829, - "created_at": 1782905827, + "completed_at": 1783328025, + "created_at": 1783328021, "error": null, "frequency_penalty": 0, - "id": "resp_05a90b95f7a788b5006a44fbe30f2081a38db9d8811b348009", + "id": "resp_0e66d4cf3b44aa7f006a4b6d1415ec81a2b2537cecc1b12662", "incomplete_details": null, "instructions": null, "max_output_tokens": 256, @@ -3117,7 +3114,7 @@ "type": "output_text" } ], - "id": "msg_05a90b95f7a788b5006a44fbe3dc2c81a39292caa71b0ff248", + "id": "msg_0e66d4cf3b44aa7f006a4b6d16b89881a2b76a79a154e36a02", "role": "assistant", "status": "completed", "type": "message" @@ -3230,13 +3227,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a1451de93ec35a6b-VIE", + "cf-ray": "a16d61562c445aad-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Wed, 01 Jul 2026 11:37:09 GMT", + "date": "Mon, 06 Jul 2026 08:53:46 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "2552", + "openai-processing-ms": "7482", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -3250,47 +3247,39 @@ "x-ratelimit-remaining-tokens": "149999475", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "e566f085-89cd-4852-a34c-b7d7e0b2f196" + "x-request-id": "59075f75-1ca7-44e1-a648-4094286b2f6e" }, "status": 200, "statusText": "OK" } }, { - "callIndex": 4, - "id": "4862666ed7237d6b", + "callIndex": 14, + "id": "cab5f9a41efafafd", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-30T14:05:07.225Z", + "recordedAt": "2026-07-06T08:53:48.116Z", "request": { "body": { "kind": "json", "value": { "input": [ { - "content": "You must inspect live weather via the provided get_weather tool before responding.", + "content": "You are a terse weather assistant. Use tools before answering.", "role": "system" }, { "content": [ { - "text": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", + "text": "Use get_weather for Paris, France, then reply with one short sentence.", "type": "input_text" } ], "role": "user" - }, - { - "id": "fc_0d44b1f448d37f70006a43cd12082481a381a4bdd5f9c67779", - "type": "item_reference" - }, - { - "call_id": "call_AkiRjbi2RreT0VGuO1DSeJib", - "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "type": "function_call_output" } ], - "max_output_tokens": 128, + "max_output_tokens": 96, "model": "gpt-4o-mini-2024-07-18", + "stream": true, "temperature": 0, "tool_choice": "required", "tools": [ @@ -3319,76 +3308,87 @@ "url": "https://api.openai.com/v1/responses" }, "response": { + "body": { + "chunks": [ + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_064eb500041e3d7b006a4b6d1acd6081a08258b83417ce9fea\",\"object\":\"response\",\"created_at\":1783328026,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_064eb500041e3d7b006a4b6d1acd6081a08258b83417ce9fea\",\"object\":\"response\",\"created_at\":1783328026,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_064eb500041e3d7b006a4b6d1be13081a0965472c3d4cdeff5\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_5AIVB5vSHGUszN8aascCN8xJ\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_064eb500041e3d7b006a4b6d1be13081a0965472c3d4cdeff5\",\"obfuscation\":\"OkuRaQCX5s9HFg\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_064eb500041e3d7b006a4b6d1be13081a0965472c3d4cdeff5\",\"obfuscation\":\"UdRdArKv\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_064eb500041e3d7b006a4b6d1be13081a0965472c3d4cdeff5\",\"obfuscation\":\"V1MNXf2yt4ich\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_064eb500041e3d7b006a4b6d1be13081a0965472c3d4cdeff5\",\"obfuscation\":\"dCuDgR1QoJr\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_064eb500041e3d7b006a4b6d1be13081a0965472c3d4cdeff5\",\"obfuscation\":\"5XSVdLtobTnwyKv\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_064eb500041e3d7b006a4b6d1be13081a0965472c3d4cdeff5\",\"obfuscation\":\"FypA4Jpk7\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_064eb500041e3d7b006a4b6d1be13081a0965472c3d4cdeff5\",\"obfuscation\":\"LLZuT9mLU2fgid\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_064eb500041e3d7b006a4b6d1be13081a0965472c3d4cdeff5\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_064eb500041e3d7b006a4b6d1be13081a0965472c3d4cdeff5\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_5AIVB5vSHGUszN8aascCN8xJ\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_064eb500041e3d7b006a4b6d1acd6081a08258b83417ce9fea\",\"object\":\"response\",\"created_at\":1783328026,\"status\":\"completed\",\"background\":false,\"completed_at\":1783328027,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_064eb500041e3d7b006a4b6d1be13081a0965472c3d4cdeff5\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_5AIVB5vSHGUszN8aascCN8xJ\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":84,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":92},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + ], + "kind": "sse" + }, + "headers": { + "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", + "alt-svc": "h3=\":443\"; ma=86400", + "cf-cache-status": "DYNAMIC", + "cf-ray": "a16d6186ef795aad-VIE", + "connection": "keep-alive", + "content-type": "text/event-stream; charset=utf-8", + "date": "Mon, 06 Jul 2026 08:53:46 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "112", + "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", + "openai-version": "2020-10-01", + "server": "cloudflare", + "set-cookie": "[REDACTED]", + "strict-transport-security": "max-age=31536000; includeSubDomains; preload", + "transfer-encoding": "chunked", + "x-content-type-options": "nosniff", + "x-request-id": "cbf329cf-f33a-42fd-bc9f-69aa7673b468" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 15, + "id": "0b49ee234aab4656", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-07-06T08:53:49.035Z", + "request": { "body": { "kind": "json", "value": { - "background": false, - "billing": { - "payer": "developer" - }, - "completed_at": 1782828307, - "created_at": 1782828306, - "error": null, - "frequency_penalty": 0, - "id": "resp_0d44b1f448d37f70006a43cd128d6881a3aee7745cd49600d0", - "incomplete_details": null, - "instructions": null, - "max_output_tokens": 128, - "max_tool_calls": null, - "metadata": {}, - "model": "gpt-4o-mini-2024-07-18", - "moderation": null, - "object": "response", - "output": [ + "input": [ + { + "content": "You are a terse weather assistant. Use tools before answering.", + "role": "system" + }, + { + "content": [ + { + "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "type": "input_text" + } + ], + "role": "user" + }, { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_kzLEMwkgoKReYpTSoSdsCQZS", - "id": "fc_0d44b1f448d37f70006a43cd130ca881a3ba3bdade118a8490", + "call_id": "call_5AIVB5vSHGUszN8aascCN8xJ", "name": "get_weather", - "status": "completed", "type": "function_call" + }, + { + "call_id": "call_5AIVB5vSHGUszN8aascCN8xJ", + "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", + "type": "function_call_output" } ], - "parallel_tool_calls": true, - "presence_penalty": 0, - "previous_response_id": null, - "prompt_cache_key": "[REDACTED]", - "prompt_cache_retention": "in_memory", - "reasoning": { - "context": null, - "effort": null, - "summary": null - }, - "safety_identifier": null, - "service_tier": "default", - "status": "completed", - "store": true, + "max_output_tokens": 96, + "model": "gpt-4o-mini-2024-07-18", + "stream": true, "temperature": 0, - "text": { - "format": { - "type": "text" - }, - "verbosity": "medium" - }, "tool_choice": "required", - "tool_usage": { - "image_gen": { - "input_tokens": 0, - "input_tokens_details": { - "image_tokens": 0, - "text_tokens": 0 - }, - "output_tokens": 0, - "output_tokens_details": { - "image_tokens": 0, - "text_tokens": 0 - }, - "total_tokens": 0 - }, - "web_search": { - "num_requests": 0 - } - }, "tools": [ { "description": "Get the weather for a location", @@ -3405,38 +3405,44 @@ "required": ["location"], "type": "object" }, - "strict": true, "type": "function" } - ], - "top_logprobs": 0, - "top_p": 1, - "truncation": "disabled", - "usage": { - "input_tokens": 133, - "input_tokens_details": { - "cached_tokens": 0 - }, - "output_tokens": 8, - "output_tokens_details": { - "reasoning_tokens": 0 - }, - "total_tokens": 141 - }, - "user": null + ] } }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "chunks": [ + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0c20e36e3e222036006a4b6d1c52988192bce54ff9da85f125\",\"object\":\"response\",\"created_at\":1783328028,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0c20e36e3e222036006a4b6d1c52988192bce54ff9da85f125\",\"object\":\"response\",\"created_at\":1783328028,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_0c20e36e3e222036006a4b6d1cd5548192a1dd0eeffc1c7eab\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_LSPBIYKfl1M6FSlK9XJtVeiO\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_0c20e36e3e222036006a4b6d1cd5548192a1dd0eeffc1c7eab\",\"obfuscation\":\"fiqSASpwbqFt6d\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_0c20e36e3e222036006a4b6d1cd5548192a1dd0eeffc1c7eab\",\"obfuscation\":\"ZPKYMXVG\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_0c20e36e3e222036006a4b6d1cd5548192a1dd0eeffc1c7eab\",\"obfuscation\":\"xcrfyU4FLZkzA\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_0c20e36e3e222036006a4b6d1cd5548192a1dd0eeffc1c7eab\",\"obfuscation\":\"j6zpXowyrUA\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_0c20e36e3e222036006a4b6d1cd5548192a1dd0eeffc1c7eab\",\"obfuscation\":\"2psGeVqqoQUxvHR\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_0c20e36e3e222036006a4b6d1cd5548192a1dd0eeffc1c7eab\",\"obfuscation\":\"iZqyReECw\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_0c20e36e3e222036006a4b6d1cd5548192a1dd0eeffc1c7eab\",\"obfuscation\":\"ORjPzay7MM7dI0\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_0c20e36e3e222036006a4b6d1cd5548192a1dd0eeffc1c7eab\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_0c20e36e3e222036006a4b6d1cd5548192a1dd0eeffc1c7eab\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_LSPBIYKfl1M6FSlK9XJtVeiO\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0c20e36e3e222036006a4b6d1c52988192bce54ff9da85f125\",\"object\":\"response\",\"created_at\":1783328028,\"status\":\"completed\",\"background\":false,\"completed_at\":1783328028,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_0c20e36e3e222036006a4b6d1cd5548192a1dd0eeffc1c7eab\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_LSPBIYKfl1M6FSlK9XJtVeiO\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":123,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":131},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + ], + "kind": "sse" + }, "headers": { "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a13db953589cc2cd-VIE", + "cf-ray": "a16d61905ff95aad-VIE", "connection": "keep-alive", - "content-encoding": "gzip", - "content-type": "application/json", - "date": "Tue, 30 Jun 2026 14:05:07 GMT", + "content-type": "text/event-stream; charset=utf-8", + "date": "Mon, 06 Jul 2026 08:53:48 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "732", + "openai-processing-ms": "112", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -3444,62 +3450,61 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-ratelimit-limit-requests": "30000", - "x-ratelimit-limit-tokens": "150000000", - "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999650", - "x-ratelimit-reset-requests": "2ms", - "x-ratelimit-reset-tokens": "0s", - "x-request-id": "f29de81f-8c36-4998-97e3-d209e626b684" + "x-request-id": "5c6a35fd-3014-4b59-b63a-ddf7fbd24ca4" }, "status": 200, "statusText": "OK" } }, { - "callIndex": 5, - "id": "85d657a76f0adc46", + "callIndex": 16, + "id": "f52dd9eeb4304bc1", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-30T14:05:08.069Z", + "recordedAt": "2026-07-06T08:53:50.079Z", "request": { "body": { "kind": "json", "value": { "input": [ { - "content": "You must inspect live weather via the provided get_weather tool before responding.", + "content": "You are a terse weather assistant. Use tools before answering.", "role": "system" }, { "content": [ { - "text": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", + "text": "Use get_weather for Paris, France, then reply with one short sentence.", "type": "input_text" } ], "role": "user" }, { - "id": "fc_0d44b1f448d37f70006a43cd12082481a381a4bdd5f9c67779", - "type": "item_reference" + "arguments": "{\"location\":\"Paris, France\"}", + "call_id": "call_5AIVB5vSHGUszN8aascCN8xJ", + "name": "get_weather", + "type": "function_call" }, { - "call_id": "call_AkiRjbi2RreT0VGuO1DSeJib", + "call_id": "call_5AIVB5vSHGUszN8aascCN8xJ", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0d44b1f448d37f70006a43cd130ca881a3ba3bdade118a8490", - "type": "item_reference" + "arguments": "{\"location\":\"Paris, France\"}", + "call_id": "call_LSPBIYKfl1M6FSlK9XJtVeiO", + "name": "get_weather", + "type": "function_call" }, { - "call_id": "call_kzLEMwkgoKReYpTSoSdsCQZS", + "call_id": "call_LSPBIYKfl1M6FSlK9XJtVeiO", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } ], - "max_output_tokens": 128, + "max_output_tokens": 96, "model": "gpt-4o-mini-2024-07-18", + "stream": true, "temperature": 0, "tool_choice": "required", "tools": [ @@ -3529,123 +3534,33 @@ }, "response": { "body": { - "kind": "json", - "value": { - "background": false, - "billing": { - "payer": "developer" - }, - "completed_at": 1782828307, - "created_at": 1782828307, - "error": null, - "frequency_penalty": 0, - "id": "resp_0d44b1f448d37f70006a43cd1373a081a38bd1573fe6cd1bc3", - "incomplete_details": null, - "instructions": null, - "max_output_tokens": 128, - "max_tool_calls": null, - "metadata": {}, - "model": "gpt-4o-mini-2024-07-18", - "moderation": null, - "object": "response", - "output": [ - { - "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_wJyDgvgcMuQxNrpEwkWm1TPx", - "id": "fc_0d44b1f448d37f70006a43cd13de2881a3a7a908754ffab9d3", - "name": "get_weather", - "status": "completed", - "type": "function_call" - } - ], - "parallel_tool_calls": true, - "presence_penalty": 0, - "previous_response_id": null, - "prompt_cache_key": "[REDACTED]", - "prompt_cache_retention": "in_memory", - "reasoning": { - "context": null, - "effort": null, - "summary": null - }, - "safety_identifier": null, - "service_tier": "default", - "status": "completed", - "store": true, - "temperature": 0, - "text": { - "format": { - "type": "text" - }, - "verbosity": "medium" - }, - "tool_choice": "required", - "tool_usage": { - "image_gen": { - "input_tokens": 0, - "input_tokens_details": { - "image_tokens": 0, - "text_tokens": 0 - }, - "output_tokens": 0, - "output_tokens_details": { - "image_tokens": 0, - "text_tokens": 0 - }, - "total_tokens": 0 - }, - "web_search": { - "num_requests": 0 - } - }, - "tools": [ - { - "description": "Get the weather for a location", - "name": "get_weather", - "parameters": { - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "properties": { - "location": { - "description": "The city and country", - "type": "string" - } - }, - "required": ["location"], - "type": "object" - }, - "strict": true, - "type": "function" - } - ], - "top_logprobs": 0, - "top_p": 1, - "truncation": "disabled", - "usage": { - "input_tokens": 172, - "input_tokens_details": { - "cached_tokens": 0 - }, - "output_tokens": 8, - "output_tokens_details": { - "reasoning_tokens": 0 - }, - "total_tokens": 180 - }, - "user": null - } + "chunks": [ + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_00f354b569648596006a4b6d1d3c8c81a1bd90c2ff82573f85\",\"object\":\"response\",\"created_at\":1783328029,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_00f354b569648596006a4b6d1d3c8c81a1bd90c2ff82573f85\",\"object\":\"response\",\"created_at\":1783328029,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_00f354b569648596006a4b6d1dc0a081a181f1e59301707eb3\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_nORuCt6uo5JHX9qQgL4igzTH\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_00f354b569648596006a4b6d1dc0a081a181f1e59301707eb3\",\"obfuscation\":\"Bkl8hB7JcIpkJv\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_00f354b569648596006a4b6d1dc0a081a181f1e59301707eb3\",\"obfuscation\":\"Wbc07vFJ\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_00f354b569648596006a4b6d1dc0a081a181f1e59301707eb3\",\"obfuscation\":\"Rz2QqSRblCxeQ\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_00f354b569648596006a4b6d1dc0a081a181f1e59301707eb3\",\"obfuscation\":\"kc7vNgvuGDC\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_00f354b569648596006a4b6d1dc0a081a181f1e59301707eb3\",\"obfuscation\":\"icn1uVdX2nxbX27\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_00f354b569648596006a4b6d1dc0a081a181f1e59301707eb3\",\"obfuscation\":\"v7VRHR8uj\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_00f354b569648596006a4b6d1dc0a081a181f1e59301707eb3\",\"obfuscation\":\"I9jJZhJjwV0e1A\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_00f354b569648596006a4b6d1dc0a081a181f1e59301707eb3\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_00f354b569648596006a4b6d1dc0a081a181f1e59301707eb3\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_nORuCt6uo5JHX9qQgL4igzTH\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_00f354b569648596006a4b6d1d3c8c81a1bd90c2ff82573f85\",\"object\":\"response\",\"created_at\":1783328029,\"status\":\"completed\",\"background\":false,\"completed_at\":1783328029,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_00f354b569648596006a4b6d1dc0a081a181f1e59301707eb3\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_nORuCt6uo5JHX9qQgL4igzTH\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":162,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":170},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + ], + "kind": "sse" }, "headers": { "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a13db958ec10c2cd-VIE", + "cf-ray": "a16d61961cf75aad-VIE", "connection": "keep-alive", - "content-encoding": "gzip", - "content-type": "application/json", - "date": "Tue, 30 Jun 2026 14:05:08 GMT", + "content-type": "text/event-stream; charset=utf-8", + "date": "Mon, 06 Jul 2026 08:53:49 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "676", + "openai-processing-ms": "121", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -3653,71 +3568,72 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-ratelimit-limit-requests": "30000", - "x-ratelimit-limit-tokens": "150000000", - "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999612", - "x-ratelimit-reset-requests": "2ms", - "x-ratelimit-reset-tokens": "0s", - "x-request-id": "bf9f9cc4-ca26-4735-ae56-efe2174194cb" + "x-request-id": "1eaf27f7-d77c-4f57-8505-47f5d28d73eb" }, "status": 200, "statusText": "OK" } }, { - "callIndex": 6, - "id": "9e2f3f107d421efc", + "callIndex": 17, + "id": "a68527dff479ce1a", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-30T14:05:08.972Z", + "recordedAt": "2026-07-06T08:53:51.156Z", "request": { "body": { "kind": "json", "value": { "input": [ { - "content": "You must inspect live weather via the provided get_weather tool before responding.", + "content": "You are a terse weather assistant. Use tools before answering.", "role": "system" }, { "content": [ { - "text": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", + "text": "Use get_weather for Paris, France, then reply with one short sentence.", "type": "input_text" } ], "role": "user" }, { - "id": "fc_0d44b1f448d37f70006a43cd12082481a381a4bdd5f9c67779", - "type": "item_reference" + "arguments": "{\"location\":\"Paris, France\"}", + "call_id": "call_5AIVB5vSHGUszN8aascCN8xJ", + "name": "get_weather", + "type": "function_call" }, { - "call_id": "call_AkiRjbi2RreT0VGuO1DSeJib", + "call_id": "call_5AIVB5vSHGUszN8aascCN8xJ", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0d44b1f448d37f70006a43cd130ca881a3ba3bdade118a8490", - "type": "item_reference" + "arguments": "{\"location\":\"Paris, France\"}", + "call_id": "call_LSPBIYKfl1M6FSlK9XJtVeiO", + "name": "get_weather", + "type": "function_call" }, { - "call_id": "call_kzLEMwkgoKReYpTSoSdsCQZS", + "call_id": "call_LSPBIYKfl1M6FSlK9XJtVeiO", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0d44b1f448d37f70006a43cd13de2881a3a7a908754ffab9d3", - "type": "item_reference" + "arguments": "{\"location\":\"Paris, France\"}", + "call_id": "call_nORuCt6uo5JHX9qQgL4igzTH", + "name": "get_weather", + "type": "function_call" }, { - "call_id": "call_wJyDgvgcMuQxNrpEwkWm1TPx", + "call_id": "call_nORuCt6uo5JHX9qQgL4igzTH", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } ], - "max_output_tokens": 128, + "max_output_tokens": 96, "model": "gpt-4o-mini-2024-07-18", + "stream": true, "temperature": 0, "tool_choice": "required", "tools": [ @@ -3747,123 +3663,33 @@ }, "response": { "body": { - "kind": "json", - "value": { - "background": false, - "billing": { - "payer": "developer" - }, - "completed_at": 1782828308, - "created_at": 1782828308, - "error": null, - "frequency_penalty": 0, - "id": "resp_0d44b1f448d37f70006a43cd144b3c81a38bd55d4a9dcee5eb", - "incomplete_details": null, - "instructions": null, - "max_output_tokens": 128, - "max_tool_calls": null, - "metadata": {}, - "model": "gpt-4o-mini-2024-07-18", - "moderation": null, - "object": "response", - "output": [ - { - "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_M1YUQAGujkfHbN7k1KH7HIgo", - "id": "fc_0d44b1f448d37f70006a43cd14c6c881a3b595c74dfc7c0162", - "name": "get_weather", - "status": "completed", - "type": "function_call" - } - ], - "parallel_tool_calls": true, - "presence_penalty": 0, - "previous_response_id": null, - "prompt_cache_key": "[REDACTED]", - "prompt_cache_retention": "in_memory", - "reasoning": { - "context": null, - "effort": null, - "summary": null - }, - "safety_identifier": null, - "service_tier": "default", - "status": "completed", - "store": true, - "temperature": 0, - "text": { - "format": { - "type": "text" - }, - "verbosity": "medium" - }, - "tool_choice": "required", - "tool_usage": { - "image_gen": { - "input_tokens": 0, - "input_tokens_details": { - "image_tokens": 0, - "text_tokens": 0 - }, - "output_tokens": 0, - "output_tokens_details": { - "image_tokens": 0, - "text_tokens": 0 - }, - "total_tokens": 0 - }, - "web_search": { - "num_requests": 0 - } - }, - "tools": [ - { - "description": "Get the weather for a location", - "name": "get_weather", - "parameters": { - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "properties": { - "location": { - "description": "The city and country", - "type": "string" - } - }, - "required": ["location"], - "type": "object" - }, - "strict": true, - "type": "function" - } - ], - "top_logprobs": 0, - "top_p": 1, - "truncation": "disabled", - "usage": { - "input_tokens": 211, - "input_tokens_details": { - "cached_tokens": 0 - }, - "output_tokens": 8, - "output_tokens_details": { - "reasoning_tokens": 0 - }, - "total_tokens": 219 - }, - "user": null - } + "chunks": [ + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_00b42cb4bbd1b388006a4b6d1e497881918894594cf169c226\",\"object\":\"response\",\"created_at\":1783328030,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_00b42cb4bbd1b388006a4b6d1e497881918894594cf169c226\",\"object\":\"response\",\"created_at\":1783328030,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_00b42cb4bbd1b388006a4b6d1ee5d481918c41445b056cc967\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_jjs2MC18QafQPqZemWS4kXgw\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_00b42cb4bbd1b388006a4b6d1ee5d481918c41445b056cc967\",\"obfuscation\":\"j0mi4UlzeMphQv\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_00b42cb4bbd1b388006a4b6d1ee5d481918c41445b056cc967\",\"obfuscation\":\"dj6dKDu6\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_00b42cb4bbd1b388006a4b6d1ee5d481918c41445b056cc967\",\"obfuscation\":\"zkhqEwGsI6aX8\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_00b42cb4bbd1b388006a4b6d1ee5d481918c41445b056cc967\",\"obfuscation\":\"fgfoKAiUD70\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_00b42cb4bbd1b388006a4b6d1ee5d481918c41445b056cc967\",\"obfuscation\":\"huBJPyXcDzjNAXs\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_00b42cb4bbd1b388006a4b6d1ee5d481918c41445b056cc967\",\"obfuscation\":\"a4L6zHdTD\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_00b42cb4bbd1b388006a4b6d1ee5d481918c41445b056cc967\",\"obfuscation\":\"nXfk1UxRowa3sY\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_00b42cb4bbd1b388006a4b6d1ee5d481918c41445b056cc967\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_00b42cb4bbd1b388006a4b6d1ee5d481918c41445b056cc967\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_jjs2MC18QafQPqZemWS4kXgw\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_00b42cb4bbd1b388006a4b6d1e497881918894594cf169c226\",\"object\":\"response\",\"created_at\":1783328030,\"status\":\"completed\",\"background\":false,\"completed_at\":1783328031,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_00b42cb4bbd1b388006a4b6d1ee5d481918c41445b056cc967\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_jjs2MC18QafQPqZemWS4kXgw\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":201,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":209},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + ], + "kind": "sse" }, "headers": { "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a13db95e3f9bc2cd-VIE", + "cf-ray": "a16d619caa8a5aad-VIE", "connection": "keep-alive", - "content-encoding": "gzip", - "content-type": "application/json", - "date": "Tue, 30 Jun 2026 14:05:09 GMT", + "content-type": "text/event-stream; charset=utf-8", + "date": "Mon, 06 Jul 2026 08:53:50 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "736", + "openai-processing-ms": "126", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -3871,36 +3697,30 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-ratelimit-limit-requests": "30000", - "x-ratelimit-limit-tokens": "150000000", - "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999572", - "x-ratelimit-reset-requests": "2ms", - "x-ratelimit-reset-tokens": "0s", - "x-request-id": "af939ee1-3deb-45bc-aab1-d96e06ab29a9" + "x-request-id": "e76ad19e-2fa6-43dd-b11e-7fa17b1ac4c5" }, "status": 200, "statusText": "OK" } }, { - "callIndex": 9, - "id": "cdf4d54c5192d51e", + "callIndex": 18, + "id": "68b95c3d415edc61", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-30T14:05:12.353Z", + "recordedAt": "2026-07-06T08:53:52.253Z", "request": { "body": { "kind": "json", "value": { "input": [ { - "content": "You are a terse weather assistant. Use tools before answering.", + "content": "You are a helpful weather assistant.", "role": "system" }, { "content": [ { - "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "text": "What's the weather in Paris?", "type": "input_text" } ], @@ -3940,19 +3760,19 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_06bc0e47031f1035006a43cd17a5f0819c87e070f9e834dbd7\",\"object\":\"response\",\"created_at\":1782828311,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", - "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_06bc0e47031f1035006a43cd17a5f0819c87e070f9e834dbd7\",\"object\":\"response\",\"created_at\":1782828311,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", - "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_sTScpLSOY47aZi8gJLjVvWXC\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"FAZZfjfG0zwF0L\",\"output_index\":0,\"sequence_number\":3}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"cIPC7Vhe\",\"output_index\":0,\"sequence_number\":4}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"JRjjAZw2DsYZS\",\"output_index\":0,\"sequence_number\":5}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"uATf4bQepED\",\"output_index\":0,\"sequence_number\":6}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"WwU5vooRA1TWXa7\",\"output_index\":0,\"sequence_number\":7}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"0d2IyxK1x\",\"output_index\":0,\"sequence_number\":8}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"obfuscation\":\"OUcyNi2dyVMNtm\",\"output_index\":0,\"sequence_number\":9}", - "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"output_index\":0,\"sequence_number\":10}", - "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_sTScpLSOY47aZi8gJLjVvWXC\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", - "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_06bc0e47031f1035006a43cd17a5f0819c87e070f9e834dbd7\",\"object\":\"response\",\"created_at\":1782828311,\"status\":\"completed\",\"background\":false,\"completed_at\":1782828312,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_06bc0e47031f1035006a43cd1824c0819c94e62c7564d22614\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_sTScpLSOY47aZi8gJLjVvWXC\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":84,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":92},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_01586087756ed932006a4b6d1f6028819faeca3634812ce6ea\",\"object\":\"response\",\"created_at\":1783328031,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_01586087756ed932006a4b6d1f6028819faeca3634812ce6ea\",\"object\":\"response\",\"created_at\":1783328031,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_01586087756ed932006a4b6d1fe184819f81f81da643dbb253\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_gFUshjUsV3Ngpz52OkpiA6kM\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_01586087756ed932006a4b6d1fe184819f81f81da643dbb253\",\"obfuscation\":\"2dRqBFyzkrMyXG\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_01586087756ed932006a4b6d1fe184819f81f81da643dbb253\",\"obfuscation\":\"wmcABcZF\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_01586087756ed932006a4b6d1fe184819f81f81da643dbb253\",\"obfuscation\":\"QUCDK79DMSMwo\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_01586087756ed932006a4b6d1fe184819f81f81da643dbb253\",\"obfuscation\":\"POTokfq76ok\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_01586087756ed932006a4b6d1fe184819f81f81da643dbb253\",\"obfuscation\":\"Y07a5VP6ioyMzme\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_01586087756ed932006a4b6d1fe184819f81f81da643dbb253\",\"obfuscation\":\"RcvOEUy4p\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_01586087756ed932006a4b6d1fe184819f81f81da643dbb253\",\"obfuscation\":\"o3IPdeAUOkuBI1\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_01586087756ed932006a4b6d1fe184819f81f81da643dbb253\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_01586087756ed932006a4b6d1fe184819f81f81da643dbb253\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_gFUshjUsV3Ngpz52OkpiA6kM\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_01586087756ed932006a4b6d1f6028819faeca3634812ce6ea\",\"object\":\"response\",\"created_at\":1783328031,\"status\":\"completed\",\"background\":false,\"completed_at\":1783328032,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_01586087756ed932006a4b6d1fe184819f81f81da643dbb253\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_gFUshjUsV3Ngpz52OkpiA6kM\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":70,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":78},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" ], "kind": "sse" }, @@ -3960,12 +3780,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a13db972addbc2cd-VIE", + "cf-ray": "a16d61a36f965aad-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 30 Jun 2026 14:05:11 GMT", + "date": "Mon, 06 Jul 2026 08:53:51 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "235", + "openai-processing-ms": "170", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -3973,30 +3793,30 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "a6f44209-2a5e-43fa-ae38-f6d92212d2c4" + "x-request-id": "7bd3cd02-c866-4902-bdc9-844672f3b94d" }, "status": 200, "statusText": "OK" } }, { - "callIndex": 10, - "id": "bcc5abe5ef622fae", + "callIndex": 19, + "id": "f9284ed3b3492200", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-30T14:05:13.541Z", + "recordedAt": "2026-07-06T08:53:53.596Z", "request": { "body": { "kind": "json", "value": { "input": [ { - "content": "You are a terse weather assistant. Use tools before answering.", + "content": "You are a helpful weather assistant.", "role": "system" }, { "content": [ { - "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "text": "What's the weather in Paris?", "type": "input_text" } ], @@ -4004,12 +3824,12 @@ }, { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "call_id": "call_gFUshjUsV3Ngpz52OkpiA6kM", "name": "get_weather", "type": "function_call" }, { - "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "call_id": "call_gFUshjUsV3Ngpz52OkpiA6kM", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -4047,19 +3867,19 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0cf091c9d8607162006a43cd18c7e081a1ae70ca20b185512e\",\"object\":\"response\",\"created_at\":1782828312,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", - "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0cf091c9d8607162006a43cd18c7e081a1ae70ca20b185512e\",\"object\":\"response\",\"created_at\":1782828312,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", - "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_RCRQYqqTzbN62gHTHHp23Mf2\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"zyvGiMbtbpfGOG\",\"output_index\":0,\"sequence_number\":3}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"nmlfNWem\",\"output_index\":0,\"sequence_number\":4}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"C86uRmRWjQiXr\",\"output_index\":0,\"sequence_number\":5}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"vfzYyOCxi9F\",\"output_index\":0,\"sequence_number\":6}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"OGWJ2mMxKa5zbQa\",\"output_index\":0,\"sequence_number\":7}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"Yy0SfUAU1\",\"output_index\":0,\"sequence_number\":8}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"obfuscation\":\"qQJt1lEqzpuywS\",\"output_index\":0,\"sequence_number\":9}", - "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"output_index\":0,\"sequence_number\":10}", - "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_RCRQYqqTzbN62gHTHHp23Mf2\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", - "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0cf091c9d8607162006a43cd18c7e081a1ae70ca20b185512e\",\"object\":\"response\",\"created_at\":1782828312,\"status\":\"completed\",\"background\":false,\"completed_at\":1782828313,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_0cf091c9d8607162006a43cd1948a081a1981a52231c705d50\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_RCRQYqqTzbN62gHTHHp23Mf2\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":123,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":131},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0f0a2a2ca33b9910006a4b6d2070b4819d82eaf124a4e9ff1c\",\"object\":\"response\",\"created_at\":1783328032,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0f0a2a2ca33b9910006a4b6d2070b4819d82eaf124a4e9ff1c\",\"object\":\"response\",\"created_at\":1783328032,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_0f0a2a2ca33b9910006a4b6d20f694819d922848ed49f521d0\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_uWdCfipoF3A6UyD5Qb5OQ3LG\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_0f0a2a2ca33b9910006a4b6d20f694819d922848ed49f521d0\",\"obfuscation\":\"bFC2GcoaJerSGU\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_0f0a2a2ca33b9910006a4b6d20f694819d922848ed49f521d0\",\"obfuscation\":\"l57tHvPW\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_0f0a2a2ca33b9910006a4b6d20f694819d922848ed49f521d0\",\"obfuscation\":\"vPFgU0VShWpoH\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_0f0a2a2ca33b9910006a4b6d20f694819d922848ed49f521d0\",\"obfuscation\":\"3L11DWI7m37\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_0f0a2a2ca33b9910006a4b6d20f694819d922848ed49f521d0\",\"obfuscation\":\"ggklGwtzU5dQSUu\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_0f0a2a2ca33b9910006a4b6d20f694819d922848ed49f521d0\",\"obfuscation\":\"TjVD8Y728\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_0f0a2a2ca33b9910006a4b6d20f694819d922848ed49f521d0\",\"obfuscation\":\"c1ikOAGhuk5kCi\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_0f0a2a2ca33b9910006a4b6d20f694819d922848ed49f521d0\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_0f0a2a2ca33b9910006a4b6d20f694819d922848ed49f521d0\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_uWdCfipoF3A6UyD5Qb5OQ3LG\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0f0a2a2ca33b9910006a4b6d2070b4819d82eaf124a4e9ff1c\",\"object\":\"response\",\"created_at\":1783328032,\"status\":\"completed\",\"background\":false,\"completed_at\":1783328033,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_0f0a2a2ca33b9910006a4b6d20f694819d922848ed49f521d0\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_uWdCfipoF3A6UyD5Qb5OQ3LG\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":109,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":117},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" ], "kind": "sse" }, @@ -4067,12 +3887,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a13db97909fbc2cd-VIE", + "cf-ray": "a16d61aa1d175aad-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 30 Jun 2026 14:05:12 GMT", + "date": "Mon, 06 Jul 2026 08:53:52 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "124", + "openai-processing-ms": "105", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -4080,30 +3900,30 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "e6eb27ba-6372-4a59-a3cc-7461c0daca87" + "x-request-id": "f920f0b6-c64c-4732-a4d5-3b44a7835cc0" }, "status": 200, "statusText": "OK" } }, { - "callIndex": 11, - "id": "5ae7a910cfe65f0a", + "callIndex": 20, + "id": "6eb37c8b04f90420", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-30T14:05:14.796Z", + "recordedAt": "2026-07-06T08:53:54.498Z", "request": { "body": { "kind": "json", "value": { "input": [ { - "content": "You are a terse weather assistant. Use tools before answering.", + "content": "You are a helpful weather assistant.", "role": "system" }, { "content": [ { - "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "text": "What's the weather in Paris?", "type": "input_text" } ], @@ -4111,23 +3931,23 @@ }, { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "call_id": "call_gFUshjUsV3Ngpz52OkpiA6kM", "name": "get_weather", "type": "function_call" }, { - "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "call_id": "call_gFUshjUsV3Ngpz52OkpiA6kM", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_RCRQYqqTzbN62gHTHHp23Mf2", + "call_id": "call_uWdCfipoF3A6UyD5Qb5OQ3LG", "name": "get_weather", "type": "function_call" }, { - "call_id": "call_RCRQYqqTzbN62gHTHHp23Mf2", + "call_id": "call_uWdCfipoF3A6UyD5Qb5OQ3LG", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -4165,19 +3985,19 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_06abbb48bcf77776006a43cd19d364819cb93cf33ba3b848f6\",\"object\":\"response\",\"created_at\":1782828313,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", - "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_06abbb48bcf77776006a43cd19d364819cb93cf33ba3b848f6\",\"object\":\"response\",\"created_at\":1782828313,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", - "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_TWX0F2viwpe2TX5QlLVtUQVI\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"X9fZc0MDBGfT68\",\"output_index\":0,\"sequence_number\":3}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"BDGNmwiY\",\"output_index\":0,\"sequence_number\":4}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"mrSpd5KiNuZ3e\",\"output_index\":0,\"sequence_number\":5}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"7BeqAFR9G4Z\",\"output_index\":0,\"sequence_number\":6}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"i79W3XCNPYkxbiE\",\"output_index\":0,\"sequence_number\":7}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"RpDPgyZxs\",\"output_index\":0,\"sequence_number\":8}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"obfuscation\":\"tTTv99o6bF5UeI\",\"output_index\":0,\"sequence_number\":9}", - "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"output_index\":0,\"sequence_number\":10}", - "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_TWX0F2viwpe2TX5QlLVtUQVI\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", - "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_06abbb48bcf77776006a43cd19d364819cb93cf33ba3b848f6\",\"object\":\"response\",\"created_at\":1782828313,\"status\":\"completed\",\"background\":false,\"completed_at\":1782828314,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_06abbb48bcf77776006a43cd1a9a80819ca13baf71c78e69f0\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_TWX0F2viwpe2TX5QlLVtUQVI\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":162,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":170},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_02179691be6473eb006a4b6d21cd5c81a3ac76d5467f556bb8\",\"object\":\"response\",\"created_at\":1783328033,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_02179691be6473eb006a4b6d21cd5c81a3ac76d5467f556bb8\",\"object\":\"response\",\"created_at\":1783328033,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_02179691be6473eb006a4b6d22483081a3a921fdee1de11029\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_NGVAl0rG3LkwBJ4UnY1JdIZC\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_02179691be6473eb006a4b6d22483081a3a921fdee1de11029\",\"obfuscation\":\"cf8jnM4GOr6Tg3\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_02179691be6473eb006a4b6d22483081a3a921fdee1de11029\",\"obfuscation\":\"BUaoGkre\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_02179691be6473eb006a4b6d22483081a3a921fdee1de11029\",\"obfuscation\":\"kZXu6Yj5BO3M4\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_02179691be6473eb006a4b6d22483081a3a921fdee1de11029\",\"obfuscation\":\"pKeRQKSy05f\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_02179691be6473eb006a4b6d22483081a3a921fdee1de11029\",\"obfuscation\":\"ZPA18WwZAyjiRPF\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_02179691be6473eb006a4b6d22483081a3a921fdee1de11029\",\"obfuscation\":\"ZOoayP7MD\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_02179691be6473eb006a4b6d22483081a3a921fdee1de11029\",\"obfuscation\":\"sa0sqp8sLoRR8z\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_02179691be6473eb006a4b6d22483081a3a921fdee1de11029\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_02179691be6473eb006a4b6d22483081a3a921fdee1de11029\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_NGVAl0rG3LkwBJ4UnY1JdIZC\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_02179691be6473eb006a4b6d21cd5c81a3ac76d5467f556bb8\",\"object\":\"response\",\"created_at\":1783328033,\"status\":\"completed\",\"background\":false,\"completed_at\":1783328034,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_02179691be6473eb006a4b6d22483081a3a921fdee1de11029\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_NGVAl0rG3LkwBJ4UnY1JdIZC\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":148,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":156},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" ], "kind": "sse" }, @@ -4185,12 +4005,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a13db9807e84c2cd-VIE", + "cf-ray": "a16d61b28ccc5aad-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 30 Jun 2026 14:05:14 GMT", + "date": "Mon, 06 Jul 2026 08:53:54 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "290", + "openai-processing-ms": "176", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -4198,30 +4018,30 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "da6ccba4-7d01-4bef-b112-85c2065c865c" + "x-request-id": "fc2f8882-bee5-430c-977e-474aa9c4aac8" }, "status": 200, "statusText": "OK" } }, { - "callIndex": 12, - "id": "99916913afa15f69", + "callIndex": 21, + "id": "6594f6ae56bdc869", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-30T14:05:15.815Z", + "recordedAt": "2026-07-06T08:53:55.553Z", "request": { "body": { "kind": "json", "value": { "input": [ { - "content": "You are a terse weather assistant. Use tools before answering.", + "content": "You are a helpful weather assistant.", "role": "system" }, { "content": [ { - "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "text": "What's the weather in Paris?", "type": "input_text" } ], @@ -4229,34 +4049,34 @@ }, { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "call_id": "call_gFUshjUsV3Ngpz52OkpiA6kM", "name": "get_weather", "type": "function_call" }, { - "call_id": "call_sTScpLSOY47aZi8gJLjVvWXC", + "call_id": "call_gFUshjUsV3Ngpz52OkpiA6kM", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_RCRQYqqTzbN62gHTHHp23Mf2", + "call_id": "call_uWdCfipoF3A6UyD5Qb5OQ3LG", "name": "get_weather", "type": "function_call" }, { - "call_id": "call_RCRQYqqTzbN62gHTHHp23Mf2", + "call_id": "call_uWdCfipoF3A6UyD5Qb5OQ3LG", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_TWX0F2viwpe2TX5QlLVtUQVI", + "call_id": "call_NGVAl0rG3LkwBJ4UnY1JdIZC", "name": "get_weather", "type": "function_call" }, { - "call_id": "call_TWX0F2viwpe2TX5QlLVtUQVI", + "call_id": "call_NGVAl0rG3LkwBJ4UnY1JdIZC", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -4294,19 +4114,19 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0142b745d8bafca3006a43cd1b0e30819d89e0c23de448e0f7\",\"object\":\"response\",\"created_at\":1782828315,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", - "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0142b745d8bafca3006a43cd1b0e30819d89e0c23de448e0f7\",\"object\":\"response\",\"created_at\":1782828315,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", - "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_86SOe7Fv6IkNa64Wfh9zR37k\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"HcAXBXIFHmlnxn\",\"output_index\":0,\"sequence_number\":3}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"lmGTz0yC\",\"output_index\":0,\"sequence_number\":4}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"dkyh3nMg0zWEm\",\"output_index\":0,\"sequence_number\":5}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"iGbTMoEbEF8\",\"output_index\":0,\"sequence_number\":6}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"wCxCzVHGQYyDFhR\",\"output_index\":0,\"sequence_number\":7}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"mgougFVkD\",\"output_index\":0,\"sequence_number\":8}", - "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"obfuscation\":\"uYHCWj7aAlU8ku\",\"output_index\":0,\"sequence_number\":9}", - "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"output_index\":0,\"sequence_number\":10}", - "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_86SOe7Fv6IkNa64Wfh9zR37k\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", - "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0142b745d8bafca3006a43cd1b0e30819d89e0c23de448e0f7\",\"object\":\"response\",\"created_at\":1782828315,\"status\":\"completed\",\"background\":false,\"completed_at\":1782828315,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_0142b745d8bafca3006a43cd1ba7fc819d9e827fb1a2308746\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_86SOe7Fv6IkNa64Wfh9zR37k\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":201,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":209},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0338e52f512e684a006a4b6d22bb28819facf63544413e5d52\",\"object\":\"response\",\"created_at\":1783328034,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":0}", + "event: response.in_progress\ndata: {\"type\":\"response.in_progress\",\"response\":{\"id\":\"resp_0338e52f512e684a006a4b6d22bb28819facf63544413e5d52\",\"object\":\"response\",\"created_at\":1783328034,\"status\":\"in_progress\",\"background\":false,\"completed_at\":null,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"auto\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":null,\"user\":null,\"metadata\":{}},\"sequence_number\":1}", + "event: response.output_item.added\ndata: {\"type\":\"response.output_item.added\",\"item\":{\"id\":\"fc_0338e52f512e684a006a4b6d234810819f89d370ddf2dfdc97\",\"type\":\"function_call\",\"status\":\"in_progress\",\"arguments\":\"\",\"call_id\":\"call_ZUgQJ3wz7qrugXUvrpsLkOmF\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":2}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"{\\\"\",\"item_id\":\"fc_0338e52f512e684a006a4b6d234810819f89d370ddf2dfdc97\",\"obfuscation\":\"mz6WJLzKNuQVtL\",\"output_index\":0,\"sequence_number\":3}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"location\",\"item_id\":\"fc_0338e52f512e684a006a4b6d234810819f89d370ddf2dfdc97\",\"obfuscation\":\"Tx0Nq4JI\",\"output_index\":0,\"sequence_number\":4}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\":\\\"\",\"item_id\":\"fc_0338e52f512e684a006a4b6d234810819f89d370ddf2dfdc97\",\"obfuscation\":\"XaL6EIoZwa7FF\",\"output_index\":0,\"sequence_number\":5}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"Paris\",\"item_id\":\"fc_0338e52f512e684a006a4b6d234810819f89d370ddf2dfdc97\",\"obfuscation\":\"qBueKSuxZUe\",\"output_index\":0,\"sequence_number\":6}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\",\",\"item_id\":\"fc_0338e52f512e684a006a4b6d234810819f89d370ddf2dfdc97\",\"obfuscation\":\"fzY51qRf1wbWidm\",\"output_index\":0,\"sequence_number\":7}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\" France\",\"item_id\":\"fc_0338e52f512e684a006a4b6d234810819f89d370ddf2dfdc97\",\"obfuscation\":\"TtYAi9o3k\",\"output_index\":0,\"sequence_number\":8}", + "event: response.function_call_arguments.delta\ndata: {\"type\":\"response.function_call_arguments.delta\",\"delta\":\"\\\"}\",\"item_id\":\"fc_0338e52f512e684a006a4b6d234810819f89d370ddf2dfdc97\",\"obfuscation\":\"1hXyaNBl5dD4bJ\",\"output_index\":0,\"sequence_number\":9}", + "event: response.function_call_arguments.done\ndata: {\"type\":\"response.function_call_arguments.done\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"item_id\":\"fc_0338e52f512e684a006a4b6d234810819f89d370ddf2dfdc97\",\"output_index\":0,\"sequence_number\":10}", + "event: response.output_item.done\ndata: {\"type\":\"response.output_item.done\",\"item\":{\"id\":\"fc_0338e52f512e684a006a4b6d234810819f89d370ddf2dfdc97\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_ZUgQJ3wz7qrugXUvrpsLkOmF\",\"name\":\"get_weather\"},\"output_index\":0,\"sequence_number\":11}", + "event: response.completed\ndata: {\"type\":\"response.completed\",\"response\":{\"id\":\"resp_0338e52f512e684a006a4b6d22bb28819facf63544413e5d52\",\"object\":\"response\",\"created_at\":1783328034,\"status\":\"completed\",\"background\":false,\"completed_at\":1783328035,\"error\":null,\"frequency_penalty\":0,\"incomplete_details\":null,\"instructions\":null,\"max_output_tokens\":96,\"max_tool_calls\":null,\"model\":\"gpt-4o-mini-2024-07-18\",\"moderation\":null,\"output\":[{\"id\":\"fc_0338e52f512e684a006a4b6d234810819f89d370ddf2dfdc97\",\"type\":\"function_call\",\"status\":\"completed\",\"arguments\":\"{\\\"location\\\":\\\"Paris, France\\\"}\",\"call_id\":\"call_ZUgQJ3wz7qrugXUvrpsLkOmF\",\"name\":\"get_weather\"}],\"parallel_tool_calls\":true,\"presence_penalty\":0,\"previous_response_id\":null,\"prompt_cache_key\":null,\"prompt_cache_retention\":\"in_memory\",\"reasoning\":{\"context\":null,\"effort\":null,\"summary\":null},\"safety_identifier\":null,\"service_tier\":\"default\",\"store\":true,\"temperature\":0,\"text\":{\"format\":{\"type\":\"text\"},\"verbosity\":\"medium\"},\"tool_choice\":\"required\",\"tool_usage\":{\"image_gen\":{\"input_tokens\":0,\"input_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"output_tokens\":0,\"output_tokens_details\":{\"image_tokens\":0,\"text_tokens\":0},\"total_tokens\":0},\"web_search\":{\"num_requests\":0}},\"tools\":[{\"type\":\"function\",\"description\":\"Get the weather for a location\",\"name\":\"get_weather\",\"parameters\":{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\",\"description\":\"The city and country\"}},\"required\":[\"location\"],\"additionalProperties\":false,\"$schema\":\"http://json-schema.org/draft-07/schema#\"},\"strict\":true}],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":187,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":8,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":195},\"user\":null,\"metadata\":{}},\"sequence_number\":12}" ], "kind": "sse" }, @@ -4314,12 +4134,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a13db9885c23c2cd-VIE", + "cf-ray": "a16d61b859715aad-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 30 Jun 2026 14:05:15 GMT", + "date": "Mon, 06 Jul 2026 08:53:54 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "201", + "openai-processing-ms": "106", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -4327,11 +4147,14 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "99e2031c-bcb6-4a8b-8876-c0b91a5e7e37" + "x-request-id": "f2f2783a-4e97-4f00-b2eb-5fb909fe0fce" }, "status": 200, "statusText": "OK" } } - ] + ], + "meta": { + "createdAt": "2026-06-15T13:08:33.188Z" + } } diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json index abc72598e..ebe790f53 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json @@ -417,7 +417,7 @@ ], "input": { "experimental_output": { - "responseFormat": {} + "responseFormat": "[Promise]" }, "maxOutputTokens": 32, "model": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt index d9a870ae4..38784441d 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt @@ -295,7 +295,7 @@ span_tree: │ └── generateText [function] │ input: { │ "experimental_output": { - │ "responseFormat": {} + │ "responseFormat": "[Promise]" │ }, │ "maxOutputTokens": 32, │ "model": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json index 00a0312d1..1333529fc 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json @@ -417,7 +417,7 @@ ], "input": { "experimental_output": { - "responseFormat": {} + "responseFormat": "[Promise]" }, "maxOutputTokens": 32, "model": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt index 016337e46..280ed8953 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt @@ -295,7 +295,7 @@ span_tree: │ └── generateText [function] │ input: { │ "experimental_output": { - │ "responseFormat": {} + │ "responseFormat": "[Promise]" │ }, │ "maxOutputTokens": 32, │ "model": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.json index 2ebebd1ec..779d8f39d 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.json @@ -944,6 +944,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You must inspect live weather via the provided get_weather tool before responding.", "maxOutputTokens": 128, "messages": [ { @@ -1055,6 +1056,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You must inspect live weather via the provided get_weather tool before responding.", "maxOutputTokens": 128, "messages": [ { @@ -1201,6 +1203,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You must inspect live weather via the provided get_weather tool before responding.", "maxOutputTokens": 128, "messages": [ { @@ -1382,6 +1385,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You must inspect live weather via the provided get_weather tool before responding.", "maxOutputTokens": 128, "messages": [ { @@ -1595,6 +1599,7 @@ } ], "input": { + "instructions": "You must inspect live weather via the provided get_weather tool before responding.", "maxOutputTokens": 128, "maxRetries": 2, "messages": [ @@ -2707,6 +2712,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You are a terse assistant.", "maxOutputTokens": 24, "messages": [ { @@ -2774,6 +2780,7 @@ } ], "input": { + "instructions": "You are a terse assistant.", "maxOutputTokens": 24, "maxRetries": 2, "messages": [ @@ -2959,6 +2966,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You are a terse assistant.", "maxOutputTokens": 24, "messages": [ { @@ -3026,6 +3034,7 @@ } ], "input": { + "instructions": "You are a terse assistant.", "maxOutputTokens": 24, "maxRetries": 2, "messages": [ @@ -3214,6 +3223,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", "maxOutputTokens": 256, "messages": [ { @@ -3394,6 +3404,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", "maxOutputTokens": 256, "messages": [ { @@ -3606,6 +3617,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", "maxOutputTokens": 256, "messages": [ { @@ -3830,6 +3842,7 @@ } ], "input": { + "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", "maxOutputTokens": 256, "maxRetries": 2, "messages": [ @@ -5491,6 +5504,990 @@ "operation": "workflow-agent-stream", "testRunId": "" } + }, + { + "name": "ai-sdk-workflow-agent-stream-prompt-operation", + "children": [ + { + "name": "WorkflowAgent.stream", + "type": "function", + "children": [ + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a helpful weather assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "What's the weather in Paris?", + "type": "text" + } + ], + "role": "user" + } + ] + }, + "output": { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 70 + }, + "inputTokens": 70, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 70, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 78 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "temperature": 0 + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + ] + }, + "metrics": { + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 70, + "tokens": 78 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolName": "get_weather" + }, + "metrics": { + "duration_ms": 0 + } + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a helpful weather assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "What's the weather in Paris?", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 109 + }, + "inputTokens": 109, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 109, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 117 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "temperature": 0 + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + ] + }, + "metrics": { + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 109, + "tokens": 117 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolName": "get_weather" + }, + "metrics": { + "duration_ms": 0 + } + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a helpful weather assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "What's the weather in Paris?", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 148 + }, + "inputTokens": 148, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 148, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 156 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "temperature": 0 + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + ] + }, + "metrics": { + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 148, + "tokens": 156 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolName": "get_weather" + }, + "metrics": { + "duration_ms": 0 + } + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a helpful weather assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "What's the weather in Paris?", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 187 + }, + "inputTokens": 187, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 187, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 195 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "temperature": 0 + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + ] + }, + "metrics": { + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 187, + "tokens": 195 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolName": "get_weather" + }, + "metrics": { + "duration_ms": 0 + } + } + ], + "input": { + "messages": [ + { + "content": "What's the weather in Paris?", + "role": "user" + } + ] + }, + "output": { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "steps": [ + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 0, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 70 + }, + "inputTokens": 70, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 70, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 78 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 1, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 109 + }, + "inputTokens": 109, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 109, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 117 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 2, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 148 + }, + "inputTokens": 148, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 148, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 156 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "request": { + "messages": [] + }, + "response": { + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 3, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 187 + }, + "inputTokens": 187, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 187, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 195 + }, + "warnings": [] + } + ], + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "totalUsage": { + "inputTokens": 514, + "outputTokens": 32, + "totalTokens": 546 + }, + "usage": { + "inputTokens": 514, + "outputTokens": 32, + "totalTokens": 546 + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "maxRetries": 2, + "temperature": 0, + "toolChoice": "required" + }, + "provider": "openai.responses", + "tools": { + "get_weather": { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + } + } + } + ], + "metadata": { + "operation": "workflow-agent-stream-prompt", + "testRunId": "" + } } ], "metadata": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.txt index 89c4b5aeb..738f555b6 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-auto-hook.span-tree.txt @@ -873,6 +873,7 @@ span_tree: │ } │ └── generateText [function] │ input: { + │ "instructions": "You must inspect live weather via the provided get_weather tool before responding.", │ "maxOutputTokens": 128, │ "maxRetries": 2, │ "messages": [ @@ -1652,6 +1653,7 @@ span_tree: │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You must inspect live weather via the provided get_weather tool before responding.", │ │ "maxOutputTokens": 128, │ │ "messages": [ │ │ { @@ -1755,6 +1757,7 @@ span_tree: │ │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You must inspect live weather via the provided get_weather tool before responding.", │ │ "maxOutputTokens": 128, │ │ "messages": [ │ │ { @@ -1893,6 +1896,7 @@ span_tree: │ │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You must inspect live weather via the provided get_weather tool before responding.", │ │ "maxOutputTokens": 128, │ │ "messages": [ │ │ { @@ -2066,6 +2070,7 @@ span_tree: │ │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You must inspect live weather via the provided get_weather tool before responding.", │ │ "maxOutputTokens": 128, │ │ "messages": [ │ │ { @@ -2569,6 +2574,7 @@ span_tree: │ } │ └── generateText [function] │ input: { + │ "instructions": "You are a terse assistant.", │ "maxOutputTokens": 24, │ "maxRetries": 2, │ "messages": [ @@ -2737,6 +2743,7 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { + │ "instructions": "You are a terse assistant.", │ "maxOutputTokens": 24, │ "messages": [ │ { @@ -2808,6 +2815,7 @@ span_tree: │ } │ └── streamText [function] │ input: { + │ "instructions": "You are a terse assistant.", │ "maxOutputTokens": 24, │ "maxRetries": 2, │ "messages": [ @@ -2979,6 +2987,7 @@ span_tree: │ } │ └── doStream [llm] │ input: { + │ "instructions": "You are a terse assistant.", │ "maxOutputTokens": 24, │ "messages": [ │ { @@ -3050,6 +3059,7 @@ span_tree: │ } │ └── generateText [function] │ input: { + │ "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", │ "maxOutputTokens": 256, │ "maxRetries": 2, │ "messages": [ @@ -3723,6 +3733,7 @@ span_tree: │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", │ │ "maxOutputTokens": 256, │ │ "messages": [ │ │ { @@ -3891,6 +3902,7 @@ span_tree: │ │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", │ │ "maxOutputTokens": 256, │ │ "messages": [ │ │ { @@ -4095,6 +4107,7 @@ span_tree: │ │ } │ └── doGenerate [llm] │ input: { + │ "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", │ "maxOutputTokens": 256, │ "messages": [ │ { @@ -4316,16 +4329,959 @@ span_tree: │ "prompt_tokens": 308, │ "tokens": 370 │ } - └── ai-sdk-workflow-agent-stream-operation + ├── ai-sdk-workflow-agent-stream-operation + │ metadata: { + │ "operation": "workflow-agent-stream", + │ "testRunId": "" + │ } + │ └── WorkflowAgent.stream [function] + │ input: { + │ "messages": [ + │ { + │ "content": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "role": "user" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "request": { + │ "messages": [] + │ }, + │ "response": { + │ "messages": [], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "steps": [ + │ { + │ "callId": "", + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "gpt-4o-mini-2024-07-18" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "request": { + │ "messages": [] + │ }, + │ "response": { + │ "messages": [], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "stepNumber": 0, + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 84 + │ }, + │ "inputTokens": 84, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 84, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 92 + │ }, + │ "warnings": [] + │ }, + │ { + │ "callId": "", + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "gpt-4o-mini-2024-07-18" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "request": { + │ "messages": [] + │ }, + │ "response": { + │ "messages": [], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "stepNumber": 1, + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 123 + │ }, + │ "inputTokens": 123, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 123, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 131 + │ }, + │ "warnings": [] + │ }, + │ { + │ "callId": "", + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "gpt-4o-mini-2024-07-18" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "request": { + │ "messages": [] + │ }, + │ "response": { + │ "messages": [], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "stepNumber": 2, + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 162 + │ }, + │ "inputTokens": 162, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 162, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 170 + │ }, + │ "warnings": [] + │ }, + │ { + │ "callId": "", + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "gpt-4o-mini-2024-07-18" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "request": { + │ "messages": [] + │ }, + │ "response": { + │ "messages": [], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "stepNumber": 3, + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 201 + │ }, + │ "inputTokens": 201, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 201, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 209 + │ }, + │ "warnings": [] + │ } + │ ], + │ "text": "", + │ "toolCalls": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "toolResults": [], + │ "totalUsage": { + │ "inputTokens": 570, + │ "outputTokens": 32, + │ "totalTokens": 602 + │ }, + │ "usage": { + │ "inputTokens": 570, + │ "outputTokens": 32, + │ "totalTokens": 602 + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "options": { + │ "maxOutputTokens": 96, + │ "maxRetries": 2, + │ "temperature": 0, + │ "toolChoice": "required" + │ }, + │ "provider": "openai.responses", + │ "tools": { + │ "get_weather": { + │ "description": "Get the weather for a location", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "location": { + │ "description": "The city and country", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "location" + │ ], + │ "type": "object" + │ } + │ } + │ } + │ } + │ ├── doGenerate [llm] + │ │ input: { + │ │ "messages": [ + │ │ { + │ │ "content": "You are a terse weather assistant. Use tools before answering.", + │ │ "role": "system" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "role": "user" + │ │ } + │ │ ] + │ │ } + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "finishReason": "tool-calls", + │ │ "response": {}, + │ │ "usage": { + │ │ "inputTokenDetails": { + │ │ "cacheReadTokens": 0, + │ │ "noCacheTokens": 84 + │ │ }, + │ │ "inputTokens": 84, + │ │ "outputTokenDetails": { + │ │ "reasoningTokens": 0, + │ │ "textTokens": 8 + │ │ }, + │ │ "outputTokens": 8, + │ │ "raw": { + │ │ "input_tokens": 84, + │ │ "input_tokens_details": { + │ │ "cached_tokens": 0 + │ │ }, + │ │ "output_tokens": 8, + │ │ "output_tokens_details": { + │ │ "reasoning_tokens": 0 + │ │ } + │ │ }, + │ │ "totalTokens": 92 + │ │ } + │ │ } + │ │ metadata: { + │ │ "braintrust": { + │ │ "integration_name": "ai-sdk", + │ │ "sdk_language": "typescript" + │ │ }, + │ │ "model": "gpt-4o-mini-2024-07-18", + │ │ "options": { + │ │ "maxOutputTokens": 96, + │ │ "temperature": 0 + │ │ }, + │ │ "provider": "openai.responses", + │ │ "tools": [ + │ │ { + │ │ "description": "Get the weather for a location", + │ │ "inputSchema": { + │ │ "$schema": "http://json-schema.org/draft-07/schema#", + │ │ "additionalProperties": false, + │ │ "properties": { + │ │ "location": { + │ │ "description": "The city and country", + │ │ "type": "string" + │ │ } + │ │ }, + │ │ "required": [ + │ │ "location" + │ │ ], + │ │ "type": "object" + │ │ } + │ │ } + │ │ ] + │ │ } + │ │ metrics: { + │ │ "completion_tokens": 8, + │ │ "prompt_cached_tokens": 0, + │ │ "prompt_tokens": 84, + │ │ "tokens": 92 + │ │ } + │ ├── get_weather [tool] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } + │ │ output: { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ metadata: { + │ │ "braintrust": { + │ │ "integration_name": "ai-sdk", + │ │ "sdk_language": "typescript" + │ │ }, + │ │ "toolName": "get_weather" + │ │ } + │ │ metrics: { + │ │ "duration_ms": 0 + │ │ } + │ ├── doGenerate [llm] + │ │ input: { + │ │ "messages": [ + │ │ { + │ │ "content": "You are a terse weather assistant. Use tools before answering.", + │ │ "role": "system" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "role": "user" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ } + │ │ ] + │ │ } + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "finishReason": "tool-calls", + │ │ "response": {}, + │ │ "usage": { + │ │ "inputTokenDetails": { + │ │ "cacheReadTokens": 0, + │ │ "noCacheTokens": 123 + │ │ }, + │ │ "inputTokens": 123, + │ │ "outputTokenDetails": { + │ │ "reasoningTokens": 0, + │ │ "textTokens": 8 + │ │ }, + │ │ "outputTokens": 8, + │ │ "raw": { + │ │ "input_tokens": 123, + │ │ "input_tokens_details": { + │ │ "cached_tokens": 0 + │ │ }, + │ │ "output_tokens": 8, + │ │ "output_tokens_details": { + │ │ "reasoning_tokens": 0 + │ │ } + │ │ }, + │ │ "totalTokens": 131 + │ │ } + │ │ } + │ │ metadata: { + │ │ "braintrust": { + │ │ "integration_name": "ai-sdk", + │ │ "sdk_language": "typescript" + │ │ }, + │ │ "model": "gpt-4o-mini-2024-07-18", + │ │ "options": { + │ │ "maxOutputTokens": 96, + │ │ "temperature": 0 + │ │ }, + │ │ "provider": "openai.responses", + │ │ "tools": [ + │ │ { + │ │ "description": "Get the weather for a location", + │ │ "inputSchema": { + │ │ "$schema": "http://json-schema.org/draft-07/schema#", + │ │ "additionalProperties": false, + │ │ "properties": { + │ │ "location": { + │ │ "description": "The city and country", + │ │ "type": "string" + │ │ } + │ │ }, + │ │ "required": [ + │ │ "location" + │ │ ], + │ │ "type": "object" + │ │ } + │ │ } + │ │ ] + │ │ } + │ │ metrics: { + │ │ "completion_tokens": 8, + │ │ "prompt_cached_tokens": 0, + │ │ "prompt_tokens": 123, + │ │ "tokens": 131 + │ │ } + │ ├── get_weather [tool] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } + │ │ output: { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ metadata: { + │ │ "braintrust": { + │ │ "integration_name": "ai-sdk", + │ │ "sdk_language": "typescript" + │ │ }, + │ │ "toolName": "get_weather" + │ │ } + │ │ metrics: { + │ │ "duration_ms": 0 + │ │ } + │ ├── doGenerate [llm] + │ │ input: { + │ │ "messages": [ + │ │ { + │ │ "content": "You are a terse weather assistant. Use tools before answering.", + │ │ "role": "system" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "role": "user" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ } + │ │ ] + │ │ } + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "finishReason": "tool-calls", + │ │ "response": {}, + │ │ "usage": { + │ │ "inputTokenDetails": { + │ │ "cacheReadTokens": 0, + │ │ "noCacheTokens": 162 + │ │ }, + │ │ "inputTokens": 162, + │ │ "outputTokenDetails": { + │ │ "reasoningTokens": 0, + │ │ "textTokens": 8 + │ │ }, + │ │ "outputTokens": 8, + │ │ "raw": { + │ │ "input_tokens": 162, + │ │ "input_tokens_details": { + │ │ "cached_tokens": 0 + │ │ }, + │ │ "output_tokens": 8, + │ │ "output_tokens_details": { + │ │ "reasoning_tokens": 0 + │ │ } + │ │ }, + │ │ "totalTokens": 170 + │ │ } + │ │ } + │ │ metadata: { + │ │ "braintrust": { + │ │ "integration_name": "ai-sdk", + │ │ "sdk_language": "typescript" + │ │ }, + │ │ "model": "gpt-4o-mini-2024-07-18", + │ │ "options": { + │ │ "maxOutputTokens": 96, + │ │ "temperature": 0 + │ │ }, + │ │ "provider": "openai.responses", + │ │ "tools": [ + │ │ { + │ │ "description": "Get the weather for a location", + │ │ "inputSchema": { + │ │ "$schema": "http://json-schema.org/draft-07/schema#", + │ │ "additionalProperties": false, + │ │ "properties": { + │ │ "location": { + │ │ "description": "The city and country", + │ │ "type": "string" + │ │ } + │ │ }, + │ │ "required": [ + │ │ "location" + │ │ ], + │ │ "type": "object" + │ │ } + │ │ } + │ │ ] + │ │ } + │ │ metrics: { + │ │ "completion_tokens": 8, + │ │ "prompt_cached_tokens": 0, + │ │ "prompt_tokens": 162, + │ │ "tokens": 170 + │ │ } + │ ├── get_weather [tool] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } + │ │ output: { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ metadata: { + │ │ "braintrust": { + │ │ "integration_name": "ai-sdk", + │ │ "sdk_language": "typescript" + │ │ }, + │ │ "toolName": "get_weather" + │ │ } + │ │ metrics: { + │ │ "duration_ms": 0 + │ │ } + │ ├── doGenerate [llm] + │ │ input: { + │ │ "messages": [ + │ │ { + │ │ "content": "You are a terse weather assistant. Use tools before answering.", + │ │ "role": "system" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "role": "user" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ } + │ │ ] + │ │ } + │ │ output: { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "finishReason": "tool-calls", + │ │ "response": {}, + │ │ "usage": { + │ │ "inputTokenDetails": { + │ │ "cacheReadTokens": 0, + │ │ "noCacheTokens": 201 + │ │ }, + │ │ "inputTokens": 201, + │ │ "outputTokenDetails": { + │ │ "reasoningTokens": 0, + │ │ "textTokens": 8 + │ │ }, + │ │ "outputTokens": 8, + │ │ "raw": { + │ │ "input_tokens": 201, + │ │ "input_tokens_details": { + │ │ "cached_tokens": 0 + │ │ }, + │ │ "output_tokens": 8, + │ │ "output_tokens_details": { + │ │ "reasoning_tokens": 0 + │ │ } + │ │ }, + │ │ "totalTokens": 209 + │ │ } + │ │ } + │ │ metadata: { + │ │ "braintrust": { + │ │ "integration_name": "ai-sdk", + │ │ "sdk_language": "typescript" + │ │ }, + │ │ "model": "gpt-4o-mini-2024-07-18", + │ │ "options": { + │ │ "maxOutputTokens": 96, + │ │ "temperature": 0 + │ │ }, + │ │ "provider": "openai.responses", + │ │ "tools": [ + │ │ { + │ │ "description": "Get the weather for a location", + │ │ "inputSchema": { + │ │ "$schema": "http://json-schema.org/draft-07/schema#", + │ │ "additionalProperties": false, + │ │ "properties": { + │ │ "location": { + │ │ "description": "The city and country", + │ │ "type": "string" + │ │ } + │ │ }, + │ │ "required": [ + │ │ "location" + │ │ ], + │ │ "type": "object" + │ │ } + │ │ } + │ │ ] + │ │ } + │ │ metrics: { + │ │ "completion_tokens": 8, + │ │ "prompt_cached_tokens": 0, + │ │ "prompt_tokens": 201, + │ │ "tokens": 209 + │ │ } + │ └── get_weather [tool] + │ input: { + │ "location": "Paris, France" + │ } + │ output: { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "toolName": "get_weather" + │ } + │ metrics: { + │ "duration_ms": 0 + │ } + └── ai-sdk-workflow-agent-stream-prompt-operation metadata: { - "operation": "workflow-agent-stream", + "operation": "workflow-agent-stream-prompt", "testRunId": "" } └── WorkflowAgent.stream [function] input: { "messages": [ { - "content": "Use get_weather for Paris, France, then reply with one short sentence.", + "content": "What's the weather in Paris?", "role": "user" } ] @@ -4392,16 +5348,16 @@ span_tree: "usage": { "inputTokenDetails": { "cacheReadTokens": 0, - "noCacheTokens": 84 + "noCacheTokens": 70 }, - "inputTokens": 84, + "inputTokens": 70, "outputTokenDetails": { "reasoningTokens": 0, "textTokens": 8 }, "outputTokens": 8, "raw": { - "input_tokens": 84, + "input_tokens": 70, "input_tokens_details": { "cached_tokens": 0 }, @@ -4410,7 +5366,7 @@ span_tree: "reasoning_tokens": 0 } }, - "totalTokens": 92 + "totalTokens": 78 }, "warnings": [] }, @@ -4450,16 +5406,16 @@ span_tree: "usage": { "inputTokenDetails": { "cacheReadTokens": 0, - "noCacheTokens": 123 + "noCacheTokens": 109 }, - "inputTokens": 123, + "inputTokens": 109, "outputTokenDetails": { "reasoningTokens": 0, "textTokens": 8 }, "outputTokens": 8, "raw": { - "input_tokens": 123, + "input_tokens": 109, "input_tokens_details": { "cached_tokens": 0 }, @@ -4468,7 +5424,7 @@ span_tree: "reasoning_tokens": 0 } }, - "totalTokens": 131 + "totalTokens": 117 }, "warnings": [] }, @@ -4508,16 +5464,16 @@ span_tree: "usage": { "inputTokenDetails": { "cacheReadTokens": 0, - "noCacheTokens": 162 + "noCacheTokens": 148 }, - "inputTokens": 162, + "inputTokens": 148, "outputTokenDetails": { "reasoningTokens": 0, "textTokens": 8 }, "outputTokens": 8, "raw": { - "input_tokens": 162, + "input_tokens": 148, "input_tokens_details": { "cached_tokens": 0 }, @@ -4526,7 +5482,7 @@ span_tree: "reasoning_tokens": 0 } }, - "totalTokens": 170 + "totalTokens": 156 }, "warnings": [] }, @@ -4566,16 +5522,16 @@ span_tree: "usage": { "inputTokenDetails": { "cacheReadTokens": 0, - "noCacheTokens": 201 + "noCacheTokens": 187 }, - "inputTokens": 201, + "inputTokens": 187, "outputTokenDetails": { "reasoningTokens": 0, "textTokens": 8 }, "outputTokens": 8, "raw": { - "input_tokens": 201, + "input_tokens": 187, "input_tokens_details": { "cached_tokens": 0 }, @@ -4584,7 +5540,7 @@ span_tree: "reasoning_tokens": 0 } }, - "totalTokens": 209 + "totalTokens": 195 }, "warnings": [] } @@ -4601,14 +5557,14 @@ span_tree: ], "toolResults": [], "totalUsage": { - "inputTokens": 570, + "inputTokens": 514, "outputTokens": 32, - "totalTokens": 602 + "totalTokens": 546 }, "usage": { - "inputTokens": 570, + "inputTokens": 514, "outputTokens": 32, - "totalTokens": 602 + "totalTokens": 546 }, "warnings": [] } @@ -4649,13 +5605,13 @@ span_tree: │ input: { │ "messages": [ │ { - │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "content": "You are a helpful weather assistant.", │ "role": "system" │ }, │ { │ "content": [ │ { - │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "text": "What's the weather in Paris?", │ "type": "text" │ } │ ], @@ -4678,16 +5634,16 @@ span_tree: │ "usage": { │ "inputTokenDetails": { │ "cacheReadTokens": 0, - │ "noCacheTokens": 84 + │ "noCacheTokens": 70 │ }, - │ "inputTokens": 84, + │ "inputTokens": 70, │ "outputTokenDetails": { │ "reasoningTokens": 0, │ "textTokens": 8 │ }, │ "outputTokens": 8, │ "raw": { - │ "input_tokens": 84, + │ "input_tokens": 70, │ "input_tokens_details": { │ "cached_tokens": 0 │ }, @@ -4696,7 +5652,7 @@ span_tree: │ "reasoning_tokens": 0 │ } │ }, - │ "totalTokens": 92 + │ "totalTokens": 78 │ } │ } │ metadata: { @@ -4733,8 +5689,8 @@ span_tree: │ metrics: { │ "completion_tokens": 8, │ "prompt_cached_tokens": 0, - │ "prompt_tokens": 84, - │ "tokens": 92 + │ "prompt_tokens": 70, + │ "tokens": 78 │ } ├── get_weather [tool] │ input: { @@ -4759,13 +5715,13 @@ span_tree: │ input: { │ "messages": [ │ { - │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "content": "You are a helpful weather assistant.", │ "role": "system" │ }, │ { │ "content": [ │ { - │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "text": "What's the weather in Paris?", │ "type": "text" │ } │ ], @@ -4817,16 +5773,16 @@ span_tree: │ "usage": { │ "inputTokenDetails": { │ "cacheReadTokens": 0, - │ "noCacheTokens": 123 + │ "noCacheTokens": 109 │ }, - │ "inputTokens": 123, + │ "inputTokens": 109, │ "outputTokenDetails": { │ "reasoningTokens": 0, │ "textTokens": 8 │ }, │ "outputTokens": 8, │ "raw": { - │ "input_tokens": 123, + │ "input_tokens": 109, │ "input_tokens_details": { │ "cached_tokens": 0 │ }, @@ -4835,7 +5791,7 @@ span_tree: │ "reasoning_tokens": 0 │ } │ }, - │ "totalTokens": 131 + │ "totalTokens": 117 │ } │ } │ metadata: { @@ -4872,8 +5828,8 @@ span_tree: │ metrics: { │ "completion_tokens": 8, │ "prompt_cached_tokens": 0, - │ "prompt_tokens": 123, - │ "tokens": 131 + │ "prompt_tokens": 109, + │ "tokens": 117 │ } ├── get_weather [tool] │ input: { @@ -4898,13 +5854,13 @@ span_tree: │ input: { │ "messages": [ │ { - │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "content": "You are a helpful weather assistant.", │ "role": "system" │ }, │ { │ "content": [ │ { - │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "text": "What's the weather in Paris?", │ "type": "text" │ } │ ], @@ -4985,16 +5941,16 @@ span_tree: │ "usage": { │ "inputTokenDetails": { │ "cacheReadTokens": 0, - │ "noCacheTokens": 162 + │ "noCacheTokens": 148 │ }, - │ "inputTokens": 162, + │ "inputTokens": 148, │ "outputTokenDetails": { │ "reasoningTokens": 0, │ "textTokens": 8 │ }, │ "outputTokens": 8, │ "raw": { - │ "input_tokens": 162, + │ "input_tokens": 148, │ "input_tokens_details": { │ "cached_tokens": 0 │ }, @@ -5003,7 +5959,7 @@ span_tree: │ "reasoning_tokens": 0 │ } │ }, - │ "totalTokens": 170 + │ "totalTokens": 156 │ } │ } │ metadata: { @@ -5040,8 +5996,8 @@ span_tree: │ metrics: { │ "completion_tokens": 8, │ "prompt_cached_tokens": 0, - │ "prompt_tokens": 162, - │ "tokens": 170 + │ "prompt_tokens": 148, + │ "tokens": 156 │ } ├── get_weather [tool] │ input: { @@ -5066,13 +6022,13 @@ span_tree: │ input: { │ "messages": [ │ { - │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "content": "You are a helpful weather assistant.", │ "role": "system" │ }, │ { │ "content": [ │ { - │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "text": "What's the weather in Paris?", │ "type": "text" │ } │ ], @@ -5182,16 +6138,16 @@ span_tree: │ "usage": { │ "inputTokenDetails": { │ "cacheReadTokens": 0, - │ "noCacheTokens": 201 + │ "noCacheTokens": 187 │ }, - │ "inputTokens": 201, + │ "inputTokens": 187, │ "outputTokenDetails": { │ "reasoningTokens": 0, │ "textTokens": 8 │ }, │ "outputTokens": 8, │ "raw": { - │ "input_tokens": 201, + │ "input_tokens": 187, │ "input_tokens_details": { │ "cached_tokens": 0 │ }, @@ -5200,7 +6156,7 @@ span_tree: │ "reasoning_tokens": 0 │ } │ }, - │ "totalTokens": 209 + │ "totalTokens": 195 │ } │ } │ metadata: { @@ -5237,8 +6193,8 @@ span_tree: │ metrics: { │ "completion_tokens": 8, │ "prompt_cached_tokens": 0, - │ "prompt_tokens": 201, - │ "tokens": 209 + │ "prompt_tokens": 187, + │ "tokens": 195 │ } └── get_weather [tool] input: { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.json index 043fd0d96..e126e3ed5 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.json @@ -944,6 +944,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You must inspect live weather via the provided get_weather tool before responding.", "maxOutputTokens": 128, "messages": [ { @@ -1055,6 +1056,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You must inspect live weather via the provided get_weather tool before responding.", "maxOutputTokens": 128, "messages": [ { @@ -1201,6 +1203,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You must inspect live weather via the provided get_weather tool before responding.", "maxOutputTokens": 128, "messages": [ { @@ -1382,6 +1385,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You must inspect live weather via the provided get_weather tool before responding.", "maxOutputTokens": 128, "messages": [ { @@ -1595,6 +1599,7 @@ } ], "input": { + "instructions": "You must inspect live weather via the provided get_weather tool before responding.", "maxOutputTokens": 128, "maxRetries": 2, "messages": [ @@ -2707,6 +2712,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You are a terse assistant.", "maxOutputTokens": 24, "messages": [ { @@ -2774,6 +2780,7 @@ } ], "input": { + "instructions": "You are a terse assistant.", "maxOutputTokens": 24, "maxRetries": 2, "messages": [ @@ -2959,6 +2966,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You are a terse assistant.", "maxOutputTokens": 24, "messages": [ { @@ -3026,6 +3034,7 @@ } ], "input": { + "instructions": "You are a terse assistant.", "maxOutputTokens": 24, "maxRetries": 2, "messages": [ @@ -3214,6 +3223,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", "maxOutputTokens": 256, "messages": [ { @@ -3394,6 +3404,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", "maxOutputTokens": 256, "messages": [ { @@ -3606,6 +3617,7 @@ "type": "llm", "children": [], "input": { + "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", "maxOutputTokens": 256, "messages": [ { @@ -3830,6 +3842,7 @@ } ], "input": { + "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", "maxOutputTokens": 256, "maxRetries": 2, "messages": [ @@ -5691,6 +5704,1186 @@ "operation": "workflow-agent-stream", "testRunId": "" } + }, + { + "name": "ai-sdk-workflow-agent-stream-prompt-operation", + "children": [ + { + "name": "WorkflowAgent.stream", + "type": "function", + "children": [ + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a helpful weather assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "What's the weather in Paris?", + "type": "text" + } + ], + "role": "user" + } + ] + }, + "output": { + "finishReason": { + "unified": "tool-calls" + }, + "text": "", + "toolCalls": [ + { + "input": "{\"location\":\"Paris, France\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 70, + "total": 70 + }, + "outputTokens": { + "reasoning": 0, + "text": 8, + "total": 8 + }, + "raw": { + "input_tokens": 70, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "includeRawChunks": false, + "maxOutputTokens": 96, + "temperature": 0, + "toolChoice": { + "type": "required" + } + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather", + "type": "function" + } + ] + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 70, + "reasoning_tokens": 0, + "tokens": 78 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a helpful weather assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "What's the weather in Paris?", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "finishReason": { + "unified": "tool-calls" + }, + "text": "", + "toolCalls": [ + { + "input": "{\"location\":\"Paris, France\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 109, + "total": 109 + }, + "outputTokens": { + "reasoning": 0, + "text": 8, + "total": 8 + }, + "raw": { + "input_tokens": 109, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "includeRawChunks": false, + "maxOutputTokens": 96, + "temperature": 0, + "toolChoice": { + "type": "required" + } + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather", + "type": "function" + } + ] + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 109, + "reasoning_tokens": 0, + "tokens": 117 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a helpful weather assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "What's the weather in Paris?", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "finishReason": { + "unified": "tool-calls" + }, + "text": "", + "toolCalls": [ + { + "input": "{\"location\":\"Paris, France\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 148, + "total": 148 + }, + "outputTokens": { + "reasoning": 0, + "text": 8, + "total": 8 + }, + "raw": { + "input_tokens": 148, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "includeRawChunks": false, + "maxOutputTokens": 96, + "temperature": 0, + "toolChoice": { + "type": "required" + } + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather", + "type": "function" + } + ] + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 148, + "reasoning_tokens": 0, + "tokens": 156 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "messages": [ + { + "content": "You are a helpful weather assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "What's the weather in Paris?", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + }, + "output": { + "finishReason": { + "unified": "tool-calls" + }, + "text": "", + "toolCalls": [ + { + "input": "{\"location\":\"Paris, France\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 187, + "total": 187 + }, + "outputTokens": { + "reasoning": 0, + "text": 8, + "total": 8 + }, + "raw": { + "input_tokens": 187, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "includeRawChunks": false, + "maxOutputTokens": 96, + "temperature": 0, + "toolChoice": { + "type": "required" + } + }, + "provider": "openai.responses", + "tools": [ + { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + }, + "name": "get_weather", + "type": "function" + } + ] + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 8, + "prompt_cached_tokens": 0, + "prompt_tokens": 187, + "reasoning_tokens": 0, + "tokens": 195 + } + }, + { + "name": "get_weather", + "type": "tool", + "children": [], + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + } + ], + "input": { + "prompt": "What's the weather in Paris?", + "system": "You are a helpful weather assistant." + }, + "output": { + "messages": [ + { + "content": "You are a helpful weather assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "What's the weather in Paris?", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "json", + "value": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + } + }, + "toolName": "get_weather", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "steps": [ + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "reasoning": [], + "request": { + "messages": [] + }, + "response": { + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 0, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 70 + }, + "inputTokens": 70, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 70, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 78 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "reasoning": [], + "request": { + "messages": [] + }, + "response": { + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 1, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 109 + }, + "inputTokens": 109, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 109, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 117 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "reasoning": [], + "request": { + "messages": [] + }, + "response": { + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 2, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 148 + }, + "inputTokens": 148, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 148, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 156 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "dynamicToolCalls": [], + "dynamicToolResults": [], + "files": [], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "gpt-4o-mini-2024-07-18" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "reasoning": [], + "request": { + "messages": [] + }, + "response": { + "messages": [], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "sources": [], + "staticToolCalls": [], + "staticToolResults": [], + "stepNumber": 3, + "text": "", + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [], + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 187 + }, + "inputTokens": 187, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 8 + }, + "outputTokens": 8, + "raw": { + "input_tokens": 187, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 8, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 195 + }, + "warnings": [] + } + ], + "toolCalls": [ + { + "input": { + "location": "Paris, France" + }, + "toolName": "get_weather", + "type": "tool-call" + } + ], + "toolResults": [ + { + "input": { + "location": "Paris, France" + }, + "output": { + "condition": "sunny", + "location": "Paris, France", + "temperatureC": 22 + }, + "toolName": "get_weather", + "type": "tool-result" + } + ] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "options": { + "maxOutputTokens": 96, + "stopWhen": "[Function]", + "temperature": 0, + "toolChoice": "required" + }, + "provider": "openai.responses", + "tools": { + "get_weather": { + "description": "Get the weather for a location", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "location": { + "description": "The city and country", + "type": "string" + } + }, + "required": [ + "location" + ], + "type": "object" + } + } + } + } + } + ], + "metadata": { + "operation": "workflow-agent-stream-prompt", + "testRunId": "" + } } ], "metadata": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.txt index f153bc897..656496e68 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v7-explicit.span-tree.txt @@ -873,6 +873,7 @@ span_tree: │ } │ └── generateText [function] │ input: { + │ "instructions": "You must inspect live weather via the provided get_weather tool before responding.", │ "maxOutputTokens": 128, │ "maxRetries": 2, │ "messages": [ @@ -1652,6 +1653,7 @@ span_tree: │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You must inspect live weather via the provided get_weather tool before responding.", │ │ "maxOutputTokens": 128, │ │ "messages": [ │ │ { @@ -1755,6 +1757,7 @@ span_tree: │ │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You must inspect live weather via the provided get_weather tool before responding.", │ │ "maxOutputTokens": 128, │ │ "messages": [ │ │ { @@ -1893,6 +1896,7 @@ span_tree: │ │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You must inspect live weather via the provided get_weather tool before responding.", │ │ "maxOutputTokens": 128, │ │ "messages": [ │ │ { @@ -2066,6 +2070,7 @@ span_tree: │ │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You must inspect live weather via the provided get_weather tool before responding.", │ │ "maxOutputTokens": 128, │ │ "messages": [ │ │ { @@ -2569,6 +2574,7 @@ span_tree: │ } │ └── generateText [function] │ input: { + │ "instructions": "You are a terse assistant.", │ "maxOutputTokens": 24, │ "maxRetries": 2, │ "messages": [ @@ -2737,6 +2743,7 @@ span_tree: │ } │ └── doGenerate [llm] │ input: { + │ "instructions": "You are a terse assistant.", │ "maxOutputTokens": 24, │ "messages": [ │ { @@ -2808,6 +2815,7 @@ span_tree: │ } │ └── streamText [function] │ input: { + │ "instructions": "You are a terse assistant.", │ "maxOutputTokens": 24, │ "maxRetries": 2, │ "messages": [ @@ -2979,6 +2987,7 @@ span_tree: │ } │ └── doStream [llm] │ input: { + │ "instructions": "You are a terse assistant.", │ "maxOutputTokens": 24, │ "messages": [ │ { @@ -3050,6 +3059,7 @@ span_tree: │ } │ └── generateText [function] │ input: { + │ "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", │ "maxOutputTokens": 256, │ "maxRetries": 2, │ "messages": [ @@ -3723,6 +3733,7 @@ span_tree: │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", │ │ "maxOutputTokens": 256, │ │ "messages": [ │ │ { @@ -3891,6 +3902,7 @@ span_tree: │ │ } │ ├── doGenerate [llm] │ │ input: { + │ │ "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", │ │ "maxOutputTokens": 256, │ │ "messages": [ │ │ { @@ -4095,6 +4107,7 @@ span_tree: │ │ } │ └── doGenerate [llm] │ input: { + │ "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", │ "maxOutputTokens": 256, │ "messages": [ │ { @@ -4316,30 +4329,1169 @@ span_tree: │ "prompt_tokens": 308, │ "tokens": 370 │ } - └── ai-sdk-workflow-agent-stream-operation + ├── ai-sdk-workflow-agent-stream-operation + │ metadata: { + │ "operation": "workflow-agent-stream", + │ "testRunId": "" + │ } + │ └── WorkflowAgent.stream [function] + │ input: { + │ "messages": [ + │ { + │ "content": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "role": "user" + │ } + │ ] + │ } + │ output: { + │ "messages": [ + │ { + │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "json", + │ "value": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + │ }, + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ], + │ "steps": [ + │ { + │ "callId": "", + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "dynamicToolCalls": [], + │ "dynamicToolResults": [], + │ "files": [], + │ "finishReason": "tool-calls", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "gpt-4o-mini-2024-07-18" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "reasoning": [], + │ "request": { + │ "messages": [] + │ }, + │ "response": { + │ "messages": [], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "sources": [], + │ "staticToolCalls": [], + │ "staticToolResults": [], + │ "stepNumber": 0, + │ "text": "", + │ "toolCalls": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "toolResults": [], + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 84 + │ }, + │ "inputTokens": 84, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 84, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 92 + │ }, + │ "warnings": [] + │ }, + │ { + │ "callId": "", + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "dynamicToolCalls": [], + │ "dynamicToolResults": [], + │ "files": [], + │ "finishReason": "tool-calls", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "gpt-4o-mini-2024-07-18" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "reasoning": [], + │ "request": { + │ "messages": [] + │ }, + │ "response": { + │ "messages": [], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "sources": [], + │ "staticToolCalls": [], + │ "staticToolResults": [], + │ "stepNumber": 1, + │ "text": "", + │ "toolCalls": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "toolResults": [], + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 123 + │ }, + │ "inputTokens": 123, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 123, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 131 + │ }, + │ "warnings": [] + │ }, + │ { + │ "callId": "", + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "dynamicToolCalls": [], + │ "dynamicToolResults": [], + │ "files": [], + │ "finishReason": "tool-calls", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "gpt-4o-mini-2024-07-18" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "reasoning": [], + │ "request": { + │ "messages": [] + │ }, + │ "response": { + │ "messages": [], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "sources": [], + │ "staticToolCalls": [], + │ "staticToolResults": [], + │ "stepNumber": 2, + │ "text": "", + │ "toolCalls": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "toolResults": [], + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 162 + │ }, + │ "inputTokens": 162, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 162, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 170 + │ }, + │ "warnings": [] + │ }, + │ { + │ "callId": "", + │ "content": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "dynamicToolCalls": [], + │ "dynamicToolResults": [], + │ "files": [], + │ "finishReason": "tool-calls", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "gpt-4o-mini-2024-07-18" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "reasoning": [], + │ "request": { + │ "messages": [] + │ }, + │ "response": { + │ "messages": [], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "sources": [], + │ "staticToolCalls": [], + │ "staticToolResults": [], + │ "stepNumber": 3, + │ "text": "", + │ "toolCalls": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "toolResults": [], + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 201 + │ }, + │ "inputTokens": 201, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 8 + │ }, + │ "outputTokens": 8, + │ "raw": { + │ "input_tokens": 201, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 8, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 209 + │ }, + │ "warnings": [] + │ } + │ ], + │ "toolCalls": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "toolName": "get_weather", + │ "type": "tool-call" + │ } + │ ], + │ "toolResults": [ + │ { + │ "input": { + │ "location": "Paris, France" + │ }, + │ "output": { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ }, + │ "toolName": "get_weather", + │ "type": "tool-result" + │ } + │ ] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "options": { + │ "maxOutputTokens": 96, + │ "stopWhen": "[Function]", + │ "temperature": 0, + │ "toolChoice": "required" + │ }, + │ "provider": "openai.responses", + │ "tools": { + │ "get_weather": { + │ "description": "Get the weather for a location", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "location": { + │ "description": "The city and country", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "location" + │ ], + │ "type": "object" + │ } + │ } + │ } + │ } + │ ├── doStream [llm] + │ │ input: { + │ │ "messages": [ + │ │ { + │ │ "content": "You are a terse weather assistant. Use tools before answering.", + │ │ "role": "system" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "role": "user" + │ │ } + │ │ ] + │ │ } + │ │ output: { + │ │ "finishReason": { + │ │ "unified": "tool-calls" + │ │ }, + │ │ "text": "", + │ │ "toolCalls": [ + │ │ { + │ │ "input": "{\"location\":\"Paris, France\"}", + │ │ "providerMetadata": { + │ │ "openai": { + │ │ "itemId": "" + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "usage": { + │ │ "inputTokens": { + │ │ "cacheRead": 0, + │ │ "noCache": 84, + │ │ "total": 84 + │ │ }, + │ │ "outputTokens": { + │ │ "reasoning": 0, + │ │ "text": 8, + │ │ "total": 8 + │ │ }, + │ │ "raw": { + │ │ "input_tokens": 84, + │ │ "input_tokens_details": { + │ │ "cached_tokens": 0 + │ │ }, + │ │ "output_tokens": 8, + │ │ "output_tokens_details": { + │ │ "reasoning_tokens": 0 + │ │ } + │ │ } + │ │ } + │ │ } + │ │ metadata: { + │ │ "braintrust": { + │ │ "integration_name": "ai-sdk", + │ │ "sdk_language": "typescript" + │ │ }, + │ │ "finish_reason": { + │ │ "unified": "tool-calls" + │ │ }, + │ │ "model": "gpt-4o-mini-2024-07-18", + │ │ "options": { + │ │ "includeRawChunks": false, + │ │ "maxOutputTokens": 96, + │ │ "temperature": 0, + │ │ "toolChoice": { + │ │ "type": "required" + │ │ } + │ │ }, + │ │ "provider": "openai.responses", + │ │ "tools": [ + │ │ { + │ │ "description": "Get the weather for a location", + │ │ "inputSchema": { + │ │ "$schema": "http://json-schema.org/draft-07/schema#", + │ │ "additionalProperties": false, + │ │ "properties": { + │ │ "location": { + │ │ "description": "The city and country", + │ │ "type": "string" + │ │ } + │ │ }, + │ │ "required": [ + │ │ "location" + │ │ ], + │ │ "type": "object" + │ │ }, + │ │ "name": "get_weather", + │ │ "type": "function" + │ │ } + │ │ ] + │ │ } + │ │ metrics: { + │ │ "completion_reasoning_tokens": 0, + │ │ "completion_tokens": 8, + │ │ "prompt_cached_tokens": 0, + │ │ "prompt_tokens": 84, + │ │ "reasoning_tokens": 0, + │ │ "tokens": 92 + │ │ } + │ ├── get_weather [tool] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } + │ │ output: { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ ├── doStream [llm] + │ │ input: { + │ │ "messages": [ + │ │ { + │ │ "content": "You are a terse weather assistant. Use tools before answering.", + │ │ "role": "system" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "role": "user" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ } + │ │ ] + │ │ } + │ │ output: { + │ │ "finishReason": { + │ │ "unified": "tool-calls" + │ │ }, + │ │ "text": "", + │ │ "toolCalls": [ + │ │ { + │ │ "input": "{\"location\":\"Paris, France\"}", + │ │ "providerMetadata": { + │ │ "openai": { + │ │ "itemId": "" + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "usage": { + │ │ "inputTokens": { + │ │ "cacheRead": 0, + │ │ "noCache": 123, + │ │ "total": 123 + │ │ }, + │ │ "outputTokens": { + │ │ "reasoning": 0, + │ │ "text": 8, + │ │ "total": 8 + │ │ }, + │ │ "raw": { + │ │ "input_tokens": 123, + │ │ "input_tokens_details": { + │ │ "cached_tokens": 0 + │ │ }, + │ │ "output_tokens": 8, + │ │ "output_tokens_details": { + │ │ "reasoning_tokens": 0 + │ │ } + │ │ } + │ │ } + │ │ } + │ │ metadata: { + │ │ "braintrust": { + │ │ "integration_name": "ai-sdk", + │ │ "sdk_language": "typescript" + │ │ }, + │ │ "finish_reason": { + │ │ "unified": "tool-calls" + │ │ }, + │ │ "model": "gpt-4o-mini-2024-07-18", + │ │ "options": { + │ │ "includeRawChunks": false, + │ │ "maxOutputTokens": 96, + │ │ "temperature": 0, + │ │ "toolChoice": { + │ │ "type": "required" + │ │ } + │ │ }, + │ │ "provider": "openai.responses", + │ │ "tools": [ + │ │ { + │ │ "description": "Get the weather for a location", + │ │ "inputSchema": { + │ │ "$schema": "http://json-schema.org/draft-07/schema#", + │ │ "additionalProperties": false, + │ │ "properties": { + │ │ "location": { + │ │ "description": "The city and country", + │ │ "type": "string" + │ │ } + │ │ }, + │ │ "required": [ + │ │ "location" + │ │ ], + │ │ "type": "object" + │ │ }, + │ │ "name": "get_weather", + │ │ "type": "function" + │ │ } + │ │ ] + │ │ } + │ │ metrics: { + │ │ "completion_reasoning_tokens": 0, + │ │ "completion_tokens": 8, + │ │ "prompt_cached_tokens": 0, + │ │ "prompt_tokens": 123, + │ │ "reasoning_tokens": 0, + │ │ "tokens": 131 + │ │ } + │ ├── get_weather [tool] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } + │ │ output: { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ ├── doStream [llm] + │ │ input: { + │ │ "messages": [ + │ │ { + │ │ "content": "You are a terse weather assistant. Use tools before answering.", + │ │ "role": "system" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "role": "user" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ } + │ │ ] + │ │ } + │ │ output: { + │ │ "finishReason": { + │ │ "unified": "tool-calls" + │ │ }, + │ │ "text": "", + │ │ "toolCalls": [ + │ │ { + │ │ "input": "{\"location\":\"Paris, France\"}", + │ │ "providerMetadata": { + │ │ "openai": { + │ │ "itemId": "" + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "usage": { + │ │ "inputTokens": { + │ │ "cacheRead": 0, + │ │ "noCache": 162, + │ │ "total": 162 + │ │ }, + │ │ "outputTokens": { + │ │ "reasoning": 0, + │ │ "text": 8, + │ │ "total": 8 + │ │ }, + │ │ "raw": { + │ │ "input_tokens": 162, + │ │ "input_tokens_details": { + │ │ "cached_tokens": 0 + │ │ }, + │ │ "output_tokens": 8, + │ │ "output_tokens_details": { + │ │ "reasoning_tokens": 0 + │ │ } + │ │ } + │ │ } + │ │ } + │ │ metadata: { + │ │ "braintrust": { + │ │ "integration_name": "ai-sdk", + │ │ "sdk_language": "typescript" + │ │ }, + │ │ "finish_reason": { + │ │ "unified": "tool-calls" + │ │ }, + │ │ "model": "gpt-4o-mini-2024-07-18", + │ │ "options": { + │ │ "includeRawChunks": false, + │ │ "maxOutputTokens": 96, + │ │ "temperature": 0, + │ │ "toolChoice": { + │ │ "type": "required" + │ │ } + │ │ }, + │ │ "provider": "openai.responses", + │ │ "tools": [ + │ │ { + │ │ "description": "Get the weather for a location", + │ │ "inputSchema": { + │ │ "$schema": "http://json-schema.org/draft-07/schema#", + │ │ "additionalProperties": false, + │ │ "properties": { + │ │ "location": { + │ │ "description": "The city and country", + │ │ "type": "string" + │ │ } + │ │ }, + │ │ "required": [ + │ │ "location" + │ │ ], + │ │ "type": "object" + │ │ }, + │ │ "name": "get_weather", + │ │ "type": "function" + │ │ } + │ │ ] + │ │ } + │ │ metrics: { + │ │ "completion_reasoning_tokens": 0, + │ │ "completion_tokens": 8, + │ │ "prompt_cached_tokens": 0, + │ │ "prompt_tokens": 162, + │ │ "reasoning_tokens": 0, + │ │ "tokens": 170 + │ │ } + │ ├── get_weather [tool] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } + │ │ output: { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ ├── doStream [llm] + │ │ input: { + │ │ "messages": [ + │ │ { + │ │ "content": "You are a terse weather assistant. Use tools before answering.", + │ │ "role": "system" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ │ "type": "text" + │ │ } + │ │ ], + │ │ "role": "user" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "input": { + │ │ "location": "Paris, France" + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "role": "assistant" + │ │ }, + │ │ { + │ │ "content": [ + │ │ { + │ │ "output": { + │ │ "type": "json", + │ │ "value": { + │ │ "condition": "sunny", + │ │ "location": "Paris, France", + │ │ "temperatureC": 22 + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-result" + │ │ } + │ │ ], + │ │ "role": "tool" + │ │ } + │ │ ] + │ │ } + │ │ output: { + │ │ "finishReason": { + │ │ "unified": "tool-calls" + │ │ }, + │ │ "text": "", + │ │ "toolCalls": [ + │ │ { + │ │ "input": "{\"location\":\"Paris, France\"}", + │ │ "providerMetadata": { + │ │ "openai": { + │ │ "itemId": "" + │ │ } + │ │ }, + │ │ "toolName": "get_weather", + │ │ "type": "tool-call" + │ │ } + │ │ ], + │ │ "usage": { + │ │ "inputTokens": { + │ │ "cacheRead": 0, + │ │ "noCache": 201, + │ │ "total": 201 + │ │ }, + │ │ "outputTokens": { + │ │ "reasoning": 0, + │ │ "text": 8, + │ │ "total": 8 + │ │ }, + │ │ "raw": { + │ │ "input_tokens": 201, + │ │ "input_tokens_details": { + │ │ "cached_tokens": 0 + │ │ }, + │ │ "output_tokens": 8, + │ │ "output_tokens_details": { + │ │ "reasoning_tokens": 0 + │ │ } + │ │ } + │ │ } + │ │ } + │ │ metadata: { + │ │ "braintrust": { + │ │ "integration_name": "ai-sdk", + │ │ "sdk_language": "typescript" + │ │ }, + │ │ "finish_reason": { + │ │ "unified": "tool-calls" + │ │ }, + │ │ "model": "gpt-4o-mini-2024-07-18", + │ │ "options": { + │ │ "includeRawChunks": false, + │ │ "maxOutputTokens": 96, + │ │ "temperature": 0, + │ │ "toolChoice": { + │ │ "type": "required" + │ │ } + │ │ }, + │ │ "provider": "openai.responses", + │ │ "tools": [ + │ │ { + │ │ "description": "Get the weather for a location", + │ │ "inputSchema": { + │ │ "$schema": "http://json-schema.org/draft-07/schema#", + │ │ "additionalProperties": false, + │ │ "properties": { + │ │ "location": { + │ │ "description": "The city and country", + │ │ "type": "string" + │ │ } + │ │ }, + │ │ "required": [ + │ │ "location" + │ │ ], + │ │ "type": "object" + │ │ }, + │ │ "name": "get_weather", + │ │ "type": "function" + │ │ } + │ │ ] + │ │ } + │ │ metrics: { + │ │ "completion_reasoning_tokens": 0, + │ │ "completion_tokens": 8, + │ │ "prompt_cached_tokens": 0, + │ │ "prompt_tokens": 201, + │ │ "reasoning_tokens": 0, + │ │ "tokens": 209 + │ │ } + │ └── get_weather [tool] + │ input: { + │ "location": "Paris, France" + │ } + │ output: { + │ "condition": "sunny", + │ "location": "Paris, France", + │ "temperatureC": 22 + │ } + └── ai-sdk-workflow-agent-stream-prompt-operation metadata: { - "operation": "workflow-agent-stream", + "operation": "workflow-agent-stream-prompt", "testRunId": "" } └── WorkflowAgent.stream [function] input: { - "messages": [ - { - "content": "Use get_weather for Paris, France, then reply with one short sentence.", - "role": "user" - } - ] + "prompt": "What's the weather in Paris?", + "system": "You are a helpful weather assistant." } output: { "messages": [ { - "content": "You are a terse weather assistant. Use tools before answering.", + "content": "You are a helpful weather assistant.", "role": "system" }, { "content": [ { - "text": "Use get_weather for Paris, France, then reply with one short sentence.", + "text": "What's the weather in Paris?", "type": "text" } ], @@ -4517,16 +5669,16 @@ span_tree: "usage": { "inputTokenDetails": { "cacheReadTokens": 0, - "noCacheTokens": 84 + "noCacheTokens": 70 }, - "inputTokens": 84, + "inputTokens": 70, "outputTokenDetails": { "reasoningTokens": 0, "textTokens": 8 }, "outputTokens": 8, "raw": { - "input_tokens": 84, + "input_tokens": 70, "input_tokens_details": { "cached_tokens": 0 }, @@ -4535,7 +5687,7 @@ span_tree: "reasoning_tokens": 0 } }, - "totalTokens": 92 + "totalTokens": 78 }, "warnings": [] }, @@ -4593,16 +5745,16 @@ span_tree: "usage": { "inputTokenDetails": { "cacheReadTokens": 0, - "noCacheTokens": 123 + "noCacheTokens": 109 }, - "inputTokens": 123, + "inputTokens": 109, "outputTokenDetails": { "reasoningTokens": 0, "textTokens": 8 }, "outputTokens": 8, "raw": { - "input_tokens": 123, + "input_tokens": 109, "input_tokens_details": { "cached_tokens": 0 }, @@ -4611,7 +5763,7 @@ span_tree: "reasoning_tokens": 0 } }, - "totalTokens": 131 + "totalTokens": 117 }, "warnings": [] }, @@ -4669,16 +5821,16 @@ span_tree: "usage": { "inputTokenDetails": { "cacheReadTokens": 0, - "noCacheTokens": 162 + "noCacheTokens": 148 }, - "inputTokens": 162, + "inputTokens": 148, "outputTokenDetails": { "reasoningTokens": 0, "textTokens": 8 }, "outputTokens": 8, "raw": { - "input_tokens": 162, + "input_tokens": 148, "input_tokens_details": { "cached_tokens": 0 }, @@ -4687,7 +5839,7 @@ span_tree: "reasoning_tokens": 0 } }, - "totalTokens": 170 + "totalTokens": 156 }, "warnings": [] }, @@ -4745,16 +5897,16 @@ span_tree: "usage": { "inputTokenDetails": { "cacheReadTokens": 0, - "noCacheTokens": 201 + "noCacheTokens": 187 }, - "inputTokens": 201, + "inputTokens": 187, "outputTokenDetails": { "reasoningTokens": 0, "textTokens": 8 }, "outputTokens": 8, "raw": { - "input_tokens": 201, + "input_tokens": 187, "input_tokens_details": { "cached_tokens": 0 }, @@ -4763,7 +5915,7 @@ span_tree: "reasoning_tokens": 0 } }, - "totalTokens": 209 + "totalTokens": 195 }, "warnings": [] } @@ -4829,13 +5981,13 @@ span_tree: │ input: { │ "messages": [ │ { - │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "content": "You are a helpful weather assistant.", │ "role": "system" │ }, │ { │ "content": [ │ { - │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "text": "What's the weather in Paris?", │ "type": "text" │ } │ ], @@ -4863,8 +6015,8 @@ span_tree: │ "usage": { │ "inputTokens": { │ "cacheRead": 0, - │ "noCache": 84, - │ "total": 84 + │ "noCache": 70, + │ "total": 70 │ }, │ "outputTokens": { │ "reasoning": 0, @@ -4872,7 +6024,7 @@ span_tree: │ "total": 8 │ }, │ "raw": { - │ "input_tokens": 84, + │ "input_tokens": 70, │ "input_tokens_details": { │ "cached_tokens": 0 │ }, @@ -4927,9 +6079,9 @@ span_tree: │ "completion_reasoning_tokens": 0, │ "completion_tokens": 8, │ "prompt_cached_tokens": 0, - │ "prompt_tokens": 84, + │ "prompt_tokens": 70, │ "reasoning_tokens": 0, - │ "tokens": 92 + │ "tokens": 78 │ } ├── get_weather [tool] │ input: { @@ -4944,13 +6096,13 @@ span_tree: │ input: { │ "messages": [ │ { - │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "content": "You are a helpful weather assistant.", │ "role": "system" │ }, │ { │ "content": [ │ { - │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "text": "What's the weather in Paris?", │ "type": "text" │ } │ ], @@ -5007,8 +6159,8 @@ span_tree: │ "usage": { │ "inputTokens": { │ "cacheRead": 0, - │ "noCache": 123, - │ "total": 123 + │ "noCache": 109, + │ "total": 109 │ }, │ "outputTokens": { │ "reasoning": 0, @@ -5016,7 +6168,7 @@ span_tree: │ "total": 8 │ }, │ "raw": { - │ "input_tokens": 123, + │ "input_tokens": 109, │ "input_tokens_details": { │ "cached_tokens": 0 │ }, @@ -5071,9 +6223,9 @@ span_tree: │ "completion_reasoning_tokens": 0, │ "completion_tokens": 8, │ "prompt_cached_tokens": 0, - │ "prompt_tokens": 123, + │ "prompt_tokens": 109, │ "reasoning_tokens": 0, - │ "tokens": 131 + │ "tokens": 117 │ } ├── get_weather [tool] │ input: { @@ -5088,13 +6240,13 @@ span_tree: │ input: { │ "messages": [ │ { - │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "content": "You are a helpful weather assistant.", │ "role": "system" │ }, │ { │ "content": [ │ { - │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "text": "What's the weather in Paris?", │ "type": "text" │ } │ ], @@ -5180,8 +6332,8 @@ span_tree: │ "usage": { │ "inputTokens": { │ "cacheRead": 0, - │ "noCache": 162, - │ "total": 162 + │ "noCache": 148, + │ "total": 148 │ }, │ "outputTokens": { │ "reasoning": 0, @@ -5189,7 +6341,7 @@ span_tree: │ "total": 8 │ }, │ "raw": { - │ "input_tokens": 162, + │ "input_tokens": 148, │ "input_tokens_details": { │ "cached_tokens": 0 │ }, @@ -5244,9 +6396,9 @@ span_tree: │ "completion_reasoning_tokens": 0, │ "completion_tokens": 8, │ "prompt_cached_tokens": 0, - │ "prompt_tokens": 162, + │ "prompt_tokens": 148, │ "reasoning_tokens": 0, - │ "tokens": 170 + │ "tokens": 156 │ } ├── get_weather [tool] │ input: { @@ -5261,13 +6413,13 @@ span_tree: │ input: { │ "messages": [ │ { - │ "content": "You are a terse weather assistant. Use tools before answering.", + │ "content": "You are a helpful weather assistant.", │ "role": "system" │ }, │ { │ "content": [ │ { - │ "text": "Use get_weather for Paris, France, then reply with one short sentence.", + │ "text": "What's the weather in Paris?", │ "type": "text" │ } │ ], @@ -5382,8 +6534,8 @@ span_tree: │ "usage": { │ "inputTokens": { │ "cacheRead": 0, - │ "noCache": 201, - │ "total": 201 + │ "noCache": 187, + │ "total": 187 │ }, │ "outputTokens": { │ "reasoning": 0, @@ -5391,7 +6543,7 @@ span_tree: │ "total": 8 │ }, │ "raw": { - │ "input_tokens": 201, + │ "input_tokens": 187, │ "input_tokens_details": { │ "cached_tokens": 0 │ }, @@ -5446,9 +6598,9 @@ span_tree: │ "completion_reasoning_tokens": 0, │ "completion_tokens": 8, │ "prompt_cached_tokens": 0, - │ "prompt_tokens": 201, + │ "prompt_tokens": 187, │ "reasoning_tokens": 0, - │ "tokens": 209 + │ "tokens": 195 │ } └── get_weather [tool] input: { diff --git a/e2e/scenarios/ai-sdk-instrumentation/assertions.ts b/e2e/scenarios/ai-sdk-instrumentation/assertions.ts index 230df198c..30c85555b 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/assertions.ts +++ b/e2e/scenarios/ai-sdk-instrumentation/assertions.ts @@ -1314,43 +1314,90 @@ export function defineAISDKInstrumentationAssertions(options: { } if (options.supportsWorkflowAgent) { - test("captures trace for WorkflowAgent.stream()", testConfig, () => { - const root = findLatestSpan(events, ROOT_NAME); - const trace = findWorkflowAgentTrace(events); + test( + "captures trace for WorkflowAgent.stream() with messages", + testConfig, + () => { + const root = findLatestSpan(events, ROOT_NAME); + const trace = findWorkflowAgentTrace( + events, + "ai-sdk-workflow-agent-stream-operation", + ); - expectOperationParentedByRoot(trace.operation, root); - expect(operationName(trace.operation)).toBe("workflow-agent-stream"); - expect(findAllSpans(events, "WorkflowAgent.stream")).toHaveLength(1); - expect(trace.workflowSpans).toHaveLength(1); - expectAISDKParentSpan(trace.parent); - expect(hasPromptLikeInput(trace.parent?.input)).toBe(true); - expect( - hasSemanticOutput(trace.parent?.output, [ - "messages", - "steps", - "text", - "toolCalls", - "toolResults", - ]), - ).toBe(true); - expect(trace.modelChildren.length).toBeGreaterThanOrEqual(1); - trace.modelChildren.forEach(expectAISDKModelChildSpan); - expect(trace.toolSpans.length).toBeGreaterThanOrEqual(1); - expect(trace.toolSpans[0]?.input).toMatchObject({ - location: expect.any(String), - }); - expect(trace.toolSpans[0]?.output).toBeDefined(); - expect(collectToolCallNames(trace.parent?.output)).toContain( - "get_weather", - ); - expect(collectToolResultNames(trace.parent?.output)).toContain( - "get_weather", - ); - expect(trace.parent?.span.ended).toBe(true); - expect(trace.modelChildren.every((child) => child.span.ended)).toBe( - true, - ); - }); + expectOperationParentedByRoot(trace.operation, root); + expect(operationName(trace.operation)).toBe("workflow-agent-stream"); + expect(findAllSpans(events, "WorkflowAgent.stream")).toHaveLength(2); + expect(trace.workflowSpans).toHaveLength(1); + expectAISDKParentSpan(trace.parent); + expect(hasPromptLikeInput(trace.parent?.input)).toBe(true); + expect( + hasSemanticOutput(trace.parent?.output, [ + "messages", + "steps", + "text", + "toolCalls", + "toolResults", + ]), + ).toBe(true); + expect(trace.modelChildren.length).toBeGreaterThanOrEqual(1); + trace.modelChildren.forEach(expectAISDKModelChildSpan); + expect(trace.toolSpans.length).toBeGreaterThanOrEqual(1); + expect(trace.toolSpans[0]?.input).toMatchObject({ + location: expect.any(String), + }); + expect(trace.toolSpans[0]?.output).toBeDefined(); + expect(collectToolCallNames(trace.parent?.output)).toContain( + "get_weather", + ); + expect(collectToolResultNames(trace.parent?.output)).toContain( + "get_weather", + ); + expect(trace.parent?.span.ended).toBe(true); + expect(trace.modelChildren.every((child) => child.span.ended)).toBe( + true, + ); + }, + ); + + test( + "captures trace for WorkflowAgent.stream() with system and prompt", + testConfig, + () => { + const root = findLatestSpan(events, ROOT_NAME); + const trace = findWorkflowAgentTrace( + events, + "ai-sdk-workflow-agent-stream-prompt-operation", + ); + + expectOperationParentedByRoot(trace.operation, root); + expect(operationName(trace.operation)).toBe( + "workflow-agent-stream-prompt", + ); + expect(trace.workflowSpans).toHaveLength(1); + expectAISDKParentSpan(trace.parent); + const input = isRecord(trace.parent?.input) + ? trace.parent.input + : null; + expect(hasPromptLikeInput(input)).toBe(true); + expect(JSON.stringify(input)).toContain("weather in Paris"); + expect( + hasSemanticOutput(trace.parent?.output, [ + "messages", + "steps", + "text", + "toolCalls", + "toolResults", + ]), + ).toBe(true); + expect(trace.modelChildren.length).toBeGreaterThanOrEqual(1); + trace.modelChildren.forEach(expectAISDKModelChildSpan); + expect(trace.toolSpans.length).toBeGreaterThanOrEqual(1); + expect(trace.toolSpans[0]?.input).toMatchObject({ + location: expect.any(String), + }); + expect(trace.parent?.span.ended).toBe(true); + }, + ); } if (options.supportsAgentToolLoop) { @@ -1450,11 +1497,11 @@ export function defineAISDKInstrumentationAssertions(options: { }); } -function findWorkflowAgentTrace(events: CapturedLogEvent[]) { - const operation = findLatestSpan( - events, - "ai-sdk-workflow-agent-stream-operation", - ); +function findWorkflowAgentTrace( + events: CapturedLogEvent[], + operationSpanName: string, +) { + const operation = findLatestSpan(events, operationSpanName); const workflowSpans = findChildSpans( events, "WorkflowAgent.stream", diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs b/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs index e334719f8..ca22d4567 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs @@ -207,29 +207,29 @@ async function runWorkflowAgentStreamOperation({ instrumentedWorkflow, openaiModel, }) { + const agent = new instrumentedWorkflow.WorkflowAgent({ + instructions: + "You are a terse weather assistant. Use tools before answering.", + model: openaiModel, + tools: { + get_weather: ai.tool({ + description: "Get the weather for a location", + inputSchema: z.object({ + location: z.string().describe("The city and country"), + }), + execute: async ({ location }) => ({ + condition: "sunny", + location, + temperatureC: 22, + }), + }), + }, + }); + await runOperation( "ai-sdk-workflow-agent-stream-operation", "workflow-agent-stream", async () => { - const agent = new instrumentedWorkflow.WorkflowAgent({ - instructions: - "You are a terse weather assistant. Use tools before answering.", - model: openaiModel, - tools: { - get_weather: ai.tool({ - description: "Get the weather for a location", - inputSchema: z.object({ - location: z.string().describe("The city and country"), - }), - execute: async ({ location }) => ({ - condition: "sunny", - location, - temperatureC: 22, - }), - }), - }, - }); - await agent.stream({ messages: [ { @@ -245,6 +245,21 @@ async function runWorkflowAgentStreamOperation({ }); }, ); + + await runOperation( + "ai-sdk-workflow-agent-stream-prompt-operation", + "workflow-agent-stream-prompt", + async () => { + await agent.stream({ + system: "You are a helpful weather assistant.", + prompt: "What's the weather in Paris?", + stopWhen: ai.stepCountIs(4), + temperature: 0, + toolChoice: "required", + maxOutputTokens: 96, + }); + }, + ); } async function runAISDKInstrumentationScenario( diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts index 01c3d98a7..3837d50ad 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.streaming.test.ts @@ -347,6 +347,7 @@ describe("AI SDK streaming instrumentation", () => { async stream(params: any) { return { messages: params.messages, + prompt: params.prompt, steps: [], text: `Streamed by ${this.#_name}`, }; @@ -376,8 +377,9 @@ describe("AI SDK streaming instrumentation", () => { await directlyWrappedAgent.stream({ headers: { authorization: "secret" }, maxOutputTokens: 12, - messages: [{ role: "user", content: "Hello again" }], + prompt: "Hello again", stopWhen: () => true, + system: "You are terse.", }); expect(workflowAgentWrapperSpanCountForTesting()).toBe(0); @@ -387,14 +389,22 @@ describe("AI SDK streaming instrumentation", () => { ); expect(workflowSpans).toHaveLength(2); + expect( + workflowSpans.find((span) => Array.isArray(span.input?.messages))?.input, + ).toMatchObject({ + messages: [{ role: "user", content: "Hello" }], + }); + expect( + workflowSpans.find((span) => span.input?.prompt === "Hello again")?.input, + ).toMatchObject({ + prompt: "Hello again", + system: "You are terse.", + }); for (const span of workflowSpans) { expect(span.span_attributes).toMatchObject({ type: "function", name: "WorkflowAgent.stream", }); - expect(span.input).toMatchObject({ - messages: expect.any(Array), - }); expect(span.input).not.toHaveProperty("headers"); expect(span.input).not.toHaveProperty("maxOutputTokens"); expect(span.input).not.toHaveProperty("stopWhen"); diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts index a9236bdac..89b23e360 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts @@ -25,6 +25,9 @@ vi.mock("../../wrappers/ai-sdk/telemetry", () => ({ import { AISDKPlugin, DEFAULT_DENY_OUTPUT_PATHS, + processAISDKCallInput, + processAISDKWorkflowAgentCallInput, + processAISDKWorkflowAgentModelCallInput, processAISDKOutput as processAISDKOutputActual, } from "./ai-sdk-plugin"; import { Attachment } from "../../logger"; @@ -103,6 +106,88 @@ describe("AISDKPlugin", () => { }); }); + describe("WorkflowAgent input extraction", () => { + it("preserves string prompts and system overrides", () => { + expect( + processAISDKWorkflowAgentCallInput({ + headers: { authorization: "secret" }, + maxOutputTokens: 12, + prompt: "What's the weather in Paris?", + stopWhen: () => true, + system: "You are a helpful weather assistant.", + }).input, + ).toEqual({ + prompt: "What's the weather in Paris?", + system: "You are a helpful weather assistant.", + }); + }); + + it("preserves public prompt message arrays for WorkflowAgent spans", () => { + expect( + processAISDKWorkflowAgentCallInput({ + prompt: [{ role: "user", content: "Hello" }], + system: "You are terse.", + }).input, + ).toEqual({ + prompt: [{ role: "user", content: "Hello" }], + system: "You are terse.", + }); + }); + + it("normalizes model call prompt arrays for WorkflowAgent child spans", () => { + expect( + processAISDKWorkflowAgentModelCallInput({ + instructions: "You are terse.", + prompt: [{ role: "user", content: "Hello" }], + }).input, + ).toEqual({ + instructions: "You are terse.", + messages: [{ role: "user", content: "Hello" }], + }); + }); + + it("does not treat arbitrary prompt objects as public AI SDK prompts", () => { + expect( + processAISDKWorkflowAgentCallInput({ + prompt: { role: "user", content: "Hello" } as any, + system: "You are terse.", + }).input, + ).toEqual({ + system: "You are terse.", + }); + }); + + it("omits SDK internals and function options from call inputs", () => { + const processed = processAISDKCallInput({ + model: { + config: { + provider: "openai.responses", + url: () => "https://example.test", + }, + doGenerate: async () => ({}), + doStream: async () => ({ stream: new ReadableStream() }), + modelId: "gpt-4.1-mini", + }, + prompt: "Hello", + stopWhen: () => true, + }).input as Record; + + expect(processed).toMatchObject({ + model: { + config: { + provider: "openai.responses", + }, + modelId: "gpt-4.1-mini", + }, + prompt: "Hello", + }); + expect(processed).not.toHaveProperty("stopWhen"); + expect(processed.model).not.toHaveProperty("doGenerate"); + expect(processed.model).not.toHaveProperty("doStream"); + expect(processed.model.config).not.toHaveProperty("url"); + }); + }); + describe("enable/disable", () => { it("should enable plugin", () => { expect(() => plugin.enable()).not.toThrow(); @@ -1330,6 +1415,7 @@ describe("AI SDK utility functions", () => { response: { headers: { authorization: "secret" }, body: "secret-body", + constructor: "unsafe", id: "response-id", messages: [ { @@ -1340,6 +1426,7 @@ describe("AI SDK utility functions", () => { result: { headers: { authorization: "nested-secret" }, id: "nested-provider-response-id", + prototype: "unsafe", }, }, ], @@ -1430,9 +1517,13 @@ describe("AI SDK utility functions", () => { expect(result.request.providerPayload).not.toHaveProperty("headers"); expect(result.response).not.toHaveProperty("headers"); expect(result.response.body).toBe(""); + expect(result.response).not.toHaveProperty("constructor"); expect(result.response.messages[0].content[0].result).not.toHaveProperty( "headers", ); + expect(result.response.messages[0].content[0].result).not.toHaveProperty( + "prototype", + ); expect(result.rawResponse).not.toHaveProperty("headers"); expect(result.responses[0]).not.toHaveProperty("headers"); if (result.roundtrips) { diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.ts index 1e1a1ff6c..44956c15c 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.ts @@ -883,15 +883,8 @@ const processInputAttachmentsSync = ( } } - if ( - "prepareCall" in processed && - typeof processed.prepareCall === "function" - ) { - processed.prepareCall = "[Function]"; - } - return { - input: removeHeadersDeep(processed) as AISDKCallParams, + input: sanitizeAISDKCallInputValue(processed) as AISDKCallParams, outputPromise, }; }; @@ -1107,7 +1100,7 @@ export function processAISDKWorkflowAgentCallInput( const processed = processAISDKCallInput(params); return { ...processed, - input: extractMessagesInput(processed.input), + input: extractWorkflowAgentInput(processed.input), }; } @@ -1117,7 +1110,7 @@ export function processAISDKWorkflowAgentModelCallInput( const processed = processAISDKCallInput(params); return { ...processed, - input: extractMessagesInput(processed.input), + input: extractWorkflowAgentModelInput(processed.input), }; } @@ -1337,29 +1330,118 @@ export function extractWorkflowMetadataFromCallParams( params: AISDKCallParams, self?: unknown, ): Record { - const processed = processAISDKCallInput(params).input; - const metadata = extractMetadataFromCallParams(processed, self); - const options = extractAISDKCallOptionsForMetadata(processed); + const metadata = extractMetadataFromCallParams(params, self); + const options = extractAISDKCallOptionsForMetadata(params); if (Object.keys(options).length > 0) { metadata.options = options; } return metadata; } -function extractMessagesInput(params: AISDKCallParams): AISDKCallParams { +function extractWorkflowAgentInput(params: AISDKCallParams): AISDKCallParams { + const input: AISDKCallParams = {}; + if (params.instructions !== undefined) { + input.instructions = params.instructions; + } + if (params.system !== undefined) { + input.system = params.system; + } + + if (Array.isArray(params.messages)) { + return { ...input, messages: params.messages }; + } + + if (typeof params.prompt === "string") { + return { ...input, prompt: params.prompt }; + } + + if (Array.isArray(params.prompt)) { + return { ...input, prompt: params.prompt }; + } + + return input; +} + +function extractWorkflowAgentModelInput( + params: AISDKCallParams, +): AISDKCallParams { + const input: AISDKCallParams = {}; + if (params.instructions !== undefined) { + input.instructions = params.instructions; + } + if (params.system !== undefined) { + input.system = params.system; + } + if (Array.isArray(params.messages)) { - return { messages: params.messages }; + return { ...input, messages: params.messages }; + } + + if (typeof params.prompt === "string") { + return { ...input, prompt: params.prompt }; } if (Array.isArray(params.prompt)) { - return { messages: params.prompt }; + return { ...input, messages: params.prompt }; + } + + return input; +} + +function sanitizeAISDKCallInputValue(value: unknown, depth = 0): unknown { + if (value === undefined || typeof value === "function") { + return undefined; + } + + if (value === null || typeof value !== "object") { + return value; + } + + if (isPromiseLike(value)) { + return "[Promise]"; + } + + if (typeof AbortSignal !== "undefined" && value instanceof AbortSignal) { + return "[AbortSignal]"; + } + + if (depth >= 8) { + return "[Object]"; + } + + if (Array.isArray(value)) { + return value + .map((item) => sanitizeAISDKCallInputValue(item, depth + 1)) + .filter((item) => item !== undefined); + } + + if (!isObject(value)) { + return value; } - if (params.prompt && typeof params.prompt === "object") { - return { messages: [params.prompt as AISDKMessage] }; + const prototype = Object.getPrototypeOf(value); + if (prototype !== Object.prototype && prototype !== null) { + return value; } - return {}; + const sanitized: Record = {}; + for (const [key, nested] of Object.entries(value)) { + if ( + key === "__proto__" || + key === "constructor" || + key === "prototype" || + key.toLowerCase() === "headers" + ) { + continue; + } + + const sanitizedNested = sanitizeAISDKCallInputValue(nested, depth + 1); + if (sanitizedNested !== undefined) { + sanitized[key] = sanitizedNested; + } + } + + return sanitized; } function extractAISDKCallOptionsForMetadata( @@ -1368,6 +1450,7 @@ function extractAISDKCallOptionsForMetadata( const options: Record = {}; const inputOrTopLevelKeys = new Set([ "model", + "instructions", "messages", "prompt", "system", @@ -2847,31 +2930,6 @@ function isAsyncGenerator(value: unknown): value is AsyncGenerator { ); } -function removeHeadersDeep(value: unknown): unknown { - if (Array.isArray(value)) { - return value.map((item) => removeHeadersDeep(item)); - } - - if (!isObject(value)) { - return value; - } - - const prototype = Object.getPrototypeOf(value); - if (prototype !== Object.prototype && prototype !== null) { - return value; - } - - const sanitized: Record = {}; - for (const [key, nested] of Object.entries(value)) { - if (key.toLowerCase() === "headers") { - continue; - } - sanitized[key] = removeHeadersDeep(nested); - } - - return sanitized; -} - /** * Process AI SDK output, omitting specified paths. */ @@ -2926,7 +2984,7 @@ export function processAISDKOutput( const record = entry.obj as Record; if (remainingKeys.length === 0) { - record[firstKey] = removeHeadersDeep(record[firstKey]); + record[firstKey] = sanitizeAISDKMetadataValue(record[firstKey]); continue; } diff --git a/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts b/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts index 1f77608bc..8741a0e1f 100644 --- a/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-v7-telemetry.test.ts @@ -200,6 +200,7 @@ describe("braintrustAISDKTelemetry", () => { telemetry.onStart?.({ callId: "call-1", + instructions: "Be terse.", operationId: "ai.generateText", provider: "openai", modelId: "gpt-4.1-mini", @@ -208,9 +209,10 @@ describe("braintrustAISDKTelemetry", () => { }); telemetry.onLanguageModelCallStart?.({ callId: "call-1", + instructions: "Be terse.", provider: "openai", modelId: "gpt-4.1-mini", - prompt: [{ role: "user", content: "Reply with OK." }], + messages: [{ role: "user", content: "Reply with OK." }], }); telemetry.onLanguageModelCallEnd?.({ callId: "call-1", @@ -250,6 +252,7 @@ describe("braintrustAISDKTelemetry", () => { name: "generateText", }, input: { + instructions: "Be terse.", messages: [{ role: "user", content: "Reply with OK." }], }, metadata: { @@ -274,6 +277,10 @@ describe("braintrustAISDKTelemetry", () => { model: "gpt-4.1-mini", }, }); + expect(modelCall?.input).toMatchObject({ + instructions: "Be terse.", + messages: [{ role: "user", content: "Reply with OK." }], + }); expect(modelCall?.output).toMatchObject({ text: "OK" }); }); @@ -297,7 +304,7 @@ describe("braintrustAISDKTelemetry", () => { }, }); telemetry.onLanguageModelCallStart?.({ - callId: "workflow-agent", + callId: "workflow-agent-model-call", headers: { authorization: "secret" }, maxOutputTokens: 32, provider: "openai", @@ -307,7 +314,7 @@ describe("braintrustAISDKTelemetry", () => { toolChoice: "required", }); telemetry.onLanguageModelCallEnd?.({ - callId: "workflow-agent", + callId: "workflow-agent-model-call", provider: "openai", modelId: "gpt-4.1-mini", text: "It is sunny.", @@ -430,6 +437,70 @@ describe("braintrustAISDKTelemetry", () => { }); }); + it("backfills WorkflowAgent stream input from model call telemetry", async () => { + const telemetry = braintrustAISDKTelemetry(); + + telemetry.onStart?.({ + callId: "workflow-agent", + operationId: "ai.workflowAgent.stream", + provider: "openai", + modelId: "gpt-4.1-mini", + }); + telemetry.onLanguageModelCallStart?.({ + callId: "workflow-agent-model-call", + headers: { authorization: "secret" }, + maxOutputTokens: 32, + provider: "openai", + modelId: "gpt-4.1-mini", + messages: [{ role: "user", content: "What's the weather in Paris?" }], + toolChoice: "required", + }); + telemetry.onLanguageModelCallEnd?.({ + callId: "workflow-agent-model-call", + provider: "openai", + modelId: "gpt-4.1-mini", + text: "It is sunny.", + usage: { + inputTokens: 8, + outputTokens: 4, + totalTokens: 12, + }, + }); + telemetry.onEnd?.({ + callId: "workflow-agent", + finishReason: "stop", + operationId: "ai.workflowAgent.stream", + text: "It is sunny.", + totalUsage: { + inputTokens: 8, + outputTokens: 4, + totalTokens: 12, + }, + }); + + const spans = (await backgroundLogger.drain()) as Array< + Record + >; + const operation = spans.find( + (span) => span.span_attributes?.name === "WorkflowAgent.stream", + ); + + expect(operation).toMatchObject({ + input: { + messages: [{ role: "user", content: "What's the weather in Paris?" }], + }, + metadata: { + provider: "openai", + model: "gpt-4.1-mini", + options: { + maxOutputTokens: 32, + toolChoice: "required", + }, + }, + }); + expect(operation?.input).not.toHaveProperty("headers"); + }); + it("does not create telemetry child spans for wrapper-owned WorkflowAgent streams", async () => { const telemetry = braintrustAISDKTelemetry(); const wrapperSpan = startSpan({ name: "WorkflowAgent.stream" }); diff --git a/js/src/vendor-sdk-types/ai-sdk-common.ts b/js/src/vendor-sdk-types/ai-sdk-common.ts index 98617b851..62f4ccb21 100644 --- a/js/src/vendor-sdk-types/ai-sdk-common.ts +++ b/js/src/vendor-sdk-types/ai-sdk-common.ts @@ -178,7 +178,9 @@ export interface AISDKRerankParams { export interface AISDKCallParams { model?: AISDKModel; - prompt?: AISDKMessage[] | Record; + instructions?: unknown; + prompt?: string | AISDKMessage[]; + system?: unknown; messages?: AISDKMessage[]; tools?: AISDKTools; schema?: unknown; diff --git a/js/src/wrappers/ai-sdk/telemetry.ts b/js/src/wrappers/ai-sdk/telemetry.ts index 2c5af3629..798bcbf7d 100644 --- a/js/src/wrappers/ai-sdk/telemetry.ts +++ b/js/src/wrappers/ai-sdk/telemetry.ts @@ -38,6 +38,7 @@ type OperationState = { callId: string; firstChunkTime?: number; hadModelChild: boolean; + loggedInput: boolean; operationName: string; operationKey: string; ownsSpan: boolean; @@ -211,10 +212,17 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { if (isObject(event)) { const callId = (event as { callId?: unknown }).callId; if (typeof callId === "string") { - return ( - operationKeyForCallId(callId, mode) ?? - (callId === "workflow-agent" ? undefined : callId) - ); + const operationKey = operationKeyForCallId(callId, mode); + if (operationKey) { + return operationKey; + } + + const workflowOperationKey = workflowOperationKeyStore.getStore(); + if (workflowOperationKey && operations.has(workflowOperationKey)) { + return workflowOperationKey; + } + + return callId === "workflow-agent" ? undefined : callId; } } @@ -463,6 +471,7 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { registerOperation({ callId: event.callId, hadModelChild: false, + loggedInput: false, operationName, operationKey, ownsSpan, @@ -507,6 +516,10 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { ? processAISDKWorkflowAgentCallInput(callInput) : processAISDKCallInput(callInput); logPayload.input = input; + const state = operations.get(operationKey); + if (state) { + state.loggedInput = hasPromptLikeInput(input); + } if ( outputPromise && !workflowAgent && @@ -542,6 +555,27 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { const operationName = state?.operationName ?? "generateText"; const callInput = operationInput(event, operationName); const workflowAgent = operationName === "WorkflowAgent.stream"; + const processedInput = + shouldRecordInputs(event) && workflowAgent + ? processAISDKWorkflowAgentModelCallInput(callInput).input + : shouldRecordInputs(event) + ? processAISDKCallInput(callInput).input + : undefined; + if ( + workflowAgent && + state?.ownsSpan && + !state.loggedInput && + hasPromptLikeInput(processedInput) + ) { + state.span.log({ + input: processedInput, + metadata: { + ...metadataFromEvent(event), + ...extractWorkflowMetadataFromCallParams(callInput), + }, + }); + state.loggedInput = true; + } const openSpans = operationKey ? modelSpans.get(operationKey) : undefined; @@ -559,9 +593,7 @@ export function braintrustAISDKTelemetry(): AISDKV7Telemetry { { ...(shouldRecordInputs(event) ? { - input: workflowAgent - ? processAISDKWorkflowAgentModelCallInput(callInput).input - : processAISDKCallInput(callInput).input, + input: processedInput, } : {}), metadata: workflowAgent @@ -885,6 +917,14 @@ function shouldRecordOutputs(event: AISDKV7TelemetryOptions): boolean { return event.recordOutputs !== false; } +function hasPromptLikeInput(input: unknown): boolean { + if (!isObject(input)) { + return false; + } + + return input.prompt !== undefined || input.messages !== undefined; +} + function operationNameFromId(operationId: string | undefined): string { if (operationId === "ai.workflowAgent.stream") { return "WorkflowAgent.stream"; @@ -955,6 +995,7 @@ function operationInput( return { model: modelFromEvent(event), + instructions: event.instructions, system: event.system, prompt: event.prompt, messages: event.messages, From 6e873dd0b7032af223dd23151407d8f91055a787 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 6 Jul 2026 11:41:14 +0200 Subject: [PATCH 8/9] fix(ai-sdk): omit experimental output from traces --- .../ai-sdk-v4-auto-hook.span-tree.json | 3 --- .../ai-sdk-v4-auto-hook.span-tree.txt | 3 --- .../ai-sdk-v4-wrapped.span-tree.json | 3 --- .../ai-sdk-v4-wrapped.span-tree.txt | 3 --- .../ai-sdk-v5-auto-hook.span-tree.json | 19 ------------------- .../ai-sdk-v5-auto-hook.span-tree.txt | 19 ------------------- .../ai-sdk-v5-wrapped.span-tree.json | 19 ------------------- .../ai-sdk-v5-wrapped.span-tree.txt | 19 ------------------- .../ai-sdk-v6-auto-hook.span-tree.json | 3 --- .../ai-sdk-v6-auto-hook.span-tree.txt | 3 --- .../ai-sdk-v6-wrapped.span-tree.json | 3 --- .../ai-sdk-v6-wrapped.span-tree.txt | 3 --- .../plugins/ai-sdk-plugin.test.ts | 5 +++++ .../instrumentation/plugins/ai-sdk-plugin.ts | 2 ++ 14 files changed, 7 insertions(+), 100 deletions(-) diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.json index 0c9418083..8e394b55e 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.json @@ -338,9 +338,6 @@ } ], "input": { - "experimental_output": { - "type": "object" - }, "maxTokens": 32, "model": { "config": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.txt index 30b652e6d..49cd76935 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-auto-hook.span-tree.txt @@ -222,9 +222,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "experimental_output": { - │ "type": "object" - │ }, │ "maxTokens": 32, │ "model": { │ "config": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.json index 0c9418083..8e394b55e 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.json @@ -338,9 +338,6 @@ } ], "input": { - "experimental_output": { - "type": "object" - }, "maxTokens": 32, "model": { "config": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.txt index 30b652e6d..49cd76935 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v4-wrapped.span-tree.txt @@ -222,9 +222,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "experimental_output": { - │ "type": "object" - │ }, │ "maxTokens": 32, │ "model": { │ "config": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.json index b53148122..245946982 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.json @@ -333,25 +333,6 @@ } ], "input": { - "experimental_output": { - "responseFormat": { - "schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "properties": { - "answer": { - "type": "string" - } - }, - "required": [ - "answer" - ], - "type": "object" - }, - "type": "json" - }, - "type": "object" - }, "maxOutputTokens": 32, "model": { "config": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.txt index 7b05215a7..24af76860 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-auto-hook.span-tree.txt @@ -230,25 +230,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "experimental_output": { - │ "responseFormat": { - │ "schema": { - │ "$schema": "http://json-schema.org/draft-07/schema#", - │ "additionalProperties": false, - │ "properties": { - │ "answer": { - │ "type": "string" - │ } - │ }, - │ "required": [ - │ "answer" - │ ], - │ "type": "object" - │ }, - │ "type": "json" - │ }, - │ "type": "object" - │ }, │ "maxOutputTokens": 32, │ "model": { │ "config": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.json index 4f3ed6b97..79bff2e52 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.json @@ -333,25 +333,6 @@ } ], "input": { - "experimental_output": { - "responseFormat": { - "schema": { - "$schema": "http://json-schema.org/draft-07/schema#", - "additionalProperties": false, - "properties": { - "answer": { - "type": "string" - } - }, - "required": [ - "answer" - ], - "type": "object" - }, - "type": "json" - }, - "type": "object" - }, "maxOutputTokens": 32, "model": { "config": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.txt index 5fc5a7419..c12f06227 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v5-wrapped.span-tree.txt @@ -230,25 +230,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "experimental_output": { - │ "responseFormat": { - │ "schema": { - │ "$schema": "http://json-schema.org/draft-07/schema#", - │ "additionalProperties": false, - │ "properties": { - │ "answer": { - │ "type": "string" - │ } - │ }, - │ "required": [ - │ "answer" - │ ], - │ "type": "object" - │ }, - │ "type": "json" - │ }, - │ "type": "object" - │ }, │ "maxOutputTokens": 32, │ "model": { │ "config": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json index ebe790f53..7ea80c710 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.json @@ -416,9 +416,6 @@ } ], "input": { - "experimental_output": { - "responseFormat": "[Promise]" - }, "maxOutputTokens": 32, "model": { "config": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt index 38784441d..9a7100a1b 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-auto-hook.span-tree.txt @@ -294,9 +294,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "experimental_output": { - │ "responseFormat": "[Promise]" - │ }, │ "maxOutputTokens": 32, │ "model": { │ "config": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json index 1333529fc..fb047d529 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.json @@ -416,9 +416,6 @@ } ], "input": { - "experimental_output": { - "responseFormat": "[Promise]" - }, "maxOutputTokens": 32, "model": { "config": { diff --git a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt index 280ed8953..525bedcbf 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt +++ b/e2e/scenarios/ai-sdk-instrumentation/__snapshots__/ai-sdk-v6-wrapped.span-tree.txt @@ -294,9 +294,6 @@ span_tree: │ } │ └── generateText [function] │ input: { - │ "experimental_output": { - │ "responseFormat": "[Promise]" - │ }, │ "maxOutputTokens": 32, │ "model": { │ "config": { diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts index 89b23e360..caf2dd3b7 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.test.ts @@ -168,6 +168,10 @@ describe("AISDKPlugin", () => { doStream: async () => ({ stream: new ReadableStream() }), modelId: "gpt-4.1-mini", }, + experimental_output: { + responseFormat: Promise.resolve({ type: "json" }), + type: "object", + }, prompt: "Hello", stopWhen: () => true, }).input as Record; @@ -181,6 +185,7 @@ describe("AISDKPlugin", () => { }, prompt: "Hello", }); + expect(processed).not.toHaveProperty("experimental_output"); expect(processed).not.toHaveProperty("stopWhen"); expect(processed.model).not.toHaveProperty("doGenerate"); expect(processed.model).not.toHaveProperty("doStream"); diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.ts index 44956c15c..c160ed657 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.ts @@ -832,6 +832,7 @@ const processInputAttachmentsSync = ( const processed: AISDKCallParams = { ...input }; delete processed.headers; + delete processed.experimental_output; if (input.messages && Array.isArray(input.messages)) { processed.messages = input.messages.map(processMessage); @@ -1458,6 +1459,7 @@ function extractAISDKCallOptionsForMetadata( "headers", "abortSignal", "signal", + "experimental_output", ]); for (const [key, value] of Object.entries(params)) { From 3166e091d6cbb3ec867bc894f1bc013bc4a2fe73 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 6 Jul 2026 12:21:22 +0200 Subject: [PATCH 9/9] fix(ai-sdk): remove unused message import --- js/src/instrumentation/plugins/ai-sdk-plugin.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.ts index c160ed657..9d387f26a 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.ts @@ -34,7 +34,6 @@ import type { AISDKEmbedParams, AISDKEmbeddingResult, AISDKLanguageModel, - AISDKMessage, AISDKModel, AISDKModelStreamChunk, AISDKOutputObject,