From ac4ab8cd302701067ae9f1d89ed279a680250049 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 1 Jul 2026 14:17:02 +0200 Subject: [PATCH 1/3] fix(ai-sdk): Don't capture message history in tool spans --- .../__cassettes__/ai-sdk-v3.cassette.json | 130 +- .../__cassettes__/ai-sdk-v4.cassette.json | 152 +- .../__cassettes__/ai-sdk-v5.cassette.json | 732 +++-- .../__cassettes__/ai-sdk-v6.cassette.json | 2674 +++++++++++----- .../__cassettes__/ai-sdk-v7.cassette.json | 1471 ++++++++- .../ai-sdk-v3-auto-hook.span-tree.json | 19 - .../ai-sdk-v3-auto-hook.span-tree.txt | 19 - .../ai-sdk-v3-wrapped.span-tree.json | 19 - .../ai-sdk-v3-wrapped.span-tree.txt | 19 - .../ai-sdk-v4-auto-hook.span-tree.json | 39 +- .../ai-sdk-v4-auto-hook.span-tree.txt | 39 +- .../ai-sdk-v4-wrapped.span-tree.json | 39 +- .../ai-sdk-v4-wrapped.span-tree.txt | 39 +- .../ai-sdk-v5-auto-hook.span-tree.json | 305 +- .../ai-sdk-v5-auto-hook.span-tree.txt | 305 +- .../ai-sdk-v5-wrapped.span-tree.json | 287 +- .../ai-sdk-v5-wrapped.span-tree.txt | 287 +- .../ai-sdk-v6-auto-hook.span-tree.json | 2752 ++++++++++++++-- .../ai-sdk-v6-auto-hook.span-tree.txt | 2839 +++++++++++++++-- .../ai-sdk-v6-wrapped.span-tree.json | 2010 ++++++++++-- .../ai-sdk-v6-wrapped.span-tree.txt | 2033 ++++++++++-- .../ai-sdk-v7-auto-hook.span-tree.json | 2063 +++++++++++- .../ai-sdk-v7-auto-hook.span-tree.txt | 2268 +++++++++++-- .../ai-sdk-v7-explicit.span-tree.json | 2063 +++++++++++- .../ai-sdk-v7-explicit.span-tree.txt | 2268 +++++++++++-- .../ai-sdk-instrumentation/assertions.ts | 112 +- .../scenario.ai-sdk-v6.mjs | 1 + .../scenario.ai-sdk-v6.ts | 1 + .../scenario.ai-sdk-v7.mjs | 2 + .../scenario.ai-sdk-v7.ts | 2 + .../ai-sdk-instrumentation/scenario.impl.mjs | 79 + .../ai-sdk-instrumentation/scenario.mjs | 1 + .../ai-sdk-instrumentation/scenario.test.ts | 2 + .../ai-sdk-instrumentation/scenario.ts | 1 + 34 files changed, 20867 insertions(+), 4205 deletions(-) diff --git a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v3.cassette.json b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v3.cassette.json index 21bea9aea..8651e1b69 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v3.cassette.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v3.cassette.json @@ -2,9 +2,9 @@ "entries": [ { "callIndex": 0, - "id": "66fa29eed4a03d8d", + "id": "2583f51940dc092e", "matchKey": "POST api.openai.com/v1/chat/completions", - "recordedAt": "2026-05-26T14:29:53.960Z", + "recordedAt": "2026-07-01T11:33:03.285Z", "request": { "body": { "kind": "json", @@ -41,12 +41,12 @@ } } ], - "created": 1779805793, - "id": "chatcmpl-Djn4z2IFrN0ZImXkwB61w6D5XadW9", + "created": 1782905583, + "id": "chatcmpl-DwnTbV1W6hoKdnPEmm39mBrJeo2E2", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", - "system_fingerprint": "fp_9bfafbc51b", + "system_fingerprint": "fp_d0469e1700", "usage": { "completion_tokens": 2, "completion_tokens_details": { @@ -68,13 +68,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d797e8bc15a7d-VIE", + "cf-ray": "a14517f41edfc2fc-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:29:54 GMT", + "date": "Wed, 01 Jul 2026 11:33:03 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "831", + "openai-processing-ms": "447", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -89,7 +89,7 @@ "x-ratelimit-remaining-tokens": "149999985", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_df2175a359ef40d3aca905f962b5bd21" + "x-request-id": "req_da7e342a827e418298378ec7a5e2b791" }, "status": 200, "statusText": "OK" @@ -97,9 +97,9 @@ }, { "callIndex": 1, - "id": "b9a0059ca6f02ace", + "id": "901ff936ff6b7255", "matchKey": "POST api.openai.com/v1/chat/completions", - "recordedAt": "2026-05-26T14:29:54.688Z", + "recordedAt": "2026-07-01T11:33:03.877Z", "request": { "body": { "kind": "json", @@ -123,14 +123,14 @@ "response": { "body": { "chunks": [ - "data: {\"id\":\"chatcmpl-Djn507itm2eHsR01BnkVIYKXePbS4\",\"object\":\"chat.completion.chunk\",\"created\":1779805794,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"sHHaH4\"}", - "data: {\"id\":\"chatcmpl-Djn507itm2eHsR01BnkVIYKXePbS4\",\"object\":\"chat.completion.chunk\",\"created\":1779805794,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"One\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"uuqAL\"}", - "data: {\"id\":\"chatcmpl-Djn507itm2eHsR01BnkVIYKXePbS4\",\"object\":\"chat.completion.chunk\",\"created\":1779805794,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"rz3iyXB\"}", - "data: {\"id\":\"chatcmpl-Djn507itm2eHsR01BnkVIYKXePbS4\",\"object\":\"chat.completion.chunk\",\"created\":1779805794,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" two\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"JaZG\"}", - "data: {\"id\":\"chatcmpl-Djn507itm2eHsR01BnkVIYKXePbS4\",\"object\":\"chat.completion.chunk\",\"created\":1779805794,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"i4HzSKA\"}", - "data: {\"id\":\"chatcmpl-Djn507itm2eHsR01BnkVIYKXePbS4\",\"object\":\"chat.completion.chunk\",\"created\":1779805794,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" three\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"DX\"}", - "data: {\"id\":\"chatcmpl-Djn507itm2eHsR01BnkVIYKXePbS4\",\"object\":\"chat.completion.chunk\",\"created\":1779805794,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"UGC7igb\"}", - "data: {\"id\":\"chatcmpl-Djn507itm2eHsR01BnkVIYKXePbS4\",\"object\":\"chat.completion.chunk\",\"created\":1779805794,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"obfuscation\":\"M7\"}", + "data: {\"id\":\"chatcmpl-DwnTbZ4akqF9CXgW2XVaifVACzHEd\",\"object\":\"chat.completion.chunk\",\"created\":1782905583,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"1yCl5l\"}", + "data: {\"id\":\"chatcmpl-DwnTbZ4akqF9CXgW2XVaifVACzHEd\",\"object\":\"chat.completion.chunk\",\"created\":1782905583,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"One\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"vXk51\"}", + "data: {\"id\":\"chatcmpl-DwnTbZ4akqF9CXgW2XVaifVACzHEd\",\"object\":\"chat.completion.chunk\",\"created\":1782905583,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"xyT7yG9\"}", + "data: {\"id\":\"chatcmpl-DwnTbZ4akqF9CXgW2XVaifVACzHEd\",\"object\":\"chat.completion.chunk\",\"created\":1782905583,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" two\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"PTVs\"}", + "data: {\"id\":\"chatcmpl-DwnTbZ4akqF9CXgW2XVaifVACzHEd\",\"object\":\"chat.completion.chunk\",\"created\":1782905583,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"Wfknrsp\"}", + "data: {\"id\":\"chatcmpl-DwnTbZ4akqF9CXgW2XVaifVACzHEd\",\"object\":\"chat.completion.chunk\",\"created\":1782905583,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" three\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"Ue\"}", + "data: {\"id\":\"chatcmpl-DwnTbZ4akqF9CXgW2XVaifVACzHEd\",\"object\":\"chat.completion.chunk\",\"created\":1782905583,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"282EC2G\"}", + "data: {\"id\":\"chatcmpl-DwnTbZ4akqF9CXgW2XVaifVACzHEd\",\"object\":\"chat.completion.chunk\",\"created\":1782905583,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"obfuscation\":\"5z\"}", "data: [DONE]" ], "kind": "sse" @@ -139,12 +139,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d798528e25a7d-VIE", + "cf-ray": "a14517f8890ac2fc-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 26 May 2026 14:29:54 GMT", + "date": "Wed, 01 Jul 2026 11:33:03 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "342", + "openai-processing-ms": "265", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -156,10 +156,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999985", + "x-ratelimit-remaining-tokens": "149999982", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_feed66d7e982402ba0ab811ebc869ab3" + "x-request-id": "req_45503867e5c441dfab97c28f8617f3c2" }, "status": 200, "statusText": "OK" @@ -167,9 +167,9 @@ }, { "callIndex": 0, - "id": "7d3c0bb6426e6be4", + "id": "49a95bf2b3466013", "matchKey": "POST api.openai.com/v1/embeddings", - "recordedAt": "2026-05-26T14:29:55.049Z", + "recordedAt": "2026-07-01T11:33:04.061Z", "request": { "body": { "kind": "json", @@ -757,13 +757,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d798afd455a7d-VIE", + "cf-ray": "a14517fbfaf2c2fc-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:29:55 GMT", + "date": "Wed, 01 Jul 2026 11:33:04 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "64", + "openai-processing-ms": "67", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -778,7 +778,7 @@ "x-ratelimit-remaining-tokens": "9999993", "x-ratelimit-reset-requests": "6ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_c7f830b4fb364c8a95d3e7cde2f48a56" + "x-request-id": "57b849f9-e7e0-41e7-9350-e59cc51abc6c" }, "status": 200, "statusText": "OK" @@ -786,9 +786,9 @@ }, { "callIndex": 2, - "id": "30f31184211ae8a1", + "id": "f7a3ad27b5067191", "matchKey": "POST api.openai.com/v1/chat/completions", - "recordedAt": "2026-05-26T14:29:55.910Z", + "recordedAt": "2026-07-01T11:33:05.314Z", "request": { "body": { "kind": "json", @@ -854,19 +854,19 @@ "arguments": "{\"location\":\"Paris, France\"}", "name": "get_weather" }, - "id": "call_JdCrDUvI5Bw14zreiJumxyAK", + "id": "call_HBwEZ0kRHmyGpj7Q9nUVEjlI", "type": "function" } ] } } ], - "created": 1779805795, - "id": "chatcmpl-Djn51ttaeJ3Zl8pMfiVvNw3T6u09g", + "created": 1782905584, + "id": "chatcmpl-DwnTcZYeLXEMNM87RQ1GLak11JBNO", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", - "system_fingerprint": "fp_53ab0cb954", + "system_fingerprint": "fp_acf4e170a0", "usage": { "completion_tokens": 16, "completion_tokens_details": { @@ -888,13 +888,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d798bedcc5a7d-VIE", + "cf-ray": "a14517fd1b61c2fc-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:29:56 GMT", + "date": "Wed, 01 Jul 2026 11:33:05 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "654", + "openai-processing-ms": "1045", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -906,10 +906,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999950", + "x-ratelimit-remaining-tokens": "149999952", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_84b44e4c07e84b9194b921768c3fd7f9" + "x-request-id": "req_0adcc5318f784282a2e83a056db2e3ac" }, "status": 200, "statusText": "OK" @@ -917,9 +917,9 @@ }, { "callIndex": 3, - "id": "9681fdcd86301e38", + "id": "26ad5653def30060", "matchKey": "POST api.openai.com/v1/chat/completions", - "recordedAt": "2026-05-26T14:29:56.420Z", + "recordedAt": "2026-07-01T11:33:05.858Z", "request": { "body": { "kind": "json", @@ -985,19 +985,19 @@ "arguments": "{\"city\":\"Paris\"}", "name": "json" }, - "id": "call_q2yfhPHpRqJL5kLo5l1DMdTk", + "id": "call_Il3hQT8LA4HlgllNrURHYFgH", "type": "function" } ] } } ], - "created": 1779805796, - "id": "chatcmpl-Djn52PAMF28QTfFnDtewik05liNp3", + "created": 1782905585, + "id": "chatcmpl-DwnTdss88uoJmtY2tCRYjKPF2gbCv", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", - "system_fingerprint": "fp_df8c8d3b43", + "system_fingerprint": "fp_a849775b18", "usage": { "completion_tokens": 5, "completion_tokens_details": { @@ -1019,13 +1019,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d799149485a7d-VIE", + "cf-ray": "a1451804ff53c2fc-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:29:56 GMT", + "date": "Wed, 01 Jul 2026 11:33:05 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "308", + "openai-processing-ms": "345", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1037,10 +1037,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999987", + "x-ratelimit-remaining-tokens": "149999990", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_61705bf0bbdc45b7b708bb634658c63b" + "x-request-id": "req_25914640ea7a47f59cbac7c3ac82f9ab" }, "status": 200, "statusText": "OK" @@ -1048,9 +1048,9 @@ }, { "callIndex": 4, - "id": "d2e0c4c7403336d9", + "id": "1e0515e907a8bb36", "matchKey": "POST api.openai.com/v1/chat/completions", - "recordedAt": "2026-05-26T14:29:57.137Z", + "recordedAt": "2026-07-01T11:33:06.683Z", "request": { "body": { "kind": "json", @@ -1100,13 +1100,13 @@ "response": { "body": { "chunks": [ - "data: {\"id\":\"chatcmpl-Djn52uqbMGt1QoGiSc2VmEH6oOeF5\",\"object\":\"chat.completion.chunk\",\"created\":1779805796,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_gPcrO1W6TRDMkacd05MNaLZd\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"xJbn6xoq\"}", - "data: {\"id\":\"chatcmpl-Djn52uqbMGt1QoGiSc2VmEH6oOeF5\",\"object\":\"chat.completion.chunk\",\"created\":1779805796,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"PluGlQNa9w2\"}", - "data: {\"id\":\"chatcmpl-Djn52uqbMGt1QoGiSc2VmEH6oOeF5\",\"object\":\"chat.completion.chunk\",\"created\":1779805796,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"city\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"qjL8ZSfTBb\"}", - "data: {\"id\":\"chatcmpl-Djn52uqbMGt1QoGiSc2VmEH6oOeF5\",\"object\":\"chat.completion.chunk\",\"created\":1779805796,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"UiXPoy608\"}", - "data: {\"id\":\"chatcmpl-Djn52uqbMGt1QoGiSc2VmEH6oOeF5\",\"object\":\"chat.completion.chunk\",\"created\":1779805796,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Paris\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"SB5AEkelu\"}", - "data: {\"id\":\"chatcmpl-Djn52uqbMGt1QoGiSc2VmEH6oOeF5\",\"object\":\"chat.completion.chunk\",\"created\":1779805796,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"FJFtzQRiU2I\"}", - "data: {\"id\":\"chatcmpl-Djn52uqbMGt1QoGiSc2VmEH6oOeF5\",\"object\":\"chat.completion.chunk\",\"created\":1779805796,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"obfuscation\":\"wf\"}", + "data: {\"id\":\"chatcmpl-DwnTeHfwY4PreYUJLd47Wdp5Edv37\",\"object\":\"chat.completion.chunk\",\"created\":1782905586,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_n6B7Skq7RtkbplSmKoJN2PgK\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"wpMfrpjL\"}", + "data: {\"id\":\"chatcmpl-DwnTeHfwY4PreYUJLd47Wdp5Edv37\",\"object\":\"chat.completion.chunk\",\"created\":1782905586,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"3REh0gSsUSm\"}", + "data: {\"id\":\"chatcmpl-DwnTeHfwY4PreYUJLd47Wdp5Edv37\",\"object\":\"chat.completion.chunk\",\"created\":1782905586,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"city\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"UYI9JaRv8a\"}", + "data: {\"id\":\"chatcmpl-DwnTeHfwY4PreYUJLd47Wdp5Edv37\",\"object\":\"chat.completion.chunk\",\"created\":1782905586,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"ODAhmiSIn\"}", + "data: {\"id\":\"chatcmpl-DwnTeHfwY4PreYUJLd47Wdp5Edv37\",\"object\":\"chat.completion.chunk\",\"created\":1782905586,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Paris\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"1r8C1DuPT\"}", + "data: {\"id\":\"chatcmpl-DwnTeHfwY4PreYUJLd47Wdp5Edv37\",\"object\":\"chat.completion.chunk\",\"created\":1782905586,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"iQBFEw5OYJI\"}", + "data: {\"id\":\"chatcmpl-DwnTeHfwY4PreYUJLd47Wdp5Edv37\",\"object\":\"chat.completion.chunk\",\"created\":1782905586,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"obfuscation\":\"tZ\"}", "data: [DONE]" ], "kind": "sse" @@ -1115,12 +1115,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d79948b7e5a7d-VIE", + "cf-ray": "a14518087916c2fc-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 26 May 2026 14:29:56 GMT", + "date": "Wed, 01 Jul 2026 11:33:06 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "284", + "openai-processing-ms": "421", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1135,7 +1135,7 @@ "x-ratelimit-remaining-tokens": "149999990", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_0e7ea1674d7949c8a55f70e77a39ad2a" + "x-request-id": "req_77f5602412d440a283b2be60ca7bdcfc" }, "status": 200, "statusText": "OK" diff --git a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v4.cassette.json b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v4.cassette.json index 7360c3150..a9910d03b 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v4.cassette.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v4.cassette.json @@ -2,9 +2,9 @@ "entries": [ { "callIndex": 0, - "id": "66fa29eed4a03d8d", + "id": "2583f51940dc092e", "matchKey": "POST api.openai.com/v1/chat/completions", - "recordedAt": "2026-05-26T14:30:06.248Z", + "recordedAt": "2026-07-01T11:33:12.981Z", "request": { "body": { "kind": "json", @@ -41,12 +41,12 @@ } } ], - "created": 1779805805, - "id": "chatcmpl-Djn5BCeeLqVv8Ft8l3zkfs6xvruEe", + "created": 1782905592, + "id": "chatcmpl-DwnTkQKhpUachLsSY89LLtyvZUPSD", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", - "system_fingerprint": "fp_9bfafbc51b", + "system_fingerprint": "fp_d0469e1700", "usage": { "completion_tokens": 2, "completion_tokens_details": { @@ -68,13 +68,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d79ce3a235a7d-VIE", + "cf-ray": "a1451831be90c2fc-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:30:06 GMT", + "date": "Wed, 01 Jul 2026 11:33:13 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "400", + "openai-processing-ms": "313", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -89,7 +89,7 @@ "x-ratelimit-remaining-tokens": "149999982", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_6f02fedb1edb438896c2e36f2f460d3a" + "x-request-id": "req_60f7834037ab4715a8b82dc46936f5c7" }, "status": 200, "statusText": "OK" @@ -97,9 +97,9 @@ }, { "callIndex": 1, - "id": "b9a0059ca6f02ace", + "id": "26bd7a839024be32", "matchKey": "POST api.openai.com/v1/chat/completions", - "recordedAt": "2026-05-26T14:30:07.070Z", + "recordedAt": "2026-07-01T11:33:13.618Z", "request": { "body": { "kind": "json", @@ -143,12 +143,12 @@ } } ], - "created": 1779805806, - "id": "chatcmpl-Djn5CAmVA0STGBhbGxjxn2tWd17Ge", + "created": 1782905593, + "id": "chatcmpl-DwnTl4abquZl3z7fTTdN3cNHZXpva", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", - "system_fingerprint": "fp_0cab4b58ee", + "system_fingerprint": "fp_b4b9deb02a", "usage": { "completion_tokens": 5, "completion_tokens_details": { @@ -170,13 +170,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d79d20ca15a7d-VIE", + "cf-ray": "a14518350fe7c2fc-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:30:07 GMT", + "date": "Wed, 01 Jul 2026 11:33:13 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "628", + "openai-processing-ms": "396", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -188,10 +188,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999922", + "x-ratelimit-remaining-tokens": "149999920", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_57f0f5297e434aae9a72f8a85b705211" + "x-request-id": "req_ce10016460644067a7d098ad589eb357" }, "status": 200, "statusText": "OK" @@ -199,9 +199,9 @@ }, { "callIndex": 2, - "id": "30f31184211ae8a1", + "id": "c2dd75e81b07922a", "matchKey": "POST api.openai.com/v1/chat/completions", - "recordedAt": "2026-05-26T14:30:07.585Z", + "recordedAt": "2026-07-01T11:33:14.216Z", "request": { "body": { "kind": "json", @@ -225,14 +225,14 @@ "response": { "body": { "chunks": [ - "data: {\"id\":\"chatcmpl-Djn5DSkXAqfLUJRXgR13cNftcvFK8\",\"object\":\"chat.completion.chunk\",\"created\":1779805807,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"CWVj0E\"}", - "data: {\"id\":\"chatcmpl-Djn5DSkXAqfLUJRXgR13cNftcvFK8\",\"object\":\"chat.completion.chunk\",\"created\":1779805807,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"One\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"wc94w\"}", - "data: {\"id\":\"chatcmpl-Djn5DSkXAqfLUJRXgR13cNftcvFK8\",\"object\":\"chat.completion.chunk\",\"created\":1779805807,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"7RWk5ab\"}", - "data: {\"id\":\"chatcmpl-Djn5DSkXAqfLUJRXgR13cNftcvFK8\",\"object\":\"chat.completion.chunk\",\"created\":1779805807,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" two\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"nqaQ\"}", - "data: {\"id\":\"chatcmpl-Djn5DSkXAqfLUJRXgR13cNftcvFK8\",\"object\":\"chat.completion.chunk\",\"created\":1779805807,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"PYTWRLU\"}", - "data: {\"id\":\"chatcmpl-Djn5DSkXAqfLUJRXgR13cNftcvFK8\",\"object\":\"chat.completion.chunk\",\"created\":1779805807,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" three\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"Rm\"}", - "data: {\"id\":\"chatcmpl-Djn5DSkXAqfLUJRXgR13cNftcvFK8\",\"object\":\"chat.completion.chunk\",\"created\":1779805807,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"v2r1JFP\"}", - "data: {\"id\":\"chatcmpl-Djn5DSkXAqfLUJRXgR13cNftcvFK8\",\"object\":\"chat.completion.chunk\",\"created\":1779805807,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_2a69b66f71\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"obfuscation\":\"vU\"}", + "data: {\"id\":\"chatcmpl-DwnTlXXVV4sWWpLdv6zWepCEOIQlM\",\"object\":\"chat.completion.chunk\",\"created\":1782905593,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"TfpaSo\"}", + "data: {\"id\":\"chatcmpl-DwnTlXXVV4sWWpLdv6zWepCEOIQlM\",\"object\":\"chat.completion.chunk\",\"created\":1782905593,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\"One\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"07dpm\"}", + "data: {\"id\":\"chatcmpl-DwnTlXXVV4sWWpLdv6zWepCEOIQlM\",\"object\":\"chat.completion.chunk\",\"created\":1782905593,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"gc28Ww8\"}", + "data: {\"id\":\"chatcmpl-DwnTlXXVV4sWWpLdv6zWepCEOIQlM\",\"object\":\"chat.completion.chunk\",\"created\":1782905593,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" two\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"cR4X\"}", + "data: {\"id\":\"chatcmpl-DwnTlXXVV4sWWpLdv6zWepCEOIQlM\",\"object\":\"chat.completion.chunk\",\"created\":1782905593,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\",\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"ldIDR64\"}", + "data: {\"id\":\"chatcmpl-DwnTlXXVV4sWWpLdv6zWepCEOIQlM\",\"object\":\"chat.completion.chunk\",\"created\":1782905593,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" three\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"qy\"}", + "data: {\"id\":\"chatcmpl-DwnTlXXVV4sWWpLdv6zWepCEOIQlM\",\"object\":\"chat.completion.chunk\",\"created\":1782905593,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"WY51vat\"}", + "data: {\"id\":\"chatcmpl-DwnTlXXVV4sWWpLdv6zWepCEOIQlM\",\"object\":\"chat.completion.chunk\",\"created\":1782905593,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_85fd54540d\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"obfuscation\":\"PU\"}", "data: [DONE]" ], "kind": "sse" @@ -241,12 +241,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d79d70fe45a7d-VIE", + "cf-ray": "a1451838f98bc2fc-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 26 May 2026 14:30:07 GMT", + "date": "Wed, 01 Jul 2026 11:33:14 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "237", + "openai-processing-ms": "291", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -258,10 +258,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999985", + "x-ratelimit-remaining-tokens": "149999982", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_0735e9279cd9404d95c99c8ebb19f811" + "x-request-id": "req_7d829c1d0cc54d0cb578c32be9238e4f" }, "status": 200, "statusText": "OK" @@ -269,9 +269,9 @@ }, { "callIndex": 0, - "id": "7d3c0bb6426e6be4", + "id": "49a95bf2b3466013", "matchKey": "POST api.openai.com/v1/embeddings", - "recordedAt": "2026-05-26T14:30:07.736Z", + "recordedAt": "2026-07-01T11:33:14.378Z", "request": { "body": { "kind": "json", @@ -859,13 +859,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d79da4a305a7d-VIE", + "cf-ray": "a145183c8b76c2fc-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:30:07 GMT", + "date": "Wed, 01 Jul 2026 11:33:14 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "64", + "openai-processing-ms": "63", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -880,7 +880,7 @@ "x-ratelimit-remaining-tokens": "9999993", "x-ratelimit-reset-requests": "6ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_29415200888545d3ac2e479703775277" + "x-request-id": "ecf96317-4083-473d-90dd-065a496503d9" }, "status": 200, "statusText": "OK" @@ -888,9 +888,9 @@ }, { "callIndex": 3, - "id": "9681fdcd86301e38", + "id": "2c7dbd0fc5fbea43", "matchKey": "POST api.openai.com/v1/chat/completions", - "recordedAt": "2026-05-26T14:30:08.658Z", + "recordedAt": "2026-07-01T11:33:15.258Z", "request": { "body": { "kind": "json", @@ -956,19 +956,19 @@ "arguments": "{\"location\":\"Paris, France\"}", "name": "get_weather" }, - "id": "call_HWmiALnwpX7k56KcjxgKvZOW", + "id": "call_G73KYmWu14pwR6Fb1DSYut7w", "type": "function" } ] } } ], - "created": 1779805808, - "id": "chatcmpl-Djn5E6ngb3OWX0LiUbTdOjWx0Qif7", + "created": 1782905594, + "id": "chatcmpl-DwnTmiM2YW8lwSm8fuKZpB8FCp8xZ", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", - "system_fingerprint": "fp_53ab0cb954", + "system_fingerprint": "fp_acf4e170a0", "usage": { "completion_tokens": 16, "completion_tokens_details": { @@ -990,13 +990,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d79db2ace5a7d-VIE", + "cf-ray": "a145183dbbf3c2fc-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:30:08 GMT", + "date": "Wed, 01 Jul 2026 11:33:15 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "743", + "openai-processing-ms": "634", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1008,10 +1008,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999952", + "x-ratelimit-remaining-tokens": "149999950", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_b161784fb5d54b388ef33c836f26bfcf" + "x-request-id": "req_327aab974f9d4fd2a8e8b44b7eb0897e" }, "status": 200, "statusText": "OK" @@ -1019,9 +1019,9 @@ }, { "callIndex": 4, - "id": "d2e0c4c7403336d9", + "id": "7c6adfd95a57b3b9", "matchKey": "POST api.openai.com/v1/chat/completions", - "recordedAt": "2026-05-26T14:30:09.598Z", + "recordedAt": "2026-07-01T11:33:16.178Z", "request": { "body": { "kind": "json", @@ -1087,19 +1087,19 @@ "arguments": "{\"city\":\"Paris\"}", "name": "json" }, - "id": "call_upS7AVwdvoIoTyYXDlZ7fZXI", + "id": "call_6U22uEiGWoPKXKaY3ScANp0Z", "type": "function" } ] } } ], - "created": 1779805809, - "id": "chatcmpl-Djn5FBiB4kKD2iqcopJ2eIUg9tuLI", + "created": 1782905595, + "id": "chatcmpl-DwnTnM4w37w3ZQ5wLWh1HP0eDMEn5", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", - "system_fingerprint": "fp_df8c8d3b43", + "system_fingerprint": "fp_a849775b18", "usage": { "completion_tokens": 5, "completion_tokens_details": { @@ -1121,13 +1121,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d79e3185a5a7d-VIE", + "cf-ray": "a14518431ec0c2fc-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:30:09 GMT", + "date": "Wed, 01 Jul 2026 11:33:16 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "402", + "openai-processing-ms": "693", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1139,10 +1139,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999990", + "x-ratelimit-remaining-tokens": "149999987", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_eec72bdf0eb7405fa593a742edf10e19" + "x-request-id": "req_30106d275cd1444b9ac3e26484b08a27" }, "status": 200, "statusText": "OK" @@ -1150,9 +1150,9 @@ }, { "callIndex": 5, - "id": "c505f9dbd2a1ee9b", + "id": "355b7339cc02f06e", "matchKey": "POST api.openai.com/v1/chat/completions", - "recordedAt": "2026-05-26T14:30:10.280Z", + "recordedAt": "2026-07-01T11:33:16.799Z", "request": { "body": { "kind": "json", @@ -1202,13 +1202,13 @@ "response": { "body": { "chunks": [ - "data: {\"id\":\"chatcmpl-Djn5GI27FpMXnSZM8dcutjhLJwIMo\",\"object\":\"chat.completion.chunk\",\"created\":1779805810,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_Wr7uvaSY2mLoeB1eCUdQgzJA\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"lk7oJZSQ\"}", - "data: {\"id\":\"chatcmpl-Djn5GI27FpMXnSZM8dcutjhLJwIMo\",\"object\":\"chat.completion.chunk\",\"created\":1779805810,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"iqlJqZ9F3U5\"}", - "data: {\"id\":\"chatcmpl-Djn5GI27FpMXnSZM8dcutjhLJwIMo\",\"object\":\"chat.completion.chunk\",\"created\":1779805810,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"city\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"DCo76pXnIp\"}", - "data: {\"id\":\"chatcmpl-Djn5GI27FpMXnSZM8dcutjhLJwIMo\",\"object\":\"chat.completion.chunk\",\"created\":1779805810,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"IfrAz0cJD\"}", - "data: {\"id\":\"chatcmpl-Djn5GI27FpMXnSZM8dcutjhLJwIMo\",\"object\":\"chat.completion.chunk\",\"created\":1779805810,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Paris\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"MN5mCA8Rh\"}", - "data: {\"id\":\"chatcmpl-Djn5GI27FpMXnSZM8dcutjhLJwIMo\",\"object\":\"chat.completion.chunk\",\"created\":1779805810,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"6YMhu2BCEh2\"}", - "data: {\"id\":\"chatcmpl-Djn5GI27FpMXnSZM8dcutjhLJwIMo\",\"object\":\"chat.completion.chunk\",\"created\":1779805810,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_df8c8d3b43\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"obfuscation\":\"ET\"}", + "data: {\"id\":\"chatcmpl-DwnToBzFgEhN37jzvoAFYIm5Qb2Ql\",\"object\":\"chat.completion.chunk\",\"created\":1782905596,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":null,\"tool_calls\":[{\"index\":0,\"id\":\"call_bRTICvTwWe6VbN9wLm1GU6ty\",\"type\":\"function\",\"function\":{\"name\":\"json\",\"arguments\":\"\"}}],\"refusal\":null},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"5YJ5GBpS\"}", + "data: {\"id\":\"chatcmpl-DwnToBzFgEhN37jzvoAFYIm5Qb2Ql\",\"object\":\"chat.completion.chunk\",\"created\":1782905596,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"{\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"rI3pcpVEaOj\"}", + "data: {\"id\":\"chatcmpl-DwnToBzFgEhN37jzvoAFYIm5Qb2Ql\",\"object\":\"chat.completion.chunk\",\"created\":1782905596,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"city\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"dZm9cM1crb\"}", + "data: {\"id\":\"chatcmpl-DwnToBzFgEhN37jzvoAFYIm5Qb2Ql\",\"object\":\"chat.completion.chunk\",\"created\":1782905596,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\":\\\"\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"2aAqSqoc8\"}", + "data: {\"id\":\"chatcmpl-DwnToBzFgEhN37jzvoAFYIm5Qb2Ql\",\"object\":\"chat.completion.chunk\",\"created\":1782905596,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"Paris\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"ceGj02xXC\"}", + "data: {\"id\":\"chatcmpl-DwnToBzFgEhN37jzvoAFYIm5Qb2Ql\",\"object\":\"chat.completion.chunk\",\"created\":1782905596,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{\"tool_calls\":[{\"index\":0,\"function\":{\"arguments\":\"\\\"}\"}}]},\"logprobs\":null,\"finish_reason\":null}],\"obfuscation\":\"WUMiRR6bEmH\"}", + "data: {\"id\":\"chatcmpl-DwnToBzFgEhN37jzvoAFYIm5Qb2Ql\",\"object\":\"chat.completion.chunk\",\"created\":1782905596,\"model\":\"gpt-4o-mini-2024-07-18\",\"service_tier\":\"default\",\"system_fingerprint\":\"fp_a849775b18\",\"choices\":[{\"index\":0,\"delta\":{},\"logprobs\":null,\"finish_reason\":\"stop\"}],\"obfuscation\":\"uS\"}", "data: [DONE]" ], "kind": "sse" @@ -1217,12 +1217,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d79e6eb685a7d-VIE", + "cf-ray": "a1451848f971c2fc-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 26 May 2026 14:30:10 GMT", + "date": "Wed, 01 Jul 2026 11:33:16 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "395", + "openai-processing-ms": "337", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1234,10 +1234,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999990", + "x-ratelimit-remaining-tokens": "149999987", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_da7e40c160b74a8ea3d7ab2e650f30fe" + "x-request-id": "req_93f11b55e69f4b9d8c5133a2d8477876" }, "status": 200, "statusText": "OK" diff --git a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v5.cassette.json b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v5.cassette.json index a1c3ae8c8..c7f42c390 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v5.cassette.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v5.cassette.json @@ -2,9 +2,9 @@ "entries": [ { "callIndex": 0, - "id": "7c0e162d6794cf5d", + "id": "9aa262365558ebc2", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:30:52.844Z", + "recordedAt": "2026-07-01T11:34:01.100Z", "request": { "body": { "kind": "json", @@ -37,11 +37,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805852, - "created_at": 1779805852, + "completed_at": 1782905641, + "created_at": 1782905640, "error": null, "frequency_penalty": 0, - "id": "resp_079fe20fa9b574c0006a15ae9c5bbc81a0ba1718924f2ddb29", + "id": "resp_05199857977cbd9c006a44fb287be081a1a0c7026165ffc097", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -60,7 +60,7 @@ "type": "output_text" } ], - "id": "msg_079fe20fa9b574c0006a15ae9cb43481a085da21b91cecef66", + "id": "msg_05199857977cbd9c006a44fb28f5bc81a18da845fef7f17681", "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": "a01d7af0a9b3afe9-VIE", + "cf-ray": "a145195c7f0927b8-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:30:52 GMT", + "date": "Wed, 01 Jul 2026 11:34:01 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "551", + "openai-processing-ms": "655", "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_599671c3f2af47d6889d237ea8f698ad" + "x-request-id": "1bcaeff1-ab8b-4065-a4f8-18175d8d5306" }, "status": 200, "statusText": "OK" @@ -138,9 +156,9 @@ }, { "callIndex": 1, - "id": "f12aff3913439248", + "id": "9e077c56377ca81c", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:30:54.079Z", + "recordedAt": "2026-07-01T11:34:02.243Z", "request": { "body": { "kind": "json", @@ -191,11 +209,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805853, - "created_at": 1779805853, + "completed_at": 1782905642, + "created_at": 1782905641, "error": null, "frequency_penalty": 0, - "id": "resp_0ef56b986aa2f4d3006a15ae9d16e88197a9c761e874c7f338", + "id": "resp_0f4e3e14489cbc1a006a44fb2967408191bb58f176e4c89506", "incomplete_details": null, "instructions": null, "max_output_tokens": 32, @@ -214,7 +232,7 @@ "type": "output_text" } ], - "id": "msg_0ef56b986aa2f4d3006a15ae9db5d0819799dff4366383bedd", + "id": "msg_0f4e3e14489cbc1a006a44fb2a02c08191bf89883b77488e27", "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": "a01d7af52e14afe9-VIE", + "cf-ray": "a1451961ac7627b8-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:30:54 GMT", + "date": "Wed, 01 Jul 2026 11:34:02 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "966", + "openai-processing-ms": "961", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -294,10 +330,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999935", + "x-ratelimit-remaining-tokens": "149999937", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_b2d5395bd1bc497a91953cbcaaf669c1" + "x-request-id": "fa25565e-663d-4fbf-9425-99e2359f38af" }, "status": 200, "statusText": "OK" @@ -305,9 +341,9 @@ }, { "callIndex": 2, - "id": "5d2312f425df9f2f", + "id": "bdbf85bb8f9015c8", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:30:56.614Z", + "recordedAt": "2026-07-01T11:34:03.098Z", "request": { "body": { "kind": "json", @@ -336,20 +372,20 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0ba0cd5532d5f60f006a15ae9fbbe8819783f4c0f24f46e277\",\"object\":\"response\",\"created_at\":1779805855,\"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_0ba0cd5532d5f60f006a15ae9fbbe8819783f4c0f24f46e277\",\"object\":\"response\",\"created_at\":1779805855,\"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_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"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_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"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_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"logprobs\":[],\"obfuscation\":\"Z0FwWQ2tE4Wlt\",\"output_index\":0,\"sequence_number\":4}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"logprobs\":[],\"obfuscation\":\"BkOkmtHq0faJU5W\",\"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_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"logprobs\":[],\"obfuscation\":\"cagvB3CGUsNO\",\"output_index\":0,\"sequence_number\":6}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"logprobs\":[],\"obfuscation\":\"FEzBakHwmadoXu8\",\"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_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"logprobs\":[],\"obfuscation\":\"GXwuzD0BBs\",\"output_index\":0,\"sequence_number\":8}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"logprobs\":[],\"obfuscation\":\"0aQDdMgisZIbxSq\",\"output_index\":0,\"sequence_number\":9}", - "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"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_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"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_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"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_0ba0cd5532d5f60f006a15ae9fbbe8819783f4c0f24f46e277\",\"object\":\"response\",\"created_at\":1779805855,\"status\":\"completed\",\"background\":false,\"completed_at\":1779805856,\"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_0ba0cd5532d5f60f006a15aea04e0c8197a298326f453fe05d\",\"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_07a957574ad7fd45006a44fb2a73c0819f9b822083e6f4ecdd\",\"object\":\"response\",\"created_at\":1782905642,\"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_07a957574ad7fd45006a44fb2a73c0819f9b822083e6f4ecdd\",\"object\":\"response\",\"created_at\":1782905642,\"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_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"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_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"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_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"logprobs\":[],\"obfuscation\":\"6XT8QL8vD4SIG\",\"output_index\":0,\"sequence_number\":4}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"logprobs\":[],\"obfuscation\":\"ayxw34AmFQMKDSV\",\"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_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"logprobs\":[],\"obfuscation\":\"2HmPQ82UeiuZ\",\"output_index\":0,\"sequence_number\":6}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"logprobs\":[],\"obfuscation\":\"Ymu9ssyDgPt3pXA\",\"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_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"logprobs\":[],\"obfuscation\":\"x4DYmsFX7K\",\"output_index\":0,\"sequence_number\":8}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"logprobs\":[],\"obfuscation\":\"vE0TzCdjoCsHfb2\",\"output_index\":0,\"sequence_number\":9}", + "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"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_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"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_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"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_07a957574ad7fd45006a44fb2a73c0819f9b822083e6f4ecdd\",\"object\":\"response\",\"created_at\":1782905642,\"status\":\"completed\",\"background\":false,\"completed_at\":1782905643,\"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_07a957574ad7fd45006a44fb2aef74819f97668b86d6e998cd\",\"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": "a01d7afd2c95afe9-VIE", + "cf-ray": "a1451968cd3727b8-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 26 May 2026 14:30:55 GMT", + "date": "Wed, 01 Jul 2026 11:34:02 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "225", + "openai-processing-ms": "133", "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_6565cda300b640bd9a10edfe1393cf60" + "x-request-id": "28d1d569-b42c-474f-9c78-c3551db4b3c4" }, "status": 200, "statusText": "OK" @@ -378,9 +414,9 @@ }, { "callIndex": 0, - "id": "7d3c0bb6426e6be4", + "id": "49a95bf2b3466013", "matchKey": "POST api.openai.com/v1/embeddings", - "recordedAt": "2026-05-26T14:30:56.844Z", + "recordedAt": "2026-07-01T11:34:03.449Z", "request": { "body": { "kind": "json", @@ -968,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": "a01d7b0cc925afe9-VIE", + "cf-ray": "a145196e4b5e27b8-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:30:56 GMT", + "date": "Wed, 01 Jul 2026 11:34:03 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "68", + "openai-processing-ms": "50", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -989,7 +1025,7 @@ "x-ratelimit-remaining-tokens": "9999993", "x-ratelimit-reset-requests": "6ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_cc7cce7e17f4463f8976ef8fc34ff8e7" + "x-request-id": "ec7c12f9-9f9c-4a84-8426-f936ca272646" }, "status": 200, "statusText": "OK" @@ -997,9 +1033,9 @@ }, { "callIndex": 3, - "id": "83cbbf6da482c905", + "id": "38b93ac07e54edaf", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:30:59.618Z", + "recordedAt": "2026-07-01T11:34:04.706Z", "request": { "body": { "kind": "json", @@ -1057,11 +1093,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805859, - "created_at": 1779805857, + "completed_at": 1782905644, + "created_at": 1782905643, "error": null, "frequency_penalty": 0, - "id": "resp_032219604220a203006a15aea1467481909fcdd6867a30274b", + "id": "resp_08f347681c1ceae9006a44fb2ba7cc81a2bd0e5addb9d2c546", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1073,8 +1109,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_fmxlwyKl1DCQWgQTefQaPsoO", - "id": "fc_032219604220a203006a15aea318e88190955bf42b2faa9a2f", + "call_id": "call_6AyvDHOLknhbzexti9u7lueP", + "id": "fc_08f347681c1ceae9006a44fb2c699881a29d6e7b789e4ba595", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1102,11 +1138,30 @@ "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": { @@ -1142,13 +1197,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7b0e2d28afe9-VIE", + "cf-ray": "a145197038e227b8-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:30:59 GMT", + "date": "Wed, 01 Jul 2026 11:34:04 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "2549", + "openai-processing-ms": "1088", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1159,10 +1214,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": "req_63c0959ed95548f59f67678103162f27" + "x-request-id": "93811fbf-ce31-4236-97cc-71ba60949071" }, "status": 200, "statusText": "OK" @@ -1170,9 +1225,9 @@ }, { "callIndex": 4, - "id": "417e64addcf59da7", + "id": "789d4bccdffe53e0", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:31:00.784Z", + "recordedAt": "2026-07-01T11:34:05.818Z", "request": { "body": { "kind": "json", @@ -1192,11 +1247,11 @@ "role": "user" }, { - "id": "fc_032219604220a203006a15aea318e88190955bf42b2faa9a2f", + "id": "fc_08f347681c1ceae9006a44fb2c699881a29d6e7b789e4ba595", "type": "item_reference" }, { - "call_id": "call_fmxlwyKl1DCQWgQTefQaPsoO", + "call_id": "call_6AyvDHOLknhbzexti9u7lueP", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1239,11 +1294,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805860, - "created_at": 1779805859, + "completed_at": 1782905645, + "created_at": 1782905644, "error": null, "frequency_penalty": 0, - "id": "resp_032219604220a203006a15aea3dfc481908344eeeddbd56fe9", + "id": "resp_08f347681c1ceae9006a44fb2cea5881a28b48d6fa2e3799c2", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1255,8 +1310,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_o1jrrHfuNpF6nbgARDWIXYJD", - "id": "fc_032219604220a203006a15aea47590819086861a31b1e0f715", + "call_id": "call_uFMzYctL2zflMSrs9hRRzA0X", + "id": "fc_08f347681c1ceae9006a44fb2d89c481a2bda46ccdf62ac7f1", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1284,11 +1339,30 @@ "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": { @@ -1324,13 +1398,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7b1f8ee4afe9-VIE", + "cf-ray": "a14519782d2c27b8-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:00 GMT", + "date": "Wed, 01 Jul 2026 11:34:05 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "967", + "openai-processing-ms": "920", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1344,7 +1418,7 @@ "x-ratelimit-remaining-tokens": "149999650", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_43de7431f00640afb5b40fe3ca6a53ec" + "x-request-id": "ca0527cd-bc15-48d7-8cbf-ec728d010155" }, "status": 200, "statusText": "OK" @@ -1352,9 +1426,9 @@ }, { "callIndex": 5, - "id": "341675a0a1a88c63", + "id": "7707e02179cbf6fb", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:31:06.479Z", + "recordedAt": "2026-07-01T11:34:06.906Z", "request": { "body": { "kind": "json", @@ -1374,20 +1448,20 @@ "role": "user" }, { - "id": "fc_032219604220a203006a15aea318e88190955bf42b2faa9a2f", + "id": "fc_08f347681c1ceae9006a44fb2c699881a29d6e7b789e4ba595", "type": "item_reference" }, { - "call_id": "call_fmxlwyKl1DCQWgQTefQaPsoO", + "call_id": "call_6AyvDHOLknhbzexti9u7lueP", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_032219604220a203006a15aea47590819086861a31b1e0f715", + "id": "fc_08f347681c1ceae9006a44fb2d89c481a2bda46ccdf62ac7f1", "type": "item_reference" }, { - "call_id": "call_o1jrrHfuNpF6nbgARDWIXYJD", + "call_id": "call_uFMzYctL2zflMSrs9hRRzA0X", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1430,11 +1504,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805866, - "created_at": 1779805861, + "completed_at": 1782905646, + "created_at": 1782905646, "error": null, "frequency_penalty": 0, - "id": "resp_032219604220a203006a15aea506908190b94d95c14a37a0e0", + "id": "resp_08f347681c1ceae9006a44fb2e037081a2ad0fba288f671177", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1446,8 +1520,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_P2OHCNR4FJbAC5mHgygO30AY", - "id": "fc_032219604220a203006a15aeaa098c8190aa38dc30dd4f5d7a", + "call_id": "call_ekHROuJIGMbrhUMZHLjt3oo6", + "id": "fc_08f347681c1ceae9006a44fb2eac8c81a28c5b7b37b6719daf", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1475,11 +1549,30 @@ "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": { @@ -1515,13 +1608,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7b26c98cafe9-VIE", + "cf-ray": "a145197f0ec727b8-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:06 GMT", + "date": "Wed, 01 Jul 2026 11:34:06 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "5492", + "openai-processing-ms": "927", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1535,7 +1628,7 @@ "x-ratelimit-remaining-tokens": "149999612", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_03a8f47b8cae41a4a29c63816b36fc79" + "x-request-id": "1eb3e1db-609a-4f0b-af20-acfdcc5fb392" }, "status": 200, "statusText": "OK" @@ -1543,9 +1636,9 @@ }, { "callIndex": 6, - "id": "cbb9070d68f84d1b", + "id": "813a7ae19d9589e8", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:31:09.130Z", + "recordedAt": "2026-07-01T11:34:08.284Z", "request": { "body": { "kind": "json", @@ -1565,29 +1658,29 @@ "role": "user" }, { - "id": "fc_032219604220a203006a15aea318e88190955bf42b2faa9a2f", + "id": "fc_08f347681c1ceae9006a44fb2c699881a29d6e7b789e4ba595", "type": "item_reference" }, { - "call_id": "call_fmxlwyKl1DCQWgQTefQaPsoO", + "call_id": "call_6AyvDHOLknhbzexti9u7lueP", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_032219604220a203006a15aea47590819086861a31b1e0f715", + "id": "fc_08f347681c1ceae9006a44fb2d89c481a2bda46ccdf62ac7f1", "type": "item_reference" }, { - "call_id": "call_o1jrrHfuNpF6nbgARDWIXYJD", + "call_id": "call_uFMzYctL2zflMSrs9hRRzA0X", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_032219604220a203006a15aeaa098c8190aa38dc30dd4f5d7a", + "id": "fc_08f347681c1ceae9006a44fb2eac8c81a28c5b7b37b6719daf", "type": "item_reference" }, { - "call_id": "call_P2OHCNR4FJbAC5mHgygO30AY", + "call_id": "call_ekHROuJIGMbrhUMZHLjt3oo6", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1630,11 +1723,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805868, - "created_at": 1779805866, + "completed_at": 1782905648, + "created_at": 1782905647, "error": null, "frequency_penalty": 0, - "id": "resp_032219604220a203006a15aeaab7bc8190b46b29c870cecb4d", + "id": "resp_08f347681c1ceae9006a44fb2f320c81a2b6f1dab43a8c88d5", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1646,8 +1739,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_9gyR7ruyP1D2sC6zum8pwIVs", - "id": "fc_032219604220a203006a15aeac09508190b71508c7f9376dc0", + "call_id": "call_QuF6cx4bdqqovAwFkznLSgHC", + "id": "fc_08f347681c1ceae9006a44fb2ff78481a2b2c2943820ad8177", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1675,11 +1768,30 @@ "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": { @@ -1715,13 +1827,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7b4a6e86afe9-VIE", + "cf-ray": "a1451985efb127b8-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:09 GMT", + "date": "Wed, 01 Jul 2026 11:34:08 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "2474", + "openai-processing-ms": "1184", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1735,7 +1847,7 @@ "x-ratelimit-remaining-tokens": "149999572", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_aea55e6427f14a4c8fe0b3fd95b867ab" + "x-request-id": "5136c5e3-9582-4879-8a94-69a54af29863" }, "status": 200, "statusText": "OK" @@ -1743,9 +1855,9 @@ }, { "callIndex": 7, - "id": "bccc54d212e2503d", + "id": "702cf53e6dc272a1", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:31:12.754Z", + "recordedAt": "2026-07-01T11:34:09.199Z", "request": { "body": { "kind": "json", @@ -1779,11 +1891,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805872, - "created_at": 1779805869, + "completed_at": 1782905649, + "created_at": 1782905648, "error": null, "frequency_penalty": 0, - "id": "resp_0b5013c021eba882006a15aead644481a2bc16f65cb30a34b8", + "id": "resp_0dcedb94a80a3278006a44fb307d8c8191952377da9a1c1014", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -1802,7 +1914,7 @@ "type": "output_text" } ], - "id": "msg_0b5013c021eba882006a15aeb08e0081a2b67e4bb4635d2126", + "id": "msg_0dcedb94a80a3278006a44fb30ff8c8191bf60ff1694bd2c18", "role": "assistant", "status": "completed", "type": "message" @@ -1830,6 +1942,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, @@ -1852,13 +1982,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7b5b0ec0afe9-VIE", + "cf-ray": "a145198e8e6d27b8-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:12 GMT", + "date": "Wed, 01 Jul 2026 11:34:09 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "3425", + "openai-processing-ms": "658", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1872,7 +2002,7 @@ "x-ratelimit-remaining-tokens": "149996365", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "1ms", - "x-request-id": "req_10af14d7516343e790e3730ea566bc28" + "x-request-id": "7f74ecb4-991d-4fa6-9e59-cae5e3847bf4" }, "status": 200, "statusText": "OK" @@ -1880,9 +2010,9 @@ }, { "callIndex": 8, - "id": "8eec740c1be01c5c", + "id": "ddd31b453d0b2378", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:31:21.460Z", + "recordedAt": "2026-07-01T11:34:15.418Z", "request": { "body": { "kind": "json", @@ -1916,11 +2046,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805881, - "created_at": 1779805878, + "completed_at": 1782905655, + "created_at": 1782905654, "error": null, "frequency_penalty": 0, - "id": "resp_01d1c487348e0edf006a15aeb66de4819ea360d94e21b0deba", + "id": "resp_0ea2e6177810cd2f006a44fb36967881a0ab6adb81715b7b14", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -1939,7 +2069,7 @@ "type": "output_text" } ], - "id": "msg_01d1c487348e0edf006a15aeb94930819e976dff0b181da6ff", + "id": "msg_0ea2e6177810cd2f006a44fb37388481a0ab68d8b11f6c730a", "role": "assistant", "status": "completed", "type": "message" @@ -1967,6 +2097,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, @@ -1989,13 +2137,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7b935a8dc270-VIE", + "cf-ray": "a14519b47f2c5b4f-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:21 GMT", + "date": "Wed, 01 Jul 2026 11:34:15 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "3078", + "openai-processing-ms": "850", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2009,7 +2157,7 @@ "x-ratelimit-remaining-tokens": "149996365", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "1ms", - "x-request-id": "req_11dd3f2bd6444fb5ba11e2659e83dfe0" + "x-request-id": "3b439d31-5136-4411-87be-d5a1201692f7" }, "status": 200, "statusText": "OK" @@ -2017,9 +2165,9 @@ }, { "callIndex": 9, - "id": "6945bf18d345ad4a", + "id": "6d15acba002e709c", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:31:31.795Z", + "recordedAt": "2026-07-01T11:34:23.297Z", "request": { "body": { "kind": "json", @@ -2053,11 +2201,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805891, - "created_at": 1779805886, + "completed_at": 1782905662, + "created_at": 1782905661, "error": null, "frequency_penalty": 0, - "id": "resp_0ba324a3a7c994c9006a15aebed6848191b0e3399ca9af8737", + "id": "resp_0bdbb6b19915358e006a44fb3d676081a2b159864e8041ce84", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -2076,7 +2224,7 @@ "type": "output_text" } ], - "id": "msg_0ba324a3a7c994c9006a15aec39d6c819191d77a8552a89379", + "id": "msg_0bdbb6b19915358e006a44fb3e741081a2b1720c7c060f7036", "role": "assistant", "status": "completed", "type": "message" @@ -2104,6 +2252,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, @@ -2126,13 +2292,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7bc7d869c31a-VIE", + "cf-ray": "a14519db386ad8dc-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:31 GMT", + "date": "Wed, 01 Jul 2026 11:34:23 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "5006", + "openai-processing-ms": "2482", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2143,10 +2309,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149996362", + "x-ratelimit-remaining-tokens": "149996365", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "1ms", - "x-request-id": "req_920ee52af3ff46a5a831c38f7ef2c3c0" + "x-request-id": "6bf6c4c1-e284-4a96-8a72-89662b7e47d8" }, "status": 200, "statusText": "OK" @@ -2154,9 +2320,9 @@ }, { "callIndex": 0, - "id": "fcd9d51c145fb90b", + "id": "04d8f7db5dc7b0b8", "matchKey": "POST api.anthropic.com/v1/messages", - "recordedAt": "2026-05-26T14:31:33.391Z", + "recordedAt": "2026-07-01T11:34:24.256Z", "request": { "body": { "kind": "json", @@ -2194,7 +2360,7 @@ "type": "text" } ], - "id": "msg_01TgQZs3Wm7jWYSQUa4cwke5", + "id": "msg_01MPF5AjF2FoupHL4n11kNkp", "model": "claude-haiku-4-5-20251001", "role": "assistant", "stop_details": null, @@ -2217,33 +2383,31 @@ }, "headers": { "anthropic-organization-id": "27796668-7351-40ac-acc4-024aee8995a5", - "anthropic-ratelimit-input-tokens-limit": "4000000", - "anthropic-ratelimit-input-tokens-remaining": "4000000", - "anthropic-ratelimit-input-tokens-reset": "2026-05-26T14:31:33Z", - "anthropic-ratelimit-output-tokens-limit": "800000", - "anthropic-ratelimit-output-tokens-remaining": "800000", - "anthropic-ratelimit-output-tokens-reset": "2026-05-26T14:31:33Z", + "anthropic-ratelimit-input-tokens-limit": "10000000", + "anthropic-ratelimit-input-tokens-remaining": "10000000", + "anthropic-ratelimit-input-tokens-reset": "2026-07-01T11:34:24Z", + "anthropic-ratelimit-output-tokens-limit": "2000000", + "anthropic-ratelimit-output-tokens-remaining": "2000000", + "anthropic-ratelimit-output-tokens-reset": "2026-07-01T11:34:24Z", "anthropic-ratelimit-requests-limit": "20000", "anthropic-ratelimit-requests-remaining": "19999", - "anthropic-ratelimit-requests-reset": "2026-05-26T14:31:32Z", - "anthropic-ratelimit-tokens-limit": "4800000", - "anthropic-ratelimit-tokens-remaining": "4800000", - "anthropic-ratelimit-tokens-reset": "2026-05-26T14:31:33Z", + "anthropic-ratelimit-requests-reset": "2026-07-01T11:34:23Z", + "anthropic-ratelimit-tokens-limit": "12000000", + "anthropic-ratelimit-tokens-remaining": "12000000", + "anthropic-ratelimit-tokens-reset": "2026-07-01T11:34:24Z", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7be94d18b825-VIE", + "cf-ray": "a14519ed3e5d5b57-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-security-policy": "default-src 'none'; frame-ancestors 'none'", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:33 GMT", - "request-id": "req_011CbRLobgtz2qSjgh3q1jYa", + "date": "Wed, 01 Jul 2026 11:34:24 GMT", + "request-id": "req_011CcbGR6Bo95ApxBqZ11Ysi", "server": "cloudflare", - "set-cookie": "[REDACTED]", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "traceresponse": "00-040398a5e540cd2079b84dd5597a5673-960a7723d83fdf5b-01", + "traceresponse": "00-4ded240bd67c784d758973d9fe052352-26e7f7d83ff88e42-01", "transfer-encoding": "chunked", "vary": "Accept-Encoding", - "x-envoy-upstream-service-time": "1278", "x-robots-tag": "none" }, "status": 200, @@ -2252,9 +2416,9 @@ }, { "callIndex": 1, - "id": "ff22a182ea5a9c06", + "id": "f51018468a0f5811", "matchKey": "POST api.anthropic.com/v1/messages", - "recordedAt": "2026-05-26T14:31:40.048Z", + "recordedAt": "2026-07-01T11:34:30.258Z", "request": { "body": { "kind": "json", @@ -2292,7 +2456,7 @@ "type": "text" } ], - "id": "msg_01MK1zU2MsFSTWBeiab18KB6", + "id": "msg_01WDLfdyRoSqr5DrKU4PRmTt", "model": "claude-haiku-4-5-20251001", "role": "assistant", "stop_details": null, @@ -2315,33 +2479,31 @@ }, "headers": { "anthropic-organization-id": "27796668-7351-40ac-acc4-024aee8995a5", - "anthropic-ratelimit-input-tokens-limit": "4000000", - "anthropic-ratelimit-input-tokens-remaining": "4000000", - "anthropic-ratelimit-input-tokens-reset": "2026-05-26T14:31:39Z", - "anthropic-ratelimit-output-tokens-limit": "800000", - "anthropic-ratelimit-output-tokens-remaining": "800000", - "anthropic-ratelimit-output-tokens-reset": "2026-05-26T14:31:40Z", + "anthropic-ratelimit-input-tokens-limit": "10000000", + "anthropic-ratelimit-input-tokens-remaining": "10000000", + "anthropic-ratelimit-input-tokens-reset": "2026-07-01T11:34:30Z", + "anthropic-ratelimit-output-tokens-limit": "2000000", + "anthropic-ratelimit-output-tokens-remaining": "2000000", + "anthropic-ratelimit-output-tokens-reset": "2026-07-01T11:34:30Z", "anthropic-ratelimit-requests-limit": "20000", "anthropic-ratelimit-requests-remaining": "19999", - "anthropic-ratelimit-requests-reset": "2026-05-26T14:31:38Z", - "anthropic-ratelimit-tokens-limit": "4800000", - "anthropic-ratelimit-tokens-remaining": "4800000", - "anthropic-ratelimit-tokens-reset": "2026-05-26T14:31:39Z", + "anthropic-ratelimit-requests-reset": "2026-07-01T11:34:29Z", + "anthropic-ratelimit-tokens-limit": "12000000", + "anthropic-ratelimit-tokens-remaining": "12000000", + "anthropic-ratelimit-tokens-reset": "2026-07-01T11:34:30Z", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7c128df59c23-VIE", + "cf-ray": "a1451a127c0fc2a7-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-security-policy": "default-src 'none'; frame-ancestors 'none'", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:40 GMT", - "request-id": "req_011CbRLp5ppM2PV31rDi84Td", + "date": "Wed, 01 Jul 2026 11:34:30 GMT", + "request-id": "req_011CcbGRXiTYHPS1oYefdUEk", "server": "cloudflare", - "set-cookie": "[REDACTED]", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "traceresponse": "00-5dd14bc06f108de799b1f7bf22a4b52f-b745fcdcd1f37029-01", + "traceresponse": "00-42f6fc605b6a2d20d40d5584fb6128b1-407e7b1b73143375-01", "transfer-encoding": "chunked", "vary": "Accept-Encoding", - "x-envoy-upstream-service-time": "1337", "x-robots-tag": "none" }, "status": 200, @@ -2350,9 +2512,9 @@ }, { "callIndex": 2, - "id": "f1d50a1e6c760d6c", + "id": "c440f9309e7fff40", "matchKey": "POST api.anthropic.com/v1/messages", - "recordedAt": "2026-05-26T14:31:46.089Z", + "recordedAt": "2026-07-01T11:34:36.230Z", "request": { "body": { "kind": "json", @@ -2390,7 +2552,7 @@ "type": "text" } ], - "id": "msg_01RMfRwigBvxv8nKZy3CAZKR", + "id": "msg_01S76t6GEz6k1QKQRVRAEsLC", "model": "claude-haiku-4-5-20251001", "role": "assistant", "stop_details": null, @@ -2413,33 +2575,31 @@ }, "headers": { "anthropic-organization-id": "27796668-7351-40ac-acc4-024aee8995a5", - "anthropic-ratelimit-input-tokens-limit": "4000000", - "anthropic-ratelimit-input-tokens-remaining": "4000000", - "anthropic-ratelimit-input-tokens-reset": "2026-05-26T14:31:46Z", - "anthropic-ratelimit-output-tokens-limit": "800000", - "anthropic-ratelimit-output-tokens-remaining": "800000", - "anthropic-ratelimit-output-tokens-reset": "2026-05-26T14:31:46Z", + "anthropic-ratelimit-input-tokens-limit": "10000000", + "anthropic-ratelimit-input-tokens-remaining": "10000000", + "anthropic-ratelimit-input-tokens-reset": "2026-07-01T11:34:36Z", + "anthropic-ratelimit-output-tokens-limit": "2000000", + "anthropic-ratelimit-output-tokens-remaining": "2000000", + "anthropic-ratelimit-output-tokens-reset": "2026-07-01T11:34:36Z", "anthropic-ratelimit-requests-limit": "20000", "anthropic-ratelimit-requests-remaining": "19999", - "anthropic-ratelimit-requests-reset": "2026-05-26T14:31:45Z", - "anthropic-ratelimit-tokens-limit": "4800000", - "anthropic-ratelimit-tokens-remaining": "4800000", - "anthropic-ratelimit-tokens-reset": "2026-05-26T14:31:46Z", + "anthropic-ratelimit-requests-reset": "2026-07-01T11:34:35Z", + "anthropic-ratelimit-tokens-limit": "12000000", + "anthropic-ratelimit-tokens-remaining": "12000000", + "anthropic-ratelimit-tokens-reset": "2026-07-01T11:34:36Z", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7c3c9f705abf-VIE", + "cf-ray": "a1451a37fb229322-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-security-policy": "default-src 'none'; frame-ancestors 'none'", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:46 GMT", - "request-id": "req_011CbRLpacvq6pgeCRUGEeBV", + "date": "Wed, 01 Jul 2026 11:34:36 GMT", + "request-id": "req_011CcbGRyJaygT1rFg6CuoTk", "server": "cloudflare", - "set-cookie": "[REDACTED]", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "traceresponse": "00-bc361ada83fc77876ad8868084c0e55d-b22b13ff69cc6b42-01", + "traceresponse": "00-c9bf25fc21743a5b33f2bf4c0e1c340d-9827bb32224b2e02-01", "transfer-encoding": "chunked", "vary": "Accept-Encoding", - "x-envoy-upstream-service-time": "628", "x-robots-tag": "none" }, "status": 200, @@ -2448,9 +2608,9 @@ }, { "callIndex": 10, - "id": "ab34eb26595033a1", + "id": "543af14bb29bb653", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:31:47.079Z", + "recordedAt": "2026-07-01T11:34:37.315Z", "request": { "body": { "kind": "json", @@ -2483,11 +2643,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805906, - "created_at": 1779805906, + "completed_at": 1782905677, + "created_at": 1782905676, "error": null, "frequency_penalty": 0, - "id": "resp_02752146964da61d006a15aed26534819488115251d37d4787", + "id": "resp_09e4b98965974448006a44fb4c987081a28248de7f6f6301eb", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -2506,7 +2666,7 @@ "type": "output_text" } ], - "id": "msg_02752146964da61d006a15aed2d6888194bbdd9261992d8b08", + "id": "msg_09e4b98965974448006a44fb4d140481a29cc11b0affae67cb", "role": "assistant", "status": "completed", "type": "message" @@ -2534,6 +2694,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, @@ -2556,13 +2734,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7c4249c15ac3-VIE", + "cf-ray": "a1451a3df8003a0d-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:47 GMT", + "date": "Wed, 01 Jul 2026 11:34:37 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "699", + "openai-processing-ms": "768", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2573,10 +2751,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999965", + "x-ratelimit-remaining-tokens": "149999962", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_1c87f2151ca14134bc2bc1055adaa099" + "x-request-id": "99ae9432-39e2-4de8-848c-b6921e64acd8" }, "status": 200, "statusText": "OK" @@ -2584,9 +2762,9 @@ }, { "callIndex": 11, - "id": "250e64f864c72337", + "id": "7dd6d4e7df85bf24", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:31:49.948Z", + "recordedAt": "2026-07-01T11:34:38.088Z", "request": { "body": { "kind": "json", @@ -2637,11 +2815,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805907, - "created_at": 1779805907, + "completed_at": 1782905677, + "created_at": 1782905677, "error": null, "frequency_penalty": 0, - "id": "resp_0c397ea2d144b352006a15aed34f4881928af16a2b5d4148fd", + "id": "resp_02601d30a9673047006a44fb4d88dc81919e2396ef466f190a", "incomplete_details": null, "instructions": null, "max_output_tokens": 32, @@ -2660,7 +2838,7 @@ "type": "output_text" } ], - "id": "msg_0c397ea2d144b352006a15aed3d938819295771ea0c08a62e6", + "id": "msg_02601d30a9673047006a44fb4ddc84819180d68c81533d1246", "role": "assistant", "status": "completed", "type": "message" @@ -2701,6 +2879,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, @@ -2723,13 +2919,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7c48185e5ac3-VIE", + "cf-ray": "a1451a43fe423a0d-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:50 GMT", + "date": "Wed, 01 Jul 2026 11:34:38 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "2710", + "openai-processing-ms": "599", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2743,7 +2939,7 @@ "x-ratelimit-remaining-tokens": "149999942", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_9ff345fe978b4834b3a274be13367b02" + "x-request-id": "fe27c661-9161-4afc-88fc-8c3f739b9fa5" }, "status": 200, "statusText": "OK" @@ -2751,9 +2947,9 @@ }, { "callIndex": 12, - "id": "fecb7c9f8d04e1bd", + "id": "ab264fb8dfbb6978", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:31:51.137Z", + "recordedAt": "2026-07-01T11:34:40.935Z", "request": { "body": { "kind": "json", @@ -2800,19 +2996,19 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0ed08bec25143519006a15aed632f4819e8eeffe49128777a4\",\"object\":\"response\",\"created_at\":1779805910,\"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\":false},\"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_0ed08bec25143519006a15aed632f4819e8eeffe49128777a4\",\"object\":\"response\",\"created_at\":1779805910,\"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\":false},\"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_0ed08bec25143519006a15aed6ec04819eb5013bd3a69200cb\",\"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_0ed08bec25143519006a15aed6ec04819eb5013bd3a69200cb\",\"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_0ed08bec25143519006a15aed6ec04819eb5013bd3a69200cb\",\"logprobs\":[],\"obfuscation\":\"ujcGm2WS2hZquT\",\"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_0ed08bec25143519006a15aed6ec04819eb5013bd3a69200cb\",\"logprobs\":[],\"obfuscation\":\"Y4LA2dJWNNQN\",\"output_index\":0,\"sequence_number\":5}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\":\\\"\",\"item_id\":\"msg_0ed08bec25143519006a15aed6ec04819eb5013bd3a69200cb\",\"logprobs\":[],\"obfuscation\":\"DQikJxCEdOcuP\",\"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_0ed08bec25143519006a15aed6ec04819eb5013bd3a69200cb\",\"logprobs\":[],\"obfuscation\":\"T1sMZInNYC3\",\"output_index\":0,\"sequence_number\":7}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\"}\",\"item_id\":\"msg_0ed08bec25143519006a15aed6ec04819eb5013bd3a69200cb\",\"logprobs\":[],\"obfuscation\":\"dHiMkiV98XMcGr\",\"output_index\":0,\"sequence_number\":8}", - "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0ed08bec25143519006a15aed6ec04819eb5013bd3a69200cb\",\"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_0ed08bec25143519006a15aed6ec04819eb5013bd3a69200cb\",\"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_0ed08bec25143519006a15aed6ec04819eb5013bd3a69200cb\",\"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_0ed08bec25143519006a15aed632f4819e8eeffe49128777a4\",\"object\":\"response\",\"created_at\":1779805910,\"status\":\"completed\",\"background\":false,\"completed_at\":1779805911,\"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_0ed08bec25143519006a15aed6ec04819eb5013bd3a69200cb\",\"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\":false},\"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_098b899d08597050006a44fb4e4be4819f8661306b53a56cc9\",\"object\":\"response\",\"created_at\":1782905678,\"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\":false},\"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_098b899d08597050006a44fb4e4be4819f8661306b53a56cc9\",\"object\":\"response\",\"created_at\":1782905678,\"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\":false},\"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_098b899d08597050006a44fb50b8d0819f9546feea0df7ba18\",\"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_098b899d08597050006a44fb50b8d0819f9546feea0df7ba18\",\"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_098b899d08597050006a44fb50b8d0819f9546feea0df7ba18\",\"logprobs\":[],\"obfuscation\":\"3YvDPjDX8hTOwQ\",\"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_098b899d08597050006a44fb50b8d0819f9546feea0df7ba18\",\"logprobs\":[],\"obfuscation\":\"TSATxZsDr2yV\",\"output_index\":0,\"sequence_number\":5}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\":\\\"\",\"item_id\":\"msg_098b899d08597050006a44fb50b8d0819f9546feea0df7ba18\",\"logprobs\":[],\"obfuscation\":\"l9nprsI8TkxDW\",\"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_098b899d08597050006a44fb50b8d0819f9546feea0df7ba18\",\"logprobs\":[],\"obfuscation\":\"6ZesWEyjcnL\",\"output_index\":0,\"sequence_number\":7}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\"}\",\"item_id\":\"msg_098b899d08597050006a44fb50b8d0819f9546feea0df7ba18\",\"logprobs\":[],\"obfuscation\":\"m3tpU8X3DzgbiF\",\"output_index\":0,\"sequence_number\":8}", + "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_098b899d08597050006a44fb50b8d0819f9546feea0df7ba18\",\"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_098b899d08597050006a44fb50b8d0819f9546feea0df7ba18\",\"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_098b899d08597050006a44fb50b8d0819f9546feea0df7ba18\",\"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_098b899d08597050006a44fb4e4be4819f8661306b53a56cc9\",\"object\":\"response\",\"created_at\":1782905678,\"status\":\"completed\",\"background\":false,\"completed_at\":1782905680,\"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_098b899d08597050006a44fb50b8d0819f9546feea0df7ba18\",\"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\":false},\"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" }, @@ -2820,12 +3016,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7c5a1a6c5ac3-VIE", + "cf-ray": "a1451a48ca203a0d-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 26 May 2026 14:31:50 GMT", + "date": "Wed, 01 Jul 2026 11:34:38 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "193", + "openai-processing-ms": "123", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2833,7 +3029,7 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "req_bbca434904f148d891384795c1a33a10" + "x-request-id": "4efb0892-4e0d-43da-ac15-9fae343fd2cf" }, "status": 200, "statusText": "OK" @@ -2841,9 +3037,9 @@ }, { "callIndex": 13, - "id": "eebc152ba05b8412", + "id": "56e93cb33088bf20", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:31:52.167Z", + "recordedAt": "2026-07-01T11:34:42.242Z", "request": { "body": { "kind": "json", @@ -2879,11 +3075,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805911, - "created_at": 1779805911, + "completed_at": 1782905682, + "created_at": 1782905681, "error": null, "frequency_penalty": 0, - "id": "resp_0b529fcd653c3731006a15aed763c88190afd3d3681b24862b", + "id": "resp_0b2e6d2c13cd5d7a006a44fb512e58819ebae94e5e8a84f3f5", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -2902,7 +3098,7 @@ "type": "output_text" } ], - "id": "msg_0b529fcd653c3731006a15aed7e86c819095af96470d2d202a", + "id": "msg_0b2e6d2c13cd5d7a006a44fb520e90819e9fe6b7bd517617cf", "role": "assistant", "status": "completed", "type": "message" @@ -2930,6 +3126,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, @@ -2952,13 +3166,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7c6179c55ac3-VIE", + "cf-ray": "a1451a5ada333a0d-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:31:52 GMT", + "date": "Wed, 01 Jul 2026 11:34:42 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "828", + "openai-processing-ms": "1103", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2972,7 +3186,7 @@ "x-ratelimit-remaining-tokens": "149999955", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_3f6b96efd56d4b64a9d3bb8770f70872" + "x-request-id": "062cbdfa-60d5-4684-9884-2bfa1b33e5e8" }, "status": 200, "statusText": "OK" @@ -2980,9 +3194,9 @@ }, { "callIndex": 14, - "id": "bc08e707f2920073", + "id": "0eab30381a4e4f04", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:31:52.979Z", + "recordedAt": "2026-07-01T11:34:45.384Z", "request": { "body": { "kind": "json", @@ -3014,17 +3228,17 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0c68bc1a67424f7e006a15aed86ac4819ea744c0a71addda95\",\"object\":\"response\",\"created_at\":1779805912,\"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\",\"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_0c68bc1a67424f7e006a15aed86ac4819ea744c0a71addda95\",\"object\":\"response\",\"created_at\":1779805912,\"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\",\"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_0c68bc1a67424f7e006a15aed8dc90819eabe02debeadb0208\",\"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_0c68bc1a67424f7e006a15aed8dc90819eabe02debeadb0208\",\"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_0c68bc1a67424f7e006a15aed8dc90819eabe02debeadb0208\",\"logprobs\":[],\"obfuscation\":\"smr46kItxt\",\"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_0c68bc1a67424f7e006a15aed8dc90819eabe02debeadb0208\",\"logprobs\":[],\"obfuscation\":\"P2uegB6GNSVF\",\"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_0c68bc1a67424f7e006a15aed8dc90819eabe02debeadb0208\",\"logprobs\":[],\"obfuscation\":\"3U3aGhkcZwlbIs\",\"output_index\":0,\"sequence_number\":6}", - "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0c68bc1a67424f7e006a15aed8dc90819eabe02debeadb0208\",\"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_0c68bc1a67424f7e006a15aed8dc90819eabe02debeadb0208\",\"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_0c68bc1a67424f7e006a15aed8dc90819eabe02debeadb0208\",\"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_0c68bc1a67424f7e006a15aed86ac4819ea744c0a71addda95\",\"object\":\"response\",\"created_at\":1779805912,\"status\":\"completed\",\"background\":false,\"completed_at\":1779805912,\"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_0c68bc1a67424f7e006a15aed8dc90819eabe02debeadb0208\",\"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\",\"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_0937aea3f7959f79006a44fb52d88481a2aee874ec009974f5\",\"object\":\"response\",\"created_at\":1782905683,\"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_0937aea3f7959f79006a44fb52d88481a2aee874ec009974f5\",\"object\":\"response\",\"created_at\":1782905683,\"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_0937aea3f7959f79006a44fb5432d081a2bb2fb6562e417506\",\"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_0937aea3f7959f79006a44fb5432d081a2bb2fb6562e417506\",\"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_0937aea3f7959f79006a44fb5432d081a2bb2fb6562e417506\",\"logprobs\":[],\"obfuscation\":\"PXWKNFtgVv\",\"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_0937aea3f7959f79006a44fb5432d081a2bb2fb6562e417506\",\"logprobs\":[],\"obfuscation\":\"4AGxlXeEpG6v\",\"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_0937aea3f7959f79006a44fb5432d081a2bb2fb6562e417506\",\"logprobs\":[],\"obfuscation\":\"TtebPgBZOhmCyp\",\"output_index\":0,\"sequence_number\":6}", + "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0937aea3f7959f79006a44fb5432d081a2bb2fb6562e417506\",\"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_0937aea3f7959f79006a44fb5432d081a2bb2fb6562e417506\",\"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_0937aea3f7959f79006a44fb5432d081a2bb2fb6562e417506\",\"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_0937aea3f7959f79006a44fb52d88481a2aee874ec009974f5\",\"object\":\"response\",\"created_at\":1782905683,\"status\":\"completed\",\"background\":false,\"completed_at\":1782905684,\"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_0937aea3f7959f79006a44fb5432d081a2bb2fb6562e417506\",\"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" }, @@ -3032,12 +3246,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7c67f8f55ac3-VIE", + "cf-ray": "a1451a62bb893a0d-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 26 May 2026 14:31:52 GMT", + "date": "Wed, 01 Jul 2026 11:34:43 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "101", + "openai-processing-ms": "1140", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -3045,7 +3259,7 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "req_8e34cc9b074e4b67a9393bc2e3d9b0cc" + "x-request-id": "e8d0113b-2c7d-9157-a0ea-1c19660cf3d5" }, "status": 200, "statusText": "OK" diff --git a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v6.cassette.json b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v6.cassette.json index b8b511504..61b13b544 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v6.cassette.json +++ b/e2e/scenarios/ai-sdk-instrumentation/__cassettes__/ai-sdk-v6.cassette.json @@ -2,9 +2,9 @@ "entries": [ { "callIndex": 0, - "id": "7c0e162d6794cf5d", + "id": "9aa262365558ebc2", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:32:41.628Z", + "recordedAt": "2026-07-01T11:35:36.763Z", "request": { "body": { "kind": "json", @@ -37,11 +37,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805961, - "created_at": 1779805961, + "completed_at": 1782905736, + "created_at": 1782905735, "error": null, "frequency_penalty": 0, - "id": "resp_0ae8f4672b8743a8006a15af0912fc819c8ef6655cbfacc71a", + "id": "resp_074a35c70aa721ba006a44fb87b2c881a191ff75f89d8434eb", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -60,7 +60,7 @@ "type": "output_text" } ], - "id": "msg_0ae8f4672b8743a8006a15af0973d4819c853d6b16f32a005d", + "id": "msg_074a35c70aa721ba006a44fb8850a881a186d7b7bea8b2ca90", "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": "a01d7d981b335ba9-VIE", + "cf-ray": "a1451bae4daac251-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:32:41 GMT", + "date": "Wed, 01 Jul 2026 11:35:36 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "613", + "openai-processing-ms": "1273", "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_8de6734de96f4c7880ee5e20621063fa" + "x-request-id": "90706cb9-f589-4c85-9e5e-c6c6a599a393" }, "status": 200, "statusText": "OK" @@ -138,9 +156,9 @@ }, { "callIndex": 1, - "id": "f12aff3913439248", + "id": "9e077c56377ca81c", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:32:42.676Z", + "recordedAt": "2026-07-01T11:35:37.969Z", "request": { "body": { "kind": "json", @@ -191,11 +209,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805962, - "created_at": 1779805961, + "completed_at": 1782905737, + "created_at": 1782905737, "error": null, "frequency_penalty": 0, - "id": "resp_04713787d801f79c006a15af09ea04819c9d842c64fda47765", + "id": "resp_06cecb4f7d9dda24006a44fb8900d081a184f9e7dc68b10629", "incomplete_details": null, "instructions": null, "max_output_tokens": 32, @@ -214,7 +232,7 @@ "type": "output_text" } ], - "id": "msg_04713787d801f79c006a15af0a71e8819cb861779e3a0d88be", + "id": "msg_06cecb4f7d9dda24006a44fb89a74881a1ad6b891b7c3acd17", "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": "a01d7d9d2a8d5ba9-VIE", + "cf-ray": "a1451bb7ab7fc251-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:32:42 GMT", + "date": "Wed, 01 Jul 2026 11:35:38 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "830", + "openai-processing-ms": "997", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -297,7 +333,7 @@ "x-ratelimit-remaining-tokens": "149999935", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_97a81239bf3a4deab7ce96f7c63de695" + "x-request-id": "ee92c4e7-cc4b-4d57-9005-85868c3300dc" }, "status": 200, "statusText": "OK" @@ -305,9 +341,9 @@ }, { "callIndex": 2, - "id": "5d2312f425df9f2f", + "id": "bdbf85bb8f9015c8", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:32:43.410Z", + "recordedAt": "2026-07-01T11:35:38.863Z", "request": { "body": { "kind": "json", @@ -336,20 +372,20 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_0138b1866972f9de006a15af0ae9b08192862ef9a1b4f09020\",\"object\":\"response\",\"created_at\":1779805962,\"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_0138b1866972f9de006a15af0ae9b08192862ef9a1b4f09020\",\"object\":\"response\",\"created_at\":1779805962,\"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_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"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_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"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_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"logprobs\":[],\"obfuscation\":\"m53TT0ZzdJqnr\",\"output_index\":0,\"sequence_number\":4}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"logprobs\":[],\"obfuscation\":\"pqeuHCnl2QdiSqC\",\"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_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"logprobs\":[],\"obfuscation\":\"ZXZdkpbFKnCv\",\"output_index\":0,\"sequence_number\":6}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"logprobs\":[],\"obfuscation\":\"mgc2Rv567Bvou6s\",\"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_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"logprobs\":[],\"obfuscation\":\"pYSeQB1Bnr\",\"output_index\":0,\"sequence_number\":8}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"logprobs\":[],\"obfuscation\":\"2DXsUW34vTA0wuM\",\"output_index\":0,\"sequence_number\":9}", - "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"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_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"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_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"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_0138b1866972f9de006a15af0ae9b08192862ef9a1b4f09020\",\"object\":\"response\",\"created_at\":1779805962,\"status\":\"completed\",\"background\":false,\"completed_at\":1779805963,\"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_0138b1866972f9de006a15af0b4194819289c48d1e3100b9e0\",\"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_003e10eb463c2876006a44fb8a39ec819dbdd7c06e6d192669\",\"object\":\"response\",\"created_at\":1782905738,\"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_003e10eb463c2876006a44fb8a39ec819dbdd7c06e6d192669\",\"object\":\"response\",\"created_at\":1782905738,\"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_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"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_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"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_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"logprobs\":[],\"obfuscation\":\"X4qEHYOA1Akjw\",\"output_index\":0,\"sequence_number\":4}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"logprobs\":[],\"obfuscation\":\"Wc4f8oIeK5BlilO\",\"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_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"logprobs\":[],\"obfuscation\":\"50dxErQacvCq\",\"output_index\":0,\"sequence_number\":6}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\",\",\"item_id\":\"msg_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"logprobs\":[],\"obfuscation\":\"1X6BY0fV3BwtN63\",\"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_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"logprobs\":[],\"obfuscation\":\"620XGSt0iR\",\"output_index\":0,\"sequence_number\":8}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\".\",\"item_id\":\"msg_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"logprobs\":[],\"obfuscation\":\"oJpOdU0VYYlg31x\",\"output_index\":0,\"sequence_number\":9}", + "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"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_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"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_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"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_003e10eb463c2876006a44fb8a39ec819dbdd7c06e6d192669\",\"object\":\"response\",\"created_at\":1782905738,\"status\":\"completed\",\"background\":false,\"completed_at\":1782905738,\"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_003e10eb463c2876006a44fb8aa240819dbde31abe49078ebf\",\"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": "a01d7da3ab0e5ba9-VIE", + "cf-ray": "a1451bbf488ac251-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 26 May 2026 14:32:43 GMT", + "date": "Wed, 01 Jul 2026 11:35:38 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "141", + "openai-processing-ms": "131", "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_e9b44e44383443709da54f6c4f523dae" + "x-request-id": "d41e58a4-4039-4e9c-94f8-f776fee3c6bd" }, "status": 200, "statusText": "OK" @@ -378,9 +414,9 @@ }, { "callIndex": 0, - "id": "7d3c0bb6426e6be4", + "id": "49a95bf2b3466013", "matchKey": "POST api.openai.com/v1/embeddings", - "recordedAt": "2026-05-26T14:32:43.639Z", + "recordedAt": "2026-07-01T11:35:39.147Z", "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": "a01d7da848af5ba9-VIE", + "cf-ray": "a1451bc4cc41c251-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:32:43 GMT", + "date": "Wed, 01 Jul 2026 11:35:39 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "67", + "openai-processing-ms": "98", "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_2446dbd4550f4088a555ce0c6c952d83" + "x-request-id": "7e779afe-ee9c-4cf1-8b88-4862cff2df51" }, "status": 200, "statusText": "OK" @@ -997,9 +1036,9 @@ }, { "callIndex": 0, - "id": "98922b41de07d721", + "id": "064d11f1077567e7", "matchKey": "POST api.cohere.com/v2/rerank", - "recordedAt": "2026-05-26T14:32:43.956Z", + "recordedAt": "2026-07-01T11:35:39.508Z", "request": { "body": { "kind": "json", @@ -1022,7 +1061,7 @@ "body": { "kind": "json", "value": { - "id": "e23b1959-3ffd-48e8-ba26-43f0bbea12e0", + "id": "167a26bb-932d-4148-97c8-ac403e1effdc", "meta": { "api_version": { "version": "2" @@ -1034,7 +1073,7 @@ "results": [ { "index": 1, - "relevance_score": 0.06664825 + "relevance_score": 0.06657539 }, { "index": 0, @@ -1049,7 +1088,7 @@ "cache-control": "no-cache, no-store, no-transform, must-revalidate, private, max-age=0", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:32:44 GMT", + "date": "Wed, 01 Jul 2026 11:35:39 GMT", "expires": "Thu, 01 Jan 1970 00:00:00 GMT", "pragma": "no-cache", "server": "envoy", @@ -1057,8 +1096,8 @@ "vary": "Origin,Accept-Encoding", "via": "1.1 google", "x-accel-expires": "0", - "x-debug-trace-id": "ad481c6b7d9052e5bb7dea258faacfd9", - "x-envoy-upstream-service-time": "51" + "x-debug-trace-id": "6fc058575dfc01ef2de7ec2f13b69ad9", + "x-envoy-upstream-service-time": "45" }, "status": 200, "statusText": "OK" @@ -1066,9 +1105,9 @@ }, { "callIndex": 3, - "id": "83cbbf6da482c905", + "id": "e09f32cc805b35e9", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:32:45.498Z", + "recordedAt": "2026-07-01T11:35:40.377Z", "request": { "body": { "kind": "json", @@ -1125,11 +1164,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805965, - "created_at": 1779805964, + "completed_at": 1782905740, + "created_at": 1782905739, "error": null, "frequency_penalty": 0, - "id": "resp_08598442cc0f79bb006a15af0c36948195b074e5e5df94043b", + "id": "resp_0478186e28027e3d006a44fb8bb84481a2bc912429b02c8872", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1141,8 +1180,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_p987IdsfRoC6YqtClJBQYGiM", - "id": "fc_08598442cc0f79bb006a15af0cec84819592dee93deda7d4a1", + "call_id": "call_buIBx5J91u1G66u2fIMOfuJR", + "id": "fc_0478186e28027e3d006a44fb8c348481a29814922e37a90173", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1170,11 +1209,30 @@ "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": { @@ -1210,13 +1268,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7dab9cb45ba9-VIE", + "cf-ray": "a1451bc8aeb1c251-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:32:45 GMT", + "date": "Wed, 01 Jul 2026 11:35:40 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1191", + "openai-processing-ms": "684", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1230,7 +1288,7 @@ "x-ratelimit-remaining-tokens": "149999690", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_b9816c4c5d7247a191d6066f926b96f9" + "x-request-id": "ab6e1034-4df6-4b75-9c2c-271d2719a0d9" }, "status": 200, "statusText": "OK" @@ -1238,9 +1296,9 @@ }, { "callIndex": 4, - "id": "417e64addcf59da7", + "id": "09a78d5fab7dfdf7", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:32:46.508Z", + "recordedAt": "2026-07-01T11:35:41.296Z", "request": { "body": { "kind": "json", @@ -1260,11 +1318,11 @@ "role": "user" }, { - "id": "fc_08598442cc0f79bb006a15af0cec84819592dee93deda7d4a1", + "id": "fc_0478186e28027e3d006a44fb8c348481a29814922e37a90173", "type": "item_reference" }, { - "call_id": "call_p987IdsfRoC6YqtClJBQYGiM", + "call_id": "call_buIBx5J91u1G66u2fIMOfuJR", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1306,11 +1364,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805966, - "created_at": 1779805965, + "completed_at": 1782905741, + "created_at": 1782905740, "error": null, "frequency_penalty": 0, - "id": "resp_08598442cc0f79bb006a15af0dc68081959ec160b70093836e", + "id": "resp_0478186e28027e3d006a44fb8c962081a2972d9acda103b3ec", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1322,8 +1380,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_rXxdJ6ZZKPJTK60S8uRMETMr", - "id": "fc_08598442cc0f79bb006a15af0e37b881959d4caf77afd037b8", + "call_id": "call_vU6gSptn2xCodyhaz6vC2Kzm", + "id": "fc_0478186e28027e3d006a44fb8d14d081a2996717f82dd9f672", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1351,11 +1409,30 @@ "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": { @@ -1391,13 +1468,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7db54fd75ba9-VIE", + "cf-ray": "a1451bce0a43c251-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:32:46 GMT", + "date": "Wed, 01 Jul 2026 11:35:41 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "787", + "openai-processing-ms": "750", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1408,10 +1485,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149999650", + "x-ratelimit-remaining-tokens": "149999647", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_572d45f7969c4a6586e434fe15c784d5" + "x-request-id": "30fe7494-5a99-4f88-ab49-3fe973423aa8" }, "status": 200, "statusText": "OK" @@ -1419,9 +1496,9 @@ }, { "callIndex": 5, - "id": "341675a0a1a88c63", + "id": "de9e05a3d9094a01", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:32:47.664Z", + "recordedAt": "2026-07-01T11:35:42.144Z", "request": { "body": { "kind": "json", @@ -1441,20 +1518,20 @@ "role": "user" }, { - "id": "fc_08598442cc0f79bb006a15af0cec84819592dee93deda7d4a1", + "id": "fc_0478186e28027e3d006a44fb8c348481a29814922e37a90173", "type": "item_reference" }, { - "call_id": "call_p987IdsfRoC6YqtClJBQYGiM", + "call_id": "call_buIBx5J91u1G66u2fIMOfuJR", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_08598442cc0f79bb006a15af0e37b881959d4caf77afd037b8", + "id": "fc_0478186e28027e3d006a44fb8d14d081a2996717f82dd9f672", "type": "item_reference" }, { - "call_id": "call_rXxdJ6ZZKPJTK60S8uRMETMr", + "call_id": "call_vU6gSptn2xCodyhaz6vC2Kzm", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1496,11 +1573,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805967, - "created_at": 1779805966, + "completed_at": 1782905741, + "created_at": 1782905741, "error": null, "frequency_penalty": 0, - "id": "resp_08598442cc0f79bb006a15af0ec2b08195838a44ad27bd0616", + "id": "resp_0478186e28027e3d006a44fb8d7fc081a2ba35f8c551becf4d", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1512,8 +1589,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_eQv7beCDlkPo9IZ7RqLIBZnA", - "id": "fc_08598442cc0f79bb006a15af0f482c8195b16afe400b665873", + "call_id": "call_FoyDE1UI4ZZfMWMpm0chSiaY", + "id": "fc_0478186e28027e3d006a44fb8def0481a2aa91597fd394782b", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1541,11 +1618,30 @@ "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": { @@ -1581,13 +1677,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7dbb9ef55ba9-VIE", + "cf-ray": "a1451bd3ce31c251-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:32:47 GMT", + "date": "Wed, 01 Jul 2026 11:35:42 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "950", + "openai-processing-ms": "684", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1601,7 +1697,7 @@ "x-ratelimit-remaining-tokens": "149999610", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_a3bafe595fae474ea397ac4314c9b58d" + "x-request-id": "9cbde7cb-f4a1-42aa-8500-67b95bac99b8" }, "status": 200, "statusText": "OK" @@ -1609,9 +1705,9 @@ }, { "callIndex": 6, - "id": "cbb9070d68f84d1b", + "id": "e47593626487f05c", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:32:50.092Z", + "recordedAt": "2026-07-01T11:35:43.063Z", "request": { "body": { "kind": "json", @@ -1631,29 +1727,29 @@ "role": "user" }, { - "id": "fc_08598442cc0f79bb006a15af0cec84819592dee93deda7d4a1", + "id": "fc_0478186e28027e3d006a44fb8c348481a29814922e37a90173", "type": "item_reference" }, { - "call_id": "call_p987IdsfRoC6YqtClJBQYGiM", + "call_id": "call_buIBx5J91u1G66u2fIMOfuJR", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_08598442cc0f79bb006a15af0e37b881959d4caf77afd037b8", + "id": "fc_0478186e28027e3d006a44fb8d14d081a2996717f82dd9f672", "type": "item_reference" }, { - "call_id": "call_rXxdJ6ZZKPJTK60S8uRMETMr", + "call_id": "call_vU6gSptn2xCodyhaz6vC2Kzm", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_08598442cc0f79bb006a15af0f482c8195b16afe400b665873", + "id": "fc_0478186e28027e3d006a44fb8def0481a2aa91597fd394782b", "type": "item_reference" }, { - "call_id": "call_eQv7beCDlkPo9IZ7RqLIBZnA", + "call_id": "call_FoyDE1UI4ZZfMWMpm0chSiaY", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1695,11 +1791,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805969, - "created_at": 1779805968, + "completed_at": 1782905742, + "created_at": 1782905742, "error": null, "frequency_penalty": 0, - "id": "resp_08598442cc0f79bb006a15af10250c81959bec3c43ccd2bc01", + "id": "resp_0478186e28027e3d006a44fb8e59cc81a2993e5fa02af129ef", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1711,8 +1807,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_Z9gzPWppdWEfEIgXj3O72kXZ", - "id": "fc_08598442cc0f79bb006a15af10f0108195a5adcdbadd5a1f10", + "call_id": "call_DMDbg3nOq2uBBhGR6FHZ58Xd", + "id": "fc_0478186e28027e3d006a44fb8ec6c881a29c8b127256d9602d", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1740,11 +1836,30 @@ "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": { @@ -1780,13 +1895,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7dc2cfb15ba9-VIE", + "cf-ray": "a1451bd92954c251-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:32:49 GMT", + "date": "Wed, 01 Jul 2026 11:35:43 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1869", + "openai-processing-ms": "748", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1800,7 +1915,7 @@ "x-ratelimit-remaining-tokens": "149999572", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_91fdb8ac7e0d4593a2839afb78c9593c" + "x-request-id": "b40d4cac-70da-4895-91d1-65dfc7e03c90" }, "status": 200, "statusText": "OK" @@ -1808,9 +1923,9 @@ }, { "callIndex": 7, - "id": "bccc54d212e2503d", + "id": "702cf53e6dc272a1", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:32:51.317Z", + "recordedAt": "2026-07-01T11:35:44.077Z", "request": { "body": { "kind": "json", @@ -1844,11 +1959,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805971, - "created_at": 1779805970, + "completed_at": 1782905743, + "created_at": 1782905743, "error": null, "frequency_penalty": 0, - "id": "resp_043f0172a215dc7f006a15af125af081a2bac847c8f9b8268f", + "id": "resp_09a6d5ca495553cc006a44fb8f4e4881a0870deb7e8f085d0d", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -1867,7 +1982,7 @@ "type": "output_text" } ], - "id": "msg_043f0172a215dc7f006a15af12fd0881a297980be23f678791", + "id": "msg_09a6d5ca495553cc006a44fb8ff18081a0923f959147792a57", "role": "assistant", "status": "completed", "type": "message" @@ -1895,6 +2010,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, @@ -1917,13 +2050,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7dd2196a5ba9-VIE", + "cf-ray": "a1451bdf1d47c251-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:32:51 GMT", + "date": "Wed, 01 Jul 2026 11:35:44 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1019", + "openai-processing-ms": "809", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1937,7 +2070,7 @@ "x-ratelimit-remaining-tokens": "149996365", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "1ms", - "x-request-id": "req_38e96ebf1dc544a0bf9e0830360384f0" + "x-request-id": "feca8dc9-4bb0-44ff-8ee8-b0890aba82ed" }, "status": 200, "statusText": "OK" @@ -1945,9 +2078,9 @@ }, { "callIndex": 8, - "id": "8eec740c1be01c5c", + "id": "ddd31b453d0b2378", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:32:57.586Z", + "recordedAt": "2026-07-01T11:35:50.266Z", "request": { "body": { "kind": "json", @@ -1981,11 +2114,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805977, - "created_at": 1779805976, + "completed_at": 1782905750, + "created_at": 1782905749, "error": null, "frequency_penalty": 0, - "id": "resp_0d0561dbc862734f006a15af18aa54819095e6c2718702d82e", + "id": "resp_0b99e1eed1c80ca9006a44fb957bd481a38864e416fe287cca", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -2004,7 +2137,7 @@ "type": "output_text" } ], - "id": "msg_0d0561dbc862734f006a15af194c3481909d1f1d4bde067114", + "id": "msg_0b99e1eed1c80ca9006a44fb960c7c81a3a4f7a4734a1688fa", "role": "assistant", "status": "completed", "type": "message" @@ -2032,6 +2165,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, @@ -2054,13 +2205,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7df98906e34f-VIE", + "cf-ray": "a1451c05bca36cb4-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:32:57 GMT", + "date": "Wed, 01 Jul 2026 11:35:50 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "934", + "openai-processing-ms": "713", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2071,10 +2222,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149996365", + "x-ratelimit-remaining-tokens": "149996362", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "1ms", - "x-request-id": "req_6e99013304b94b5faaf878b2988ea1c7" + "x-request-id": "ca8add10-ec54-44fc-b7ac-f0ef22d4cc4d" }, "status": 200, "statusText": "OK" @@ -2082,9 +2233,9 @@ }, { "callIndex": 9, - "id": "6945bf18d345ad4a", + "id": "6d15acba002e709c", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:33:05.654Z", + "recordedAt": "2026-07-01T11:35:56.937Z", "request": { "body": { "kind": "json", @@ -2118,11 +2269,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779805985, - "created_at": 1779805983, + "completed_at": 1782905756, + "created_at": 1782905755, "error": null, "frequency_penalty": 0, - "id": "resp_088492e32fc3e300006a15af1f04e081a1a4e70824ce25a9b0", + "id": "resp_0e332ae37c38a558006a44fb9ba114819d9d5317e00fd3f498", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -2141,7 +2292,7 @@ "type": "output_text" } ], - "id": "msg_088492e32fc3e300006a15af217d9081a18daa98a8fadddd74", + "id": "msg_0e332ae37c38a558006a44fb9cc3d8819d90273f620149c908", "role": "assistant", "status": "completed", "type": "message" @@ -2169,6 +2320,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, @@ -2191,13 +2360,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7e211b133266-VIE", + "cf-ray": "a1451c2bfd4c804e-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:33:05 GMT", + "date": "Wed, 01 Jul 2026 11:35:57 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "2684", + "openai-processing-ms": "1335", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2208,10 +2377,10 @@ "x-ratelimit-limit-requests": "30000", "x-ratelimit-limit-tokens": "150000000", "x-ratelimit-remaining-requests": "29999", - "x-ratelimit-remaining-tokens": "149996365", + "x-ratelimit-remaining-tokens": "149996362", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "1ms", - "x-request-id": "req_d2c02668b4f246e9b9d288d5ac1b099c" + "x-request-id": "88c93837-04ce-4020-9373-1bf4338cbd3c" }, "status": 200, "statusText": "OK" @@ -2219,9 +2388,9 @@ }, { "callIndex": 0, - "id": "fcd9d51c145fb90b", + "id": "04d8f7db5dc7b0b8", "matchKey": "POST api.anthropic.com/v1/messages", - "recordedAt": "2026-05-26T14:33:06.936Z", + "recordedAt": "2026-07-01T11:35:58.432Z", "request": { "body": { "kind": "json", @@ -2259,7 +2428,7 @@ "type": "text" } ], - "id": "msg_01YGBExCQPsVFA4c3f7EHZsw", + "id": "msg_01XtmAdPMKotogZEH1NGFa9R", "model": "claude-haiku-4-5-20251001", "role": "assistant", "stop_details": null, @@ -2282,33 +2451,31 @@ }, "headers": { "anthropic-organization-id": "27796668-7351-40ac-acc4-024aee8995a5", - "anthropic-ratelimit-input-tokens-limit": "4000000", - "anthropic-ratelimit-input-tokens-remaining": "4000000", - "anthropic-ratelimit-input-tokens-reset": "2026-05-26T14:33:06Z", - "anthropic-ratelimit-output-tokens-limit": "800000", - "anthropic-ratelimit-output-tokens-remaining": "800000", - "anthropic-ratelimit-output-tokens-reset": "2026-05-26T14:33:06Z", + "anthropic-ratelimit-input-tokens-limit": "10000000", + "anthropic-ratelimit-input-tokens-remaining": "10000000", + "anthropic-ratelimit-input-tokens-reset": "2026-07-01T11:35:58Z", + "anthropic-ratelimit-output-tokens-limit": "2000000", + "anthropic-ratelimit-output-tokens-remaining": "2000000", + "anthropic-ratelimit-output-tokens-reset": "2026-07-01T11:35:58Z", "anthropic-ratelimit-requests-limit": "20000", "anthropic-ratelimit-requests-remaining": "19999", - "anthropic-ratelimit-requests-reset": "2026-05-26T14:33:06Z", - "anthropic-ratelimit-tokens-limit": "4800000", - "anthropic-ratelimit-tokens-remaining": "4800000", - "anthropic-ratelimit-tokens-reset": "2026-05-26T14:33:06Z", + "anthropic-ratelimit-requests-reset": "2026-07-01T11:35:57Z", + "anthropic-ratelimit-tokens-limit": "12000000", + "anthropic-ratelimit-tokens-remaining": "12000000", + "anthropic-ratelimit-tokens-reset": "2026-07-01T11:35:58Z", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7e347e9bb86d-VIE", + "cf-ray": "a1451c370ada1479-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-security-policy": "default-src 'none'; frame-ancestors 'none'", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:33:07 GMT", - "request-id": "req_011CbRLvXP8LFFcSrnY4gaXC", + "date": "Wed, 01 Jul 2026 11:35:58 GMT", + "request-id": "req_011CcbGY1Cc4uPU6rxnoBTxK", "server": "cloudflare", - "set-cookie": "[REDACTED]", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "traceresponse": "00-a6f66013dad712a9f1e76be382593208-265083b3df3f9daa-01", + "traceresponse": "00-7eabef75198cd2ff623c2eba1774e577-754179d847cf202f-01", "transfer-encoding": "chunked", "vary": "Accept-Encoding", - "x-envoy-upstream-service-time": "884", "x-robots-tag": "none" }, "status": 200, @@ -2317,9 +2484,9 @@ }, { "callIndex": 1, - "id": "ff22a182ea5a9c06", + "id": "f51018468a0f5811", "matchKey": "POST api.anthropic.com/v1/messages", - "recordedAt": "2026-05-26T14:33:13.471Z", + "recordedAt": "2026-07-01T11:36:04.829Z", "request": { "body": { "kind": "json", @@ -2357,7 +2524,7 @@ "type": "text" } ], - "id": "msg_01Mbm93n3vBowGYFuBNd8yBu", + "id": "msg_01MQ7uw6u54M8uuL6BkLy965", "model": "claude-haiku-4-5-20251001", "role": "assistant", "stop_details": null, @@ -2380,33 +2547,31 @@ }, "headers": { "anthropic-organization-id": "27796668-7351-40ac-acc4-024aee8995a5", - "anthropic-ratelimit-input-tokens-limit": "4000000", - "anthropic-ratelimit-input-tokens-remaining": "4000000", - "anthropic-ratelimit-input-tokens-reset": "2026-05-26T14:33:13Z", - "anthropic-ratelimit-output-tokens-limit": "800000", - "anthropic-ratelimit-output-tokens-remaining": "800000", - "anthropic-ratelimit-output-tokens-reset": "2026-05-26T14:33:13Z", + "anthropic-ratelimit-input-tokens-limit": "10000000", + "anthropic-ratelimit-input-tokens-remaining": "10000000", + "anthropic-ratelimit-input-tokens-reset": "2026-07-01T11:36:04Z", + "anthropic-ratelimit-output-tokens-limit": "2000000", + "anthropic-ratelimit-output-tokens-remaining": "2000000", + "anthropic-ratelimit-output-tokens-reset": "2026-07-01T11:36:04Z", "anthropic-ratelimit-requests-limit": "20000", "anthropic-ratelimit-requests-remaining": "19999", - "anthropic-ratelimit-requests-reset": "2026-05-26T14:33:12Z", - "anthropic-ratelimit-tokens-limit": "4800000", - "anthropic-ratelimit-tokens-remaining": "4800000", - "anthropic-ratelimit-tokens-reset": "2026-05-26T14:33:13Z", + "anthropic-ratelimit-requests-reset": "2026-07-01T11:36:03Z", + "anthropic-ratelimit-tokens-limit": "12000000", + "anthropic-ratelimit-tokens-remaining": "12000000", + "anthropic-ratelimit-tokens-reset": "2026-07-01T11:36:04Z", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7e5b1a61ee05-VIE", + "cf-ray": "a1451c5f4a2cc270-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-security-policy": "default-src 'none'; frame-ancestors 'none'", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:33:13 GMT", - "request-id": "req_011CbRLvyiubnM1SWU8qgDBC", + "date": "Wed, 01 Jul 2026 11:36:04 GMT", + "request-id": "req_011CcbGYURDRJDsMWg4VDoCN", "server": "cloudflare", - "set-cookie": "[REDACTED]", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "traceresponse": "00-9bc24c49b9863f6d7f32091da2e6dda1-15ed6389666c9a12-01", + "traceresponse": "00-5bcbd056e69396f011d5cb6672bd52c7-8202e976e65ccf64-01", "transfer-encoding": "chunked", "vary": "Accept-Encoding", - "x-envoy-upstream-service-time": "1229", "x-robots-tag": "none" }, "status": 200, @@ -2415,9 +2580,9 @@ }, { "callIndex": 2, - "id": "f1d50a1e6c760d6c", + "id": "c440f9309e7fff40", "matchKey": "POST api.anthropic.com/v1/messages", - "recordedAt": "2026-05-26T14:33:19.623Z", + "recordedAt": "2026-07-01T11:36:11.109Z", "request": { "body": { "kind": "json", @@ -2455,7 +2620,7 @@ "type": "text" } ], - "id": "msg_01LkCUQJj37V91a4pMgnFMzi", + "id": "msg_01UqSisxLDjbkX6yqpw4Cjpj", "model": "claude-haiku-4-5-20251001", "role": "assistant", "stop_details": null, @@ -2478,33 +2643,31 @@ }, "headers": { "anthropic-organization-id": "27796668-7351-40ac-acc4-024aee8995a5", - "anthropic-ratelimit-input-tokens-limit": "4000000", - "anthropic-ratelimit-input-tokens-remaining": "4000000", - "anthropic-ratelimit-input-tokens-reset": "2026-05-26T14:33:19Z", - "anthropic-ratelimit-output-tokens-limit": "800000", - "anthropic-ratelimit-output-tokens-remaining": "800000", - "anthropic-ratelimit-output-tokens-reset": "2026-05-26T14:33:19Z", + "anthropic-ratelimit-input-tokens-limit": "10000000", + "anthropic-ratelimit-input-tokens-remaining": "10000000", + "anthropic-ratelimit-input-tokens-reset": "2026-07-01T11:36:10Z", + "anthropic-ratelimit-output-tokens-limit": "2000000", + "anthropic-ratelimit-output-tokens-remaining": "2000000", + "anthropic-ratelimit-output-tokens-reset": "2026-07-01T11:36:10Z", "anthropic-ratelimit-requests-limit": "20000", "anthropic-ratelimit-requests-remaining": "19999", - "anthropic-ratelimit-requests-reset": "2026-05-26T14:33:18Z", - "anthropic-ratelimit-tokens-limit": "4800000", - "anthropic-ratelimit-tokens-remaining": "4800000", - "anthropic-ratelimit-tokens-reset": "2026-05-26T14:33:19Z", + "anthropic-ratelimit-requests-reset": "2026-07-01T11:36:10Z", + "anthropic-ratelimit-tokens-limit": "12000000", + "anthropic-ratelimit-tokens-remaining": "12000000", + "anthropic-ratelimit-tokens-reset": "2026-07-01T11:36:10Z", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7e841b7f90c5-VIE", + "cf-ray": "a1451c873ceb804e-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-security-policy": "default-src 'none'; frame-ancestors 'none'", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:33:19 GMT", - "request-id": "req_011CbRLwTjPQwtj3aTa4np1F", + "date": "Wed, 01 Jul 2026 11:36:11 GMT", + "request-id": "req_011CcbGYwjXN2U8JUq1ct6vh", "server": "cloudflare", - "set-cookie": "[REDACTED]", "strict-transport-security": "max-age=31536000; includeSubDomains; preload", - "traceresponse": "00-1894ce575029b226b719217daf0080bc-bb73b322dcc186fd-01", + "traceresponse": "00-b46f3f724995f1ca67acda3ae6ed07e2-652db0d51a4404cf-01", "transfer-encoding": "chunked", "vary": "Accept-Encoding", - "x-envoy-upstream-service-time": "808", "x-robots-tag": "none" }, "status": 200, @@ -2513,9 +2676,9 @@ }, { "callIndex": 10, - "id": "ab34eb26595033a1", + "id": "543af14bb29bb653", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:33:20.774Z", + "recordedAt": "2026-07-01T11:36:12.227Z", "request": { "body": { "kind": "json", @@ -2548,11 +2711,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779806000, - "created_at": 1779806000, + "completed_at": 1782905772, + "created_at": 1782905771, "error": null, "frequency_penalty": 0, - "id": "resp_0fad7bc839da64da006a15af2ff6388196b810531a23687f84", + "id": "resp_0a4fb6d728eb3b3d006a44fbab765881a2ada0c26dae936d38", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -2571,7 +2734,7 @@ "type": "output_text" } ], - "id": "msg_0fad7bc839da64da006a15af3071a481968d9fd398e433e679", + "id": "msg_0a4fb6d728eb3b3d006a44fbac0e1081a28b92cd8a61a8c1f1", "role": "assistant", "status": "completed", "type": "message" @@ -2599,6 +2762,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, @@ -2621,13 +2802,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7e8b1d565ac3-VIE", + "cf-ray": "a1451c8eb86f5a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:33:20 GMT", + "date": "Wed, 01 Jul 2026 11:36:12 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "842", + "openai-processing-ms": "791", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2641,7 +2822,7 @@ "x-ratelimit-remaining-tokens": "149999962", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_52ba02c2c9b54b92960a0993a9995110" + "x-request-id": "791f5614-8b12-4e30-b757-ee636a418628" }, "status": 200, "statusText": "OK" @@ -2649,9 +2830,9 @@ }, { "callIndex": 11, - "id": "250e64f864c72337", + "id": "7dd6d4e7df85bf24", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:33:21.838Z", + "recordedAt": "2026-07-01T11:36:13.581Z", "request": { "body": { "kind": "json", @@ -2702,11 +2883,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779806001, - "created_at": 1779806001, + "completed_at": 1782905773, + "created_at": 1782905772, "error": null, "frequency_penalty": 0, - "id": "resp_08baa7205749b403006a15af31064881979e125b28f65dd975", + "id": "resp_04c362c7c6b3662a006a44fbac76e8819290c0e1b2c5fcc611", "incomplete_details": null, "instructions": null, "max_output_tokens": 32, @@ -2725,7 +2906,7 @@ "type": "output_text" } ], - "id": "msg_08baa7205749b403006a15af318f7c81979bd603a409608443", + "id": "msg_04c362c7c6b3662a006a44fbacf3d88192aa41752091f5cde3", "role": "assistant", "status": "completed", "type": "message" @@ -2766,6 +2947,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, @@ -2788,13 +2987,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7e91ac305ac3-VIE", + "cf-ray": "a1451c953ac45a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:33:21 GMT", + "date": "Wed, 01 Jul 2026 11:36:13 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "853", + "openai-processing-ms": "1167", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2808,7 +3007,7 @@ "x-ratelimit-remaining-tokens": "149999942", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_a0119f56c1cd49f8a3953fd27ebd2aeb" + "x-request-id": "46d94b46-b5e4-4276-8e5a-7f5b4763bc6b" }, "status": 200, "statusText": "OK" @@ -2816,9 +3015,9 @@ }, { "callIndex": 12, - "id": "fecb7c9f8d04e1bd", + "id": "ab264fb8dfbb6978", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:33:22.877Z", + "recordedAt": "2026-07-01T11:36:14.402Z", "request": { "body": { "kind": "json", @@ -2865,19 +3064,19 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_03ca218379730d79006a15af3211b881a39239df698bc83e33\",\"object\":\"response\",\"created_at\":1779806002,\"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_03ca218379730d79006a15af3211b881a39239df698bc83e33\",\"object\":\"response\",\"created_at\":1779806002,\"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_03ca218379730d79006a15af32a82481a3b2e4ce91c4ce196d\",\"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_03ca218379730d79006a15af32a82481a3b2e4ce91c4ce196d\",\"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_03ca218379730d79006a15af32a82481a3b2e4ce91c4ce196d\",\"logprobs\":[],\"obfuscation\":\"149E8gR0KQJWYr\",\"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_03ca218379730d79006a15af32a82481a3b2e4ce91c4ce196d\",\"logprobs\":[],\"obfuscation\":\"Hx6Yqjri40UY\",\"output_index\":0,\"sequence_number\":5}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\":\\\"\",\"item_id\":\"msg_03ca218379730d79006a15af32a82481a3b2e4ce91c4ce196d\",\"logprobs\":[],\"obfuscation\":\"yxhW2SvmnyoOb\",\"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_03ca218379730d79006a15af32a82481a3b2e4ce91c4ce196d\",\"logprobs\":[],\"obfuscation\":\"V0Sg0aj6x7t\",\"output_index\":0,\"sequence_number\":7}", - "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\"}\",\"item_id\":\"msg_03ca218379730d79006a15af32a82481a3b2e4ce91c4ce196d\",\"logprobs\":[],\"obfuscation\":\"kyhaGAZEyQrHVW\",\"output_index\":0,\"sequence_number\":8}", - "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_03ca218379730d79006a15af32a82481a3b2e4ce91c4ce196d\",\"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_03ca218379730d79006a15af32a82481a3b2e4ce91c4ce196d\",\"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_03ca218379730d79006a15af32a82481a3b2e4ce91c4ce196d\",\"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_03ca218379730d79006a15af3211b881a39239df698bc83e33\",\"object\":\"response\",\"created_at\":1779806002,\"status\":\"completed\",\"background\":false,\"completed_at\":1779806002,\"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_03ca218379730d79006a15af32a82481a3b2e4ce91c4ce196d\",\"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_0ed3e39178c39044006a44fbadcecc819da3b6f97c1f9fd3c4\",\"object\":\"response\",\"created_at\":1782905773,\"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_0ed3e39178c39044006a44fbadcecc819da3b6f97c1f9fd3c4\",\"object\":\"response\",\"created_at\":1782905773,\"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_0ed3e39178c39044006a44fbae464c819d97f8c8e7c1b4390d\",\"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_0ed3e39178c39044006a44fbae464c819d97f8c8e7c1b4390d\",\"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_0ed3e39178c39044006a44fbae464c819d97f8c8e7c1b4390d\",\"logprobs\":[],\"obfuscation\":\"U6metQ5rvopHBP\",\"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_0ed3e39178c39044006a44fbae464c819d97f8c8e7c1b4390d\",\"logprobs\":[],\"obfuscation\":\"9jefjm5qbBKX\",\"output_index\":0,\"sequence_number\":5}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\":\\\"\",\"item_id\":\"msg_0ed3e39178c39044006a44fbae464c819d97f8c8e7c1b4390d\",\"logprobs\":[],\"obfuscation\":\"ssHzazeLBZnj2\",\"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_0ed3e39178c39044006a44fbae464c819d97f8c8e7c1b4390d\",\"logprobs\":[],\"obfuscation\":\"rpPHuwjzfAV\",\"output_index\":0,\"sequence_number\":7}", + "event: response.output_text.delta\ndata: {\"type\":\"response.output_text.delta\",\"content_index\":0,\"delta\":\"\\\"}\",\"item_id\":\"msg_0ed3e39178c39044006a44fbae464c819d97f8c8e7c1b4390d\",\"logprobs\":[],\"obfuscation\":\"kiejaelno0Wcck\",\"output_index\":0,\"sequence_number\":8}", + "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_0ed3e39178c39044006a44fbae464c819d97f8c8e7c1b4390d\",\"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_0ed3e39178c39044006a44fbae464c819d97f8c8e7c1b4390d\",\"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_0ed3e39178c39044006a44fbae464c819d97f8c8e7c1b4390d\",\"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_0ed3e39178c39044006a44fbadcecc819da3b6f97c1f9fd3c4\",\"object\":\"response\",\"created_at\":1782905773,\"status\":\"completed\",\"background\":false,\"completed_at\":1782905774,\"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_0ed3e39178c39044006a44fbae464c819d97f8c8e7c1b4390d\",\"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" }, @@ -2885,12 +3084,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7e984b265ac3-VIE", + "cf-ray": "a1451c9dbd7a5a6b-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 26 May 2026 14:33:22 GMT", + "date": "Wed, 01 Jul 2026 11:36:13 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "110", + "openai-processing-ms": "133", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2898,7 +3097,7 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "req_39f556a54fe443b8856bb2a99caa1655" + "x-request-id": "ecd63fc0-fd0a-490b-9029-850b3dfef861" }, "status": 200, "statusText": "OK" @@ -2906,9 +3105,9 @@ }, { "callIndex": 13, - "id": "eebc152ba05b8412", + "id": "2ef0aaae3ad513b7", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:33:24.667Z", + "recordedAt": "2026-07-01T11:36:19.424Z", "request": { "body": { "kind": "json", @@ -2940,11 +3139,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1779806004, - "created_at": 1779806003, + "completed_at": 1782905778, + "created_at": 1782905776, "error": null, "frequency_penalty": 0, - "id": "resp_0bc8da77b3bd3019006a15af3321a4819e93056f542108b3d0", + "id": "resp_012c4bd1725f1929006a44fbafce80819d8ed0e5e645613e44", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -2963,7 +3162,7 @@ "type": "output_text" } ], - "id": "msg_0bc8da77b3bd3019006a15af34224c819eaa2906d50dcdb8f6", + "id": "msg_012c4bd1725f1929006a44fbb1bc64819db734713a5a97bc21", "role": "assistant", "status": "completed", "type": "message" @@ -2991,6 +3190,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, @@ -3013,13 +3230,13 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7e9eeae95ac3-VIE", + "cf-ray": "a1451ca2c81a5a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Tue, 26 May 2026 14:33:24 GMT", + "date": "Wed, 01 Jul 2026 11:36:19 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1608", + "openai-processing-ms": "4640", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -3033,7 +3250,7 @@ "x-ratelimit-remaining-tokens": "149999965", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_585b6b238467404e858ab9f8b69b1d6e" + "x-request-id": "bb916556-1112-4e83-93f2-223702cada6f" }, "status": 200, "statusText": "OK" @@ -3041,9 +3258,9 @@ }, { "callIndex": 14, - "id": "bc08e707f2920073", + "id": "710b04b5593d1203", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-05-26T14:33:26.098Z", + "recordedAt": "2026-07-01T11:36:20.750Z", "request": { "body": { "kind": "json", @@ -3071,17 +3288,17 @@ "response": { "body": { "chunks": [ - "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_069dcf656e534351006a15af34e554819794d893e76679fe92\",\"object\":\"response\",\"created_at\":1779806004,\"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\",\"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_069dcf656e534351006a15af34e554819794d893e76679fe92\",\"object\":\"response\",\"created_at\":1779806004,\"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\",\"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_069dcf656e534351006a15af35dd1481979e2e35d4690ee60f\",\"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_069dcf656e534351006a15af35dd1481979e2e35d4690ee60f\",\"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_069dcf656e534351006a15af35dd1481979e2e35d4690ee60f\",\"logprobs\":[],\"obfuscation\":\"kpXZNphSi3\",\"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_069dcf656e534351006a15af35dd1481979e2e35d4690ee60f\",\"logprobs\":[],\"obfuscation\":\"UHobwwp38QQi\",\"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_069dcf656e534351006a15af35dd1481979e2e35d4690ee60f\",\"logprobs\":[],\"obfuscation\":\"gLE76m4EHxDuyo\",\"output_index\":0,\"sequence_number\":6}", - "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_069dcf656e534351006a15af35dd1481979e2e35d4690ee60f\",\"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_069dcf656e534351006a15af35dd1481979e2e35d4690ee60f\",\"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_069dcf656e534351006a15af35dd1481979e2e35d4690ee60f\",\"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_069dcf656e534351006a15af34e554819794d893e76679fe92\",\"object\":\"response\",\"created_at\":1779806004,\"status\":\"completed\",\"background\":false,\"completed_at\":1779806005,\"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_069dcf656e534351006a15af35dd1481979e2e35d4690ee60f\",\"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\",\"tools\":[],\"top_logprobs\":0,\"top_p\":1,\"truncation\":\"disabled\",\"usage\":{\"input_tokens\":17,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":4,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":21},\"user\":null,\"metadata\":{}},\"sequence_number\":10}" + "event: response.created\ndata: {\"type\":\"response.created\",\"response\":{\"id\":\"resp_04207b5a5647c003006a44fbb3a5f081a3bac86a47e26e26f3\",\"object\":\"response\",\"created_at\":1782905779,\"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_04207b5a5647c003006a44fbb3a5f081a3bac86a47e26e26f3\",\"object\":\"response\",\"created_at\":1782905779,\"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_04207b5a5647c003006a44fbb4730881a398925d6ac567efe1\",\"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_04207b5a5647c003006a44fbb4730881a398925d6ac567efe1\",\"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_04207b5a5647c003006a44fbb4730881a398925d6ac567efe1\",\"logprobs\":[],\"obfuscation\":\"lnolMWPplG\",\"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_04207b5a5647c003006a44fbb4730881a398925d6ac567efe1\",\"logprobs\":[],\"obfuscation\":\"gIEjMLdge88h\",\"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_04207b5a5647c003006a44fbb4730881a398925d6ac567efe1\",\"logprobs\":[],\"obfuscation\":\"E56J0i4e3sACsq\",\"output_index\":0,\"sequence_number\":6}", + "event: response.output_text.done\ndata: {\"type\":\"response.output_text.done\",\"content_index\":0,\"item_id\":\"msg_04207b5a5647c003006a44fbb4730881a398925d6ac567efe1\",\"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_04207b5a5647c003006a44fbb4730881a398925d6ac567efe1\",\"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_04207b5a5647c003006a44fbb4730881a398925d6ac567efe1\",\"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_04207b5a5647c003006a44fbb3a5f081a3bac86a47e26e26f3\",\"object\":\"response\",\"created_at\":1782905779,\"status\":\"completed\",\"background\":false,\"completed_at\":1782905780,\"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_04207b5a5647c003006a44fbb4730881a398925d6ac567efe1\",\"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\":17,\"input_tokens_details\":{\"cached_tokens\":0},\"output_tokens\":4,\"output_tokens_details\":{\"reasoning_tokens\":0},\"total_tokens\":21},\"user\":null,\"metadata\":{}},\"sequence_number\":10}" ], "kind": "sse" }, @@ -3089,12 +3306,12 @@ "access-control-expose-headers": "X-Request-ID, CF-Ray, CF-Ray", "alt-svc": "h3=\":443\"; ma=86400", "cf-cache-status": "DYNAMIC", - "cf-ray": "a01d7ea9ffc95ac3-VIE", + "cf-ray": "a1451cc23bd15a6b-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Tue, 26 May 2026 14:33:25 GMT", + "date": "Wed, 01 Jul 2026 11:36:19 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "123", + "openai-processing-ms": "145", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -3102,7 +3319,846 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "req_33de134846654479a3b50cef6dbb734d" + "x-request-id": "ef002994-a2f4-44ce-82bf-9a07d908a19f" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 15, + "id": "f4efcaf6114fa328", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-07-01T11:36:22.469Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "output_text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "input_text" + } + ], + "role": "user" + } + ], + "max_output_tokens": 256, + "model": "gpt-4o-mini-2024-07-18", + "temperature": 0, + "tool_choice": "auto", + "tools": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "type": "function" + } + ] + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "kind": "json", + "value": { + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1782905782, + "created_at": 1782905781, + "error": null, + "frequency_penalty": 0, + "id": "resp_0e8ac562fb58afac006a44fbb4fe048191aa0f37c71168de2a", + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 256, + "max_tool_calls": null, + "metadata": {}, + "model": "gpt-4o-mini-2024-07-18", + "moderation": null, + "object": "response", + "output": [ + { + "arguments": "{\"item\":\"laptop\",\"store\":\"StoreA\"}", + "call_id": "call_x6XEmUuxCvgAHQEbVIwsXYhL", + "id": "fc_0e8ac562fb58afac006a44fbb662c481919fed288d71749d88", + "name": "get_store_price", + "status": "completed", + "type": "function_call" + }, + { + "arguments": "{\"item\":\"laptop\",\"store\":\"StoreB\"}", + "call_id": "call_FZrKdCznqFk8UQ16ParePUkK", + "id": "fc_0e8ac562fb58afac006a44fbb662d4819196459c50590998d8", + "name": "get_store_price", + "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": "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": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "strict": true, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "strict": true, + "type": "function" + } + ], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 232 + }, + "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": "a1451cca8f865a6b-VIE", + "connection": "keep-alive", + "content-encoding": "gzip", + "content-type": "application/json", + "date": "Wed, 01 Jul 2026 11:36:22 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "1521", + "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-ratelimit-limit-requests": "30000", + "x-ratelimit-limit-tokens": "150000000", + "x-ratelimit-remaining-requests": "29999", + "x-ratelimit-remaining-tokens": "149999610", + "x-ratelimit-reset-requests": "2ms", + "x-ratelimit-reset-tokens": "0s", + "x-request-id": "10ea4979-bb26-4d7e-be50-f412e433ba5d" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 16, + "id": "9545902062c3ac1a", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-07-01T11:36:23.498Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "output_text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "id": "fc_0e8ac562fb58afac006a44fbb662c481919fed288d71749d88", + "type": "item_reference" + }, + { + "id": "fc_0e8ac562fb58afac006a44fbb662d4819196459c50590998d8", + "type": "item_reference" + }, + { + "call_id": "call_x6XEmUuxCvgAHQEbVIwsXYhL", + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "type": "function_call_output" + }, + { + "call_id": "call_FZrKdCznqFk8UQ16ParePUkK", + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "type": "function_call_output" + } + ], + "max_output_tokens": 256, + "model": "gpt-4o-mini-2024-07-18", + "temperature": 0, + "tool_choice": "auto", + "tools": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "type": "function" + } + ] + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "kind": "json", + "value": { + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1782905783, + "created_at": 1782905782, + "error": null, + "frequency_penalty": 0, + "id": "resp_0e8ac562fb58afac006a44fbb6afec8191b103117faaaef8be", + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 256, + "max_tool_calls": null, + "metadata": {}, + "model": "gpt-4o-mini-2024-07-18", + "moderation": null, + "object": "response", + "output": [ + { + "arguments": "{\"discountCode\":\"SAVE20\",\"total\":999}", + "call_id": "call_LSRTM4uY122iNU1oWw7EmHsH", + "id": "fc_0e8ac562fb58afac006a44fbb73d588191bfc28c84ba888e19", + "name": "apply_discount", + "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": "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": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "strict": true, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "strict": true, + "type": "function" + } + ], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 281 + }, + "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": "a1451cd53bd25a6b-VIE", + "connection": "keep-alive", + "content-encoding": "gzip", + "content-type": "application/json", + "date": "Wed, 01 Jul 2026 11:36:23 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "843", + "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-ratelimit-limit-requests": "30000", + "x-ratelimit-limit-tokens": "150000000", + "x-ratelimit-remaining-requests": "29999", + "x-ratelimit-remaining-tokens": "149999525", + "x-ratelimit-reset-requests": "2ms", + "x-ratelimit-reset-tokens": "0s", + "x-request-id": "d21b7a0e-6318-47af-84db-6fa712f2e817" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 17, + "id": "309ea0af3149dfad", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-07-01T11:36:25.257Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "output_text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "id": "fc_0e8ac562fb58afac006a44fbb662c481919fed288d71749d88", + "type": "item_reference" + }, + { + "id": "fc_0e8ac562fb58afac006a44fbb662d4819196459c50590998d8", + "type": "item_reference" + }, + { + "call_id": "call_x6XEmUuxCvgAHQEbVIwsXYhL", + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "type": "function_call_output" + }, + { + "call_id": "call_FZrKdCznqFk8UQ16ParePUkK", + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "type": "function_call_output" + }, + { + "id": "fc_0e8ac562fb58afac006a44fbb73d588191bfc28c84ba888e19", + "type": "item_reference" + }, + { + "call_id": "call_LSRTM4uY122iNU1oWw7EmHsH", + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "type": "function_call_output" + } + ], + "max_output_tokens": 256, + "model": "gpt-4o-mini-2024-07-18", + "temperature": 0, + "tool_choice": "auto", + "tools": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "type": "function" + } + ] + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "kind": "json", + "value": { + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1782905785, + "created_at": 1782905783, + "error": null, + "frequency_penalty": 0, + "id": "resp_0e8ac562fb58afac006a44fbb7b4d481918efaa7d14e4dc2e6", + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 256, + "max_tool_calls": null, + "metadata": {}, + "model": "gpt-4o-mini-2024-07-18", + "moderation": null, + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "logprobs": [], + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "output_text" + } + ], + "id": "msg_0e8ac562fb58afac006a44fbb82c5481918d102579115714a4", + "role": "assistant", + "status": "completed", + "type": "message" + } + ], + "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": "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": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "strict": true, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "strict": true, + "type": "function" + } + ], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 370 + }, + "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": "a1451cdb8d7c5a6b-VIE", + "connection": "keep-alive", + "content-encoding": "gzip", + "content-type": "application/json", + "date": "Wed, 01 Jul 2026 11:36:25 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "1574", + "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-ratelimit-limit-requests": "30000", + "x-ratelimit-limit-tokens": "150000000", + "x-ratelimit-remaining-requests": "29999", + "x-ratelimit-remaining-tokens": "149999475", + "x-ratelimit-reset-requests": "2ms", + "x-ratelimit-reset-tokens": "0s", + "x-request-id": "70b9b726-ddab-4e39-8892-35d0c0fdbd74" }, "status": 200, "statusText": "OK" 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..02fa0373c 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-07-01T11:36:50.233Z", "request": { "body": { "kind": "json", @@ -37,11 +37,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528914, - "created_at": 1781528913, + "completed_at": 1782905810, + "created_at": 1782905809, "error": null, "frequency_penalty": 0, - "id": "resp_08e21a27e86c971e006a2ff951c5048192a0af2698bfaf280b", + "id": "resp_0348ef0bcf29c7a9006a44fbd19e6481a1a6bf4c1982861b47", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -60,7 +60,7 @@ "type": "output_text" } ], - "id": "msg_08e21a27e86c971e006a2ff952764c8192915880c5d463c15f", + "id": "msg_0348ef0bcf29c7a9006a44fbd2130c81a1b57271d385ab73b6", "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": "a1451d7d7b4a5a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:34 GMT", + "date": "Wed, 01 Jul 2026 11:36:50 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1035", + "openai-processing-ms": "655", "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": "f1d6c868-7785-4ae3-9ea0-d60be05b745f" }, "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-07-01T11:36:51.426Z", "request": { "body": { "kind": "json", @@ -191,11 +209,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528916, - "created_at": 1781528914, + "completed_at": 1782905811, + "created_at": 1782905810, "error": null, "frequency_penalty": 0, - "id": "resp_04d2d681e1b09a4a006a2ff952f2bc81a1a73280bae81965e2", + "id": "resp_04b05ea9abbdaf41006a44fbd27738819ebae857af0d3bd794", "incomplete_details": null, "instructions": null, "max_output_tokens": 32, @@ -214,7 +232,7 @@ "type": "output_text" } ], - "id": "msg_04d2d681e1b09a4a006a2ff953cd1081a183158139618edb2d", + "id": "msg_04b05ea9abbdaf41006a44fbd30c24819e97d83368a212ffa5", "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": "a1451d82dd1d5a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:36 GMT", + "date": "Wed, 01 Jul 2026 11:36:51 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1325", + "openai-processing-ms": "1000", "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": "1737e2b1-3b49-477b-8287-d7627795ae57" }, "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-07-01T11:36:52.400Z", "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_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}" ], "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": "a1451d8a3f5a5a6b-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Mon, 15 Jun 2026 13:08:36 GMT", + "date": "Wed, 01 Jul 2026 11:36:51 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "312", + "openai-processing-ms": "129", "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": "83e34dc6-c6b7-4bd7-be80-bb48ac896348" }, "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-07-01T11:36:52.623Z", "request": { "body": { "kind": "json", @@ -968,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": "a0c1cdf768f93249-VIE", + "cf-ray": "a1451d9079245a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:37 GMT", + "date": "Wed, 01 Jul 2026 11:36:52 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "42", + "openai-processing-ms": "68", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -989,7 +1025,7 @@ "x-ratelimit-remaining-tokens": "9999993", "x-ratelimit-reset-requests": "6ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_03dbab6160094a719bcbc01a4069874d" + "x-request-id": "b4a842ba-4420-4fd0-be72-cc00164c83d9" }, "status": 200, "statusText": "OK" @@ -997,9 +1033,9 @@ }, { "callIndex": 1, - "id": "43d0f8f8c8d2a679", + "id": "fcc3d17c88f1552b", "matchKey": "POST api.openai.com/v1/embeddings", - "recordedAt": "2026-06-15T13:08:37.963Z", + "recordedAt": "2026-07-01T11:36:52.837Z", "request": { "body": { "kind": "json", @@ -1028,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": "a0c1cdf8a9ec3249-VIE", + "cf-ray": "a1451d91c9875a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:38 GMT", + "date": "Wed, 01 Jul 2026 11:36:52 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "83", + "openai-processing-ms": "76", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1049,7 +1085,7 @@ "x-ratelimit-remaining-tokens": "9999985", "x-ratelimit-reset-requests": "6ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_130d8dd80ff340f3be99289a6f249e78" + "x-request-id": "cd17b8fe-5d3f-4b3a-8e19-965528fa7643" }, "status": 200, "statusText": "OK" @@ -1057,9 +1093,9 @@ }, { "callIndex": 3, - "id": "83cbbf6da482c905", + "id": "e09f32cc805b35e9", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:39.460Z", + "recordedAt": "2026-07-01T11:36:53.803Z", "request": { "body": { "kind": "json", @@ -1116,11 +1152,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528919, - "created_at": 1781528918, + "completed_at": 1782905813, + "created_at": 1782905813, "error": null, "frequency_penalty": 0, - "id": "resp_0b25a1d2d8c902f6006a2ff9562f3881a39ccc1431e249b362", + "id": "resp_0d1670a4a982ae06006a44fbd50dd4819ca2bc96afa7993544", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1132,8 +1168,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_AvQX7688fhEaCdlxjn3wmZeZ", - "id": "fc_0b25a1d2d8c902f6006a2ff957358081a38b137a8dbbf2df4e", + "call_id": "call_2Q7v9joZrNYZM7MGcOJ7m0Kr", + "id": "fc_0d1670a4a982ae06006a44fbd5a3bc819c94f9d101027baa9c", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1161,6 +1197,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 +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": "a0c1cdf9fb223249-VIE", + "cf-ray": "a1451d9309eb5a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:39 GMT", + "date": "Wed, 01 Jul 2026 11:36:53 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1309", + "openai-processing-ms": "780", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1219,10 +1273,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": "f7672a23-8157-4391-9117-b7a2795d1198" }, "status": 200, "statusText": "OK" @@ -1230,9 +1284,9 @@ }, { "callIndex": 4, - "id": "417e64addcf59da7", + "id": "ac165a19d6cc00c6", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:41.140Z", + "recordedAt": "2026-07-01T11:36:54.765Z", "request": { "body": { "kind": "json", @@ -1252,11 +1306,11 @@ "role": "user" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff957358081a38b137a8dbbf2df4e", + "id": "fc_0d1670a4a982ae06006a44fbd5a3bc819c94f9d101027baa9c", "type": "item_reference" }, { - "call_id": "call_AvQX7688fhEaCdlxjn3wmZeZ", + "call_id": "call_2Q7v9joZrNYZM7MGcOJ7m0Kr", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1298,11 +1352,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528921, - "created_at": 1781528919, + "completed_at": 1782905814, + "created_at": 1782905814, "error": null, "frequency_penalty": 0, - "id": "resp_0b25a1d2d8c902f6006a2ff957b31481a3a25543b14b094372", + "id": "resp_0d1670a4a982ae06006a44fbd5ff34819c86ef100a58b377b5", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1314,8 +1368,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_XSXU38q42QnVKyDrElH4Obkg", - "id": "fc_0b25a1d2d8c902f6006a2ff958eac481a39747145bfcbd44a9", + "call_id": "call_J2mBiH5mXs6wRrpj5za8jTbl", + "id": "fc_0d1670a4a982ae06006a44fbd69938819cbce2cd7ca7e4aa82", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1343,6 +1397,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 +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": "a0c1ce034b363249-VIE", + "cf-ray": "a1451d98fba15a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:41 GMT", + "date": "Wed, 01 Jul 2026 11:36:54 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1478", + "openai-processing-ms": "803", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1404,7 +1476,7 @@ "x-ratelimit-remaining-tokens": "149999650", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_72a976cf46384707ba8f41bbc737cf3b" + "x-request-id": "e58ea406-fd31-408a-8dca-9a98622087d1" }, "status": 200, "statusText": "OK" @@ -1412,9 +1484,9 @@ }, { "callIndex": 5, - "id": "341675a0a1a88c63", + "id": "9953f150c1ffa8a0", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:42.343Z", + "recordedAt": "2026-07-01T11:36:56.030Z", "request": { "body": { "kind": "json", @@ -1434,20 +1506,20 @@ "role": "user" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff957358081a38b137a8dbbf2df4e", + "id": "fc_0d1670a4a982ae06006a44fbd5a3bc819c94f9d101027baa9c", "type": "item_reference" }, { - "call_id": "call_AvQX7688fhEaCdlxjn3wmZeZ", + "call_id": "call_2Q7v9joZrNYZM7MGcOJ7m0Kr", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff958eac481a39747145bfcbd44a9", + "id": "fc_0d1670a4a982ae06006a44fbd69938819cbce2cd7ca7e4aa82", "type": "item_reference" }, { - "call_id": "call_XSXU38q42QnVKyDrElH4Obkg", + "call_id": "call_J2mBiH5mXs6wRrpj5za8jTbl", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1489,11 +1561,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528922, - "created_at": 1781528921, + "completed_at": 1782905815, + "created_at": 1782905815, "error": null, "frequency_penalty": 0, - "id": "resp_0b25a1d2d8c902f6006a2ff9595f2081a38f8aa915715e7646", + "id": "resp_0d1670a4a982ae06006a44fbd6f700819cb7ac7acf214ce1d8", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1505,8 +1577,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_of374lHpH3YYQpti3LoZMJz8", - "id": "fc_0b25a1d2d8c902f6006a2ff95a165481a3959ecf69f5beea46", + "call_id": "call_EyyNRQfPYeHhb9lc8TNZ6WtZ", + "id": "fc_0d1670a4a982ae06006a44fbd7c610819cb4841356f23c3429", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1534,6 +1606,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 +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": "a0c1ce0dcc613249-VIE", + "cf-ray": "a1451d9efdf95a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:42 GMT", + "date": "Wed, 01 Jul 2026 11:36:56 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1035", + "openai-processing-ms": "1099", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1595,7 +1685,7 @@ "x-ratelimit-remaining-tokens": "149999612", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_49d7920b1bae4f0da8fa87a9331efed2" + "x-request-id": "f29f86b4-fa2a-4168-8945-db203ca8ca05" }, "status": 200, "statusText": "OK" @@ -1603,9 +1693,9 @@ }, { "callIndex": 6, - "id": "cbb9070d68f84d1b", + "id": "bf0ae6643e03845d", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:43.548Z", + "recordedAt": "2026-07-01T11:36:57.177Z", "request": { "body": { "kind": "json", @@ -1625,29 +1715,29 @@ "role": "user" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff957358081a38b137a8dbbf2df4e", + "id": "fc_0d1670a4a982ae06006a44fbd5a3bc819c94f9d101027baa9c", "type": "item_reference" }, { - "call_id": "call_AvQX7688fhEaCdlxjn3wmZeZ", + "call_id": "call_2Q7v9joZrNYZM7MGcOJ7m0Kr", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff958eac481a39747145bfcbd44a9", + "id": "fc_0d1670a4a982ae06006a44fbd69938819cbce2cd7ca7e4aa82", "type": "item_reference" }, { - "call_id": "call_XSXU38q42QnVKyDrElH4Obkg", + "call_id": "call_J2mBiH5mXs6wRrpj5za8jTbl", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" }, { - "id": "fc_0b25a1d2d8c902f6006a2ff95a165481a3959ecf69f5beea46", + "id": "fc_0d1670a4a982ae06006a44fbd7c610819cb4841356f23c3429", "type": "item_reference" }, { - "call_id": "call_of374lHpH3YYQpti3LoZMJz8", + "call_id": "call_EyyNRQfPYeHhb9lc8TNZ6WtZ", "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "type": "function_call_output" } @@ -1689,11 +1779,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528923, - "created_at": 1781528922, + "completed_at": 1782905817, + "created_at": 1782905816, "error": null, "frequency_penalty": 0, - "id": "resp_0b25a1d2d8c902f6006a2ff95a8dd481a3847100dca2e05e64", + "id": "resp_0d1670a4a982ae06006a44fbd8401c819ca9812b93377bfe47", "incomplete_details": null, "instructions": null, "max_output_tokens": 128, @@ -1705,8 +1795,8 @@ "output": [ { "arguments": "{\"location\":\"Paris, France\"}", - "call_id": "call_nfHRx6yknrL5pAQPlKeRYu8d", - "id": "fc_0b25a1d2d8c902f6006a2ff95b435c81a39123ec9099a17d27", + "call_id": "call_m9y7HRD5gRKrWDTEZXJOTdm6", + "id": "fc_0d1670a4a982ae06006a44fbd8efd4819cb6b504cf8fbc2cfc", "name": "get_weather", "status": "completed", "type": "function_call" @@ -1734,6 +1824,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 +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": "a0c1ce154acb3249-VIE", + "cf-ray": "a1451da6f9325a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:43 GMT", + "date": "Wed, 01 Jul 2026 11:36:57 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1029", + "openai-processing-ms": "964", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1795,7 +1903,7 @@ "x-ratelimit-remaining-tokens": "149999572", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_eec9413044834713a0935560ff057d17" + "x-request-id": "063a6d44-dea2-4039-88c5-257076e01b2d" }, "status": 200, "statusText": "OK" @@ -1803,9 +1911,9 @@ }, { "callIndex": 7, - "id": "bccc54d212e2503d", + "id": "d22bae6c42006c81", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:44.902Z", + "recordedAt": "2026-07-01T11:36:57.945Z", "request": { "body": { "kind": "json", @@ -1856,11 +1964,11 @@ "billing": { "payer": "developer" }, - "completed_at": 1781528924, - "created_at": 1781528923, + "completed_at": 1782905817, + "created_at": 1782905817, "error": null, "frequency_penalty": 0, - "id": "resp_0edc151d34749c0a006a2ff95bc61c8192830a0789e2952249", + "id": "resp_07d0eacb5e020f19006a44fbd9638c8191bf06a3346592d6d4", "incomplete_details": null, "instructions": null, "max_output_tokens": 32, @@ -1879,7 +1987,7 @@ "type": "output_text" } ], - "id": "msg_0edc151d34749c0a006a2ff95cae188192bd080dc85e574076", + "id": "msg_07d0eacb5e020f19006a44fbd9cd088191a86403d6e5e83780", "role": "assistant", "status": "completed", "type": "message" @@ -1920,6 +2028,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 +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": "a0c1ce1ce95c3249-VIE", + "cf-ray": "a1451dae0b145a6b-VIE", "connection": "keep-alive", "content-encoding": "gzip", "content-type": "application/json", - "date": "Mon, 15 Jun 2026 13:08:44 GMT", + "date": "Wed, 01 Jul 2026 11:36:58 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "1173", + "openai-processing-ms": "588", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -1962,7 +2088,7 @@ "x-ratelimit-remaining-tokens": "149999942", "x-ratelimit-reset-requests": "2ms", "x-ratelimit-reset-tokens": "0s", - "x-request-id": "req_f88919222bd54f849db8d5d44579efa8" + "x-request-id": "0c9b409a-3a76-498e-847f-a6f8b8b0a32b" }, "status": 200, "statusText": "OK" @@ -1970,9 +2096,9 @@ }, { "callIndex": 8, - "id": "8eec740c1be01c5c", + "id": "6d0eec1cfcef015d", "matchKey": "POST api.openai.com/v1/responses", - "recordedAt": "2026-06-15T13:08:45.904Z", + "recordedAt": "2026-07-01T11:36:58.917Z", "request": { "body": { "kind": "json", @@ -2019,19 +2145,249 @@ "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_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}" + ], + "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": "a1451db2ec825a6b-VIE", + "connection": "keep-alive", + "content-type": "text/event-stream; charset=utf-8", + "date": "Wed, 01 Jul 2026 11:36:58 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "183", + "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": "038452fa-ef3f-4fa7-9905-b960091f7fb9" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 9, + "id": "3f08b53881e505ce", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-07-01T11:37:00.098Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a terse assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "Reply with exactly HELLO and no punctuation.", + "type": "input_text" + } + ], + "role": "user" + } + ], + "max_output_tokens": 24, + "model": "gpt-4o-mini-2024-07-18" + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "kind": "json", + "value": { + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1782905819, + "created_at": 1782905819, + "error": null, + "frequency_penalty": 0, + "id": "resp_0a0c15d796c6a34f006a44fbdb2284819fb736e3e820c1a23b", + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 24, + "max_tool_calls": null, + "metadata": {}, + "model": "gpt-4o-mini-2024-07-18", + "moderation": null, + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "logprobs": [], + "text": "HELLO", + "type": "output_text" + } + ], + "id": "msg_0a0c15d796c6a34f006a44fbdbc284819fb41f32c54acf1f53", + "role": "assistant", + "status": "completed", + "type": "message" + } + ], + "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": 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": 26, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 3, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 29 + }, + "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": "a1451db8fe9d5a6b-VIE", + "connection": "keep-alive", + "content-encoding": "gzip", + "content-type": "application/json", + "date": "Wed, 01 Jul 2026 11:37:00 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "908", + "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-ratelimit-limit-requests": "30000", + "x-ratelimit-limit-tokens": "150000000", + "x-ratelimit-remaining-requests": "29999", + "x-ratelimit-remaining-tokens": "149999955", + "x-ratelimit-reset-requests": "2ms", + "x-ratelimit-reset-tokens": "0s", + "x-request-id": "04232a6b-5e31-45df-82dd-a90abcd939c6" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 10, + "id": "d026123ce87dfbca", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-07-01T11:37:01.278Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a terse assistant.", + "role": "system" + }, + { + "content": [ + { + "text": "Reply with exactly STREAM HELLO and no punctuation.", + "type": "input_text" + } + ], + "role": "user" + } + ], + "max_output_tokens": 24, + "model": "gpt-4o-mini-2024-07-18", + "stream": true + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "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}" ], "kind": "sse" }, @@ -2039,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": "a0c1ce2559313249-VIE", + "cf-ray": "a1451dc058b05a6b-VIE", "connection": "keep-alive", "content-type": "text/event-stream; charset=utf-8", - "date": "Mon, 15 Jun 2026 13:08:45 GMT", + "date": "Wed, 01 Jul 2026 11:37:00 GMT", "openai-organization": "braintrust-data", - "openai-processing-ms": "192", + "openai-processing-ms": "245", "openai-project": "proj_vsCSXafhhByzWOThMrJcZiw9", "openai-version": "2020-10-01", "server": "cloudflare", @@ -2052,7 +2408,846 @@ "strict-transport-security": "max-age=31536000; includeSubDomains; preload", "transfer-encoding": "chunked", "x-content-type-options": "nosniff", - "x-request-id": "req_944fa722f10441f99d1f4c15b4907561" + "x-request-id": "470f07ce-d6bf-49d8-9e80-3e076c946f99" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 11, + "id": "34ad62d7c96775e7", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-07-01T11:37:04.625Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "output_text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "input_text" + } + ], + "role": "user" + } + ], + "max_output_tokens": 256, + "model": "gpt-4o-mini-2024-07-18", + "temperature": 0, + "tool_choice": "auto", + "tools": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "type": "function" + } + ] + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "kind": "json", + "value": { + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1782905824, + "created_at": 1782905821, + "error": null, + "frequency_penalty": 0, + "id": "resp_05a90b95f7a788b5006a44fbdd814c81a3baad795e58c3a0e1", + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 256, + "max_tool_calls": null, + "metadata": {}, + "model": "gpt-4o-mini-2024-07-18", + "moderation": null, + "object": "response", + "output": [ + { + "arguments": "{\"item\":\"laptop\",\"store\":\"StoreA\"}", + "call_id": "call_8GGuS9G3qXOu0uQjVEsKgw1t", + "id": "fc_05a90b95f7a788b5006a44fbe05b4c81a3b5987ee6fd97b39f", + "name": "get_store_price", + "status": "completed", + "type": "function_call" + }, + { + "arguments": "{\"item\":\"laptop\",\"store\":\"StoreB\"}", + "call_id": "call_lLjZSipWvTnUgrfgIhcwNsBk", + "id": "fc_05a90b95f7a788b5006a44fbe05b6481a38c617a786b550ef3", + "name": "get_store_price", + "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": "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": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "strict": true, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "strict": true, + "type": "function" + } + ], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 232 + }, + "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": "a1451dc7cb805a6b-VIE", + "connection": "keep-alive", + "content-encoding": "gzip", + "content-type": "application/json", + "date": "Wed, 01 Jul 2026 11:37:04 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "3170", + "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-ratelimit-limit-requests": "30000", + "x-ratelimit-limit-tokens": "150000000", + "x-ratelimit-remaining-requests": "29999", + "x-ratelimit-remaining-tokens": "149999610", + "x-ratelimit-reset-requests": "2ms", + "x-ratelimit-reset-tokens": "0s", + "x-request-id": "0d0edd0f-d34b-41f6-bf81-c4924d539f1f" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 12, + "id": "9f95a51ba8770b2c", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-07-01T11:37:06.632Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "output_text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "id": "fc_05a90b95f7a788b5006a44fbe05b4c81a3b5987ee6fd97b39f", + "type": "item_reference" + }, + { + "id": "fc_05a90b95f7a788b5006a44fbe05b6481a38c617a786b550ef3", + "type": "item_reference" + }, + { + "call_id": "call_8GGuS9G3qXOu0uQjVEsKgw1t", + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "type": "function_call_output" + }, + { + "call_id": "call_lLjZSipWvTnUgrfgIhcwNsBk", + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "type": "function_call_output" + } + ], + "max_output_tokens": 256, + "model": "gpt-4o-mini-2024-07-18", + "temperature": 0, + "tool_choice": "auto", + "tools": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "type": "function" + } + ] + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "kind": "json", + "value": { + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1782905826, + "created_at": 1782905825, + "error": null, + "frequency_penalty": 0, + "id": "resp_05a90b95f7a788b5006a44fbe111fc81a3af1e565785a2640c", + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 256, + "max_tool_calls": null, + "metadata": {}, + "model": "gpt-4o-mini-2024-07-18", + "moderation": null, + "object": "response", + "output": [ + { + "arguments": "{\"discountCode\":\"SAVE20\",\"total\":999}", + "call_id": "call_1fMn3W7IWFXGflea0D6gbIW0", + "id": "fc_05a90b95f7a788b5006a44fbe210fc81a3b1afb5c0bda84357", + "name": "apply_discount", + "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": "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": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "strict": true, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "strict": true, + "type": "function" + } + ], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 281 + }, + "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": "a1451ddcaa4e5a6b-VIE", + "connection": "keep-alive", + "content-encoding": "gzip", + "content-type": "application/json", + "date": "Wed, 01 Jul 2026 11:37:06 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "1806", + "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-ratelimit-limit-requests": "30000", + "x-ratelimit-limit-tokens": "150000000", + "x-ratelimit-remaining-requests": "29999", + "x-ratelimit-remaining-tokens": "149999522", + "x-ratelimit-reset-requests": "2ms", + "x-ratelimit-reset-tokens": "0s", + "x-request-id": "459dc5f6-acb9-474b-991a-5181e7dac227" + }, + "status": 200, + "statusText": "OK" + } + }, + { + "callIndex": 13, + "id": "058eaddbb1690160", + "matchKey": "POST api.openai.com/v1/responses", + "recordedAt": "2026-07-01T11:37:09.462Z", + "request": { + "body": { + "kind": "json", + "value": { + "input": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "output_text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "input_text" + } + ], + "role": "user" + }, + { + "id": "fc_05a90b95f7a788b5006a44fbe05b4c81a3b5987ee6fd97b39f", + "type": "item_reference" + }, + { + "id": "fc_05a90b95f7a788b5006a44fbe05b6481a38c617a786b550ef3", + "type": "item_reference" + }, + { + "call_id": "call_8GGuS9G3qXOu0uQjVEsKgw1t", + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "type": "function_call_output" + }, + { + "call_id": "call_lLjZSipWvTnUgrfgIhcwNsBk", + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "type": "function_call_output" + }, + { + "id": "fc_05a90b95f7a788b5006a44fbe210fc81a3b1afb5c0bda84357", + "type": "item_reference" + }, + { + "call_id": "call_1fMn3W7IWFXGflea0D6gbIW0", + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "type": "function_call_output" + } + ], + "max_output_tokens": 256, + "model": "gpt-4o-mini-2024-07-18", + "temperature": 0, + "tool_choice": "auto", + "tools": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "type": "function" + } + ] + } + }, + "headers": {}, + "method": "POST", + "url": "https://api.openai.com/v1/responses" + }, + "response": { + "body": { + "kind": "json", + "value": { + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1782905829, + "created_at": 1782905827, + "error": null, + "frequency_penalty": 0, + "id": "resp_05a90b95f7a788b5006a44fbe30f2081a38db9d8811b348009", + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 256, + "max_tool_calls": null, + "metadata": {}, + "model": "gpt-4o-mini-2024-07-18", + "moderation": null, + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "logprobs": [], + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "output_text" + } + ], + "id": "msg_05a90b95f7a788b5006a44fbe3dc2c81a39292caa71b0ff248", + "role": "assistant", + "status": "completed", + "type": "message" + } + ], + "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": "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": [ + { + "description": "Get the price of an item at a store", + "name": "get_store_price", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": ["item", "store"], + "type": "object" + }, + "strict": true, + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "name": "apply_discount", + "parameters": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": ["discountCode", "total"], + "type": "object" + }, + "strict": true, + "type": "function" + } + ], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + }, + "total_tokens": 370 + }, + "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": "a1451de93ec35a6b-VIE", + "connection": "keep-alive", + "content-encoding": "gzip", + "content-type": "application/json", + "date": "Wed, 01 Jul 2026 11:37:09 GMT", + "openai-organization": "braintrust-data", + "openai-processing-ms": "2552", + "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-ratelimit-limit-requests": "30000", + "x-ratelimit-limit-tokens": "150000000", + "x-ratelimit-remaining-requests": "29999", + "x-ratelimit-remaining-tokens": "149999475", + "x-ratelimit-reset-requests": "2ms", + "x-ratelimit-reset-tokens": "0s", + "x-request-id": "e566f085-89cd-4852-a34c-b7d7e0b2f196" }, "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..fdeac6a51 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 @@ -46,7 +46,6 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -98,7 +97,6 @@ }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -125,7 +123,6 @@ "isContinued": false, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -385,14 +382,12 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, "toolCalls": [ { "args": "{\"location\":\"Paris, France\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "get_weather" } @@ -476,7 +471,6 @@ }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -488,7 +482,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -499,7 +492,6 @@ "content": [ { "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -522,7 +514,6 @@ "isContinued": false, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -534,7 +525,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -545,7 +535,6 @@ "content": [ { "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -563,7 +552,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -574,7 +562,6 @@ "location": "Paris, France" }, "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather" } ], @@ -592,7 +579,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -603,7 +589,6 @@ "location": "Paris, France" }, "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather" } ], @@ -708,14 +693,12 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json" } @@ -783,7 +766,6 @@ }, "response": { "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -864,7 +846,6 @@ "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json", "type": "tool-call" 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..2f828a0fc 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 @@ -37,7 +37,6 @@ span_tree: │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -64,7 +63,6 @@ span_tree: │ "isContinued": false, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -141,7 +139,6 @@ span_tree: │ "headers": "" │ }, │ "response": { - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -334,7 +331,6 @@ span_tree: │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -346,7 +342,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -357,7 +352,6 @@ span_tree: │ "content": [ │ { │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -380,7 +374,6 @@ span_tree: │ "isContinued": false, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -392,7 +385,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -403,7 +395,6 @@ span_tree: │ "content": [ │ { │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -421,7 +412,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -432,7 +422,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather" │ } │ ], @@ -450,7 +439,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -461,7 +449,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather" │ } │ ], @@ -559,14 +546,12 @@ span_tree: │ │ "headers": "" │ │ }, │ │ "response": { - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, │ │ "toolCalls": [ │ │ { │ │ "args": "{\"location\":\"Paris, France\"}", - │ │ "toolCallId": "", │ │ "toolCallType": "function", │ │ "toolName": "get_weather" │ │ } @@ -646,7 +631,6 @@ span_tree: │ }, │ "response": { │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -715,14 +699,12 @@ span_tree: │ "headers": "" │ }, │ "response": { - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, │ "toolCalls": [ │ { │ "args": "{\"city\":\"Paris\"}", - │ "toolCallId": "", │ "toolCallType": "function", │ "toolName": "json" │ } @@ -844,7 +826,6 @@ span_tree: "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json", "type": "tool-call" 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..fdeac6a51 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 @@ -46,7 +46,6 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -98,7 +97,6 @@ }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -125,7 +123,6 @@ "isContinued": false, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -385,14 +382,12 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, "toolCalls": [ { "args": "{\"location\":\"Paris, France\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "get_weather" } @@ -476,7 +471,6 @@ }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -488,7 +482,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -499,7 +492,6 @@ "content": [ { "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -522,7 +514,6 @@ "isContinued": false, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -534,7 +525,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -545,7 +535,6 @@ "content": [ { "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -563,7 +552,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -574,7 +562,6 @@ "location": "Paris, France" }, "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather" } ], @@ -592,7 +579,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -603,7 +589,6 @@ "location": "Paris, France" }, "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather" } ], @@ -708,14 +693,12 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json" } @@ -783,7 +766,6 @@ }, "response": { "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -864,7 +846,6 @@ "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json", "type": "tool-call" 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..2f828a0fc 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 @@ -37,7 +37,6 @@ span_tree: │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -64,7 +63,6 @@ span_tree: │ "isContinued": false, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -141,7 +139,6 @@ span_tree: │ "headers": "" │ }, │ "response": { - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -334,7 +331,6 @@ span_tree: │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -346,7 +342,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -357,7 +352,6 @@ span_tree: │ "content": [ │ { │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -380,7 +374,6 @@ span_tree: │ "isContinued": false, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -392,7 +385,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -403,7 +395,6 @@ span_tree: │ "content": [ │ { │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -421,7 +412,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -432,7 +422,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather" │ } │ ], @@ -450,7 +439,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -461,7 +449,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather" │ } │ ], @@ -559,14 +546,12 @@ span_tree: │ │ "headers": "" │ │ }, │ │ "response": { - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, │ │ "toolCalls": [ │ │ { │ │ "args": "{\"location\":\"Paris, France\"}", - │ │ "toolCallId": "", │ │ "toolCallType": "function", │ │ "toolName": "get_weather" │ │ } @@ -646,7 +631,6 @@ span_tree: │ }, │ "response": { │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -715,14 +699,12 @@ span_tree: │ "headers": "" │ }, │ "response": { - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, │ "toolCalls": [ │ { │ "args": "{\"city\":\"Paris\"}", - │ "toolCallId": "", │ "toolCallType": "function", │ "toolName": "json" │ } @@ -844,7 +826,6 @@ span_tree: "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json", "type": "tool-call" 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..c0dd913a5 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 @@ -59,7 +59,6 @@ } ], "created": 0, - "id": "", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", @@ -83,7 +82,6 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -142,7 +140,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -151,7 +148,6 @@ "type": "text" } ], - "id": "", "role": "assistant" } ], @@ -181,7 +177,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -190,7 +185,6 @@ "type": "text" } ], - "id": "", "role": "assistant" } ], @@ -297,7 +291,6 @@ } ], "created": 0, - "id": "", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", @@ -321,7 +314,6 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -402,7 +394,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -411,7 +402,6 @@ "type": "text" } ], - "id": "", "role": "assistant" } ], @@ -441,7 +431,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -450,7 +439,6 @@ "type": "text" } ], - "id": "", "role": "assistant" } ], @@ -713,7 +701,6 @@ "arguments": "{\"location\":\"Paris, France\"}", "name": "get_weather" }, - "id": "", "type": "function" } ] @@ -721,7 +708,6 @@ } ], "created": 0, - "id": "", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", @@ -745,14 +731,12 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, "toolCalls": [ { "args": "{\"location\":\"Paris, France\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "get_weather" } @@ -791,8 +775,7 @@ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", "role": "user" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -851,7 +834,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -859,24 +841,20 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], - "id": "", "role": "assistant" }, { "content": [ { "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], - "id": "", "role": "tool" } ], @@ -906,7 +884,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -914,24 +891,20 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], - "id": "", "role": "assistant" }, { "content": [ { "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], - "id": "", "role": "tool" } ], @@ -946,7 +919,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -957,7 +929,6 @@ "location": "Paris, France" }, "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -976,7 +947,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -987,7 +957,6 @@ "location": "Paris, France" }, "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1108,7 +1077,6 @@ "arguments": "{\"city\":\"Paris\"}", "name": "json" }, - "id": "", "type": "function" } ] @@ -1116,7 +1084,6 @@ } ], "created": 0, - "id": "", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", @@ -1140,14 +1107,12 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json" } @@ -1222,7 +1187,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1302,7 +1266,6 @@ "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json", "type": "tool-call" 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..9c4cea0b0 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 @@ -44,7 +44,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -53,7 +52,6 @@ span_tree: │ "type": "text" │ } │ ], - │ "id": "", │ "role": "assistant" │ } │ ], @@ -83,7 +81,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -92,7 +89,6 @@ span_tree: │ "type": "text" │ } │ ], - │ "id": "", │ "role": "assistant" │ } │ ], @@ -175,7 +171,6 @@ span_tree: │ } │ ], │ "created": 0, - │ "id": "", │ "model": "gpt-4o-mini-2024-07-18", │ "object": "chat.completion", │ "service_tier": "default", @@ -199,7 +194,6 @@ span_tree: │ "headers": "" │ }, │ "response": { - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -284,7 +278,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -293,7 +286,6 @@ span_tree: │ "type": "text" │ } │ ], - │ "id": "", │ "role": "assistant" │ } │ ], @@ -323,7 +315,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -332,7 +323,6 @@ span_tree: │ "type": "text" │ } │ ], - │ "id": "", │ "role": "assistant" │ } │ ], @@ -422,7 +412,6 @@ span_tree: │ } │ ], │ "created": 0, - │ "id": "", │ "model": "gpt-4o-mini-2024-07-18", │ "object": "chat.completion", │ "service_tier": "default", @@ -446,7 +435,6 @@ span_tree: │ "headers": "" │ }, │ "response": { - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -641,7 +629,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -649,24 +636,20 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } │ ], - │ "id": "", │ "role": "assistant" │ }, │ { │ "content": [ │ { │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } │ ], - │ "id": "", │ "role": "tool" │ } │ ], @@ -696,7 +679,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -704,24 +686,20 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } │ ], - │ "id": "", │ "role": "assistant" │ }, │ { │ "content": [ │ { │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } │ ], - │ "id": "", │ "role": "tool" │ } │ ], @@ -736,7 +714,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -747,7 +724,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -766,7 +742,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -777,7 +752,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -891,7 +865,6 @@ span_tree: │ │ "arguments": "{\"location\":\"Paris, France\"}", │ │ "name": "get_weather" │ │ }, - │ │ "id": "", │ │ "type": "function" │ │ } │ │ ] @@ -899,7 +872,6 @@ span_tree: │ │ } │ │ ], │ │ "created": 0, - │ │ "id": "", │ │ "model": "gpt-4o-mini-2024-07-18", │ │ "object": "chat.completion", │ │ "service_tier": "default", @@ -923,14 +895,12 @@ span_tree: │ │ "headers": "" │ │ }, │ │ "response": { - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, │ │ "toolCalls": [ │ │ { │ │ "args": "{\"location\":\"Paris, France\"}", - │ │ "toolCallId": "", │ │ "toolCallType": "function", │ │ "toolName": "get_weather" │ │ } @@ -965,8 +935,7 @@ span_tree: │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", │ "role": "user" │ } - │ ], - │ "toolCallId": "" + │ ] │ } │ ] │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1025,7 +994,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -1109,7 +1077,6 @@ span_tree: │ "arguments": "{\"city\":\"Paris\"}", │ "name": "json" │ }, - │ "id": "", │ "type": "function" │ } │ ] @@ -1117,7 +1084,6 @@ span_tree: │ } │ ], │ "created": 0, - │ "id": "", │ "model": "gpt-4o-mini-2024-07-18", │ "object": "chat.completion", │ "service_tier": "default", @@ -1141,14 +1107,12 @@ span_tree: │ "headers": "" │ }, │ "response": { - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, │ "toolCalls": [ │ { │ "args": "{\"city\":\"Paris\"}", - │ "toolCallId": "", │ "toolCallType": "function", │ "toolName": "json" │ } @@ -1265,7 +1229,6 @@ span_tree: "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json", "type": "tool-call" 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..c0dd913a5 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 @@ -59,7 +59,6 @@ } ], "created": 0, - "id": "", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", @@ -83,7 +82,6 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -142,7 +140,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -151,7 +148,6 @@ "type": "text" } ], - "id": "", "role": "assistant" } ], @@ -181,7 +177,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -190,7 +185,6 @@ "type": "text" } ], - "id": "", "role": "assistant" } ], @@ -297,7 +291,6 @@ } ], "created": 0, - "id": "", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", @@ -321,7 +314,6 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -402,7 +394,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -411,7 +402,6 @@ "type": "text" } ], - "id": "", "role": "assistant" } ], @@ -441,7 +431,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -450,7 +439,6 @@ "type": "text" } ], - "id": "", "role": "assistant" } ], @@ -713,7 +701,6 @@ "arguments": "{\"location\":\"Paris, France\"}", "name": "get_weather" }, - "id": "", "type": "function" } ] @@ -721,7 +708,6 @@ } ], "created": 0, - "id": "", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", @@ -745,14 +731,12 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, "toolCalls": [ { "args": "{\"location\":\"Paris, France\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "get_weather" } @@ -791,8 +775,7 @@ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", "role": "user" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -851,7 +834,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -859,24 +841,20 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], - "id": "", "role": "assistant" }, { "content": [ { "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], - "id": "", "role": "tool" } ], @@ -906,7 +884,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -914,24 +891,20 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], - "id": "", "role": "assistant" }, { "content": [ { "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], - "id": "", "role": "tool" } ], @@ -946,7 +919,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -957,7 +929,6 @@ "location": "Paris, France" }, "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -976,7 +947,6 @@ "args": { "location": "Paris, France" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -987,7 +957,6 @@ "location": "Paris, France" }, "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1108,7 +1077,6 @@ "arguments": "{\"city\":\"Paris\"}", "name": "json" }, - "id": "", "type": "function" } ] @@ -1116,7 +1084,6 @@ } ], "created": 0, - "id": "", "model": "gpt-4o-mini-2024-07-18", "object": "chat.completion", "service_tier": "default", @@ -1140,14 +1107,12 @@ "headers": "" }, "response": { - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json" } @@ -1222,7 +1187,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1302,7 +1266,6 @@ "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json", "type": "tool-call" 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..9c4cea0b0 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 @@ -44,7 +44,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -53,7 +52,6 @@ span_tree: │ "type": "text" │ } │ ], - │ "id": "", │ "role": "assistant" │ } │ ], @@ -83,7 +81,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -92,7 +89,6 @@ span_tree: │ "type": "text" │ } │ ], - │ "id": "", │ "role": "assistant" │ } │ ], @@ -175,7 +171,6 @@ span_tree: │ } │ ], │ "created": 0, - │ "id": "", │ "model": "gpt-4o-mini-2024-07-18", │ "object": "chat.completion", │ "service_tier": "default", @@ -199,7 +194,6 @@ span_tree: │ "headers": "" │ }, │ "response": { - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -284,7 +278,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -293,7 +286,6 @@ span_tree: │ "type": "text" │ } │ ], - │ "id": "", │ "role": "assistant" │ } │ ], @@ -323,7 +315,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -332,7 +323,6 @@ span_tree: │ "type": "text" │ } │ ], - │ "id": "", │ "role": "assistant" │ } │ ], @@ -422,7 +412,6 @@ span_tree: │ } │ ], │ "created": 0, - │ "id": "", │ "model": "gpt-4o-mini-2024-07-18", │ "object": "chat.completion", │ "service_tier": "default", @@ -446,7 +435,6 @@ span_tree: │ "headers": "" │ }, │ "response": { - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -641,7 +629,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -649,24 +636,20 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } │ ], - │ "id": "", │ "role": "assistant" │ }, │ { │ "content": [ │ { │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } │ ], - │ "id": "", │ "role": "tool" │ } │ ], @@ -696,7 +679,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -704,24 +686,20 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } │ ], - │ "id": "", │ "role": "assistant" │ }, │ { │ "content": [ │ { │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } │ ], - │ "id": "", │ "role": "tool" │ } │ ], @@ -736,7 +714,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -747,7 +724,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -766,7 +742,6 @@ span_tree: │ "args": { │ "location": "Paris, France" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -777,7 +752,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "result": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -891,7 +865,6 @@ span_tree: │ │ "arguments": "{\"location\":\"Paris, France\"}", │ │ "name": "get_weather" │ │ }, - │ │ "id": "", │ │ "type": "function" │ │ } │ │ ] @@ -899,7 +872,6 @@ span_tree: │ │ } │ │ ], │ │ "created": 0, - │ │ "id": "", │ │ "model": "gpt-4o-mini-2024-07-18", │ │ "object": "chat.completion", │ │ "service_tier": "default", @@ -923,14 +895,12 @@ span_tree: │ │ "headers": "" │ │ }, │ │ "response": { - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, │ │ "toolCalls": [ │ │ { │ │ "args": "{\"location\":\"Paris, France\"}", - │ │ "toolCallId": "", │ │ "toolCallType": "function", │ │ "toolName": "get_weather" │ │ } @@ -965,8 +935,7 @@ span_tree: │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", │ "role": "user" │ } - │ ], - │ "toolCallId": "" + │ ] │ } │ ] │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1025,7 +994,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -1109,7 +1077,6 @@ span_tree: │ "arguments": "{\"city\":\"Paris\"}", │ "name": "json" │ }, - │ "id": "", │ "type": "function" │ } │ ] @@ -1117,7 +1084,6 @@ span_tree: │ } │ ], │ "created": 0, - │ "id": "", │ "model": "gpt-4o-mini-2024-07-18", │ "object": "chat.completion", │ "service_tier": "default", @@ -1141,14 +1107,12 @@ span_tree: │ "headers": "" │ }, │ "response": { - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, │ "toolCalls": [ │ { │ "args": "{\"city\":\"Paris\"}", - │ "toolCallId": "", │ "toolCallType": "function", │ "toolName": "json" │ } @@ -1265,7 +1229,6 @@ span_tree: "toolCalls": [ { "args": "{\"city\":\"Paris\"}", - "toolCallId": "", "toolCallType": "function", "toolName": "json", "type": "tool-call" 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..a4af6ab89 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 @@ -48,14 +48,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -125,14 +124,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -168,14 +166,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -307,14 +304,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -422,14 +418,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -465,14 +460,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -746,10 +740,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -757,14 +750,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -809,8 +801,7 @@ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", "role": "user" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -846,10 +837,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -863,7 +853,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -903,10 +892,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -914,14 +902,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -974,10 +961,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -991,15 +977,13 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1035,10 +1019,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1052,7 +1035,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1067,10 +1049,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1084,7 +1065,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1124,10 +1104,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1135,14 +1114,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1195,10 +1173,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1212,7 +1189,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1227,10 +1203,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1244,15 +1219,13 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1288,10 +1261,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1305,7 +1277,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1320,10 +1291,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1337,7 +1307,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1352,10 +1321,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1369,7 +1337,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1409,10 +1376,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1420,14 +1386,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1480,10 +1445,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1497,7 +1461,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1512,10 +1475,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1529,7 +1491,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1544,10 +1505,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1561,15 +1521,13 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1627,10 +1585,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1640,7 +1597,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1648,14 +1604,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -1665,10 +1620,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1682,7 +1636,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1697,10 +1650,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1714,7 +1666,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1729,10 +1680,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1746,7 +1696,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1761,10 +1710,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1778,7 +1726,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1798,10 +1745,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1811,7 +1757,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1819,14 +1764,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -1836,10 +1780,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1853,7 +1796,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1881,10 +1823,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1894,7 +1835,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1902,14 +1842,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -1919,10 +1858,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1936,7 +1874,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1951,10 +1888,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1968,7 +1904,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1996,10 +1931,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2009,7 +1943,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2017,14 +1950,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2034,10 +1966,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2051,7 +1982,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2066,10 +1996,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2083,7 +2012,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2098,10 +2026,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2115,7 +2042,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2143,10 +2069,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2156,7 +2081,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2164,14 +2088,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2181,10 +2104,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2198,7 +2120,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2213,10 +2134,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2230,7 +2150,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2245,10 +2164,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2262,7 +2180,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2277,10 +2194,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2294,7 +2210,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2323,10 +2238,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2338,7 +2252,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2439,14 +2352,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2521,14 +2433,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2564,14 +2475,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2678,14 +2588,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2760,14 +2669,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2803,14 +2711,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2914,14 +2821,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2996,14 +2902,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3039,14 +2944,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3175,7 +3079,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "claude-haiku-4-5-20251001" }, "usage": { @@ -3266,7 +3169,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3314,7 +3216,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3432,7 +3333,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "claude-haiku-4-5-20251001" }, "usage": { @@ -3523,7 +3423,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3571,7 +3470,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3686,7 +3584,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "claude-haiku-4-5-20251001" }, "usage": { @@ -3777,7 +3674,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3825,7 +3721,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3925,14 +3820,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -4002,7 +3896,7 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, @@ -4034,7 +3928,6 @@ "created_at": 0, "error": null, "frequency_penalty": 0, - "id": "", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -4053,7 +3946,6 @@ "type": "output_text" } ], - "id": "", "role": "assistant", "status": "completed", "type": "message" @@ -4062,7 +3954,6 @@ "parallel_tool_calls": true, "presence_penalty": 0, "previous_response_id": null, - "prompt_cache_key": "[REDACTED]", "prompt_cache_retention": "in_memory", "reasoning": { "context": null, @@ -4081,6 +3972,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, @@ -4123,7 +4032,6 @@ "x-ratelimit-reset-tokens": "", "x-request-id": "" }, - "id": "", "messages": [ { "content": [ @@ -4159,7 +4067,7 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, @@ -4191,7 +4099,6 @@ "created_at": 0, "error": null, "frequency_penalty": 0, - "id": "", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -4210,7 +4117,6 @@ "type": "output_text" } ], - "id": "", "role": "assistant", "status": "completed", "type": "message" @@ -4219,7 +4125,6 @@ "parallel_tool_calls": true, "presence_penalty": 0, "previous_response_id": null, - "prompt_cache_key": "[REDACTED]", "prompt_cache_retention": "in_memory", "reasoning": { "context": null, @@ -4238,6 +4143,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, @@ -4280,7 +4203,6 @@ "x-ratelimit-reset-tokens": "", "x-request-id": "" }, - "id": "", "messages": [ { "content": [ @@ -4404,14 +4326,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -4486,14 +4407,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -4710,14 +4630,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4753,14 +4672,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4866,14 +4784,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -4929,14 +4846,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4972,14 +4888,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ 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..ec7dee424 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 @@ -49,14 +49,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -92,14 +91,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -190,14 +188,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -314,14 +311,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -357,14 +353,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -471,14 +466,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -692,10 +686,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -705,7 +698,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -713,14 +705,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -730,10 +721,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -747,7 +737,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -762,10 +751,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -779,7 +767,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -794,10 +781,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -811,7 +797,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -826,10 +811,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -843,7 +827,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -863,10 +846,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -876,7 +858,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -884,14 +865,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -901,10 +881,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -918,7 +897,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -946,10 +924,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -959,7 +936,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -967,14 +943,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -984,10 +959,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1001,7 +975,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1016,10 +989,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1033,7 +1005,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1061,10 +1032,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1074,7 +1044,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1082,14 +1051,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1099,10 +1067,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1116,7 +1083,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1131,10 +1097,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1148,7 +1113,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1163,10 +1127,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1180,7 +1143,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1208,10 +1170,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1221,7 +1182,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1229,14 +1189,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1246,10 +1205,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1263,7 +1221,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1278,10 +1235,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1295,7 +1251,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1310,10 +1265,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1327,7 +1281,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1342,10 +1295,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1359,7 +1311,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1388,10 +1339,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1403,7 +1353,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1504,10 +1453,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1515,14 +1463,13 @@ span_tree: │ │ "finishReason": "tool-calls", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -1563,8 +1510,7 @@ span_tree: │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", │ │ "role": "user" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1596,10 +1542,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1613,7 +1558,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -1653,10 +1597,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1664,14 +1607,13 @@ span_tree: │ │ "finishReason": "tool-calls", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -1720,10 +1662,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1737,15 +1678,13 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } │ │ ], │ │ "role": "tool" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1777,10 +1716,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1794,7 +1732,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -1809,10 +1746,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1826,7 +1762,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -1866,10 +1801,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1877,14 +1811,13 @@ span_tree: │ │ "finishReason": "tool-calls", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -1933,10 +1866,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1950,7 +1882,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -1965,10 +1896,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1982,15 +1912,13 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } │ │ ], │ │ "role": "tool" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -2022,10 +1950,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2039,7 +1966,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2054,10 +1980,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2071,7 +1996,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2086,10 +2010,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2103,7 +2026,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2143,10 +2065,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2154,14 +2075,13 @@ span_tree: │ │ "finishReason": "tool-calls", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -2210,10 +2130,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2227,7 +2146,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -2242,10 +2160,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2259,7 +2176,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -2274,10 +2190,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2291,15 +2206,13 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } │ ], │ "role": "tool" │ } - │ ], - │ "toolCallId": "" + │ ] │ } │ ] │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -2347,14 +2260,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -2390,14 +2302,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -2493,14 +2404,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -2579,14 +2489,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -2622,14 +2531,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -2725,14 +2633,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -2806,14 +2713,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -2849,14 +2755,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -2952,14 +2857,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -3052,7 +2956,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3100,7 +3003,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3207,7 +3109,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, │ "usage": { @@ -3302,7 +3203,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -3350,7 +3250,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -3457,7 +3356,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "claude-haiku-4-5-20251001" │ │ }, │ │ "usage": { @@ -3547,7 +3445,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3595,7 +3492,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3702,7 +3598,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, │ "usage": { @@ -3773,7 +3668,7 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, @@ -3805,7 +3700,6 @@ span_tree: │ "created_at": 0, │ "error": null, │ "frequency_penalty": 0, - │ "id": "", │ "incomplete_details": null, │ "instructions": null, │ "max_output_tokens": 24, @@ -3824,7 +3718,6 @@ span_tree: │ "type": "output_text" │ } │ ], - │ "id": "", │ "role": "assistant", │ "status": "completed", │ "type": "message" @@ -3833,7 +3726,6 @@ span_tree: │ "parallel_tool_calls": true, │ "presence_penalty": 0, │ "previous_response_id": null, - │ "prompt_cache_key": "[REDACTED]", │ "prompt_cache_retention": "in_memory", │ "reasoning": { │ "context": null, @@ -3852,6 +3744,24 @@ span_tree: │ "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, @@ -3894,7 +3804,6 @@ span_tree: │ "x-ratelimit-reset-tokens": "", │ "x-request-id": "" │ }, - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3930,7 +3839,7 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, @@ -3962,7 +3871,6 @@ span_tree: │ "created_at": 0, │ "error": null, │ "frequency_penalty": 0, - │ "id": "", │ "incomplete_details": null, │ "instructions": null, │ "max_output_tokens": 24, @@ -3981,7 +3889,6 @@ span_tree: │ "type": "output_text" │ } │ ], - │ "id": "", │ "role": "assistant", │ "status": "completed", │ "type": "message" @@ -3990,7 +3897,6 @@ span_tree: │ "parallel_tool_calls": true, │ "presence_penalty": 0, │ "previous_response_id": null, - │ "prompt_cache_key": "[REDACTED]", │ "prompt_cache_retention": "in_memory", │ "reasoning": { │ "context": null, @@ -4009,6 +3915,24 @@ span_tree: │ "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, @@ -4051,7 +3975,6 @@ span_tree: │ "x-ratelimit-reset-tokens": "", │ "x-request-id": "" │ }, - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -4142,14 +4065,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -4228,14 +4150,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -4306,14 +4227,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -4495,14 +4415,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -4538,14 +4457,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -4646,14 +4564,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -4689,14 +4606,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -4798,14 +4714,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, 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..8c50bbf0a 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 @@ -48,14 +48,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -125,14 +124,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -168,14 +166,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -307,14 +304,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -422,14 +418,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -465,14 +460,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -746,10 +740,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -757,14 +750,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -809,8 +801,7 @@ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", "role": "user" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -846,10 +837,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -863,7 +853,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -903,10 +892,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -914,14 +902,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -974,10 +961,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -991,15 +977,13 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1035,10 +1019,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1052,7 +1035,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1067,10 +1049,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1084,7 +1065,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1124,10 +1104,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1135,14 +1114,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1195,10 +1173,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1212,7 +1189,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1227,10 +1203,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1244,15 +1219,13 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1288,10 +1261,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1305,7 +1277,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1320,10 +1291,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1337,7 +1307,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1352,10 +1321,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1369,7 +1337,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1409,10 +1376,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1420,14 +1386,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1480,10 +1445,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1497,7 +1461,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1512,10 +1475,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1529,7 +1491,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1544,10 +1505,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1561,15 +1521,13 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1627,10 +1585,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1640,7 +1597,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1648,14 +1604,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -1665,10 +1620,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1682,7 +1636,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1697,10 +1650,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1714,7 +1666,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1729,10 +1680,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1746,7 +1696,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1761,10 +1710,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1778,7 +1726,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1798,10 +1745,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1811,7 +1757,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1819,14 +1764,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -1836,10 +1780,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1853,7 +1796,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1881,10 +1823,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1894,7 +1835,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1902,14 +1842,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -1919,10 +1858,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1936,7 +1874,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1951,10 +1888,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1968,7 +1904,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1996,10 +1931,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2009,7 +1943,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2017,14 +1950,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2034,10 +1966,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2051,7 +1982,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2066,10 +1996,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2083,7 +2012,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2098,10 +2026,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2115,7 +2042,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2143,10 +2069,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2156,7 +2081,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2164,14 +2088,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2181,10 +2104,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2198,7 +2120,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2213,10 +2134,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2230,7 +2150,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2245,10 +2164,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2262,7 +2180,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2277,10 +2194,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2294,7 +2210,6 @@ "type": "text", "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2323,10 +2238,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2338,7 +2252,6 @@ "location": "Paris, France" }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2442,14 +2355,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2524,14 +2436,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2567,14 +2478,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2678,14 +2588,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2760,14 +2669,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2803,14 +2711,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2942,7 +2849,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "claude-haiku-4-5-20251001" }, "usage": { @@ -3033,7 +2939,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3081,7 +2986,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3196,7 +3100,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "claude-haiku-4-5-20251001" }, "usage": { @@ -3287,7 +3190,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3335,7 +3237,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3435,14 +3336,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -3512,7 +3412,7 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, @@ -3544,7 +3444,6 @@ "created_at": 0, "error": null, "frequency_penalty": 0, - "id": "", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -3563,7 +3462,6 @@ "type": "output_text" } ], - "id": "", "role": "assistant", "status": "completed", "type": "message" @@ -3572,7 +3470,6 @@ "parallel_tool_calls": true, "presence_penalty": 0, "previous_response_id": null, - "prompt_cache_key": "[REDACTED]", "prompt_cache_retention": "in_memory", "reasoning": { "context": null, @@ -3591,6 +3488,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, @@ -3633,7 +3548,6 @@ "x-ratelimit-reset-tokens": "", "x-request-id": "" }, - "id": "", "messages": [ { "content": [ @@ -3669,7 +3583,7 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, @@ -3701,7 +3615,6 @@ "created_at": 0, "error": null, "frequency_penalty": 0, - "id": "", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -3720,7 +3633,6 @@ "type": "output_text" } ], - "id": "", "role": "assistant", "status": "completed", "type": "message" @@ -3729,7 +3641,6 @@ "parallel_tool_calls": true, "presence_penalty": 0, "previous_response_id": null, - "prompt_cache_key": "[REDACTED]", "prompt_cache_retention": "in_memory", "reasoning": { "context": null, @@ -3748,6 +3659,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, @@ -3790,7 +3719,6 @@ "x-ratelimit-reset-tokens": "", "x-request-id": "" }, - "id": "", "messages": [ { "content": [ @@ -3914,14 +3842,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -3996,14 +3923,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -4213,14 +4139,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -4295,14 +4220,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4338,14 +4262,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ 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..6291c7921 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 @@ -49,14 +49,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -92,14 +91,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -190,14 +188,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -314,14 +311,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -357,14 +353,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -471,14 +466,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -692,10 +686,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -705,7 +698,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -713,14 +705,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -730,10 +721,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -747,7 +737,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -762,10 +751,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -779,7 +767,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -794,10 +781,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -811,7 +797,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -826,10 +811,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -843,7 +827,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -863,10 +846,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -876,7 +858,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -884,14 +865,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -901,10 +881,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -918,7 +897,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -946,10 +924,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -959,7 +936,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -967,14 +943,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -984,10 +959,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1001,7 +975,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1016,10 +989,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1033,7 +1005,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1061,10 +1032,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1074,7 +1044,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1082,14 +1051,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1099,10 +1067,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1116,7 +1083,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1131,10 +1097,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1148,7 +1113,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1163,10 +1127,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1180,7 +1143,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1208,10 +1170,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1221,7 +1182,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1229,14 +1189,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1246,10 +1205,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1263,7 +1221,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1278,10 +1235,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1295,7 +1251,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1310,10 +1265,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1327,7 +1281,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1342,10 +1295,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1359,7 +1311,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1388,10 +1339,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1403,7 +1353,6 @@ span_tree: │ "location": "Paris, France" │ }, │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1504,10 +1453,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1515,14 +1463,13 @@ span_tree: │ │ "finishReason": "tool-calls", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -1563,8 +1510,7 @@ span_tree: │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", │ │ "role": "user" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1596,10 +1542,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1613,7 +1558,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -1653,10 +1597,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1664,14 +1607,13 @@ span_tree: │ │ "finishReason": "tool-calls", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -1720,10 +1662,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1737,15 +1678,13 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } │ │ ], │ │ "role": "tool" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1777,10 +1716,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1794,7 +1732,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -1809,10 +1746,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1826,7 +1762,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -1866,10 +1801,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1877,14 +1811,13 @@ span_tree: │ │ "finishReason": "tool-calls", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -1933,10 +1866,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1950,7 +1882,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -1965,10 +1896,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1982,15 +1912,13 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } │ │ ], │ │ "role": "tool" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -2022,10 +1950,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2039,7 +1966,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2054,10 +1980,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2071,7 +1996,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2086,10 +2010,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2103,7 +2026,6 @@ span_tree: │ │ "type": "text", │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2143,10 +2065,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2154,14 +2075,13 @@ span_tree: │ │ "finishReason": "tool-calls", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -2210,10 +2130,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2227,7 +2146,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -2242,10 +2160,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2259,7 +2176,6 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -2274,10 +2190,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2291,15 +2206,13 @@ span_tree: │ "type": "text", │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } │ ], │ "role": "tool" │ } - │ ], - │ "toolCallId": "" + │ ] │ } │ ] │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -2352,14 +2265,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -2395,14 +2307,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -2498,14 +2409,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -2579,14 +2489,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -2622,14 +2531,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -2725,14 +2633,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -2830,7 +2737,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -2878,7 +2784,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -2985,7 +2890,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "claude-haiku-4-5-20251001" │ │ }, │ │ "usage": { @@ -3075,7 +2979,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3123,7 +3026,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3230,7 +3132,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, │ "usage": { @@ -3301,7 +3202,7 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, @@ -3333,7 +3234,6 @@ span_tree: │ "created_at": 0, │ "error": null, │ "frequency_penalty": 0, - │ "id": "", │ "incomplete_details": null, │ "instructions": null, │ "max_output_tokens": 24, @@ -3352,7 +3252,6 @@ span_tree: │ "type": "output_text" │ } │ ], - │ "id": "", │ "role": "assistant", │ "status": "completed", │ "type": "message" @@ -3361,7 +3260,6 @@ span_tree: │ "parallel_tool_calls": true, │ "presence_penalty": 0, │ "previous_response_id": null, - │ "prompt_cache_key": "[REDACTED]", │ "prompt_cache_retention": "in_memory", │ "reasoning": { │ "context": null, @@ -3380,6 +3278,24 @@ span_tree: │ "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, @@ -3422,7 +3338,6 @@ span_tree: │ "x-ratelimit-reset-tokens": "", │ "x-request-id": "" │ }, - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3458,7 +3373,7 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, @@ -3490,7 +3405,6 @@ span_tree: │ "created_at": 0, │ "error": null, │ "frequency_penalty": 0, - │ "id": "", │ "incomplete_details": null, │ "instructions": null, │ "max_output_tokens": 24, @@ -3509,7 +3423,6 @@ span_tree: │ "type": "output_text" │ } │ ], - │ "id": "", │ "role": "assistant", │ "status": "completed", │ "type": "message" @@ -3518,7 +3431,6 @@ span_tree: │ "parallel_tool_calls": true, │ "presence_penalty": 0, │ "previous_response_id": null, - │ "prompt_cache_key": "[REDACTED]", │ "prompt_cache_retention": "in_memory", │ "reasoning": { │ "context": null, @@ -3537,6 +3449,24 @@ span_tree: │ "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, @@ -3579,7 +3509,6 @@ span_tree: │ "x-ratelimit-reset-tokens": "", │ "x-request-id": "" │ }, - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3670,14 +3599,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -3756,14 +3684,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -3834,14 +3761,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -4042,14 +3968,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -4085,14 +4010,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -4186,14 +4110,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "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..16219a04e 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 @@ -50,14 +50,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -143,14 +142,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -186,14 +184,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -371,14 +368,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -485,14 +481,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -528,14 +523,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -827,7 +821,7 @@ "output": [ { "index": 1, - "relevance_score": 0.06664825 + "relevance_score": 0.06657539 }, { "index": 0, @@ -914,10 +908,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -927,14 +920,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -995,8 +987,7 @@ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", "role": "user" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1032,10 +1023,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1051,10 +1041,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1094,10 +1083,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1107,14 +1095,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1183,10 +1170,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1202,18 +1188,16 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1249,10 +1233,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1268,10 +1251,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1286,10 +1268,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1305,10 +1286,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1348,10 +1328,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1361,14 +1340,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1437,10 +1415,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1456,10 +1433,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1474,10 +1450,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1493,18 +1468,16 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1540,10 +1513,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1559,10 +1531,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1577,10 +1548,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1596,10 +1566,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1614,10 +1583,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1633,10 +1601,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1676,10 +1643,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1689,14 +1655,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1765,10 +1730,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1784,10 +1748,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1802,10 +1765,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1821,10 +1783,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1839,10 +1800,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1858,18 +1818,16 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1927,10 +1885,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1942,10 +1899,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1953,14 +1909,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -1970,10 +1925,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1989,10 +1943,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2007,10 +1960,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2026,10 +1978,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2044,10 +1995,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2063,10 +2013,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2081,10 +2030,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2100,10 +2048,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2123,10 +2070,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2138,10 +2084,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2149,14 +2094,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2166,10 +2110,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2185,10 +2128,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2234,10 +2176,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2249,10 +2190,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2260,14 +2200,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2277,10 +2216,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2296,10 +2234,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2314,10 +2251,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2333,10 +2269,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2382,10 +2317,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2397,10 +2331,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2408,14 +2341,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2425,10 +2357,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2444,10 +2375,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2462,10 +2392,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2481,10 +2410,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2499,10 +2427,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2518,10 +2445,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2567,10 +2493,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2582,10 +2507,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2593,14 +2517,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2610,10 +2533,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2629,10 +2551,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2647,10 +2568,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2666,10 +2586,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2684,10 +2603,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2703,10 +2621,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2721,10 +2638,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2740,10 +2656,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2790,10 +2705,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2807,10 +2721,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2939,14 +2852,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -3037,14 +2949,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3080,14 +2991,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3240,14 +3150,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -3338,14 +3247,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3381,14 +3289,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3538,14 +3445,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -3636,14 +3542,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3679,14 +3584,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3862,7 +3766,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "claude-haiku-4-5-20251001" }, "usage": { @@ -3972,7 +3875,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4021,7 +3923,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4184,7 +4085,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "claude-haiku-4-5-20251001" }, "usage": { @@ -4294,7 +4194,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4343,7 +4242,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4503,7 +4401,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "claude-haiku-4-5-20251001" }, "usage": { @@ -4613,7 +4510,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4662,7 +4558,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4806,14 +4701,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -4899,7 +4793,7 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, @@ -4931,7 +4825,6 @@ "created_at": 0, "error": null, "frequency_penalty": 0, - "id": "", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -4950,7 +4843,6 @@ "type": "output_text" } ], - "id": "", "role": "assistant", "status": "completed", "type": "message" @@ -4959,7 +4851,6 @@ "parallel_tool_calls": true, "presence_penalty": 0, "previous_response_id": null, - "prompt_cache_key": "[REDACTED]", "prompt_cache_retention": "in_memory", "reasoning": { "context": null, @@ -4978,6 +4869,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, @@ -5020,7 +4929,6 @@ "x-ratelimit-reset-tokens": "", "x-request-id": "" }, - "id": "", "messages": [ { "content": [ @@ -5056,7 +4964,7 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, @@ -5088,7 +4996,6 @@ "created_at": 0, "error": null, "frequency_penalty": 0, - "id": "", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -5107,7 +5014,6 @@ "type": "output_text" } ], - "id": "", "role": "assistant", "status": "completed", "type": "message" @@ -5116,7 +5022,6 @@ "parallel_tool_calls": true, "presence_penalty": 0, "previous_response_id": null, - "prompt_cache_key": "[REDACTED]", "prompt_cache_retention": "in_memory", "reasoning": { "context": null, @@ -5135,6 +5040,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, @@ -5177,7 +5100,6 @@ "x-ratelimit-reset-tokens": "", "x-request-id": "" }, - "id": "", "messages": [ { "content": [ @@ -5347,14 +5269,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -5445,14 +5366,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -5704,14 +5624,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -5747,14 +5666,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -5902,14 +5820,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -5981,14 +5898,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -6024,14 +5940,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -6292,6 +6207,2387 @@ "operation": "agent-stream", "testRunId": "" } + }, + { + "name": "ai-sdk-agent-tool-loop-operation", + "children": [ + { + "name": "ToolLoopAgent.generate", + "type": "function", + "children": [ + { + "name": "generateText", + "type": "function", + "children": [], + "input": { + "maxOutputTokens": 256, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ], + "model": { + "config": { + "fileIdPrefixes": [ + "file-" + ], + "provider": "openai.responses" + }, + "modelId": "gpt-4o-mini-2024-07-18", + "specificationVersion": "v3", + "supportedUrls": { + "application/pdf": [ + {} + ], + "image/*": [ + {} + ] + } + }, + "system": "You are a shopping assistant. Use the tools before answering pricing questions.", + "temperature": 0, + "tools": { + "apply_discount": { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + } + }, + "get_store_price": { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + } + } + } + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "steps": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 173 + }, + "inputTokens": 173, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 59 + }, + "outputTokens": 59, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 232 + }, + "warnings": [] + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 260 + }, + "inputTokens": 260, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 21 + }, + "outputTokens": 21, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 281 + }, + "warnings": [] + }, + { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 370 + }, + "warnings": [] + } + ], + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "toolCalls": [], + "toolResults": [], + "totalUsage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "reasoningTokens": 0, + "totalTokens": 883 + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 370 + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses", + "tools": { + "apply_discount": { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + } + }, + "get_store_price": { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + } + } + } + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 142, + "prompt_cached_tokens": 0, + "prompt_tokens": 741, + "reasoning_tokens": 0, + "tokens": 883 + } + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "headers": { + "user-agent": "ai/6.0.1" + }, + "maxOutputTokens": 256, + "prompt": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "text" + } + ], + "role": "user" + } + ], + "temperature": 0, + "toolChoice": { + "type": "auto" + }, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "input": "{\"item\":\"laptop\",\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": "{\"item\":\"laptop\",\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "finishReason": { + "unified": "tool-calls" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 173, + "total": 173 + }, + "outputTokens": { + "reasoning": 0, + "text": 59, + "total": 59 + }, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 59, + "prompt_cached_tokens": 0, + "prompt_tokens": 173, + "reasoning_tokens": 0 + } + }, + { + "name": "get_store_price", + "type": "tool", + "children": [], + "input": [ + { + "item": "laptop", + "store": "StoreA" + }, + { + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ] + } + ], + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + { + "name": "get_store_price", + "type": "tool", + "children": [], + "input": [ + { + "item": "laptop", + "store": "StoreB" + }, + { + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ] + } + ], + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "headers": { + "user-agent": "ai/6.0.1" + }, + "maxOutputTokens": 256, + "prompt": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "temperature": 0, + "toolChoice": { + "type": "auto" + }, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "input": "{\"discountCode\":\"SAVE20\",\"total\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "finishReason": { + "unified": "tool-calls" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 260, + "total": 260 + }, + "outputTokens": { + "reasoning": 0, + "text": 21, + "total": 21 + }, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 21, + "prompt_cached_tokens": 0, + "prompt_tokens": 260, + "reasoning_tokens": 0 + } + }, + { + "name": "apply_discount", + "type": "tool", + "children": [], + "input": [ + { + "discountCode": "SAVE20", + "total": 999 + }, + { + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + } + ], + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "headers": { + "user-agent": "ai/6.0.1" + }, + "maxOutputTokens": 256, + "prompt": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "temperature": 0, + "toolChoice": { + "type": "auto" + }, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": { + "unified": "stop" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 308, + "total": 308 + }, + "outputTokens": { + "reasoning": 0, + "text": 62, + "total": 62 + }, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "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": 62, + "prompt_cached_tokens": 0, + "prompt_tokens": 308, + "reasoning_tokens": 0 + } + } + ], + "input": { + "maxOutputTokens": 256, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ] + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "steps": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 173 + }, + "inputTokens": 173, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 59 + }, + "outputTokens": 59, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 232 + }, + "warnings": [] + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 260 + }, + "inputTokens": 260, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 21 + }, + "outputTokens": 21, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 281 + }, + "warnings": [] + }, + { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 370 + }, + "warnings": [] + } + ], + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "toolCalls": [], + "toolResults": [], + "totalUsage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "reasoningTokens": 0, + "totalTokens": 883 + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 370 + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + } + ], + "metadata": { + "operation": "agent-tool-loop", + "testRunId": "" + } } ], "metadata": { 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..709ea32f7 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 @@ -49,14 +49,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -92,14 +91,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -236,14 +234,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -359,14 +356,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -402,14 +398,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -562,14 +557,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -777,7 +771,7 @@ span_tree: │ output: [ │ { │ "index": 1, - │ "relevance_score": 0.06664825 + │ "relevance_score": 0.06657539 │ }, │ { │ "index": 0, @@ -852,10 +846,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -867,10 +860,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -878,14 +870,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -895,10 +886,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -914,10 +904,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -932,10 +921,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -951,10 +939,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -969,10 +956,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -988,10 +974,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1006,10 +991,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1025,10 +1009,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1048,10 +1031,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1063,10 +1045,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1074,14 +1055,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1091,10 +1071,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1110,10 +1089,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1159,10 +1137,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1174,10 +1151,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1185,14 +1161,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1202,10 +1177,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1221,10 +1195,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1239,10 +1212,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1258,10 +1230,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1307,10 +1278,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1322,10 +1292,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1333,14 +1302,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1350,10 +1318,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1369,10 +1336,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1387,10 +1353,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1406,10 +1371,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1424,10 +1388,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1443,10 +1406,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1492,10 +1454,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1507,10 +1468,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1518,14 +1478,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1535,10 +1494,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1554,10 +1512,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1572,10 +1529,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1591,10 +1547,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1609,10 +1564,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1628,10 +1582,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1646,10 +1599,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1665,10 +1617,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1715,10 +1666,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1732,10 +1682,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1862,10 +1811,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1875,14 +1823,13 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -1939,8 +1886,7 @@ span_tree: │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", │ │ "role": "user" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1972,10 +1918,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1991,10 +1936,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2034,10 +1978,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2047,14 +1990,13 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -2119,10 +2061,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2138,18 +2079,16 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } │ │ ], │ │ "role": "tool" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -2181,10 +2120,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2200,10 +2138,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2218,10 +2155,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2237,10 +2173,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2280,10 +2215,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2293,14 +2227,13 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -2365,10 +2298,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2384,10 +2316,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2402,10 +2333,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2421,18 +2351,16 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } │ │ ], │ │ "role": "tool" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -2464,10 +2392,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2483,10 +2410,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2501,10 +2427,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2520,10 +2445,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2538,10 +2462,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2557,10 +2480,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2600,10 +2522,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2613,14 +2534,13 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -2685,10 +2605,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2704,10 +2623,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -2722,10 +2640,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2741,10 +2658,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -2759,10 +2675,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2778,18 +2693,16 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } │ ], │ "role": "tool" │ } - │ ], - │ "toolCallId": "" + │ ] │ } │ ] │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -2837,14 +2750,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -2880,14 +2792,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3029,14 +2940,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -3131,14 +3041,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -3174,14 +3083,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -3323,14 +3231,13 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -3420,14 +3327,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3463,14 +3369,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3612,14 +3517,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -3728,7 +3632,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3777,7 +3680,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3929,7 +3831,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, │ "usage": { @@ -4043,7 +3944,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -4092,7 +3992,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -4244,7 +4143,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "claude-haiku-4-5-20251001" │ │ }, │ │ "usage": { @@ -4353,7 +4251,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -4402,7 +4299,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -4554,7 +4450,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, │ "usage": { @@ -4644,7 +4539,7 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, @@ -4676,7 +4571,6 @@ span_tree: │ "created_at": 0, │ "error": null, │ "frequency_penalty": 0, - │ "id": "", │ "incomplete_details": null, │ "instructions": null, │ "max_output_tokens": 24, @@ -4695,7 +4589,6 @@ span_tree: │ "type": "output_text" │ } │ ], - │ "id": "", │ "role": "assistant", │ "status": "completed", │ "type": "message" @@ -4704,7 +4597,6 @@ span_tree: │ "parallel_tool_calls": true, │ "presence_penalty": 0, │ "previous_response_id": null, - │ "prompt_cache_key": "[REDACTED]", │ "prompt_cache_retention": "in_memory", │ "reasoning": { │ "context": null, @@ -4723,6 +4615,24 @@ span_tree: │ "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, @@ -4765,7 +4675,6 @@ span_tree: │ "x-ratelimit-reset-tokens": "", │ "x-request-id": "" │ }, - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -4801,7 +4710,7 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, @@ -4833,7 +4742,6 @@ span_tree: │ "created_at": 0, │ "error": null, │ "frequency_penalty": 0, - │ "id": "", │ "incomplete_details": null, │ "instructions": null, │ "max_output_tokens": 24, @@ -4852,7 +4760,6 @@ span_tree: │ "type": "output_text" │ } │ ], - │ "id": "", │ "role": "assistant", │ "status": "completed", │ "type": "message" @@ -4861,7 +4768,6 @@ span_tree: │ "parallel_tool_calls": true, │ "presence_penalty": 0, │ "previous_response_id": null, - │ "prompt_cache_key": "[REDACTED]", │ "prompt_cache_retention": "in_memory", │ "reasoning": { │ "context": null, @@ -4880,6 +4786,24 @@ span_tree: │ "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, @@ -4922,7 +4846,6 @@ span_tree: │ "x-ratelimit-reset-tokens": "", │ "x-request-id": "" │ }, - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -5059,14 +4982,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -5161,14 +5083,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -5259,14 +5180,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -5482,14 +5402,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -5525,14 +5444,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -5676,14 +5594,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -5719,14 +5636,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -5870,14 +5786,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -5923,123 +5838,2468 @@ span_tree: │ "prompt_tokens": 16, │ "reasoning_tokens": 0 │ } - └── ai-sdk-agent-stream-operation + ├── ai-sdk-agent-stream-operation + │ metadata: { + │ "operation": "agent-stream", + │ "testRunId": "" + │ } + │ └── ToolLoopAgent.stream [function] + │ input: { + │ "maxOutputTokens": 24, + │ "messages": [ + │ { + │ "content": "Reply with exactly STREAM HELLO and no punctuation.", + │ "role": "user" + │ } + │ ] + │ } + │ 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 + │ } + │ ├── 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] + │ 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 + │ } + └── ai-sdk-agent-tool-loop-operation metadata: { - "operation": "agent-stream", + "operation": "agent-tool-loop", "testRunId": "" } - └── ToolLoopAgent.stream [function] + └── ToolLoopAgent.generate [function] input: { - "maxOutputTokens": 24, + "maxOutputTokens": 256, "messages": [ { - "content": "Reply with exactly STREAM HELLO and no punctuation.", + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", "role": "user" } ] } output: { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], "finishReason": "stop", - "text": "STREAM HELLO" - } - metadata: { - "braintrust": { - "integration_name": "ai-sdk", - "sdk_language": "typescript" + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } }, - "model": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" - } - 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/*": [ - │ {} - │ ] - │ } + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "steps": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 173 + }, + "inputTokens": 173, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 59 + }, + "outputTokens": 59, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 232 + }, + "warnings": [] + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 260 + }, + "inputTokens": 260, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 21 + }, + "outputTokens": 21, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 281 + }, + "warnings": [] + }, + { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 370 + }, + "warnings": [] + } + ], + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "toolCalls": [], + "toolResults": [], + "totalUsage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "reasoningTokens": 0, + "totalTokens": 883 + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 370 + }, + "warnings": [] + } + metadata: { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + ├── generateText [function] + │ input: { + │ "maxOutputTokens": 256, + │ "messages": [ + │ { + │ "content": "I need help comparing laptop prices before checkout.", + │ "role": "user" + │ }, + │ { + │ "content": "I can compare store prices and apply a discount code.", + │ "role": "assistant" + │ }, + │ { + │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "config": { + │ "fileIdPrefixes": [ + │ "file-" + │ ], + │ "provider": "openai.responses" + │ }, + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "specificationVersion": "v3", + │ "supportedUrls": { + │ "application/pdf": [ + │ {} + │ ], + │ "image/*": [ + │ {} + │ ] + │ } + │ }, + │ "system": "You are a shopping assistant. Use the tools before answering pricing questions.", + │ "temperature": 0, + │ "tools": { + │ "apply_discount": { + │ "description": "Apply a discount code to a total", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "discountCode": { + │ "description": "The discount code to apply", + │ "type": "string" + │ }, + │ "total": { + │ "description": "The original total", + │ "type": "number" + │ } + │ }, + │ "required": [ + │ "discountCode", + │ "total" + │ ], + │ "type": "object" + │ } + │ }, + │ "get_store_price": { + │ "description": "Get the price of an item at a store", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "item": { + │ "description": "The item to price", + │ "type": "string" + │ }, + │ "store": { + │ "description": "The store name", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "item", + │ "store" + │ ], + │ "type": "object" + │ } + │ } │ } │ } │ output: { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + │ "type": "text" + │ } + │ ], │ "finishReason": "stop", - │ "text": "STREAM HELLO" + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ }, + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "discountCode": "SAVE20", + │ "total": 999 + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "steps": [ + │ { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "dynamic": false, + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ }, + │ { + │ "dynamic": false, + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ }, + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "cachedInputTokens": 0, + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 173 + │ }, + │ "inputTokens": 173, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 59 + │ }, + │ "outputTokens": 59, + │ "raw": { + │ "input_tokens": 173, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 59, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "reasoningTokens": 0, + │ "totalTokens": 232 + │ }, + │ "warnings": [] + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "discountCode": "SAVE20", + │ "total": 999 + │ }, + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-call" + │ }, + │ { + │ "dynamic": false, + │ "input": { + │ "discountCode": "SAVE20", + │ "total": 999 + │ }, + │ "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-result" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ }, + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "discountCode": "SAVE20", + │ "total": 999 + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "cachedInputTokens": 0, + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 260 + │ }, + │ "inputTokens": 260, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 21 + │ }, + │ "outputTokens": 21, + │ "raw": { + │ "input_tokens": 260, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 21, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "reasoningTokens": 0, + │ "totalTokens": 281 + │ }, + │ "warnings": [] + │ }, + │ { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ }, + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "discountCode": "SAVE20", + │ "total": 999 + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ }, + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "cachedInputTokens": 0, + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 308 + │ }, + │ "inputTokens": 308, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 62 + │ }, + │ "outputTokens": 62, + │ "raw": { + │ "input_tokens": 308, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 62, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "reasoningTokens": 0, + │ "totalTokens": 370 + │ }, + │ "warnings": [] + │ } + │ ], + │ "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + │ "toolCalls": [], + │ "toolResults": [], + │ "totalUsage": { + │ "cachedInputTokens": 0, + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 741 + │ }, + │ "inputTokens": 741, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 142 + │ }, + │ "outputTokens": 142, + │ "reasoningTokens": 0, + │ "totalTokens": 883 + │ }, + │ "usage": { + │ "cachedInputTokens": 0, + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 308 + │ }, + │ "inputTokens": 308, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 62 + │ }, + │ "outputTokens": 62, + │ "raw": { + │ "input_tokens": 308, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 62, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "reasoningTokens": 0, + │ "totalTokens": 370 + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses", + │ "tools": { + │ "apply_discount": { + │ "description": "Apply a discount code to a total", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "discountCode": { + │ "description": "The discount code to apply", + │ "type": "string" + │ }, + │ "total": { + │ "description": "The original total", + │ "type": "number" + │ } + │ }, + │ "required": [ + │ "discountCode", + │ "total" + │ ], + │ "type": "object" + │ } + │ }, + │ "get_store_price": { + │ "description": "Get the price of an item at a store", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "item": { + │ "description": "The item to price", + │ "type": "string" + │ }, + │ "store": { + │ "description": "The store name", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "item", + │ "store" + │ ], + │ "type": "object" + │ } + │ } + │ } + │ } + │ metrics: { + │ "completion_reasoning_tokens": 0, + │ "completion_tokens": 142, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 741, + │ "reasoning_tokens": 0, + │ "tokens": 883 + │ } + ├── doGenerate [llm] + │ input: { + │ "headers": { + │ "user-agent": "ai/6.0.1" + │ }, + │ "maxOutputTokens": 256, + │ "prompt": [ + │ { + │ "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "I need help comparing laptop prices before checkout.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "text": "I can compare store prices and apply a discount code.", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ } + │ ], + │ "temperature": 0, + │ "toolChoice": { + │ "type": "auto" + │ }, + │ "tools": [ + │ { + │ "description": "Get the price of an item at a store", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "item": { + │ "description": "The item to price", + │ "type": "string" + │ }, + │ "store": { + │ "description": "The store name", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "item", + │ "store" + │ ], + │ "type": "object" + │ }, + │ "name": "get_store_price", + │ "type": "function" + │ }, + │ { + │ "description": "Apply a discount code to a total", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "discountCode": { + │ "description": "The discount code to apply", + │ "type": "string" + │ }, + │ "total": { + │ "description": "The original total", + │ "type": "number" + │ } + │ }, + │ "required": [ + │ "discountCode", + │ "total" + │ ], + │ "type": "object" + │ }, + │ "name": "apply_discount", + │ "type": "function" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": "{\"item\":\"laptop\",\"store\":\"StoreA\"}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": "{\"item\":\"laptop\",\"store\":\"StoreB\"}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": { + │ "unified": "tool-calls" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "headers": "", + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "inputTokens": { + │ "cacheRead": 0, + │ "noCache": 173, + │ "total": 173 + │ }, + │ "outputTokens": { + │ "reasoning": 0, + │ "text": 59, + │ "total": 59 + │ }, + │ "raw": { + │ "input_tokens": 173, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 59, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ } + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "finish_reason": { + │ "unified": "tool-calls" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_reasoning_tokens": 0, + │ "completion_tokens": 59, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 173, + │ "reasoning_tokens": 0 + │ } + ├── get_store_price [tool] + │ input: [ + │ { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ { + │ "messages": [ + │ { + │ "content": "I need help comparing laptop prices before checkout.", + │ "role": "user" + │ }, + │ { + │ "content": "I can compare store prices and apply a discount code.", + │ "role": "assistant" + │ }, + │ { + │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "role": "user" + │ } + │ ] + │ } + │ ] + │ output: "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + ├── get_store_price [tool] + │ input: [ + │ { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ { + │ "messages": [ + │ { + │ "content": "I need help comparing laptop prices before checkout.", + │ "role": "user" + │ }, + │ { + │ "content": "I can compare store prices and apply a discount code.", + │ "role": "assistant" + │ }, + │ { + │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "role": "user" + │ } + │ ] + │ } + │ ] + │ output: "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + ├── doGenerate [llm] + │ input: { + │ "headers": { + │ "user-agent": "ai/6.0.1" + │ }, + │ "maxOutputTokens": 256, + │ "prompt": [ + │ { + │ "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "I need help comparing laptop prices before checkout.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "text": "I can compare store prices and apply a discount code.", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ }, + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ], + │ "temperature": 0, + │ "toolChoice": { + │ "type": "auto" + │ }, + │ "tools": [ + │ { + │ "description": "Get the price of an item at a store", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "item": { + │ "description": "The item to price", + │ "type": "string" + │ }, + │ "store": { + │ "description": "The store name", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "item", + │ "store" + │ ], + │ "type": "object" + │ }, + │ "name": "get_store_price", + │ "type": "function" + │ }, + │ { + │ "description": "Apply a discount code to a total", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "discountCode": { + │ "description": "The discount code to apply", + │ "type": "string" + │ }, + │ "total": { + │ "description": "The original total", + │ "type": "number" + │ } + │ }, + │ "required": [ + │ "discountCode", + │ "total" + │ ], + │ "type": "object" + │ }, + │ "name": "apply_discount", + │ "type": "function" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": "{\"discountCode\":\"SAVE20\",\"total\":999}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": { + │ "unified": "tool-calls" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "headers": "", + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "inputTokens": { + │ "cacheRead": 0, + │ "noCache": 260, + │ "total": 260 + │ }, + │ "outputTokens": { + │ "reasoning": 0, + │ "text": 21, + │ "total": 21 + │ }, + │ "raw": { + │ "input_tokens": 260, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 21, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ } + │ }, + │ "warnings": [] │ } │ metadata: { │ "braintrust": { │ "integration_name": "ai-sdk", │ "sdk_language": "typescript" │ }, + │ "finish_reason": { + │ "unified": "tool-calls" + │ }, │ "model": "gpt-4o-mini-2024-07-18", │ "provider": "openai.responses" │ } │ metrics: { - │ "time_to_first_token": 0 + │ "completion_reasoning_tokens": 0, + │ "completion_tokens": 21, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 260, + │ "reasoning_tokens": 0 │ } - └── doStream [llm] + ├── apply_discount [tool] + │ input: [ + │ { + │ "discountCode": "SAVE20", + │ "total": 999 + │ }, + │ { + │ "messages": [ + │ { + │ "content": "I need help comparing laptop prices before checkout.", + │ "role": "user" + │ }, + │ { + │ "content": "I can compare store prices and apply a discount code.", + │ "role": "assistant" + │ }, + │ { + │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ }, + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ] + │ } + │ ] + │ output: "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + └── doGenerate [llm] input: { - "includeRawChunks": false, - "maxOutputTokens": 24, + "headers": { + "user-agent": "ai/6.0.1" + }, + "maxOutputTokens": 256, "prompt": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "text" + } + ], + "role": "assistant" + }, { "content": [ { - "text": "Reply with exactly STREAM HELLO and no punctuation.", + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", "type": "text" } ], "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "temperature": 0, + "toolChoice": { + "type": "auto" + }, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" } ] } output: { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], "finishReason": { "unified": "stop" }, - "text": "STREAM HELLO", - "toolCalls": [], + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, "usage": { "inputTokens": { "cacheRead": 0, - "noCache": 17, - "total": 17 + "noCache": 308, + "total": 308 }, "outputTokens": { "reasoning": 0, - "text": 4, - "total": 4 + "text": 62, + "total": 62 }, "raw": { - "input_tokens": 17, + "input_tokens": 308, "input_tokens_details": { "cached_tokens": 0 }, - "output_tokens": 4, + "output_tokens": 62, "output_tokens_details": { "reasoning_tokens": 0 } } - } + }, + "warnings": [] } metadata: { "braintrust": { @@ -6054,9 +8314,8 @@ span_tree: } metrics: { "completion_reasoning_tokens": 0, - "completion_tokens": 4, + "completion_tokens": 62, "prompt_cached_tokens": 0, - "prompt_tokens": 17, - "reasoning_tokens": 0, - "time_to_first_token": 0 + "prompt_tokens": 308, + "reasoning_tokens": 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..ebee98294 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 @@ -50,14 +50,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -143,14 +142,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -186,14 +184,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -371,14 +368,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -485,14 +481,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -528,14 +523,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -827,7 +821,7 @@ "output": [ { "index": 1, - "relevance_score": 0.06664825 + "relevance_score": 0.06657539 }, { "index": 0, @@ -914,10 +908,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -927,14 +920,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -995,8 +987,7 @@ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", "role": "user" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1032,10 +1023,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1051,10 +1041,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1094,10 +1083,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1107,14 +1095,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1183,10 +1170,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1202,18 +1188,16 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1249,10 +1233,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1268,10 +1251,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1286,10 +1268,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1305,10 +1286,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1348,10 +1328,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1361,14 +1340,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1437,10 +1415,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1456,10 +1433,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1474,10 +1450,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1493,18 +1468,16 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1540,10 +1513,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1559,10 +1531,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1577,10 +1548,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1596,10 +1566,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1614,10 +1583,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1633,10 +1601,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1676,10 +1643,9 @@ "input": "{\"location\":\"Paris, France\"}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1689,14 +1655,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -1765,10 +1730,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1784,10 +1748,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1802,10 +1765,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1821,10 +1783,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1839,10 +1800,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1858,18 +1818,16 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } ], "role": "tool" } - ], - "toolCallId": "" + ] } ], "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1927,10 +1885,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1942,10 +1899,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1953,14 +1909,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -1970,10 +1925,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1989,10 +1943,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2007,10 +1960,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2026,10 +1978,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2044,10 +1995,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2063,10 +2013,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2081,10 +2030,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2100,10 +2048,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2123,10 +2070,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2138,10 +2084,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2149,14 +2094,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2166,10 +2110,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2185,10 +2128,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2234,10 +2176,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2249,10 +2190,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2260,14 +2200,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2277,10 +2216,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2296,10 +2234,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2314,10 +2251,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2333,10 +2269,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2382,10 +2317,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2397,10 +2331,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2408,14 +2341,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2425,10 +2357,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2444,10 +2375,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2462,10 +2392,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2481,10 +2410,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2499,10 +2427,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2518,10 +2445,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2567,10 +2493,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2582,10 +2507,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2593,14 +2517,13 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -2610,10 +2533,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2629,10 +2551,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2647,10 +2568,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2666,10 +2586,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2684,10 +2603,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2703,10 +2621,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2721,10 +2638,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2740,10 +2656,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2790,10 +2705,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2807,10 +2721,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2942,14 +2855,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -3040,14 +2952,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3083,14 +2994,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3240,14 +3150,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -3338,14 +3247,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3381,14 +3289,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3567,7 +3474,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "claude-haiku-4-5-20251001" }, "usage": { @@ -3677,7 +3583,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3726,7 +3631,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -3886,7 +3790,6 @@ "response": { "body": "", "headers": "", - "id": "", "modelId": "claude-haiku-4-5-20251001" }, "usage": { @@ -3996,7 +3899,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4045,7 +3947,6 @@ "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -4189,14 +4090,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -4282,7 +4182,7 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, @@ -4314,7 +4214,6 @@ "created_at": 0, "error": null, "frequency_penalty": 0, - "id": "", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -4333,7 +4232,6 @@ "type": "output_text" } ], - "id": "", "role": "assistant", "status": "completed", "type": "message" @@ -4342,7 +4240,6 @@ "parallel_tool_calls": true, "presence_penalty": 0, "previous_response_id": null, - "prompt_cache_key": "[REDACTED]", "prompt_cache_retention": "in_memory", "reasoning": { "context": null, @@ -4361,6 +4258,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, @@ -4403,7 +4318,6 @@ "x-ratelimit-reset-tokens": "", "x-request-id": "" }, - "id": "", "messages": [ { "content": [ @@ -4439,7 +4353,7 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, @@ -4471,7 +4385,6 @@ "created_at": 0, "error": null, "frequency_penalty": 0, - "id": "", "incomplete_details": null, "instructions": null, "max_output_tokens": 24, @@ -4490,7 +4403,6 @@ "type": "output_text" } ], - "id": "", "role": "assistant", "status": "completed", "type": "message" @@ -4499,7 +4411,6 @@ "parallel_tool_calls": true, "presence_penalty": 0, "previous_response_id": null, - "prompt_cache_key": "[REDACTED]", "prompt_cache_retention": "in_memory", "reasoning": { "context": null, @@ -4518,6 +4429,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, @@ -4560,7 +4489,6 @@ "x-ratelimit-reset-tokens": "", "x-request-id": "" }, - "id": "", "messages": [ { "content": [ @@ -4730,14 +4658,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -4828,14 +4755,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -5079,14 +5005,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -5177,14 +5102,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -5220,14 +5144,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "messages": [ { "content": [ @@ -5460,6 +5383,1663 @@ "operation": "agent-stream", "testRunId": "" } + }, + { + "name": "ai-sdk-agent-tool-loop-operation", + "children": [ + { + "name": "ToolLoopAgent.generate", + "type": "function", + "children": [ + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "headers": { + "user-agent": "ai/6.0.1" + }, + "maxOutputTokens": 256, + "prompt": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "text" + } + ], + "role": "user" + } + ], + "temperature": 0, + "toolChoice": { + "type": "auto" + }, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "input": "{\"item\":\"laptop\",\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": "{\"item\":\"laptop\",\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "finishReason": { + "unified": "tool-calls" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 173, + "total": 173 + }, + "outputTokens": { + "reasoning": 0, + "text": 59, + "total": 59 + }, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 59, + "prompt_cached_tokens": 0, + "prompt_tokens": 173, + "reasoning_tokens": 0 + } + }, + { + "name": "get_store_price", + "type": "tool", + "children": [], + "input": [ + { + "item": "laptop", + "store": "StoreA" + }, + { + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ] + } + ], + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + { + "name": "get_store_price", + "type": "tool", + "children": [], + "input": [ + { + "item": "laptop", + "store": "StoreB" + }, + { + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ] + } + ], + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "headers": { + "user-agent": "ai/6.0.1" + }, + "maxOutputTokens": 256, + "prompt": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "temperature": 0, + "toolChoice": { + "type": "auto" + }, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "input": "{\"discountCode\":\"SAVE20\",\"total\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "finishReason": { + "unified": "tool-calls" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 260, + "total": 260 + }, + "outputTokens": { + "reasoning": 0, + "text": 21, + "total": 21 + }, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + } + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "finish_reason": { + "unified": "tool-calls" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_reasoning_tokens": 0, + "completion_tokens": 21, + "prompt_cached_tokens": 0, + "prompt_tokens": 260, + "reasoning_tokens": 0 + } + }, + { + "name": "apply_discount", + "type": "tool", + "children": [], + "input": [ + { + "discountCode": "SAVE20", + "total": 999 + }, + { + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ] + } + ], + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "headers": { + "user-agent": "ai/6.0.1" + }, + "maxOutputTokens": 256, + "prompt": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "text" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "temperature": 0, + "toolChoice": { + "type": "auto" + }, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": { + "unified": "stop" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "inputTokens": { + "cacheRead": 0, + "noCache": 308, + "total": 308 + }, + "outputTokens": { + "reasoning": 0, + "text": 62, + "total": 62 + }, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "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": 62, + "prompt_cached_tokens": 0, + "prompt_tokens": 308, + "reasoning_tokens": 0 + } + } + ], + "input": { + "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", + "maxOutputTokens": 256, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ], + "model": { + "config": { + "fileIdPrefixes": [ + "file-" + ], + "provider": "openai.responses" + }, + "modelId": "gpt-4o-mini-2024-07-18", + "specificationVersion": "v3", + "supportedUrls": { + "application/pdf": [ + {} + ], + "image/*": [ + {} + ] + } + }, + "temperature": 0, + "tools": { + "apply_discount": { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + } + }, + "get_store_price": { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + } + } + } + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "steps": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 173 + }, + "inputTokens": 173, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 59 + }, + "outputTokens": 59, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 232 + }, + "warnings": [] + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 260 + }, + "inputTokens": 260, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 21 + }, + "outputTokens": 21, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 281 + }, + "warnings": [] + }, + { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 370 + }, + "warnings": [] + } + ], + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "toolCalls": [], + "toolResults": [], + "totalUsage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "reasoningTokens": 0, + "totalTokens": 883 + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 370 + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses", + "tools": { + "apply_discount": { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + } + }, + "get_store_price": { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + } + } + } + } + } + ], + "metadata": { + "operation": "agent-tool-loop", + "testRunId": "" + } } ], "metadata": { 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..d2364ef39 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 @@ -49,14 +49,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -92,14 +91,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -236,14 +234,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -359,14 +356,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -402,14 +398,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -562,14 +557,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -777,7 +771,7 @@ span_tree: │ output: [ │ { │ "index": 1, - │ "relevance_score": 0.06664825 + │ "relevance_score": 0.06657539 │ }, │ { │ "index": 0, @@ -852,10 +846,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -867,10 +860,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -878,14 +870,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -895,10 +886,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -914,10 +904,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -932,10 +921,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -951,10 +939,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -969,10 +956,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -988,10 +974,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1006,10 +991,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1025,10 +1009,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1048,10 +1031,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1063,10 +1045,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1074,14 +1055,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1091,10 +1071,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1110,10 +1089,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1159,10 +1137,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1174,10 +1151,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1185,14 +1161,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1202,10 +1177,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1221,10 +1195,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1239,10 +1212,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1258,10 +1230,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1307,10 +1278,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1322,10 +1292,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1333,14 +1302,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1350,10 +1318,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1369,10 +1336,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1387,10 +1353,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1406,10 +1371,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1424,10 +1388,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1443,10 +1406,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1492,10 +1454,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1507,10 +1468,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1518,14 +1478,13 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1535,10 +1494,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1554,10 +1512,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1572,10 +1529,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1591,10 +1547,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1609,10 +1564,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1628,10 +1582,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1646,10 +1599,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1665,10 +1617,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1715,10 +1666,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1732,10 +1682,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1862,10 +1811,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1875,14 +1823,13 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -1939,8 +1886,7 @@ span_tree: │ │ "content": "Use the get_weather tool for Paris, France. If you do not call the tool, the answer is invalid.", │ │ "role": "user" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -1972,10 +1918,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1991,10 +1936,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2034,10 +1978,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2047,14 +1990,13 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -2119,10 +2061,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2138,18 +2079,16 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } │ │ ], │ │ "role": "tool" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -2181,10 +2120,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2200,10 +2138,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2218,10 +2155,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2237,10 +2173,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2280,10 +2215,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2293,14 +2227,13 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -2365,10 +2298,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2384,10 +2316,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2402,10 +2333,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2421,18 +2351,16 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } │ │ ], │ │ "role": "tool" │ │ } - │ │ ], - │ │ "toolCallId": "" + │ │ ] │ │ } │ │ ] │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -2464,10 +2392,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2483,10 +2410,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2501,10 +2427,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2520,10 +2445,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2538,10 +2462,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2557,10 +2480,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2600,10 +2522,9 @@ span_tree: │ │ "input": "{\"location\":\"Paris, France\"}", │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2613,14 +2534,13 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -2685,10 +2605,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2704,10 +2623,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -2722,10 +2640,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2741,10 +2658,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -2759,10 +2675,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -2778,18 +2693,16 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } │ ], │ "role": "tool" │ } - │ ], - │ "toolCallId": "" + │ ] │ } │ ] │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" @@ -2842,14 +2755,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -2885,14 +2797,13 @@ span_tree: │ │ "finishReason": "stop", │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -3034,14 +2945,13 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "responseId": "", + │ │ "responseId": "", │ │ "serviceTier": "default" │ │ } │ │ }, │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "gpt-4o-mini-2024-07-18", │ │ "timestamp": "" │ │ }, @@ -3131,14 +3041,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3174,14 +3083,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3323,14 +3231,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -3444,7 +3351,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -3493,7 +3399,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "messages": [ │ │ { │ │ "content": [ @@ -3645,7 +3550,6 @@ span_tree: │ │ "response": { │ │ "body": "", │ │ "headers": "", - │ │ "id": "", │ │ "modelId": "claude-haiku-4-5-20251001" │ │ }, │ │ "usage": { @@ -3754,7 +3658,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3803,7 +3706,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -3955,7 +3857,6 @@ span_tree: │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "claude-haiku-4-5-20251001" │ }, │ "usage": { @@ -4045,7 +3946,7 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, @@ -4077,7 +3978,6 @@ span_tree: │ "created_at": 0, │ "error": null, │ "frequency_penalty": 0, - │ "id": "", │ "incomplete_details": null, │ "instructions": null, │ "max_output_tokens": 24, @@ -4096,7 +3996,6 @@ span_tree: │ "type": "output_text" │ } │ ], - │ "id": "", │ "role": "assistant", │ "status": "completed", │ "type": "message" @@ -4105,7 +4004,6 @@ span_tree: │ "parallel_tool_calls": true, │ "presence_penalty": 0, │ "previous_response_id": null, - │ "prompt_cache_key": "[REDACTED]", │ "prompt_cache_retention": "in_memory", │ "reasoning": { │ "context": null, @@ -4124,6 +4022,24 @@ span_tree: │ "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, @@ -4166,7 +4082,6 @@ span_tree: │ "x-ratelimit-reset-tokens": "", │ "x-request-id": "" │ }, - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -4202,7 +4117,7 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, @@ -4234,7 +4149,6 @@ span_tree: │ "created_at": 0, │ "error": null, │ "frequency_penalty": 0, - │ "id": "", │ "incomplete_details": null, │ "instructions": null, │ "max_output_tokens": 24, @@ -4253,7 +4167,6 @@ span_tree: │ "type": "output_text" │ } │ ], - │ "id": "", │ "role": "assistant", │ "status": "completed", │ "type": "message" @@ -4262,7 +4175,6 @@ span_tree: │ "parallel_tool_calls": true, │ "presence_penalty": 0, │ "previous_response_id": null, - │ "prompt_cache_key": "[REDACTED]", │ "prompt_cache_retention": "in_memory", │ "reasoning": { │ "context": null, @@ -4281,6 +4193,24 @@ span_tree: │ "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, @@ -4323,7 +4253,6 @@ span_tree: │ "x-ratelimit-reset-tokens": "", │ "x-request-id": "" │ }, - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -4460,14 +4389,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -4562,14 +4490,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -4660,14 +4587,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -4902,14 +4828,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -4945,14 +4870,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -5088,14 +5012,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -5141,17 +5064,139 @@ span_tree: │ "prompt_tokens": 16, │ "reasoning_tokens": 0 │ } - └── ai-sdk-agent-stream-operation + ├── ai-sdk-agent-stream-operation + │ metadata: { + │ "operation": "agent-stream", + │ "testRunId": "" + │ } + │ └── ToolLoopAgent.stream [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/*": [ + │ {} + │ ] + │ } + │ }, + │ "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] + │ 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 + │ } + └── ai-sdk-agent-tool-loop-operation metadata: { - "operation": "agent-stream", + "operation": "agent-tool-loop", "testRunId": "" } - └── ToolLoopAgent.stream [function] + └── ToolLoopAgent.generate [function] input: { - "maxOutputTokens": 24, + "instructions": "You are a shopping assistant. Use the tools before answering pricing questions.", + "maxOutputTokens": 256, "messages": [ { - "content": "Reply with exactly STREAM HELLO and no punctuation.", + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", "role": "user" } ], @@ -5173,11 +5218,739 @@ span_tree: ] } }, - "system": "You are a terse assistant." + "temperature": 0, + "tools": { + "apply_discount": { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + } + }, + "get_store_price": { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + } + } + } } output: { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], "finishReason": "stop", - "text": "STREAM HELLO" + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "steps": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 173 + }, + "inputTokens": 173, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 59 + }, + "outputTokens": 59, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 232 + }, + "warnings": [] + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 260 + }, + "inputTokens": 260, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 21 + }, + "outputTokens": 21, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 281 + }, + "warnings": [] + }, + { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 370 + }, + "warnings": [] + } + ], + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "toolCalls": [], + "toolResults": [], + "totalUsage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "reasoningTokens": 0, + "totalTokens": 883 + }, + "usage": { + "cachedInputTokens": 0, + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "reasoningTokens": 0, + "totalTokens": 370 + }, + "warnings": [] } metadata: { "braintrust": { @@ -5185,55 +5958,830 @@ span_tree: "sdk_language": "typescript" }, "model": "gpt-4o-mini-2024-07-18", - "provider": "openai.responses" - } - metrics: { - "time_to_first_token": 0 + "provider": "openai.responses", + "tools": { + "apply_discount": { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + } + }, + "get_store_price": { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + } + } + } } - └── doStream [llm] + ├── doGenerate [llm] + │ input: { + │ "headers": { + │ "user-agent": "ai/6.0.1" + │ }, + │ "maxOutputTokens": 256, + │ "prompt": [ + │ { + │ "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "I need help comparing laptop prices before checkout.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "text": "I can compare store prices and apply a discount code.", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ } + │ ], + │ "temperature": 0, + │ "toolChoice": { + │ "type": "auto" + │ }, + │ "tools": [ + │ { + │ "description": "Get the price of an item at a store", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "item": { + │ "description": "The item to price", + │ "type": "string" + │ }, + │ "store": { + │ "description": "The store name", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "item", + │ "store" + │ ], + │ "type": "object" + │ }, + │ "name": "get_store_price", + │ "type": "function" + │ }, + │ { + │ "description": "Apply a discount code to a total", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "discountCode": { + │ "description": "The discount code to apply", + │ "type": "string" + │ }, + │ "total": { + │ "description": "The original total", + │ "type": "number" + │ } + │ }, + │ "required": [ + │ "discountCode", + │ "total" + │ ], + │ "type": "object" + │ }, + │ "name": "apply_discount", + │ "type": "function" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": "{\"item\":\"laptop\",\"store\":\"StoreA\"}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": "{\"item\":\"laptop\",\"store\":\"StoreB\"}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": { + │ "unified": "tool-calls" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "headers": "", + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "inputTokens": { + │ "cacheRead": 0, + │ "noCache": 173, + │ "total": 173 + │ }, + │ "outputTokens": { + │ "reasoning": 0, + │ "text": 59, + │ "total": 59 + │ }, + │ "raw": { + │ "input_tokens": 173, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 59, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ } + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "finish_reason": { + │ "unified": "tool-calls" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_reasoning_tokens": 0, + │ "completion_tokens": 59, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 173, + │ "reasoning_tokens": 0 + │ } + ├── get_store_price [tool] + │ input: [ + │ { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ { + │ "messages": [ + │ { + │ "content": "I need help comparing laptop prices before checkout.", + │ "role": "user" + │ }, + │ { + │ "content": "I can compare store prices and apply a discount code.", + │ "role": "assistant" + │ }, + │ { + │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "role": "user" + │ } + │ ] + │ } + │ ] + │ output: "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + ├── get_store_price [tool] + │ input: [ + │ { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ { + │ "messages": [ + │ { + │ "content": "I need help comparing laptop prices before checkout.", + │ "role": "user" + │ }, + │ { + │ "content": "I can compare store prices and apply a discount code.", + │ "role": "assistant" + │ }, + │ { + │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "role": "user" + │ } + │ ] + │ } + │ ] + │ output: "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + ├── doGenerate [llm] + │ input: { + │ "headers": { + │ "user-agent": "ai/6.0.1" + │ }, + │ "maxOutputTokens": 256, + │ "prompt": [ + │ { + │ "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + │ "role": "system" + │ }, + │ { + │ "content": [ + │ { + │ "text": "I need help comparing laptop prices before checkout.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "text": "I can compare store prices and apply a discount code.", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "type": "text" + │ } + │ ], + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ }, + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ], + │ "temperature": 0, + │ "toolChoice": { + │ "type": "auto" + │ }, + │ "tools": [ + │ { + │ "description": "Get the price of an item at a store", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "item": { + │ "description": "The item to price", + │ "type": "string" + │ }, + │ "store": { + │ "description": "The store name", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "item", + │ "store" + │ ], + │ "type": "object" + │ }, + │ "name": "get_store_price", + │ "type": "function" + │ }, + │ { + │ "description": "Apply a discount code to a total", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "discountCode": { + │ "description": "The discount code to apply", + │ "type": "string" + │ }, + │ "total": { + │ "description": "The original total", + │ "type": "number" + │ } + │ }, + │ "required": [ + │ "discountCode", + │ "total" + │ ], + │ "type": "object" + │ }, + │ "name": "apply_discount", + │ "type": "function" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": "{\"discountCode\":\"SAVE20\",\"total\":999}", + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": { + │ "unified": "tool-calls" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "body": "", + │ "headers": "", + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "usage": { + │ "inputTokens": { + │ "cacheRead": 0, + │ "noCache": 260, + │ "total": 260 + │ }, + │ "outputTokens": { + │ "reasoning": 0, + │ "text": 21, + │ "total": 21 + │ }, + │ "raw": { + │ "input_tokens": 260, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 21, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ } + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "finish_reason": { + │ "unified": "tool-calls" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_reasoning_tokens": 0, + │ "completion_tokens": 21, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 260, + │ "reasoning_tokens": 0 + │ } + ├── apply_discount [tool] + │ input: [ + │ { + │ "discountCode": "SAVE20", + │ "total": 999 + │ }, + │ { + │ "messages": [ + │ { + │ "content": "I need help comparing laptop prices before checkout.", + │ "role": "user" + │ }, + │ { + │ "content": "I can compare store prices and apply a discount code.", + │ "role": "assistant" + │ }, + │ { + │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ }, + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ] + │ } + │ ] + │ output: "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + └── doGenerate [llm] input: { - "includeRawChunks": false, - "maxOutputTokens": 24, + "headers": { + "user-agent": "ai/6.0.1" + }, + "maxOutputTokens": 256, "prompt": [ + { + "content": "You are a shopping assistant. Use the tools before answering pricing questions.", + "role": "system" + }, + { + "content": [ + { + "text": "I need help comparing laptop prices before checkout.", + "type": "text" + } + ], + "role": "user" + }, + { + "content": [ + { + "text": "I can compare store prices and apply a discount code.", + "type": "text" + } + ], + "role": "assistant" + }, { "content": [ { - "text": "Reply with exactly STREAM HELLO and no punctuation.", + "text": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", "type": "text" } ], "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "temperature": 0, + "toolChoice": { + "type": "auto" + }, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" } ] } output: { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], "finishReason": { "unified": "stop" }, - "text": "STREAM HELLO", - "toolCalls": [], + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "body": "", + "headers": "", + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, "usage": { "inputTokens": { "cacheRead": 0, - "noCache": 17, - "total": 17 + "noCache": 308, + "total": 308 }, "outputTokens": { "reasoning": 0, - "text": 4, - "total": 4 + "text": 62, + "total": 62 }, "raw": { - "input_tokens": 17, + "input_tokens": 308, "input_tokens_details": { "cached_tokens": 0 }, - "output_tokens": 4, + "output_tokens": 62, "output_tokens_details": { "reasoning_tokens": 0 } } - } + }, + "warnings": [] } metadata: { "braintrust": { @@ -5248,9 +6796,8 @@ span_tree: } metrics: { "completion_reasoning_tokens": 0, - "completion_tokens": 4, + "completion_tokens": 62, "prompt_cached_tokens": 0, - "prompt_tokens": 17, - "reasoning_tokens": 0, - "time_to_first_token": 0 + "prompt_tokens": 308, + "reasoning_tokens": 0 } 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..d154db703 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 @@ -34,7 +34,7 @@ { "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, "text": "PARIS", @@ -42,9 +42,7 @@ } ], "finishReason": "stop", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -118,13 +116,12 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -166,13 +163,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -305,7 +301,7 @@ { "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, "text": "{\"answer\":\"4\"}", @@ -313,9 +309,7 @@ } ], "finishReason": "stop", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -407,13 +401,12 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -455,13 +448,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -586,7 +578,7 @@ { "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, "text": "One, two, three.", @@ -594,9 +586,7 @@ } ], "finishReason": "stop", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -667,13 +657,12 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -715,13 +704,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -1010,18 +998,15 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], "finishReason": "tool-calls", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -1074,7 +1059,6 @@ "integration_name": "ai-sdk", "sdk_language": "typescript" }, - "toolCallId": "", "toolName": "get_weather" } }, @@ -1097,10 +1081,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1116,10 +1099,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1162,18 +1144,15 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], "finishReason": "tool-calls", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -1226,7 +1205,6 @@ "integration_name": "ai-sdk", "sdk_language": "typescript" }, - "toolCallId": "", "toolName": "get_weather" } }, @@ -1249,10 +1227,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1268,10 +1245,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1286,10 +1262,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1305,10 +1280,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1351,18 +1325,15 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], "finishReason": "tool-calls", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -1415,7 +1386,6 @@ "integration_name": "ai-sdk", "sdk_language": "typescript" }, - "toolCallId": "", "toolName": "get_weather" } }, @@ -1438,10 +1408,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1457,10 +1426,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1475,10 +1443,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1494,10 +1461,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1512,10 +1478,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1531,10 +1496,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1577,18 +1541,15 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], "finishReason": "tool-calls", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -1641,7 +1602,6 @@ "integration_name": "ai-sdk", "sdk_language": "typescript" }, - "toolCallId": "", "toolName": "get_weather" } } @@ -1692,10 +1652,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1707,10 +1666,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -1720,10 +1678,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1735,10 +1692,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -1748,10 +1704,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1763,10 +1718,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -1776,10 +1730,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1791,10 +1744,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1802,13 +1754,12 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -1818,10 +1769,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1837,10 +1787,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1862,10 +1811,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1877,10 +1825,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1892,13 +1839,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -1908,10 +1854,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1927,10 +1872,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1978,10 +1922,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1993,10 +1936,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2008,13 +1950,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -2024,10 +1965,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2043,10 +1983,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2094,10 +2033,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2109,10 +2047,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2124,13 +2061,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -2140,10 +2076,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2159,10 +2094,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2210,10 +2144,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2225,10 +2158,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2240,13 +2172,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -2256,10 +2187,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2275,10 +2205,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2326,10 +2255,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2339,10 +2267,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2352,10 +2279,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2365,10 +2291,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2382,10 +2307,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -2397,10 +2321,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -2412,10 +2335,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -2427,10 +2349,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2506,14 +2427,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2593,14 +2513,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2672,13 +2591,12 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2755,13 +2673,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2804,6 +2721,1836 @@ "operation": "stream-object", "testRunId": "" } + }, + { + "name": "ai-sdk-agent-generate-operation", + "children": [ + { + "name": "generateText", + "type": "function", + "children": [ + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 24, + "messages": [ + { + "content": "Reply with exactly HELLO and no punctuation.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 26 + }, + "inputTokens": 26, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 3 + }, + "outputTokens": 3, + "raw": { + "input_tokens": 26, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 3, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 29 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_tokens": 3, + "prompt_cached_tokens": 0, + "prompt_tokens": 26, + "tokens": 29 + } + } + ], + "input": { + "headers": { + "user-agent": "ai-sdk-agent/tool-loop ai/7.0.0" + }, + "maxOutputTokens": 24, + "maxRetries": 2, + "messages": [ + { + "content": "Reply with exactly HELLO and no punctuation.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "responseMessages": "", + "steps": [ + { + "callId": "", + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 0, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 26 + }, + "inputTokens": 26, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 3 + }, + "outputTokens": 3, + "raw": { + "input_tokens": 26, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 3, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 29 + }, + "warnings": [] + } + ], + "text": "HELLO", + "toolCalls": [], + "toolResults": [], + "totalUsage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 26 + }, + "inputTokens": 26, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 3 + }, + "outputTokens": 3, + "totalTokens": 29 + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 26 + }, + "inputTokens": 26, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 3 + }, + "outputTokens": 3, + "totalTokens": 29 + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + } + ], + "metadata": { + "operation": "agent-generate", + "testRunId": "" + } + }, + { + "name": "ai-sdk-agent-stream-operation", + "children": [ + { + "name": "streamText", + "type": "function", + "children": [ + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 24, + "messages": [ + { + "content": "Reply with exactly STREAM HELLO and no punctuation.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "STREAM HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 27 + }, + "inputTokens": 27, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 4 + }, + "outputTokens": 4, + "raw": { + "input_tokens": 27, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 4, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 31 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_tokens": 4, + "prompt_cached_tokens": 0, + "prompt_tokens": 27, + "tokens": 31 + } + } + ], + "input": { + "headers": { + "user-agent": "ai-sdk-agent/tool-loop" + }, + "maxOutputTokens": 24, + "maxRetries": 2, + "messages": [ + { + "content": "Reply with exactly STREAM HELLO and no punctuation.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "STREAM HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "STREAM HELLO", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "responseMessages": "", + "steps": [ + { + "callId": "", + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "STREAM HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "STREAM HELLO", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 0, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 27 + }, + "inputTokens": 27, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 4 + }, + "outputTokens": 4, + "raw": { + "input_tokens": 27, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 4, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 31 + }, + "warnings": [] + } + ], + "text": "STREAM HELLO", + "toolCalls": [], + "toolResults": [], + "totalUsage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 27 + }, + "inputTokens": 27, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 4 + }, + "outputTokens": 4, + "totalTokens": 31 + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 27 + }, + "inputTokens": 27, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 4 + }, + "outputTokens": 4, + "totalTokens": 31 + }, + "warnings": [] + }, + "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 + } + } + ], + "metadata": { + "operation": "agent-stream", + "testRunId": "" + } + }, + { + "name": "ai-sdk-agent-tool-loop-operation", + "children": [ + { + "name": "generateText", + "type": "function", + "children": [ + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 256, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 173 + }, + "inputTokens": 173, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 59 + }, + "outputTokens": 59, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 232 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_tokens": 59, + "prompt_cached_tokens": 0, + "prompt_tokens": 173, + "tokens": 232 + } + }, + { + "name": "get_store_price", + "type": "tool", + "children": [], + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolName": "get_store_price" + } + }, + { + "name": "get_store_price", + "type": "tool", + "children": [], + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolName": "get_store_price" + } + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 256, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 260 + }, + "inputTokens": 260, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 21 + }, + "outputTokens": 21, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 281 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_tokens": 21, + "prompt_cached_tokens": 0, + "prompt_tokens": 260, + "tokens": 281 + } + }, + { + "name": "apply_discount", + "type": "tool", + "children": [], + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolName": "apply_discount" + } + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 256, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 370 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_tokens": 62, + "prompt_cached_tokens": 0, + "prompt_tokens": 308, + "tokens": 370 + } + } + ], + "input": { + "headers": { + "user-agent": "ai-sdk-agent/tool-loop ai/7.0.0" + }, + "maxOutputTokens": 256, + "maxRetries": 2, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": { + "apply_discount": { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + } + }, + "get_store_price": { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + } + } + } + }, + "output": { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + }, + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "responseMessages": "", + "steps": [ + { + "callId": "", + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 0, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 173 + }, + "inputTokens": 173, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 59 + }, + "outputTokens": 59, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 232 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 1, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 260 + }, + "inputTokens": 260, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 21 + }, + "outputTokens": 21, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 281 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 2, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 370 + }, + "warnings": [] + } + ], + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "toolCalls": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "toolResults": [ + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "totalUsage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "totalTokens": 883 + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "totalTokens": 883 + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + } + ], + "metadata": { + "operation": "agent-tool-loop", + "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 e75d0d1d0..7e3892a80 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 @@ -44,13 +44,12 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -92,13 +91,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -206,7 +204,7 @@ span_tree: │ { │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, │ "text": "PARIS", @@ -214,9 +212,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", - │ "response": { - │ "id": "" - │ }, + │ "response": {}, │ "usage": { │ "inputTokenDetails": { │ "cacheReadTokens": 0, @@ -317,13 +313,12 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -365,13 +360,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -479,7 +473,7 @@ span_tree: │ { │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, │ "text": "{\"answer\":\"4\"}", @@ -487,9 +481,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", - │ "response": { - │ "id": "" - │ }, + │ "response": {}, │ "usage": { │ "inputTokenDetails": { │ "cacheReadTokens": 0, @@ -564,13 +556,12 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -612,13 +603,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -729,7 +719,7 @@ span_tree: │ { │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, │ "text": "One, two, three.", @@ -737,9 +727,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", - │ "response": { - │ "id": "" - │ }, + │ "response": {}, │ "usage": { │ "inputTokenDetails": { │ "cacheReadTokens": 0, @@ -941,10 +929,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -956,10 +943,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -969,10 +955,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -984,10 +969,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -997,10 +981,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1012,10 +995,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -1025,10 +1007,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1040,10 +1021,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1051,13 +1031,12 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1067,10 +1046,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1086,10 +1064,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1111,10 +1088,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1126,10 +1102,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1141,13 +1116,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1157,10 +1131,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1176,10 +1149,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1227,10 +1199,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1242,10 +1213,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1257,13 +1227,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1273,10 +1242,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1292,10 +1260,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1343,10 +1310,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1358,10 +1324,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1373,13 +1338,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1389,10 +1353,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1408,10 +1371,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1459,10 +1421,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1474,10 +1435,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1489,13 +1449,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1505,10 +1464,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1524,10 +1482,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1575,10 +1532,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1588,10 +1544,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1601,10 +1556,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1614,10 +1568,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1631,10 +1584,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -1646,10 +1598,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -1661,10 +1612,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -1676,10 +1626,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1764,18 +1713,15 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } │ │ ], │ │ "finishReason": "tool-calls", - │ │ "response": { - │ │ "id": "" - │ │ }, + │ │ "response": {}, │ │ "usage": { │ │ "inputTokenDetails": { │ │ "cacheReadTokens": 0, @@ -1824,7 +1770,6 @@ span_tree: │ │ "integration_name": "ai-sdk", │ │ "sdk_language": "typescript" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather" │ │ } │ ├── doGenerate [llm] @@ -1843,10 +1788,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1862,10 +1806,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -1908,18 +1851,15 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } │ │ ], │ │ "finishReason": "tool-calls", - │ │ "response": { - │ │ "id": "" - │ │ }, + │ │ "response": {}, │ │ "usage": { │ │ "inputTokenDetails": { │ │ "cacheReadTokens": 0, @@ -1968,7 +1908,6 @@ span_tree: │ │ "integration_name": "ai-sdk", │ │ "sdk_language": "typescript" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather" │ │ } │ ├── doGenerate [llm] @@ -1987,10 +1926,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2006,10 +1944,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2024,10 +1961,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2043,10 +1979,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2089,18 +2024,15 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } │ │ ], │ │ "finishReason": "tool-calls", - │ │ "response": { - │ │ "id": "" - │ │ }, + │ │ "response": {}, │ │ "usage": { │ │ "inputTokenDetails": { │ │ "cacheReadTokens": 0, @@ -2149,7 +2081,6 @@ span_tree: │ │ "integration_name": "ai-sdk", │ │ "sdk_language": "typescript" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather" │ │ } │ ├── doGenerate [llm] @@ -2168,10 +2099,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2187,10 +2117,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2205,10 +2134,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2224,10 +2152,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2242,10 +2169,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2261,10 +2187,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2307,18 +2232,15 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } │ │ ], │ │ "finishReason": "tool-calls", - │ │ "response": { - │ │ "id": "" - │ │ }, + │ │ "response": {}, │ │ "usage": { │ │ "inputTokenDetails": { │ │ "cacheReadTokens": 0, @@ -2367,7 +2289,6 @@ span_tree: │ "integration_name": "ai-sdk", │ "sdk_language": "typescript" │ }, - │ "toolCallId": "", │ "toolName": "get_weather" │ } ├── ai-sdk-generate-object-operation @@ -2410,14 +2331,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -2472,14 +2392,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -2523,139 +2442,1908 @@ span_tree: │ "prompt_tokens": 38, │ "tokens": 44 │ } - └── 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": { - "headers": "", - "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": { - "headers": "", - "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": [] + ├── 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": { + │ "headers": "", + │ "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": { + │ "headers": "", + │ "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-agent-generate-operation + │ metadata: { + │ "operation": "agent-generate", + │ "testRunId": "" + │ } + │ └── generateText [function] + │ input: { + │ "headers": { + │ "user-agent": "ai-sdk-agent/tool-loop ai/7.0.0" + │ }, + │ "maxOutputTokens": 24, + │ "maxRetries": 2, + │ "messages": [ + │ { + │ "content": "Reply with exactly HELLO and no punctuation.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ } + │ output: { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "responseMessages": "", + │ "steps": [ + │ { + │ "callId": "", + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "stepNumber": 0, + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 26 + │ }, + │ "inputTokens": 26, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 3 + │ }, + │ "outputTokens": 3, + │ "raw": { + │ "input_tokens": 26, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 3, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 29 + │ }, + │ "warnings": [] + │ } + │ ], + │ "text": "HELLO", + │ "toolCalls": [], + │ "toolResults": [], + │ "totalUsage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 26 + │ }, + │ "inputTokens": 26, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 3 + │ }, + │ "outputTokens": 3, + │ "totalTokens": 29 + │ }, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 26 + │ }, + │ "inputTokens": 26, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 3 + │ }, + │ "outputTokens": 3, + │ "totalTokens": 29 + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ └── doGenerate [llm] + │ input: { + │ "maxOutputTokens": 24, + │ "messages": [ + │ { + │ "content": "Reply with exactly HELLO and no punctuation.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ } + │ output: { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "response": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 26 + │ }, + │ "inputTokens": 26, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 3 + │ }, + │ "outputTokens": 3, + │ "raw": { + │ "input_tokens": 26, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 3, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 29 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_tokens": 3, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 26, + │ "tokens": 29 + │ } + ├── ai-sdk-agent-stream-operation + │ metadata: { + │ "operation": "agent-stream", + │ "testRunId": "" + │ } + │ └── streamText [function] + │ input: { + │ "headers": { + │ "user-agent": "ai-sdk-agent/tool-loop" + │ }, + │ "maxOutputTokens": 24, + │ "maxRetries": 2, + │ "messages": [ + │ { + │ "content": "Reply with exactly STREAM HELLO and no punctuation.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ } + │ output: { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "STREAM HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "STREAM HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "responseMessages": "", + │ "steps": [ + │ { + │ "callId": "", + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "STREAM HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "STREAM HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "stepNumber": 0, + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 27 + │ }, + │ "inputTokens": 27, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 4 + │ }, + │ "outputTokens": 4, + │ "raw": { + │ "input_tokens": 27, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 4, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 31 + │ }, + │ "warnings": [] + │ } + │ ], + │ "text": "STREAM HELLO", + │ "toolCalls": [], + │ "toolResults": [], + │ "totalUsage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 27 + │ }, + │ "inputTokens": 27, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 4 + │ }, + │ "outputTokens": 4, + │ "totalTokens": 31 + │ }, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 27 + │ }, + │ "inputTokens": 27, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 4 + │ }, + │ "outputTokens": 4, + │ "totalTokens": 31 + │ }, + │ "warnings": [] + │ } + │ 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] + │ input: { + │ "maxOutputTokens": 24, + │ "messages": [ + │ { + │ "content": "Reply with exactly STREAM HELLO and no punctuation.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ } + │ output: { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "STREAM HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "response": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 27 + │ }, + │ "inputTokens": 27, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 4 + │ }, + │ "outputTokens": 4, + │ "raw": { + │ "input_tokens": 27, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 4, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 31 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_tokens": 4, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 27, + │ "tokens": 31 + │ } + └── ai-sdk-agent-tool-loop-operation + metadata: { + "operation": "agent-tool-loop", + "testRunId": "" + } + └── generateText [function] + input: { + "headers": { + "user-agent": "ai-sdk-agent/tool-loop ai/7.0.0" + }, + "maxOutputTokens": 256, + "maxRetries": 2, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": { + "apply_discount": { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + } + }, + "get_store_price": { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + } + } + } + } + output: { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + }, + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "responseMessages": "", + "steps": [ + { + "callId": "", + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 0, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 173 + }, + "inputTokens": 173, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 59 + }, + "outputTokens": 59, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 232 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 1, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 260 + }, + "inputTokens": 260, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 21 + }, + "outputTokens": 21, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 281 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 2, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 370 + }, + "warnings": [] + } + ], + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "toolCalls": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "toolResults": [ + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "totalUsage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "totalTokens": 883 + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "totalTokens": 883 + }, + "warnings": [] + } + metadata: { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + ├── doGenerate [llm] + │ input: { + │ "maxOutputTokens": 256, + │ "messages": [ + │ { + │ "content": "I need help comparing laptop prices before checkout.", + │ "role": "user" + │ }, + │ { + │ "content": "I can compare store prices and apply a discount code.", + │ "role": "assistant" + │ }, + │ { + │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ }, + │ "temperature": 0, + │ "tools": [ + │ { + │ "description": "Get the price of an item at a store", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "item": { + │ "description": "The item to price", + │ "type": "string" + │ }, + │ "store": { + │ "description": "The store name", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "item", + │ "store" + │ ], + │ "type": "object" + │ }, + │ "name": "get_store_price", + │ "type": "function" + │ }, + │ { + │ "description": "Apply a discount code to a total", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "discountCode": { + │ "description": "The discount code to apply", + │ "type": "string" + │ }, + │ "total": { + │ "description": "The original total", + │ "type": "number" + │ } + │ }, + │ "required": [ + │ "discountCode", + │ "total" + │ ], + │ "type": "object" + │ }, + │ "name": "apply_discount", + │ "type": "function" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "response": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 173 + │ }, + │ "inputTokens": 173, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 59 + │ }, + │ "outputTokens": 59, + │ "raw": { + │ "input_tokens": 173, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 59, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 232 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_tokens": 59, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 173, + │ "tokens": 232 + │ } + ├── get_store_price [tool] + │ input: { + │ "item": "laptop", + │ "store": "StoreA" + │ } + │ output: "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "toolName": "get_store_price" + │ } + ├── get_store_price [tool] + │ input: { + │ "item": "laptop", + │ "store": "StoreB" + │ } + │ output: "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "toolName": "get_store_price" + │ } + ├── doGenerate [llm] + │ input: { + │ "maxOutputTokens": 256, + │ "messages": [ + │ { + │ "content": "I need help comparing laptop prices before checkout.", + │ "role": "user" + │ }, + │ { + │ "content": "I can compare store prices and apply a discount code.", + │ "role": "assistant" + │ }, + │ { + │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ }, + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ }, + │ "temperature": 0, + │ "tools": [ + │ { + │ "description": "Get the price of an item at a store", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "item": { + │ "description": "The item to price", + │ "type": "string" + │ }, + │ "store": { + │ "description": "The store name", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "item", + │ "store" + │ ], + │ "type": "object" + │ }, + │ "name": "get_store_price", + │ "type": "function" + │ }, + │ { + │ "description": "Apply a discount code to a total", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "discountCode": { + │ "description": "The discount code to apply", + │ "type": "string" + │ }, + │ "total": { + │ "description": "The original total", + │ "type": "number" + │ } + │ }, + │ "required": [ + │ "discountCode", + │ "total" + │ ], + │ "type": "object" + │ }, + │ "name": "apply_discount", + │ "type": "function" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": { + │ "discountCode": "SAVE20", + │ "total": 999 + │ }, + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "response": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 260 + │ }, + │ "inputTokens": 260, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 21 + │ }, + │ "outputTokens": 21, + │ "raw": { + │ "input_tokens": 260, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 21, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 281 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_tokens": 21, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 260, + │ "tokens": 281 + │ } + ├── apply_discount [tool] + │ input: { + │ "discountCode": "SAVE20", + │ "total": 999 + │ } + │ output: "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "toolName": "apply_discount" + │ } + └── doGenerate [llm] + input: { + "maxOutputTokens": 256, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + } + output: { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 370 + } } metadata: { "braintrust": { @@ -2666,8 +4354,8 @@ span_tree: "provider": "openai.responses" } metrics: { - "completion_tokens": 6, + "completion_tokens": 62, "prompt_cached_tokens": 0, - "prompt_tokens": 38, - "tokens": 44 + "prompt_tokens": 308, + "tokens": 370 } 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..d154db703 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 @@ -34,7 +34,7 @@ { "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, "text": "PARIS", @@ -42,9 +42,7 @@ } ], "finishReason": "stop", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -118,13 +116,12 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -166,13 +163,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -305,7 +301,7 @@ { "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, "text": "{\"answer\":\"4\"}", @@ -313,9 +309,7 @@ } ], "finishReason": "stop", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -407,13 +401,12 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -455,13 +448,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -586,7 +578,7 @@ { "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, "text": "One, two, three.", @@ -594,9 +586,7 @@ } ], "finishReason": "stop", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -667,13 +657,12 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -715,13 +704,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -1010,18 +998,15 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], "finishReason": "tool-calls", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -1074,7 +1059,6 @@ "integration_name": "ai-sdk", "sdk_language": "typescript" }, - "toolCallId": "", "toolName": "get_weather" } }, @@ -1097,10 +1081,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1116,10 +1099,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1162,18 +1144,15 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], "finishReason": "tool-calls", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -1226,7 +1205,6 @@ "integration_name": "ai-sdk", "sdk_language": "typescript" }, - "toolCallId": "", "toolName": "get_weather" } }, @@ -1249,10 +1227,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1268,10 +1245,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1286,10 +1262,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1305,10 +1280,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1351,18 +1325,15 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], "finishReason": "tool-calls", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -1415,7 +1386,6 @@ "integration_name": "ai-sdk", "sdk_language": "typescript" }, - "toolCallId": "", "toolName": "get_weather" } }, @@ -1438,10 +1408,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1457,10 +1426,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1475,10 +1443,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1494,10 +1461,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1512,10 +1478,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1531,10 +1496,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1577,18 +1541,15 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } ], "finishReason": "tool-calls", - "response": { - "id": "" - }, + "response": {}, "usage": { "inputTokenDetails": { "cacheReadTokens": 0, @@ -1641,7 +1602,6 @@ "integration_name": "ai-sdk", "sdk_language": "typescript" }, - "toolCallId": "", "toolName": "get_weather" } } @@ -1692,10 +1652,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1707,10 +1666,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -1720,10 +1678,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1735,10 +1692,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -1748,10 +1704,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1763,10 +1718,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -1776,10 +1730,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1791,10 +1744,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1802,13 +1754,12 @@ "finishReason": "tool-calls", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -1818,10 +1769,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1837,10 +1787,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1862,10 +1811,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1877,10 +1825,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1892,13 +1839,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -1908,10 +1854,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -1927,10 +1872,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -1978,10 +1922,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -1993,10 +1936,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2008,13 +1950,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -2024,10 +1965,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2043,10 +1983,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2094,10 +2033,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2109,10 +2047,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2124,13 +2061,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -2140,10 +2076,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2159,10 +2094,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2210,10 +2144,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2225,10 +2158,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2240,13 +2172,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "messages": [ { "content": [ @@ -2256,10 +2187,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2275,10 +2205,9 @@ }, "providerOptions": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2326,10 +2255,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2339,10 +2267,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2352,10 +2279,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" }, @@ -2365,10 +2291,9 @@ }, "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-call" } @@ -2382,10 +2307,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -2397,10 +2321,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -2412,10 +2335,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" }, @@ -2427,10 +2349,9 @@ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", "providerMetadata": { "openai": { - "itemId": "" + "itemId": "" } }, - "toolCallId": "", "toolName": "get_weather", "type": "tool-result" } @@ -2506,14 +2427,13 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2593,14 +2513,13 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "body": "", "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2672,13 +2591,12 @@ "finishReason": "stop", "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2755,13 +2673,12 @@ }, "providerMetadata": { "openai": { - "responseId": "", + "responseId": "", "serviceTier": "default" } }, "response": { "headers": "", - "id": "", "modelId": "gpt-4o-mini-2024-07-18", "timestamp": "" }, @@ -2804,6 +2721,1836 @@ "operation": "stream-object", "testRunId": "" } + }, + { + "name": "ai-sdk-agent-generate-operation", + "children": [ + { + "name": "generateText", + "type": "function", + "children": [ + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 24, + "messages": [ + { + "content": "Reply with exactly HELLO and no punctuation.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 26 + }, + "inputTokens": 26, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 3 + }, + "outputTokens": 3, + "raw": { + "input_tokens": 26, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 3, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 29 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_tokens": 3, + "prompt_cached_tokens": 0, + "prompt_tokens": 26, + "tokens": 29 + } + } + ], + "input": { + "headers": { + "user-agent": "ai-sdk-agent/tool-loop ai/7.0.0" + }, + "maxOutputTokens": 24, + "maxRetries": 2, + "messages": [ + { + "content": "Reply with exactly HELLO and no punctuation.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "responseMessages": "", + "steps": [ + { + "callId": "", + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "HELLO", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 0, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 26 + }, + "inputTokens": 26, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 3 + }, + "outputTokens": 3, + "raw": { + "input_tokens": 26, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 3, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 29 + }, + "warnings": [] + } + ], + "text": "HELLO", + "toolCalls": [], + "toolResults": [], + "totalUsage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 26 + }, + "inputTokens": 26, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 3 + }, + "outputTokens": 3, + "totalTokens": 29 + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 26 + }, + "inputTokens": 26, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 3 + }, + "outputTokens": 3, + "totalTokens": 29 + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + } + ], + "metadata": { + "operation": "agent-generate", + "testRunId": "" + } + }, + { + "name": "ai-sdk-agent-stream-operation", + "children": [ + { + "name": "streamText", + "type": "function", + "children": [ + { + "name": "doStream", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 24, + "messages": [ + { + "content": "Reply with exactly STREAM HELLO and no punctuation.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "STREAM HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 27 + }, + "inputTokens": 27, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 4 + }, + "outputTokens": 4, + "raw": { + "input_tokens": 27, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 4, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 31 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_tokens": 4, + "prompt_cached_tokens": 0, + "prompt_tokens": 27, + "tokens": 31 + } + } + ], + "input": { + "headers": { + "user-agent": "ai-sdk-agent/tool-loop" + }, + "maxOutputTokens": 24, + "maxRetries": 2, + "messages": [ + { + "content": "Reply with exactly STREAM HELLO and no punctuation.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "STREAM HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "STREAM HELLO", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "responseMessages": "", + "steps": [ + { + "callId": "", + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "STREAM HELLO", + "type": "text" + } + ], + "finishReason": "stop", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "STREAM HELLO", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 0, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 27 + }, + "inputTokens": 27, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 4 + }, + "outputTokens": 4, + "raw": { + "input_tokens": 27, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 4, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 31 + }, + "warnings": [] + } + ], + "text": "STREAM HELLO", + "toolCalls": [], + "toolResults": [], + "totalUsage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 27 + }, + "inputTokens": 27, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 4 + }, + "outputTokens": 4, + "totalTokens": 31 + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 27 + }, + "inputTokens": 27, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 4 + }, + "outputTokens": 4, + "totalTokens": 31 + }, + "warnings": [] + }, + "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 + } + } + ], + "metadata": { + "operation": "agent-stream", + "testRunId": "" + } + }, + { + "name": "ai-sdk-agent-tool-loop-operation", + "children": [ + { + "name": "generateText", + "type": "function", + "children": [ + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 256, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 173 + }, + "inputTokens": 173, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 59 + }, + "outputTokens": 59, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 232 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_tokens": 59, + "prompt_cached_tokens": 0, + "prompt_tokens": 173, + "tokens": 232 + } + }, + { + "name": "get_store_price", + "type": "tool", + "children": [], + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolName": "get_store_price" + } + }, + { + "name": "get_store_price", + "type": "tool", + "children": [], + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolName": "get_store_price" + } + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 256, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "finishReason": "tool-calls", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 260 + }, + "inputTokens": 260, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 21 + }, + "outputTokens": 21, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 281 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_tokens": 21, + "prompt_cached_tokens": 0, + "prompt_tokens": 260, + "tokens": 281 + } + }, + { + "name": "apply_discount", + "type": "tool", + "children": [], + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "toolName": "apply_discount" + } + }, + { + "name": "doGenerate", + "type": "llm", + "children": [], + "input": { + "maxOutputTokens": 256, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + }, + "output": { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 370 + } + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "metrics": { + "completion_tokens": 62, + "prompt_cached_tokens": 0, + "prompt_tokens": 308, + "tokens": 370 + } + } + ], + "input": { + "headers": { + "user-agent": "ai-sdk-agent/tool-loop ai/7.0.0" + }, + "maxOutputTokens": 256, + "maxRetries": 2, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": { + "apply_discount": { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + } + }, + "get_store_price": { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + } + } + } + }, + "output": { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + }, + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "responseMessages": "", + "steps": [ + { + "callId": "", + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 0, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 173 + }, + "inputTokens": 173, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 59 + }, + "outputTokens": 59, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 232 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 1, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 260 + }, + "inputTokens": 260, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 21 + }, + "outputTokens": 21, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 281 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 2, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 370 + }, + "warnings": [] + } + ], + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "toolCalls": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "toolResults": [ + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "totalUsage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "totalTokens": 883 + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "totalTokens": 883 + }, + "warnings": [] + }, + "metadata": { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + } + ], + "metadata": { + "operation": "agent-tool-loop", + "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 e75d0d1d0..7e3892a80 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 @@ -44,13 +44,12 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -92,13 +91,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -206,7 +204,7 @@ span_tree: │ { │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, │ "text": "PARIS", @@ -214,9 +212,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", - │ "response": { - │ "id": "" - │ }, + │ "response": {}, │ "usage": { │ "inputTokenDetails": { │ "cacheReadTokens": 0, @@ -317,13 +313,12 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -365,13 +360,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -479,7 +473,7 @@ span_tree: │ { │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, │ "text": "{\"answer\":\"4\"}", @@ -487,9 +481,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", - │ "response": { - │ "id": "" - │ }, + │ "response": {}, │ "usage": { │ "inputTokenDetails": { │ "cacheReadTokens": 0, @@ -564,13 +556,12 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -612,13 +603,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -729,7 +719,7 @@ span_tree: │ { │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, │ "text": "One, two, three.", @@ -737,9 +727,7 @@ span_tree: │ } │ ], │ "finishReason": "stop", - │ "response": { - │ "id": "" - │ }, + │ "response": {}, │ "usage": { │ "inputTokenDetails": { │ "cacheReadTokens": 0, @@ -941,10 +929,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -956,10 +943,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -969,10 +955,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -984,10 +969,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -997,10 +981,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1012,10 +995,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -1025,10 +1007,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1040,10 +1021,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1051,13 +1031,12 @@ span_tree: │ "finishReason": "tool-calls", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1067,10 +1046,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1086,10 +1064,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1111,10 +1088,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1126,10 +1102,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1141,13 +1116,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1157,10 +1131,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1176,10 +1149,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1227,10 +1199,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1242,10 +1213,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1257,13 +1227,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1273,10 +1242,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1292,10 +1260,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1343,10 +1310,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1358,10 +1324,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1373,13 +1338,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1389,10 +1353,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1408,10 +1371,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1459,10 +1421,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1474,10 +1435,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1489,13 +1449,12 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "headers": "", - │ "id": "", │ "messages": [ │ { │ "content": [ @@ -1505,10 +1464,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1524,10 +1482,9 @@ span_tree: │ }, │ "providerOptions": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1575,10 +1532,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1588,10 +1544,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1601,10 +1556,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ }, @@ -1614,10 +1568,9 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-call" │ } @@ -1631,10 +1584,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -1646,10 +1598,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -1661,10 +1612,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ }, @@ -1676,10 +1626,9 @@ span_tree: │ "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}", │ "providerMetadata": { │ "openai": { - │ "itemId": "" + │ "itemId": "" │ } │ }, - │ "toolCallId": "", │ "toolName": "get_weather", │ "type": "tool-result" │ } @@ -1764,18 +1713,15 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } │ │ ], │ │ "finishReason": "tool-calls", - │ │ "response": { - │ │ "id": "" - │ │ }, + │ │ "response": {}, │ │ "usage": { │ │ "inputTokenDetails": { │ │ "cacheReadTokens": 0, @@ -1824,7 +1770,6 @@ span_tree: │ │ "integration_name": "ai-sdk", │ │ "sdk_language": "typescript" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather" │ │ } │ ├── doGenerate [llm] @@ -1843,10 +1788,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -1862,10 +1806,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -1908,18 +1851,15 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } │ │ ], │ │ "finishReason": "tool-calls", - │ │ "response": { - │ │ "id": "" - │ │ }, + │ │ "response": {}, │ │ "usage": { │ │ "inputTokenDetails": { │ │ "cacheReadTokens": 0, @@ -1968,7 +1908,6 @@ span_tree: │ │ "integration_name": "ai-sdk", │ │ "sdk_language": "typescript" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather" │ │ } │ ├── doGenerate [llm] @@ -1987,10 +1926,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2006,10 +1944,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2024,10 +1961,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2043,10 +1979,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2089,18 +2024,15 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } │ │ ], │ │ "finishReason": "tool-calls", - │ │ "response": { - │ │ "id": "" - │ │ }, + │ │ "response": {}, │ │ "usage": { │ │ "inputTokenDetails": { │ │ "cacheReadTokens": 0, @@ -2149,7 +2081,6 @@ span_tree: │ │ "integration_name": "ai-sdk", │ │ "sdk_language": "typescript" │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather" │ │ } │ ├── doGenerate [llm] @@ -2168,10 +2099,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2187,10 +2117,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2205,10 +2134,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2224,10 +2152,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2242,10 +2169,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } @@ -2261,10 +2187,9 @@ span_tree: │ │ }, │ │ "providerOptions": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-result" │ │ } @@ -2307,18 +2232,15 @@ span_tree: │ │ }, │ │ "providerMetadata": { │ │ "openai": { - │ │ "itemId": "" + │ │ "itemId": "" │ │ } │ │ }, - │ │ "toolCallId": "", │ │ "toolName": "get_weather", │ │ "type": "tool-call" │ │ } │ │ ], │ │ "finishReason": "tool-calls", - │ │ "response": { - │ │ "id": "" - │ │ }, + │ │ "response": {}, │ │ "usage": { │ │ "inputTokenDetails": { │ │ "cacheReadTokens": 0, @@ -2367,7 +2289,6 @@ span_tree: │ "integration_name": "ai-sdk", │ "sdk_language": "typescript" │ }, - │ "toolCallId": "", │ "toolName": "get_weather" │ } ├── ai-sdk-generate-object-operation @@ -2410,14 +2331,13 @@ span_tree: │ }, │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -2472,14 +2392,13 @@ span_tree: │ "finishReason": "stop", │ "providerMetadata": { │ "openai": { - │ "responseId": "", + │ "responseId": "", │ "serviceTier": "default" │ } │ }, │ "response": { │ "body": "", │ "headers": "", - │ "id": "", │ "modelId": "gpt-4o-mini-2024-07-18", │ "timestamp": "" │ }, @@ -2523,139 +2442,1908 @@ span_tree: │ "prompt_tokens": 38, │ "tokens": 44 │ } - └── 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": { - "headers": "", - "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": { - "headers": "", - "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": [] + ├── 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": { + │ "headers": "", + │ "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": { + │ "headers": "", + │ "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-agent-generate-operation + │ metadata: { + │ "operation": "agent-generate", + │ "testRunId": "" + │ } + │ └── generateText [function] + │ input: { + │ "headers": { + │ "user-agent": "ai-sdk-agent/tool-loop ai/7.0.0" + │ }, + │ "maxOutputTokens": 24, + │ "maxRetries": 2, + │ "messages": [ + │ { + │ "content": "Reply with exactly HELLO and no punctuation.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ } + │ output: { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "responseMessages": "", + │ "steps": [ + │ { + │ "callId": "", + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "stepNumber": 0, + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 26 + │ }, + │ "inputTokens": 26, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 3 + │ }, + │ "outputTokens": 3, + │ "raw": { + │ "input_tokens": 26, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 3, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 29 + │ }, + │ "warnings": [] + │ } + │ ], + │ "text": "HELLO", + │ "toolCalls": [], + │ "toolResults": [], + │ "totalUsage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 26 + │ }, + │ "inputTokens": 26, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 3 + │ }, + │ "outputTokens": 3, + │ "totalTokens": 29 + │ }, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 26 + │ }, + │ "inputTokens": 26, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 3 + │ }, + │ "outputTokens": 3, + │ "totalTokens": 29 + │ }, + │ "warnings": [] + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ └── doGenerate [llm] + │ input: { + │ "maxOutputTokens": 24, + │ "messages": [ + │ { + │ "content": "Reply with exactly HELLO and no punctuation.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ } + │ output: { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "response": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 26 + │ }, + │ "inputTokens": 26, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 3 + │ }, + │ "outputTokens": 3, + │ "raw": { + │ "input_tokens": 26, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 3, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 29 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_tokens": 3, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 26, + │ "tokens": 29 + │ } + ├── ai-sdk-agent-stream-operation + │ metadata: { + │ "operation": "agent-stream", + │ "testRunId": "" + │ } + │ └── streamText [function] + │ input: { + │ "headers": { + │ "user-agent": "ai-sdk-agent/tool-loop" + │ }, + │ "maxOutputTokens": 24, + │ "maxRetries": 2, + │ "messages": [ + │ { + │ "content": "Reply with exactly STREAM HELLO and no punctuation.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ } + │ output: { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "STREAM HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "STREAM HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "responseMessages": "", + │ "steps": [ + │ { + │ "callId": "", + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "STREAM HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "responseId": "", + │ "serviceTier": "default" + │ } + │ }, + │ "response": { + │ "headers": "", + │ "messages": [ + │ { + │ "content": [ + │ { + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "STREAM HELLO", + │ "type": "text" + │ } + │ ], + │ "role": "assistant" + │ } + │ ], + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "timestamp": "" + │ }, + │ "runtimeContext": {}, + │ "stepNumber": 0, + │ "toolsContext": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 27 + │ }, + │ "inputTokens": 27, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 4 + │ }, + │ "outputTokens": 4, + │ "raw": { + │ "input_tokens": 27, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 4, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 31 + │ }, + │ "warnings": [] + │ } + │ ], + │ "text": "STREAM HELLO", + │ "toolCalls": [], + │ "toolResults": [], + │ "totalUsage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 27 + │ }, + │ "inputTokens": 27, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 4 + │ }, + │ "outputTokens": 4, + │ "totalTokens": 31 + │ }, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 27 + │ }, + │ "inputTokens": 27, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 4 + │ }, + │ "outputTokens": 4, + │ "totalTokens": 31 + │ }, + │ "warnings": [] + │ } + │ 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] + │ input: { + │ "maxOutputTokens": 24, + │ "messages": [ + │ { + │ "content": "Reply with exactly STREAM HELLO and no punctuation.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ } + │ output: { + │ "content": [ + │ { + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "text": "STREAM HELLO", + │ "type": "text" + │ } + │ ], + │ "finishReason": "stop", + │ "response": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 27 + │ }, + │ "inputTokens": 27, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 4 + │ }, + │ "outputTokens": 4, + │ "raw": { + │ "input_tokens": 27, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 4, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 31 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_tokens": 4, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 27, + │ "tokens": 31 + │ } + └── ai-sdk-agent-tool-loop-operation + metadata: { + "operation": "agent-tool-loop", + "testRunId": "" + } + └── generateText [function] + input: { + "headers": { + "user-agent": "ai-sdk-agent/tool-loop ai/7.0.0" + }, + "maxOutputTokens": 256, + "maxRetries": 2, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": { + "apply_discount": { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + } + }, + "get_store_price": { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + } + } + } + } + output: { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + }, + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "responseMessages": "", + "steps": [ + { + "callId": "", + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 0, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 173 + }, + "inputTokens": 173, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 59 + }, + "outputTokens": 59, + "raw": { + "input_tokens": 173, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 59, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 232 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "finishReason": "tool-calls", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 1, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 260 + }, + "inputTokens": 260, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 21 + }, + "outputTokens": 21, + "raw": { + "input_tokens": 260, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 21, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 281 + }, + "warnings": [] + }, + { + "callId": "", + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "providerMetadata": { + "openai": { + "responseId": "", + "serviceTier": "default" + } + }, + "response": { + "headers": "", + "messages": [ + { + "content": [ + { + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "role": "assistant" + } + ], + "modelId": "gpt-4o-mini-2024-07-18", + "timestamp": "" + }, + "runtimeContext": {}, + "stepNumber": 2, + "toolsContext": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 370 + }, + "warnings": [] + } + ], + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "toolCalls": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "toolResults": [ + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreA" + }, + "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "item": "laptop", + "store": "StoreB" + }, + "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "dynamic": false, + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}", + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "totalUsage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "totalTokens": 883 + }, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 741 + }, + "inputTokens": 741, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 142 + }, + "outputTokens": 142, + "totalTokens": 883 + }, + "warnings": [] + } + metadata: { + "braintrust": { + "integration_name": "ai-sdk", + "sdk_language": "typescript" + }, + "model": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + } + ├── doGenerate [llm] + │ input: { + │ "maxOutputTokens": 256, + │ "messages": [ + │ { + │ "content": "I need help comparing laptop prices before checkout.", + │ "role": "user" + │ }, + │ { + │ "content": "I can compare store prices and apply a discount code.", + │ "role": "assistant" + │ }, + │ { + │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "role": "user" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ }, + │ "temperature": 0, + │ "tools": [ + │ { + │ "description": "Get the price of an item at a store", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "item": { + │ "description": "The item to price", + │ "type": "string" + │ }, + │ "store": { + │ "description": "The store name", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "item", + │ "store" + │ ], + │ "type": "object" + │ }, + │ "name": "get_store_price", + │ "type": "function" + │ }, + │ { + │ "description": "Apply a discount code to a total", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "discountCode": { + │ "description": "The discount code to apply", + │ "type": "string" + │ }, + │ "total": { + │ "description": "The original total", + │ "type": "number" + │ } + │ }, + │ "required": [ + │ "discountCode", + │ "total" + │ ], + │ "type": "object" + │ }, + │ "name": "apply_discount", + │ "type": "function" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "response": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 173 + │ }, + │ "inputTokens": 173, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 59 + │ }, + │ "outputTokens": 59, + │ "raw": { + │ "input_tokens": 173, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 59, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 232 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_tokens": 59, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 173, + │ "tokens": 232 + │ } + ├── get_store_price [tool] + │ input: { + │ "item": "laptop", + │ "store": "StoreA" + │ } + │ output: "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "toolName": "get_store_price" + │ } + ├── get_store_price [tool] + │ input: { + │ "item": "laptop", + │ "store": "StoreB" + │ } + │ output: "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "toolName": "get_store_price" + │ } + ├── doGenerate [llm] + │ input: { + │ "maxOutputTokens": 256, + │ "messages": [ + │ { + │ "content": "I need help comparing laptop prices before checkout.", + │ "role": "user" + │ }, + │ { + │ "content": "I can compare store prices and apply a discount code.", + │ "role": "assistant" + │ }, + │ { + │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + │ "role": "user" + │ }, + │ { + │ "content": [ + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreA" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ }, + │ { + │ "input": { + │ "item": "laptop", + │ "store": "StoreB" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-call" + │ } + │ ], + │ "role": "assistant" + │ }, + │ { + │ "content": [ + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ }, + │ { + │ "output": { + │ "type": "text", + │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + │ }, + │ "providerOptions": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "get_store_price", + │ "type": "tool-result" + │ } + │ ], + │ "role": "tool" + │ } + │ ], + │ "model": { + │ "modelId": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ }, + │ "temperature": 0, + │ "tools": [ + │ { + │ "description": "Get the price of an item at a store", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "item": { + │ "description": "The item to price", + │ "type": "string" + │ }, + │ "store": { + │ "description": "The store name", + │ "type": "string" + │ } + │ }, + │ "required": [ + │ "item", + │ "store" + │ ], + │ "type": "object" + │ }, + │ "name": "get_store_price", + │ "type": "function" + │ }, + │ { + │ "description": "Apply a discount code to a total", + │ "inputSchema": { + │ "$schema": "http://json-schema.org/draft-07/schema#", + │ "additionalProperties": false, + │ "properties": { + │ "discountCode": { + │ "description": "The discount code to apply", + │ "type": "string" + │ }, + │ "total": { + │ "description": "The original total", + │ "type": "number" + │ } + │ }, + │ "required": [ + │ "discountCode", + │ "total" + │ ], + │ "type": "object" + │ }, + │ "name": "apply_discount", + │ "type": "function" + │ } + │ ] + │ } + │ output: { + │ "content": [ + │ { + │ "input": { + │ "discountCode": "SAVE20", + │ "total": 999 + │ }, + │ "providerMetadata": { + │ "openai": { + │ "itemId": "" + │ } + │ }, + │ "toolName": "apply_discount", + │ "type": "tool-call" + │ } + │ ], + │ "finishReason": "tool-calls", + │ "response": {}, + │ "usage": { + │ "inputTokenDetails": { + │ "cacheReadTokens": 0, + │ "noCacheTokens": 260 + │ }, + │ "inputTokens": 260, + │ "outputTokenDetails": { + │ "reasoningTokens": 0, + │ "textTokens": 21 + │ }, + │ "outputTokens": 21, + │ "raw": { + │ "input_tokens": 260, + │ "input_tokens_details": { + │ "cached_tokens": 0 + │ }, + │ "output_tokens": 21, + │ "output_tokens_details": { + │ "reasoning_tokens": 0 + │ } + │ }, + │ "totalTokens": 281 + │ } + │ } + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "model": "gpt-4o-mini-2024-07-18", + │ "provider": "openai.responses" + │ } + │ metrics: { + │ "completion_tokens": 21, + │ "prompt_cached_tokens": 0, + │ "prompt_tokens": 260, + │ "tokens": 281 + │ } + ├── apply_discount [tool] + │ input: { + │ "discountCode": "SAVE20", + │ "total": 999 + │ } + │ output: "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + │ metadata: { + │ "braintrust": { + │ "integration_name": "ai-sdk", + │ "sdk_language": "typescript" + │ }, + │ "toolName": "apply_discount" + │ } + └── doGenerate [llm] + input: { + "maxOutputTokens": 256, + "messages": [ + { + "content": "I need help comparing laptop prices before checkout.", + "role": "user" + }, + { + "content": "I can compare store prices and apply a discount code.", + "role": "assistant" + }, + { + "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + "role": "user" + }, + { + "content": [ + { + "input": { + "item": "laptop", + "store": "StoreA" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + }, + { + "input": { + "item": "laptop", + "store": "StoreB" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + }, + { + "output": { + "type": "text", + "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "get_store_price", + "type": "tool-result" + } + ], + "role": "tool" + }, + { + "content": [ + { + "input": { + "discountCode": "SAVE20", + "total": 999 + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-call" + } + ], + "role": "assistant" + }, + { + "content": [ + { + "output": { + "type": "text", + "value": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" + }, + "providerOptions": { + "openai": { + "itemId": "" + } + }, + "toolName": "apply_discount", + "type": "tool-result" + } + ], + "role": "tool" + } + ], + "model": { + "modelId": "gpt-4o-mini-2024-07-18", + "provider": "openai.responses" + }, + "temperature": 0, + "tools": [ + { + "description": "Get the price of an item at a store", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "item": { + "description": "The item to price", + "type": "string" + }, + "store": { + "description": "The store name", + "type": "string" + } + }, + "required": [ + "item", + "store" + ], + "type": "object" + }, + "name": "get_store_price", + "type": "function" + }, + { + "description": "Apply a discount code to a total", + "inputSchema": { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "properties": { + "discountCode": { + "description": "The discount code to apply", + "type": "string" + }, + "total": { + "description": "The original total", + "type": "number" + } + }, + "required": [ + "discountCode", + "total" + ], + "type": "object" + }, + "name": "apply_discount", + "type": "function" + } + ] + } + output: { + "content": [ + { + "providerMetadata": { + "openai": { + "itemId": "" + } + }, + "text": "Here are the prices for the laptop:\n\n- **Store A**: $999\n- **Store B**: $1099\n\nThe cheaper price is from **Store A** at $999. After applying the discount code **SAVE20**, the final total is **$799.20**.", + "type": "text" + } + ], + "finishReason": "stop", + "response": {}, + "usage": { + "inputTokenDetails": { + "cacheReadTokens": 0, + "noCacheTokens": 308 + }, + "inputTokens": 308, + "outputTokenDetails": { + "reasoningTokens": 0, + "textTokens": 62 + }, + "outputTokens": 62, + "raw": { + "input_tokens": 308, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 62, + "output_tokens_details": { + "reasoning_tokens": 0 + } + }, + "totalTokens": 370 + } } metadata: { "braintrust": { @@ -2666,8 +4354,8 @@ span_tree: "provider": "openai.responses" } metrics: { - "completion_tokens": 6, + "completion_tokens": 62, "prompt_cached_tokens": 0, - "prompt_tokens": 38, - "tokens": 44 + "prompt_tokens": 308, + "tokens": 370 } diff --git a/e2e/scenarios/ai-sdk-instrumentation/assertions.ts b/e2e/scenarios/ai-sdk-instrumentation/assertions.ts index 1f464db53..b1e78116d 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/assertions.ts +++ b/e2e/scenarios/ai-sdk-instrumentation/assertions.ts @@ -95,11 +95,40 @@ function collectToolCallNames(output: unknown): string[] { const steps = Array.isArray(output.steps) ? output.steps : []; const toolCalls = Array.isArray(output.toolCalls) ? output.toolCalls : []; - const names = [...toolCalls, ...steps.flatMap((step) => step.toolCalls ?? [])] + const names = [ + ...toolCalls, + ...steps.flatMap((step) => (isRecord(step) ? (step.toolCalls ?? []) : [])), + ] .map((call) => (isRecord(call) ? (call.toolName ?? call.name) : undefined)) .filter((name): name is string => typeof name === "string"); - return [...new Set(names)]; + return [...new Set([...names, ...collectToolPartNames(output, "tool-call")])]; +} + +function collectToolPartNames(output: unknown, partType: string): string[] { + const names = new Set(); + const visit = (value: unknown) => { + if (Array.isArray(value)) { + value.forEach(visit); + return; + } + + if (!isRecord(value)) { + return; + } + + if (value.type === partType) { + const name = value.toolName ?? value.name; + if (typeof name === "string") { + names.add(name); + } + } + + Object.values(value).forEach(visit); + }; + + visit(output); + return [...names]; } function collectToolResultNames(output: unknown): string[] { @@ -127,7 +156,9 @@ function collectToolResultNames(output: unknown): string[] { ) .filter((name): name is string => typeof name === "string"); - return [...new Set(names)]; + return [ + ...new Set([...names, ...collectToolPartNames(output, "tool-result")]), + ]; } function collectMetricValues( @@ -372,6 +403,35 @@ function findAgentStreamTrace( }; } +function findAgentToolLoopTrace( + events: CapturedLogEvent[], + agentSpanName: AgentSpanName | undefined, +) { + const operation = findLatestSpan(events, "ai-sdk-agent-tool-loop-operation"); + const parent = + (agentSpanName + ? findParentSpan(events, `${agentSpanName}.generate`, operation?.span.id) + : undefined) ?? + findParentSpan(events, "generateText", operation?.span.id); + const rootEvents = events.filter( + (event) => event.span.rootId === operation?.span.rootId, + ); + const modelChildren = rootEvents.filter((event) => { + const name = event.span.name ?? ""; + return name === "doGenerate" || name === "doStream"; + }); + const toolSpans = rootEvents.filter((event) => + ["apply_discount", "get_store_price"].includes(event.span.name ?? ""), + ); + + return { + modelChildren, + operation, + parent, + toolSpans, + }; +} + function operationName( event: CapturedLogEvent | undefined, ): string | undefined { @@ -779,6 +839,7 @@ export function defineAISDKInstrumentationAssertions(options: { runScenario: RunAISDKScenario; sdkMajorVersion: number; snapshotName: string; + supportsAgentToolLoop: boolean; supportsOpenAICacheAssertions: boolean; supportsProviderCacheAssertions: boolean; supportsDenyOutputOverrideScenario: boolean; @@ -1227,6 +1288,49 @@ export function defineAISDKInstrumentationAssertions(options: { } } + if (options.supportsAgentToolLoop) { + test("captures trace for ToolLoopAgent tool loop", testConfig, () => { + const root = findLatestSpan(events, ROOT_NAME); + const trace = findAgentToolLoopTrace(events, options.agentSpanName); + + expectOperationParentedByRoot(trace.operation, root); + expectAISDKParentSpan(trace.parent); + expect(operationName(trace.operation)).toBe("agent-tool-loop"); + expect(hasPromptLikeInput(trace.parent?.input)).toBe(true); + expect(trace.parent?.output).toBeDefined(); + expect(trace.modelChildren.length).toBeGreaterThanOrEqual(2); + trace.modelChildren.forEach(expectAISDKModelChildSpan); + + const toolNames = trace.toolSpans.map((event) => event.span.name); + expect(toolNames).toContain("get_store_price"); + expect(toolNames).toContain("apply_discount"); + trace.toolSpans.forEach((toolSpan) => { + expect(toolSpan.input).toBeDefined(); + expect(toolSpan.output).toBeDefined(); + }); + + const toolCallNames = [ + ...collectToolCallNames(trace.parent?.output), + ...trace.modelChildren.flatMap((event) => + collectToolCallNames(event.output), + ), + ]; + const toolResultNames = [ + ...collectToolResultNames(trace.parent?.output), + ...trace.modelChildren.flatMap((event) => + collectToolResultNames(event.output), + ), + ]; + + expect(toolCallNames).toEqual( + expect.arrayContaining(["apply_discount", "get_store_price"]), + ); + expect(toolResultNames).toEqual( + expect.arrayContaining(["apply_discount", "get_store_price"]), + ); + }); + } + if (options.supportsDenyOutputOverrideScenario) { test( "captures denyOutputPaths override on instrumentation events", @@ -1253,7 +1357,7 @@ export function defineAISDKInstrumentationAssertions(options: { await matchSpanTreeSnapshot(events, spanSnapshotPath, { normalize: { additionalProviderIdKeys: ["callId"], - omittedKeys: ["performance"], + omittedKeys: ["id", "performance", "prompt_cache_key", "toolCallId"], }, }); }); diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v6.mjs b/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v6.mjs index 5014cba74..3efd71f48 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v6.mjs +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v6.mjs @@ -11,6 +11,7 @@ runAutoAISDKInstrumentationOrExit({ maxTokensKey: "maxOutputTokens", openai, sdkVersion: await getInstalledPackageVersion(import.meta.url, "ai-sdk-v6"), + supportsAgentToolLoop: true, supportsEmbedMany: false, supportsGenerateObject: true, supportsStreamObject: true, diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v6.ts b/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v6.ts index 55a6c409e..0cf1099cf 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v6.ts +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v6.ts @@ -15,6 +15,7 @@ runMain(async () => maxTokensKey: "maxOutputTokens", openai, sdkVersion: await getInstalledPackageVersion(import.meta.url, "ai-sdk-v6"), + supportsAgentToolLoop: true, supportsEmbedMany: false, supportsGenerateObject: true, supportsStreamObject: true, 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..31dcfb02b 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7.mjs +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7.mjs @@ -4,11 +4,13 @@ import { getInstalledPackageVersion } from "../../helpers/provider-runtime.mjs"; import { runAutoAISDKInstrumentationOrExit } from "./scenario.impl.mjs"; runAutoAISDKInstrumentationOrExit({ + agentClassExport: "ToolLoopAgent", ai, createOpenAI, maxTokensKey: "maxOutputTokens", openai, sdkVersion: await getInstalledPackageVersion(import.meta.url, "ai-sdk-v7"), + supportsAgentToolLoop: true, supportsDenyOutputOverrideScenario: false, supportsEmbedMany: true, supportsGenerateObject: true, diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7.ts b/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7.ts index b36b7b2be..2c06a0c05 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7.ts +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.ai-sdk-v7.ts @@ -11,12 +11,14 @@ ai.registerTelemetry(braintrustAISDKTelemetry()); runMain(async () => runAutoAISDKInstrumentation({ + agentClassExport: "ToolLoopAgent", ai, createOpenAI, maxTokensKey: "maxOutputTokens", openai, sdkVersion: await getInstalledPackageVersion(import.meta.url, "ai-sdk-v7"), supportsDenyOutputOverrideScenario: false, + supportsAgentToolLoop: true, supportsEmbedMany: true, supportsGenerateObject: true, supportsOpenAICacheScenario: false, diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs b/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs index f84ef8c03..36fe43dbe 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.impl.mjs @@ -74,6 +74,7 @@ export const AI_SDK_SCENARIO_SPECS = [ openaiModuleName: "ai-sdk-openai-v6", packageName: "ai-sdk-v6", snapshotName: "ai-sdk-v6", + supportsAgentToolLoop: true, supportsEmbedMany: false, supportsProviderCacheAssertions: true, supportsGenerateObject: true, @@ -83,12 +84,14 @@ export const AI_SDK_SCENARIO_SPECS = [ wrapperEntry: "scenario.ts", }, { + agentClassExport: "ToolLoopAgent", autoEntry: "scenario.ai-sdk-v7.mjs", dependencyName: "ai-sdk-v7", maxTokensKey: "maxOutputTokens", openaiModuleName: "ai-sdk-openai-v7", packageName: "ai-sdk-v7", snapshotName: "ai-sdk-v7", + supportsAgentToolLoop: true, supportsDenyOutputOverrideScenario: false, supportsEmbedMany: true, supportsGenerateObject: true, @@ -531,6 +534,82 @@ async function runAISDKInstrumentationScenario( } }, ); + + if (options.supportsAgentToolLoop) { + await runOperation( + "ai-sdk-agent-tool-loop-operation", + "agent-tool-loop", + async () => { + const AgentClass = instrumentedAI[options.agentClassExport]; + const agent = new AgentClass({ + model: openaiModel, + instructions: + "You are a shopping assistant. Use the tools before answering pricing questions.", + tools: { + get_store_price: options.ai.tool({ + description: "Get the price of an item at a store", + [options.toolSchemaKey]: z.object({ + item: z.string().describe("The item to price"), + store: z.string().describe("The store name"), + }), + execute: async (args) => + JSON.stringify({ + item: args.item, + price: + args.store === "StoreA" + ? 999 + : args.store === "StoreB" + ? 1099 + : 0, + store: args.store, + }), + }), + apply_discount: options.ai.tool({ + description: "Apply a discount code to a total", + [options.toolSchemaKey]: z.object({ + discountCode: z + .string() + .describe("The discount code to apply"), + total: z.number().describe("The original total"), + }), + execute: async (args) => + JSON.stringify({ + discountCode: args.discountCode, + finalTotal: + args.discountCode === "SAVE20" + ? args.total * 0.8 + : args.total, + originalTotal: args.total, + }), + }), + }, + stopWhen: options.ai.stepCountIs(6), + temperature: 0, + }); + + await agent.generate({ + messages: [ + { + role: "user", + content: + "I need help comparing laptop prices before checkout.", + }, + { + role: "assistant", + content: + "I can compare store prices and apply a discount code.", + }, + { + role: "user", + content: + "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", + }, + ], + ...tokenLimit(options.maxTokensKey, 256), + }); + }, + ); + } } }, flushCount, diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.mjs b/e2e/scenarios/ai-sdk-instrumentation/scenario.mjs index 95fdf1683..aa011d551 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.mjs +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.mjs @@ -21,6 +21,7 @@ runMain(async () => maxTokensKey: "maxOutputTokens", openai, sdkVersion: await getInstalledPackageVersion(import.meta.url, "ai-sdk-v6"), + supportsAgentToolLoop: true, supportsEmbedMany: false, supportsGenerateObject: true, supportsStreamObject: true, diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.test.ts b/e2e/scenarios/ai-sdk-instrumentation/scenario.test.ts index ceb03ac14..1fe05a74a 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.test.ts +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.test.ts @@ -57,6 +57,7 @@ describe.concurrent("variants", () => { }); }, snapshotName: `${scenario.snapshotName}-${scenario.wrapperSnapshotSuffix ?? "wrapped"}`, + supportsAgentToolLoop: scenario.supportsAgentToolLoop === true, supportsOpenAICacheAssertions, supportsProviderCacheAssertions: scenario.supportsProviderCacheAssertions, @@ -88,6 +89,7 @@ describe.concurrent("variants", () => { }); }, snapshotName: `${scenario.snapshotName}-auto-hook`, + supportsAgentToolLoop: scenario.supportsAgentToolLoop === true, supportsOpenAICacheAssertions, supportsProviderCacheAssertions: scenario.supportsProviderCacheAssertions, diff --git a/e2e/scenarios/ai-sdk-instrumentation/scenario.ts b/e2e/scenarios/ai-sdk-instrumentation/scenario.ts index 1340f42c3..69f61b442 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/scenario.ts +++ b/e2e/scenarios/ai-sdk-instrumentation/scenario.ts @@ -21,6 +21,7 @@ runMain(async () => maxTokensKey: "maxOutputTokens", openai, sdkVersion: await getInstalledPackageVersion(import.meta.url, "ai-sdk-v6"), + supportsAgentToolLoop: true, supportsEmbedMany: false, supportsGenerateObject: true, supportsStreamObject: true, From 5758851a892b562e4426941045c66d474848249a Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 1 Jul 2026 16:01:51 +0200 Subject: [PATCH 2/3] actually fix --- .../ai-sdk-v3-auto-hook.span-tree.json | 9 +- .../ai-sdk-v3-auto-hook.span-tree.txt | 9 +- .../ai-sdk-v3-wrapped.span-tree.json | 9 +- .../ai-sdk-v3-wrapped.span-tree.txt | 9 +- .../ai-sdk-v4-auto-hook.span-tree.json | 16 +- .../ai-sdk-v4-auto-hook.span-tree.txt | 16 +- .../ai-sdk-v4-wrapped.span-tree.json | 16 +- .../ai-sdk-v4-wrapped.span-tree.txt | 16 +- .../ai-sdk-v5-auto-hook.span-tree.json | 244 +---------- .../ai-sdk-v5-auto-hook.span-tree.txt | 244 +---------- .../ai-sdk-v5-wrapped.span-tree.json | 244 +---------- .../ai-sdk-v5-wrapped.span-tree.txt | 244 +---------- .../ai-sdk-v6-auto-hook.span-tree.json | 414 +----------------- .../ai-sdk-v6-auto-hook.span-tree.txt | 414 +----------------- .../ai-sdk-v6-wrapped.span-tree.json | 414 +----------------- .../ai-sdk-v6-wrapped.span-tree.txt | 414 +----------------- .../ai-sdk-instrumentation/assertions.ts | 21 + .../instrumentation/plugins/ai-sdk-plugin.ts | 4 +- 18 files changed, 191 insertions(+), 2566 deletions(-) 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 fdeac6a51..841502f76 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 @@ -416,12 +416,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - {} - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], 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 2f828a0fc..710bf9ff9 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 @@ -576,12 +576,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: { 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 fdeac6a51..841502f76 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 @@ -416,12 +416,9 @@ "name": "get_weather", "type": "tool", "children": [], - "input": [ - { - "location": "Paris, France" - }, - {} - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], 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 2f828a0fc..710bf9ff9 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 @@ -576,12 +576,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: { 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 c0dd913a5..b3298689b 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 @@ -765,19 +765,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" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], 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 9c4cea0b0..d64605c8f 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 @@ -925,19 +925,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" - │ } - │ ] - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── ai-sdk-generate-object-operation │ metadata: { 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 c0dd913a5..b3298689b 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 @@ -765,19 +765,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" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], 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 9c4cea0b0..d64605c8f 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 @@ -925,19 +925,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" - │ } - │ ] - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── ai-sdk-generate-object-operation │ metadata: { 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 a4af6ab89..3cdf7fd03 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 @@ -791,19 +791,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" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -943,49 +933,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1155,79 +1105,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1427,109 +1307,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], 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 ec7dee424..a328a9d42 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 @@ -1500,19 +1500,9 @@ 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" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -1644,49 +1634,9 @@ 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": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -1848,79 +1798,9 @@ 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": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -2112,109 +1992,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": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ } - │ ] - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── generateText [function] │ input: { 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 8c50bbf0a..87f0cbf66 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 @@ -791,19 +791,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" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -943,49 +933,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1155,79 +1105,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1427,109 +1307,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], 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 6291c7921..b727af3d2 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 @@ -1500,19 +1500,9 @@ 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" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -1644,49 +1634,9 @@ 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": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -1848,79 +1798,9 @@ 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": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -2112,109 +1992,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": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ } - │ ] - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── ai-sdk-openai-cache-operation │ metadata: { 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 16219a04e..9c94a6bb2 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 @@ -977,19 +977,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" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1152,54 +1142,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1397,89 +1342,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1712,124 +1577,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], @@ -7233,56 +6983,20 @@ "name": "get_store_price", "type": "tool", "children": [], - "input": [ - { - "item": "laptop", - "store": "StoreA" - }, - { - "messages": [ - { - "content": "I need help comparing laptop prices before checkout.", - "role": "user" - }, - { - "content": "I can compare store prices and apply a discount code.", - "role": "assistant" - }, - { - "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - "role": "user" - } - ] - } - ], + "input": { + "item": "laptop", + "store": "StoreA" + }, "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" }, { "name": "get_store_price", "type": "tool", "children": [], - "input": [ - { - "item": "laptop", - "store": "StoreB" - }, - { - "messages": [ - { - "content": "I need help comparing laptop prices before checkout.", - "role": "user" - }, - { - "content": "I can compare store prices and apply a discount code.", - "role": "assistant" - }, - { - "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - "role": "user" - } - ] - } - ], + "input": { + "item": "laptop", + "store": "StoreB" + }, "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" }, { @@ -7519,90 +7233,10 @@ "name": "apply_discount", "type": "tool", "children": [], - "input": [ - { - "discountCode": "SAVE20", - "total": 999 - }, - { - "messages": [ - { - "content": "I need help comparing laptop prices before checkout.", - "role": "user" - }, - { - "content": "I can compare store prices and apply a discount code.", - "role": "assistant" - }, - { - "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - "role": "user" - }, - { - "content": [ - { - "input": { - "item": "laptop", - "store": "StoreA" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_store_price", - "type": "tool-call" - }, - { - "input": { - "item": "laptop", - "store": "StoreB" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_store_price", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_store_price", - "type": "tool-result" - }, - { - "output": { - "type": "text", - "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_store_price", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "discountCode": "SAVE20", + "total": 999 + }, "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" }, { 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 709ea32f7..d2180366a 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 @@ -1876,19 +1876,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" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -2043,54 +2033,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": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -2280,89 +2225,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": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -2587,124 +2452,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": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ } - │ ] - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── generateText [function] │ input: { @@ -7699,52 +7449,16 @@ span_tree: │ "reasoning_tokens": 0 │ } ├── get_store_price [tool] - │ input: [ - │ { - │ "item": "laptop", - │ "store": "StoreA" - │ }, - │ { - │ "messages": [ - │ { - │ "content": "I need help comparing laptop prices before checkout.", - │ "role": "user" - │ }, - │ { - │ "content": "I can compare store prices and apply a discount code.", - │ "role": "assistant" - │ }, - │ { - │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - │ "role": "user" - │ } - │ ] - │ } - │ ] + │ input: { + │ "item": "laptop", + │ "store": "StoreA" + │ } │ output: "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" ├── get_store_price [tool] - │ input: [ - │ { - │ "item": "laptop", - │ "store": "StoreB" - │ }, - │ { - │ "messages": [ - │ { - │ "content": "I need help comparing laptop prices before checkout.", - │ "role": "user" - │ }, - │ { - │ "content": "I can compare store prices and apply a discount code.", - │ "role": "assistant" - │ }, - │ { - │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - │ "role": "user" - │ } - │ ] - │ } - │ ] + │ input: { + │ "item": "laptop", + │ "store": "StoreB" + │ } │ output: "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" ├── doGenerate [llm] │ input: { @@ -7973,90 +7687,10 @@ span_tree: │ "reasoning_tokens": 0 │ } ├── apply_discount [tool] - │ input: [ - │ { - │ "discountCode": "SAVE20", - │ "total": 999 - │ }, - │ { - │ "messages": [ - │ { - │ "content": "I need help comparing laptop prices before checkout.", - │ "role": "user" - │ }, - │ { - │ "content": "I can compare store prices and apply a discount code.", - │ "role": "assistant" - │ }, - │ { - │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - │ "role": "user" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "item": "laptop", - │ "store": "StoreA" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_store_price", - │ "type": "tool-call" - │ }, - │ { - │ "input": { - │ "item": "laptop", - │ "store": "StoreB" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_store_price", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_store_price", - │ "type": "tool-result" - │ }, - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_store_price", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ } - │ ] - │ } - │ ] + │ input: { + │ "discountCode": "SAVE20", + │ "total": 999 + │ } │ output: "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" └── doGenerate [llm] input: { 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 ebee98294..9b8840063 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 @@ -977,19 +977,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" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1152,54 +1142,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1397,89 +1342,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" }, { @@ -1712,124 +1577,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": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - }, - { - "content": [ - { - "input": { - "location": "Paris, France" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_weather", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "location": "Paris, France" + }, "output": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" } ], @@ -5573,56 +5323,20 @@ "name": "get_store_price", "type": "tool", "children": [], - "input": [ - { - "item": "laptop", - "store": "StoreA" - }, - { - "messages": [ - { - "content": "I need help comparing laptop prices before checkout.", - "role": "user" - }, - { - "content": "I can compare store prices and apply a discount code.", - "role": "assistant" - }, - { - "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - "role": "user" - } - ] - } - ], + "input": { + "item": "laptop", + "store": "StoreA" + }, "output": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" }, { "name": "get_store_price", "type": "tool", "children": [], - "input": [ - { - "item": "laptop", - "store": "StoreB" - }, - { - "messages": [ - { - "content": "I need help comparing laptop prices before checkout.", - "role": "user" - }, - { - "content": "I can compare store prices and apply a discount code.", - "role": "assistant" - }, - { - "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - "role": "user" - } - ] - } - ], + "input": { + "item": "laptop", + "store": "StoreB" + }, "output": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" }, { @@ -5859,90 +5573,10 @@ "name": "apply_discount", "type": "tool", "children": [], - "input": [ - { - "discountCode": "SAVE20", - "total": 999 - }, - { - "messages": [ - { - "content": "I need help comparing laptop prices before checkout.", - "role": "user" - }, - { - "content": "I can compare store prices and apply a discount code.", - "role": "assistant" - }, - { - "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - "role": "user" - }, - { - "content": [ - { - "input": { - "item": "laptop", - "store": "StoreA" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_store_price", - "type": "tool-call" - }, - { - "input": { - "item": "laptop", - "store": "StoreB" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_store_price", - "type": "tool-call" - } - ], - "role": "assistant" - }, - { - "content": [ - { - "output": { - "type": "text", - "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_store_price", - "type": "tool-result" - }, - { - "output": { - "type": "text", - "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" - }, - "providerOptions": { - "openai": { - "itemId": "" - } - }, - "toolName": "get_store_price", - "type": "tool-result" - } - ], - "role": "tool" - } - ] - } - ], + "input": { + "discountCode": "SAVE20", + "total": 999 + }, "output": "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" }, { 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 d2364ef39..5b802db68 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 @@ -1876,19 +1876,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" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -2043,54 +2033,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": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -2280,89 +2225,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": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "input": { - │ │ "location": "Paris, France" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-call" - │ │ } - │ │ ], - │ │ "role": "assistant" - │ │ }, - │ │ { - │ │ "content": [ - │ │ { - │ │ "output": { - │ │ "type": "text", - │ │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ │ }, - │ │ "providerOptions": { - │ │ "openai": { - │ │ "itemId": "" - │ │ } - │ │ }, - │ │ "toolName": "get_weather", - │ │ "type": "tool-result" - │ │ } - │ │ ], - │ │ "role": "tool" - │ │ } - │ │ ] - │ │ } - │ │ ] + │ │ input: { + │ │ "location": "Paris, France" + │ │ } │ │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" │ ├── doGenerate [llm] │ │ input: { @@ -2587,124 +2452,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": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "location": "Paris, France" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_weather", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ } - │ ] - │ } - │ ] + │ input: { + │ "location": "Paris, France" + │ } │ output: "{\"condition\":\"sunny\",\"location\":\"Paris, France\",\"temperatureC\":22}" ├── ai-sdk-openai-cache-operation │ metadata: { @@ -6181,52 +5931,16 @@ span_tree: │ "reasoning_tokens": 0 │ } ├── get_store_price [tool] - │ input: [ - │ { - │ "item": "laptop", - │ "store": "StoreA" - │ }, - │ { - │ "messages": [ - │ { - │ "content": "I need help comparing laptop prices before checkout.", - │ "role": "user" - │ }, - │ { - │ "content": "I can compare store prices and apply a discount code.", - │ "role": "assistant" - │ }, - │ { - │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - │ "role": "user" - │ } - │ ] - │ } - │ ] + │ input: { + │ "item": "laptop", + │ "store": "StoreA" + │ } │ output: "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" ├── get_store_price [tool] - │ input: [ - │ { - │ "item": "laptop", - │ "store": "StoreB" - │ }, - │ { - │ "messages": [ - │ { - │ "content": "I need help comparing laptop prices before checkout.", - │ "role": "user" - │ }, - │ { - │ "content": "I can compare store prices and apply a discount code.", - │ "role": "assistant" - │ }, - │ { - │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - │ "role": "user" - │ } - │ ] - │ } - │ ] + │ input: { + │ "item": "laptop", + │ "store": "StoreB" + │ } │ output: "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" ├── doGenerate [llm] │ input: { @@ -6455,90 +6169,10 @@ span_tree: │ "reasoning_tokens": 0 │ } ├── apply_discount [tool] - │ input: [ - │ { - │ "discountCode": "SAVE20", - │ "total": 999 - │ }, - │ { - │ "messages": [ - │ { - │ "content": "I need help comparing laptop prices before checkout.", - │ "role": "user" - │ }, - │ { - │ "content": "I can compare store prices and apply a discount code.", - │ "role": "assistant" - │ }, - │ { - │ "content": "Call get_store_price for a laptop at StoreA and StoreB, then call apply_discount with code SAVE20 for the cheaper price. Finish with the discounted total.", - │ "role": "user" - │ }, - │ { - │ "content": [ - │ { - │ "input": { - │ "item": "laptop", - │ "store": "StoreA" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_store_price", - │ "type": "tool-call" - │ }, - │ { - │ "input": { - │ "item": "laptop", - │ "store": "StoreB" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_store_price", - │ "type": "tool-call" - │ } - │ ], - │ "role": "assistant" - │ }, - │ { - │ "content": [ - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"item\":\"laptop\",\"price\":999,\"store\":\"StoreA\"}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_store_price", - │ "type": "tool-result" - │ }, - │ { - │ "output": { - │ "type": "text", - │ "value": "{\"item\":\"laptop\",\"price\":1099,\"store\":\"StoreB\"}" - │ }, - │ "providerOptions": { - │ "openai": { - │ "itemId": "" - │ } - │ }, - │ "toolName": "get_store_price", - │ "type": "tool-result" - │ } - │ ], - │ "role": "tool" - │ } - │ ] - │ } - │ ] + │ input: { + │ "discountCode": "SAVE20", + │ "total": 999 + │ } │ output: "{\"discountCode\":\"SAVE20\",\"finalTotal\":799.2,\"originalTotal\":999}" └── doGenerate [llm] input: { diff --git a/e2e/scenarios/ai-sdk-instrumentation/assertions.ts b/e2e/scenarios/ai-sdk-instrumentation/assertions.ts index b1e78116d..2d71755d2 100644 --- a/e2e/scenarios/ai-sdk-instrumentation/assertions.ts +++ b/e2e/scenarios/ai-sdk-instrumentation/assertions.ts @@ -1304,6 +1304,27 @@ export function defineAISDKInstrumentationAssertions(options: { const toolNames = trace.toolSpans.map((event) => event.span.name); expect(toolNames).toContain("get_store_price"); expect(toolNames).toContain("apply_discount"); + expect( + trace.toolSpans.map((toolSpan) => ({ + input: toolSpan.input, + name: toolSpan.span.name, + })), + ).toEqual( + expect.arrayContaining([ + { + input: { item: "laptop", store: "StoreA" }, + name: "get_store_price", + }, + { + input: { item: "laptop", store: "StoreB" }, + name: "get_store_price", + }, + { + input: { discountCode: "SAVE20", total: 999 }, + name: "apply_discount", + }, + ]), + ); trace.toolSpans.forEach((toolSpan) => { expect(toolSpan.input).toBeDefined(); expect(toolSpan.output).toBeDefined(); diff --git a/js/src/instrumentation/plugins/ai-sdk-plugin.ts b/js/src/instrumentation/plugins/ai-sdk-plugin.ts index 5d09a989c..00ec96419 100644 --- a/js/src/instrumentation/plugins/ai-sdk-plugin.ts +++ b/js/src/instrumentation/plugins/ai-sdk-plugin.ts @@ -1351,7 +1351,7 @@ function prepareAISDKChildTracing( type: SpanTypeAttribute.TOOL, }, }); - span.log({ input: args.length === 1 ? args[0] : args }); + span.log({ input: args[0] }); try { let lastValue: unknown; @@ -1371,7 +1371,7 @@ function prepareAISDKChildTracing( return parentSpan.traced( async (span) => { - span.log({ input: args.length === 1 ? args[0] : args }); + span.log({ input: args[0] }); const awaitedResult = await result; span.log({ output: awaitedResult }); return awaitedResult; From bf650b4557b79c7b57ef2dc367317019ee9209fc Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Wed, 1 Jul 2026 16:02:59 +0200 Subject: [PATCH 3/3] cs --- .changeset/lemon-mirrors-fold.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/lemon-mirrors-fold.md diff --git a/.changeset/lemon-mirrors-fold.md b/.changeset/lemon-mirrors-fold.md new file mode 100644 index 000000000..7d970f491 --- /dev/null +++ b/.changeset/lemon-mirrors-fold.md @@ -0,0 +1,5 @@ +--- +"braintrust": minor +--- + +fix(ai-sdk): Don't capture message history in tool spans