diff --git a/py/src/braintrust/btx/span_validator.py b/py/src/braintrust/btx/span_validator.py index 68a49f854..15c64a11e 100644 --- a/py/src/braintrust/btx/span_validator.py +++ b/py/src/braintrust/btx/span_validator.py @@ -218,7 +218,11 @@ def validate_spans(actual_spans: list[dict[str, Any]], spec: LlmSpanSpec) -> Non for i, (actual_span, expected_span) in enumerate(zip(llm_spans, expected_spans)): span_errors: list[str] = [] for key, exp_val in expected_span.items(): - if key not in actual_span: + if key == "child_spans": + children = [s for s in actual_spans if actual_span.get("span_id") in (s.get("span_parents") or [])] + children.sort(key=lambda s: s.get("span_attributes", {}).get("exec_counter", 0)) + _validate_value(children, exp_val, f"span[{i}].child_spans", span_errors) + elif key not in actual_span: span_errors.append(f" span[{i}].{key}: key not found in actual span") else: _validate_value(actual_span[key], exp_val, f"span[{i}].{key}", span_errors) diff --git a/py/src/braintrust/btx/spec-ref.txt b/py/src/braintrust/btx/spec-ref.txt index 51bbb66dc..03ac64035 100644 --- a/py/src/braintrust/btx/spec-ref.txt +++ b/py/src/braintrust/btx/spec-ref.txt @@ -1 +1 @@ -v0.0.10 +v0.0.13 diff --git a/py/src/braintrust/btx/test_btx.py b/py/src/braintrust/btx/test_btx.py index db09cb932..23bb173a4 100644 --- a/py/src/braintrust/btx/test_btx.py +++ b/py/src/braintrust/btx/test_btx.py @@ -100,7 +100,7 @@ def test_btx_spec( assert btx_project_id is not None - num_expected = len(spec.expected_brainstore_spans) + num_expected = sum(1 + len(span.get("child_spans", [])) for span in spec.expected_brainstore_spans) print(f"\n[btx] Fetching {num_expected} span(s) for root_span_id={root_span_id!r} ...") spans = fetch_spans(root_span_id, btx_project_id, num_expected) print(f"[btx] Got {len(spans)} span(s), validating...") diff --git a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/attachments.yaml b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/attachments.yaml index a7a938890..75df3f95a 100644 --- a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/attachments.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/attachments.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"messages":[{"role":"system","content":"you are a helpful assistant"},{"role":"user","content":[{"type":"text","text":"Briefly - describe these attachments"},{"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg=="}},{"type":"file","file":{"filename":"blank.pdf","file_data":"data:application/pdf;base64,JVBERi0xLjAKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE5MAolJUVPRgo="}}]}],"model":"gpt-4o","temperature":0.0}' + describe these attachments"},{"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg=="}},{"type":"file","file":{"filename":"blank.pdf","file_data":"data:application/pdf;base64,JVBERi0xLjAKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE5MAolJUVPRgo="}}]}],"model":"gpt-6-luna","reasoning_effort":"none","temperature":0.0}' headers: accept: - application/json @@ -10,7 +10,7 @@ interactions: connection: - keep-alive content-length: - - '888' + - '918' content-type: - application/json host: @@ -19,20 +19,18 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ECrtQIzXCewzHrgripHO0lB2egzRQ\",\n \"object\": - \"chat.completion\",\n \"created\": 1786735808,\n \"model\": \"gpt-4o-2024-08-06\",\n + string: "{\n \"id\": \"chatcmpl-EfoUjzuNJdJQOKRwoTMwDsgetExnW\",\n \"object\": + \"chat.completion\",\n \"created\": 1793634257,\n \"model\": \"gpt-6-luna\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"The first attachment is a solid red - square, likely an image file with no additional content or context.\\n\\nThe - second attachment, \\\"blank.pdf,\\\" appears to be a PDF document with no - readable content or visible images.\",\n \"refusal\": null,\n \"annotations\": - []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 495,\n \"completion_tokens\": - 42,\n \"total_tokens\": 537,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_684acb85fd\"\n}\n" + \"assistant\",\n \"content\": \"The attached PDF appears blank; no + readable text or images were detected.\",\n \"refusal\": null,\n \"annotations\": + []\n },\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": + {\n \"prompt_tokens\": 241,\n \"completion_tokens\": 17,\n \"total_tokens\": + 258,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": + 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": + 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n + \ \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": null\n}\n" headers: access-control-expose-headers: - X-Request-ID @@ -41,13 +39,13 @@ interactions: connection: - keep-alive content-length: - - '1021' + - '835' content-type: - application/json date: - - Fri, 14 Aug 2026 19:30:09 GMT + - Mon, 02 Nov 2026 15:44:18 GMT openai-processing-ms: - - '1020' + - '794' openai-version: - '2020-10-01' server: @@ -61,23 +59,23 @@ interactions: x-openai-proxy-wasm: - v0.1 x-ratelimit-limit-input-images: - - '250000' + - '50000' x-ratelimit-limit-requests: - - '10000' + - '30000' x-ratelimit-limit-tokens: - - '30000000' + - '180000000' x-ratelimit-remaining-input-images: - - '249999' + - '49999' x-ratelimit-remaining-requests: - - '9999' + - '29999' x-ratelimit-remaining-tokens: - - '29998451' + - '179998452' x-ratelimit-reset-input-images: - - 0s + - 1ms x-ratelimit-reset-requests: - - 6ms + - 2ms x-ratelimit-reset-tokens: - - 3ms + - 0s status: code: 200 message: OK diff --git a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/completions.yaml b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/completions.yaml index 5efd88722..bbea93449 100644 --- a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/completions.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/completions.yaml @@ -1,139 +1,71 @@ interactions: - request: body: '{"messages":[{"role":"system","content":"you are a helpful assistant"},{"role":"user","content":"What - is the capital of France?"}],"model":"gpt-4o-mini","temperature":0.0}' + is the capital of France?"}],"model":"gpt-6-luna","reasoning_effort":"none","temperature":0.0}' headers: - Accept: + accept: - application/json - Accept-Encoding: + accept-encoding: - gzip, deflate - Connection: + connection: - keep-alive - Content-Length: - - '171' - Content-Type: + content-length: + - '196' + content-type: - application/json - Host: + host: - api.openai.com method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-DYJCoFc5SDnJMZ6RmZd3b3M8ZWMUL\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069350,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-EfoUk0B3MncB2z3cEP5SuJmRG2lnQ\",\n \"object\": + \"chat.completion\",\n \"created\": 1793634258,\n \"model\": \"gpt-6-luna\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"The capital of France is Paris.\",\n - \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": - null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 23,\n \"completion_tokens\": 7,\n \"total_tokens\": 30,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_f957560a82\"\n}\n" + \"assistant\",\n \"content\": \"Paris.\",\n \"refusal\": null,\n + \ \"annotations\": []\n },\n \"finish_reason\": \"stop\"\n + \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 22,\n \"completion_tokens\": + 5,\n \"total_tokens\": 27,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"cache_write_tokens\": 0,\n \"audio_tokens\": 0\n },\n + \ \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": + 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": + 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": + null\n}\n" headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:22:30 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff access-control-expose-headers: - X-Request-ID + - CF-Ray + - CF-Ray + connection: + - keep-alive content-length: - - '837' + - '796' + content-type: + - application/json + date: + - Mon, 02 Nov 2026 15:44:19 GMT openai-processing-ms: - - '374' + - '654' openai-version: - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - '30000' - x-ratelimit-limit-tokens: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999980' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"system","content":"you are a helpful assistant"},{"role":"user","content":"What - is the capital of France?"}],"model":"gpt-4o-mini","temperature":0.0}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '171' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-DYJIpSYdhtncLSsxchhjnZAfMmMvD\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069723,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"The capital of France is Paris.\",\n - \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": - null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 23,\n \"completion_tokens\": 7,\n \"total_tokens\": 30,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_f957560a82\"\n}\n" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:28:43 GMT - Server: + server: - cloudflare - Strict-Transport-Security: + strict-transport-security: - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: + transfer-encoding: - chunked - X-Content-Type-Options: + x-content-type-options: - nosniff - access-control-expose-headers: - - X-Request-ID - content-length: - - '837' - openai-processing-ms: - - '421' - openai-version: - - '2020-10-01' x-openai-proxy-wasm: - v0.1 x-ratelimit-limit-requests: - '30000' x-ratelimit-limit-tokens: - - '150000000' + - '180000000' x-ratelimit-remaining-requests: - '29999' x-ratelimit-remaining-tokens: - - '149999980' + - '179999982' x-ratelimit-reset-requests: - 2ms x-ratelimit-reset-tokens: diff --git a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/reasoning.yaml b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/reasoning.yaml index 226d24cfb..b97801c7e 100644 --- a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/reasoning.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/reasoning.yaml @@ -1,216 +1,99 @@ interactions: - request: body: '{"input":[{"role":"user","content":"Look at this sequence: 2, 6, 12, 20, - 30. What is the pattern and what would be the formula for the nth term?\n"}],"model":"o4-mini","reasoning":{"effort":"high","summary":"detailed"}}' + 30. What is the pattern and what would be the formula for the nth term?\n"}],"model":"gpt-6-luna","reasoning":{"effort":"high","summary":"detailed"}}' headers: - Accept: + accept: - application/json - Accept-Encoding: + accept-encoding: - gzip, deflate - Connection: + connection: - keep-alive - Content-Length: - - '219' - Content-Type: + content-length: + - '222' + content-type: - application/json - Host: + host: - api.openai.com method: POST uri: https://api.openai.com/v1/responses response: body: - string: "{\n \"id\": \"resp_0e8a51738b753ae40069ebed26c0cc8195bf51a41fc875aee1\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069350,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069360,\n \"error\": null,\n - \ \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": + string: "{\n \"id\": \"resp_03bd5f7fbd8827d3016ae8afd38aa087d1b305816a6c82e992\",\n + \ \"object\": \"response\",\n \"created_at\": 1793634259,\n \"status\": + \"completed\",\n \"access_programs\": null,\n \"background\": false,\n \"billing\": + {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1793634262,\n \"error\": + null,\n \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"max_tool_calls\": null,\n \"model\": - \"o4-mini-2025-04-16\",\n \"moderation\": null,\n \"output\": [\n {\n - \ \"id\": \"rs_0e8a51738b753ae40069ebed27a91c81958edf1cb2ef5a43ce\",\n - \ \"type\": \"reasoning\",\n \"summary\": [\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Identifying a number pattern**\\n\\nThe - user asks about the sequence: 2, 6, 12, 20, 30. I notice it\\u2019s likely - linked to triangular numbers, which are 1, 3, 6, 10, 15, each multiplied by - 2. This leads me to the formula for the nth term: a_n = n(n+1). I see it represents - pronic numbers (the product of two consecutive integers). The difference between - terms increases by 2 each time, starting from 4. Therefore, a_n = 2 * T_n - for n \\u2265 1, where T_n = n(n+1)/2.\"\n },\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Clarifying the series formula**\\n\\nI - could express the nth term as a_n = 2 + sum_{k=2}^n 2k, but a simpler way - is a_n = n(n+1). The user gives the sequence: 2, 6, 12, 20, 30, which clearly - reveals pronic numbers\\u2014products of consecutive integers. Each term follows - the pattern: 2=1\\u00b72, 6=2\\u00b73, and so on. The difference between the - terms is an increasing sequence (4, 6, 8, 10). So, I can confidently state - the formula for the nth term as a_n = n(n+1).\"\n }\n ]\n },\n - \ {\n \"id\": \"msg_0e8a51738b753ae40069ebed2f6838819597d64f386d767a88\",\n - \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": - [\n {\n \"type\": \"output_text\",\n \"annotations\": - [],\n \"logprobs\": [],\n \"text\": \"Each term is a \\u201cpronic\\u201d - (or oblong) number, i.e. the product of two consecutive integers:\\n\\n2 = - 1\\u00b72 \\n6 = 2\\u00b73 \\n12 = 3\\u00b74 \\n20 = 4\\u00b75 \\n30 = - 5\\u00b76 \\n\\nIf you label 2 as the 1st term, 6 as the 2nd, etc., then - the nth term is\\n\\na\\u2099 = n\\u00b7(n + 1)\\n\\nYou can also check that - the differences go 6\\u20132=4, 12\\u20136=6, 20\\u201312=8, \\u2026 increasing - by 2 each time.\"\n }\n ],\n \"role\": \"assistant\"\n }\n - \ ],\n \"parallel_tool_calls\": true,\n \"presence_penalty\": 0.0,\n \"previous_response_id\": - null,\n \"prompt_cache_key\": null,\n \"prompt_cache_retention\": \"in_memory\",\n - \ \"reasoning\": {\n \"effort\": \"high\",\n \"summary\": \"detailed\"\n - \ },\n \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\": - true,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": - \"text\"\n },\n \"verbosity\": \"medium\"\n },\n \"tool_choice\": - \"auto\",\n \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n \"truncation\": + \"gpt-6-luna\",\n \"moderation\": null,\n \"output\": [\n {\n \"id\": + \"rs_03bd5f7fbd8827d3016ae8afd44d5487d1bf70dab1888b5afa\",\n \"type\": + \"reasoning\",\n \"content\": [],\n \"encrypted_content\": \"gAAAA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a_iZ7vvr2OGStP_8qoRDm232lw1CgHvSCslpVFqaG9xo_UIZRFhEaCJg77rniQbibUyMaNXyG2WYnnXfIibC07aH6QNAQ_k-1vJ30TyG64fR2foeyrdyRsiAYAakcJdDlrn-1zWJaMSBSX3LxPwwSi1xgGvTaOZc3ExzCNiMbNZV7_xah3QxaNsi7v-zX3t0P4z73hNl3fDwl__81WPK2U_3jxnt9-sU8gULPRyWh1m8i9WLJ-xvFI9AXkyn1itZMi_z-h4vvlapQWhXFpdqYA-mMuOrrRtqVJ7MQWklc7juShtVZdLJ-Wim5tkR23ieSvUZ879gYtiDf-30c9dy-BQF3stjkanQSmq0lvP4FDQo0da25x9dt6K-v9JaPd4rlESwz-iXcYhjGdrE5IRsLMo5T5RmKC3eh6-_5dLBAnAfpmcdoHcW0EC0qdl9tK12EUr_PsHvwXO9tjY5XVHRRNu_pOYMnt70-DLeLgzBaOmg-X7aul8iUrnsNOXY_tkUr_83MnkHBcYsyuM9V8TmEZEE4r45Vzsq_e066-jUjp5CZMYZczqZa3_G1co3URSik40SEBuyb8tQ9EJo06TfMRIbT0at3rie7qvF-aTr7CSXu2GWdT3i0mlbCzwSBn2zbkOhTULTdAMkGNjiXDd1E0OpIqe93RHQKnLNr0BsApFI_v89wfGIkJ1Q_zo0iQJ89WdW4uedIEEflmKxWdNzHn69ri9WmGYnX9RSNEHH57OylEDYVwg1C0X2hNWUBa-655HeQdosTjhgLstVD-WhjWxgC042vMYwOaSl2ujrlACMQZmgzWbcKXO58n9NusIqcI11wg7wCWaTLCWPy57KecVMn0ifuM6LW8cqeT4d2AulLmViieQjtRqWw-A_f9uEjUKrUFkDoxNWiyBtmzD8JvlE0-22gd6pEADu-Jbc_RZQeVW7SjNz-_obS5USQ_7llVWhcARCz-fotfAQNQkElnQsWQ1NgCPc8xBYvh7pAODkaS6N4griNxdOLwhViBKqB6QjCvleO\",\n + \ \"summary\": [\n {\n \"type\": \"summary_text\",\n \"text\": + \"**Explaining sequence products**\\n\\nI need to create an answer that explains + the ambiguity around the sequence of products n(n+1). For example, if n starts + at 1, then the calculations yield results like 1*2=2, 2*3=6, and so on. I + can observe the pattern differences: 4, 6, 8, 10, which follow a natural progression. + It seems there are many potential sequences, so I'll focus on keeping things + concise for clarity's sake.\"\n }\n ]\n },\n {\n \"id\": + \"msg_03bd5f7fbd8827d3016ae8afd65d7487d19a73581289555f03\",\n \"type\": + \"message\",\n \"status\": \"completed\",\n \"content\": [\n {\n + \ \"type\": \"output_text\",\n \"annotations\": [],\n \"logprobs\": + [],\n \"text\": \"The terms follow \\\\(1\\\\cdot2,\\\\ 2\\\\cdot3,\\\\ + 3\\\\cdot4,\\\\ 4\\\\cdot5,\\\\ 5\\\\cdot6\\\\). So, numbering the first term + as \\\\(n=1\\\\), the formula is\\n\\n\\\\[\\na_n=n(n+1).\\n\\\\]\\n\\nThe + differences between terms are \\\\(4,6,8,10,\\\\ldots\\\\), increasing by + 2 each time.\"\n }\n ],\n \"phase\": \"final_answer\",\n + \ \"role\": \"assistant\"\n }\n ],\n \"parallel_tool_calls\": true,\n + \ \"presence_penalty\": 0.0,\n \"previous_response_id\": null,\n \"prompt_cache_key\": + null,\n \"prompt_cache_retention\": \"24h\",\n \"reasoning\": {\n \"context\": + \"all_turns\",\n \"effort\": \"high\",\n \"mode\": \"standard\",\n \"summary\": + \"detailed\"\n },\n \"safety_identifier\": null,\n \"service_tier\": \"default\",\n + \ \"store\": false,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": + {\n \"type\": \"text\"\n },\n \"verbosity\": \"medium\"\n },\n + \ \"tool_choice\": \"auto\",\n \"tool_usage\": {\n \"image_gen\": {\n + \ \"input_tokens\": 0,\n \"input_tokens_details\": {\n \"image_tokens\": + 0,\n \"text_tokens\": 0\n },\n \"output_tokens\": 0,\n \"output_tokens_details\": + {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"total_tokens\": + 0\n },\n \"web_search\": {\n \"num_requests\": 0\n }\n },\n + \ \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 0.98,\n \"truncation\": \"disabled\",\n \"usage\": {\n \"input_tokens\": 41,\n \"input_tokens_details\": - {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 843,\n \"output_tokens_details\": - {\n \"reasoning_tokens\": 640\n },\n \"total_tokens\": 884\n },\n - \ \"user\": null,\n \"metadata\": {}\n}" + {\n \"cache_write_tokens\": 0,\n \"cached_tokens\": 0\n },\n + \ \"output_tokens\": 168,\n \"output_tokens_details\": {\n \"reasoning_tokens\": + 70\n },\n \"total_tokens\": 209\n },\n \"user\": null,\n \"metadata\": + {}\n}" headers: - Connection: + access-control-expose-headers: + - X-Request-ID, Server-Timing-Total + - CF-Ray + - CF-Ray + connection: - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:22:40 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff content-length: - - '3191' + - '5112' + content-type: + - application/json + date: + - Mon, 02 Nov 2026 15:44:22 GMT openai-processing-ms: - - '9534' + - '3320' openai-version: - '2020-10-01' - x-ratelimit-limit-requests: - - '30000' - x-ratelimit-limit-tokens: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999752' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - status: - code: 200 - message: OK -- request: - body: "{\"input\":[{\"role\":\"user\",\"content\":\"Look at this sequence: 2, - 6, 12, 20, 30. What is the pattern and what would be the formula for the nth - term?\\n\"},{\"id\":\"rs_0e8a51738b753ae40069ebed27a91c81958edf1cb2ef5a43ce\",\"summary\":[{\"text\":\"**Identifying - a number pattern**\\n\\nThe user asks about the sequence: 2, 6, 12, 20, 30. - I notice it\u2019s likely linked to triangular numbers, which are 1, 3, 6, 10, - 15, each multiplied by 2. This leads me to the formula for the nth term: a_n - = n(n+1). I see it represents pronic numbers (the product of two consecutive - integers). The difference between terms increases by 2 each time, starting from - 4. Therefore, a_n = 2 * T_n for n \u2265 1, where T_n = n(n+1)/2.\",\"type\":\"summary_text\"},{\"text\":\"**Clarifying - the series formula**\\n\\nI could express the nth term as a_n = 2 + sum_{k=2}^n - 2k, but a simpler way is a_n = n(n+1). The user gives the sequence: 2, 6, 12, - 20, 30, which clearly reveals pronic numbers\u2014products of consecutive integers. - Each term follows the pattern: 2=1\xB72, 6=2\xB73, and so on. The difference - between the terms is an increasing sequence (4, 6, 8, 10). So, I can confidently - state the formula for the nth term as a_n = n(n+1).\",\"type\":\"summary_text\"}],\"type\":\"reasoning\"},{\"id\":\"msg_0e8a51738b753ae40069ebed2f6838819597d64f386d767a88\",\"content\":[{\"annotations\":[],\"text\":\"Each - term is a \u201Cpronic\u201D (or oblong) number, i.e. the product of two consecutive - integers:\\n\\n2 = 1\xB72 \\n6 = 2\xB73 \\n12 = 3\xB74 \\n20 = 4\xB75 \\n30 - = 5\xB76 \\n\\nIf you label 2 as the 1st term, 6 as the 2nd, etc., then the - nth term is\\n\\na\u2099 = n\xB7(n + 1)\\n\\nYou can also check that the differences - go 6\u20132=4, 12\u20136=6, 20\u201312=8, \u2026 increasing by 2 each time.\",\"type\":\"output_text\",\"logprobs\":[]}],\"role\":\"assistant\",\"status\":\"completed\",\"type\":\"message\"},{\"role\":\"user\",\"content\":\"Using - the pattern you discovered, what would be the 10th term? And can you find the - sum of the first 10 terms?\"}],\"model\":\"o4-mini\",\"reasoning\":{\"effort\":\"high\",\"summary\":\"detailed\"}}" - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1994' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/responses - response: - body: - string: "{\n \"id\": \"resp_0e8a51738b753ae40069ebed3084c88195979432aa80401334\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069360,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069368,\n \"error\": null,\n - \ \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": - null,\n \"max_output_tokens\": null,\n \"max_tool_calls\": null,\n \"model\": - \"o4-mini-2025-04-16\",\n \"moderation\": null,\n \"output\": [\n {\n - \ \"id\": \"rs_0e8a51738b753ae40069ebed315ed48195a8aee6ec68301ec7\",\n - \ \"type\": \"reasoning\",\n \"summary\": [\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Calculating pronic numbers**\\n\\nThe - user is looking for the 10th term of the pronic number sequence and the sum - of the first 10 terms. I\\u2019ve computed that the 10th term, based on the - formula a_n = n(n+1), is 110. For the sum of the first 10 terms, I calculated - S_10 = 440 by adding the sums of squares and the first 10 natural numbers. - So, my final answers are: the 10th term is 110, and the sum of the first 10 - terms is 440.\"\n },\n {\n \"type\": \"summary_text\",\n - \ \"text\": \"**Finalizing pronic numbers**\\n\\nI\\u2019m thinking - about pronic numbers, like 2, 6, and 12, and how their differences are 4 and - 6. I\\u2019ll confirm that the 10th term is 110 and the sum of the first 10 - terms is 440. I can outline the calculations, like a_{10} = 10*11 = 110 and - S_10, which gives a sum of 440. There\\u2019s also a formula for this that - simplifies the process. So my final answers are: the 10th term is 110, and - the sum is 440.\"\n }\n ]\n },\n {\n \"id\": \"msg_0e8a51738b753ae40069ebed38350881958d3154d04a7bf8d8\",\n - \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": - [\n {\n \"type\": \"output_text\",\n \"annotations\": - [],\n \"logprobs\": [],\n \"text\": \"The 10th term is \\na\\u2081\\u2080 - = 10\\u00b7(10+1) = 10\\u00b711 = 110. \\n\\nThe sum of the first 10 terms - is \\nS\\u2081\\u2080 = \\u2211_{n=1}^{10} n(n+1) = \\u2211 n\\u00b2 + \\u2211 - n \\n = (10\\u00b711\\u00b721)/6 + (10\\u00b711)/2 \\n = 385 + - 55 \\n = 440. \\n\\nEquivalently, one can use the closed\\u2010form - \ \\n\\u2211_{n=1}^N n(n+1) = N(N+1)(N+2)/3, \\nso for N=10: 10\\u00b711\\u00b712/3 - = 440.\"\n }\n ],\n \"role\": \"assistant\"\n }\n ],\n - \ \"parallel_tool_calls\": true,\n \"presence_penalty\": 0.0,\n \"previous_response_id\": - null,\n \"prompt_cache_key\": null,\n \"prompt_cache_retention\": \"in_memory\",\n - \ \"reasoning\": {\n \"effort\": \"high\",\n \"summary\": \"detailed\"\n - \ },\n \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\": - true,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": - \"text\"\n },\n \"verbosity\": \"medium\"\n },\n \"tool_choice\": - \"auto\",\n \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n \"truncation\": - \"disabled\",\n \"usage\": {\n \"input_tokens\": 216,\n \"input_tokens_details\": - {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 617,\n \"output_tokens_details\": - {\n \"reasoning_tokens\": 448\n },\n \"total_tokens\": 833\n },\n - \ \"user\": null,\n \"metadata\": {}\n}" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:22:49 GMT - Server: + server: - cloudflare - Strict-Transport-Security: + strict-transport-security: - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: + transfer-encoding: - chunked - X-Content-Type-Options: + x-content-type-options: - nosniff - content-length: - - '3132' - openai-processing-ms: - - '8559' - openai-version: - - '2020-10-01' x-ratelimit-limit-requests: - '30000' x-ratelimit-limit-tokens: - - '150000000' + - '180000000' x-ratelimit-remaining-requests: - '29999' x-ratelimit-remaining-tokens: - - '149999575' + - '180000000' x-ratelimit-reset-requests: - 2ms x-ratelimit-reset-tokens: @@ -220,205 +103,109 @@ interactions: message: OK - request: body: '{"input":[{"role":"user","content":"Look at this sequence: 2, 6, 12, 20, - 30. What is the pattern and what would be the formula for the nth term?\n"}],"model":"o4-mini","reasoning":{"effort":"high","summary":"detailed"}}' + 30. What is the pattern and what would be the formula for the nth term?\n"},{"id":"rs_03bd5f7fbd8827d3016ae8afd44d5487d1bf70dab1888b5afa","summary":[{"text":"**Explaining + sequence products**\n\nI need to create an answer that explains the ambiguity + around the sequence of products n(n+1). For example, if n starts at 1, then + the calculations yield results like 1*2=2, 2*3=6, and so on. I can observe the + pattern differences: 4, 6, 8, 10, which follow a natural progression. It seems + there are many potential sequences, so I''ll focus on keeping things concise + for clarity''s sake.","type":"summary_text"}],"type":"reasoning","content":[],"encrypted_content":"gAAAAABq6K_WjcLP9MEZmqQJix1Y42ShzlZDyX6AxKJ0FhoWfrJ9qUBFSEKktOSFbWWMl1iPIbu_0NRnWe4Mnhs2XVDk9BBWfZ3ULVZgtrhawpuHG70-mmgwZh_WM1sx9bofY16aKSG_puQrAI2U1DiAMw2UcqmTVf1H4XJAbxQizuU5v8ehL5zZhqoPPpIoTTcd0dQXtf_xPPEvbbwP58Mcym-ge1xYF2EFHYeNS607cZT8ClZysjapdMa7AwZM77OA5xgr2avWkamjmlSueVjDIr-24CKLL8T1NKwksNGep7DYKUdZlaZlcPM6fzDsr4jja1cvP9OYpEe-BMgtMI8WH4v3JRd--cBuGZJuHfz4jz970R4EcKMr4Oa9K1M0J_Gi_AKaY739gy3DVadtXOe7_kFGFLdp2bM1GwlXTSvAe_lzxDndU7eN2bf-4Oang7N4ZfeKh2bfdxK4GEZ_IbDFn-s6lSazRFRi72AqNCF73bhNuewtQae8Z7fNNzq0xNOHmEVJf_NOALL6Rv72QB6dD5O6OEfANutKydg65OA61da4OYLydRWsNGjaCWC70i406KhWAefRNBkcv1JWIqq4Vdt4kft4_pxUWFx4xzk3rQvv_n0x61UFEbxix0p3C6yvkoiR-N8FPn-mBOoKWNv3D5XHGrHfhVC-HOGwVKPHCdOUhD0ccJkiyMKM5hEYlN6ydDpw2f83YJB2GuBA3ND_KBdGjEs_wPh6MDB7gTCjAHj8di-hgo851foBsXTFtdW68XUM-oLqNXkduVYmdutbuHxRgv9kOn0GHGYmMTKHMNFpFxtuptUXm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58n9NusIqcI11wg7wCWaTLCWPy57KecVMn0ifuM6LW8cqeT4d2AulLmViieQjtRqWw-A_f9uEjUKrUFkDoxNWiyBtmzD8JvlE0-22gd6pEADu-Jbc_RZQeVW7SjNz-_obS5USQ_7llVWhcARCz-fotfAQNQkElnQsWQ1NgCPc8xBYvh7pAODkaS6N4griNxdOLwhViBKqB6QjCvleO"},{"id":"msg_03bd5f7fbd8827d3016ae8afd65d7487d19a73581289555f03","content":[{"annotations":[],"text":"The + terms follow \\(1\\cdot2,\\ 2\\cdot3,\\ 3\\cdot4,\\ 4\\cdot5,\\ 5\\cdot6\\). + So, numbering the first term as \\(n=1\\), the formula is\n\n\\[\na_n=n(n+1).\n\\]\n\nThe + differences between terms are \\(4,6,8,10,\\ldots\\), increasing by 2 each time.","type":"output_text","logprobs":[]}],"role":"assistant","status":"completed","type":"message","phase":"final_answer"},{"role":"user","content":"Using + the pattern you discovered, what would be the 10th term? And can you find the + sum of the first 10 terms?"}],"model":"gpt-6-luna","reasoning":{"effort":"high","summary":"detailed"}}' headers: - Accept: + accept: - application/json - Accept-Encoding: + accept-encoding: - gzip, deflate - Connection: + connection: - keep-alive - Content-Length: - - '219' - Content-Type: + content-length: + - '3540' + content-type: - application/json - Host: + host: - api.openai.com method: POST uri: https://api.openai.com/v1/responses response: body: - string: "{\n \"id\": \"resp_0927450cca53dbe30069ebee9bea288197b06daeeff47a3a1a\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069723,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069731,\n \"error\": null,\n - \ \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": + string: "{\n \"id\": \"resp_03bd5f7fbd8827d3016ae8afd7103487d1a24e71dea4387b85\",\n + \ \"object\": \"response\",\n \"created_at\": 1793634263,\n \"status\": + \"completed\",\n \"access_programs\": null,\n \"background\": false,\n \"billing\": + {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1793634265,\n \"error\": + null,\n \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"max_tool_calls\": null,\n \"model\": - \"o4-mini-2025-04-16\",\n \"moderation\": null,\n \"output\": [\n {\n - \ \"id\": \"rs_0927450cca53dbe30069ebee9c534881978ae034fc1a9d5085\",\n - \ \"type\": \"reasoning\",\n \"summary\": [\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Identifying sequence patterns**\\n\\nThe - user shared a sequence: 2, 6, 12, 20, 30, which represents \\\"pronic\\\" - or \\\"rectangular\\\" numbers defined by the formula n(n+1). For instance, - 2 is from 1*2, 6 is from 2*3, and so on. I see that this sequence can also - be viewed as double the triangular numbers, but the direct formula remains - n(n+1). I\\u2019ve noticed the differences between terms (4, 6, 8, 10) increase - by 2 each time, revealing it's a second-degree polynomial.\"\n },\n - \ {\n \"type\": \"summary_text\",\n \"text\": \"**Clarifying - pronic numbers**\\n\\nI've realized that the sequence can be understood as - the x-th even triangular numbers, leading to the formula a_n = n(n+1) for - the nth term. This reflects the product of two consecutive natural numbers, - and I can also express it as a_n = n^2 + n. The differences between terms - form an arithmetic sequence increasing by 2 each time. So, I\\u2019ll confirm - the sequence of pronic numbers, summarizing that each term is derived from - n multiplied by the next integer.\"\n }\n ]\n },\n {\n \"id\": - \"msg_0927450cca53dbe30069ebeea2cedc81978f9bcd1c18394e29\",\n \"type\": - \"message\",\n \"status\": \"completed\",\n \"content\": [\n {\n - \ \"type\": \"output_text\",\n \"annotations\": [],\n \"logprobs\": - [],\n \"text\": \"The terms are the \\u201cpronic\\u201d (or oblong) - numbers, i.e. the product of two consecutive integers:\\n\\n 2 = 1\\u00b72 - \ \\n 6 = 2\\u00b73 \\n12 = 3\\u00b74 \\n20 = 4\\u00b75 \\n30 = 5\\u00b76 - \ \\n\\nHence, if you index so that a\\u2081=2, a\\u2082=6, \\u2026, then\\n\\n - \ a\\u2099 = n\\u00b7(n + 1)\\n\\nYou can also write that as\\n\\n a\\u2099 - = n\\u00b2 + n.\"\n }\n ],\n \"role\": \"assistant\"\n }\n - \ ],\n \"parallel_tool_calls\": true,\n \"presence_penalty\": 0.0,\n \"previous_response_id\": - null,\n \"prompt_cache_key\": null,\n \"prompt_cache_retention\": \"in_memory\",\n - \ \"reasoning\": {\n \"effort\": \"high\",\n \"summary\": \"detailed\"\n - \ },\n \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\": - true,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": + \"gpt-6-luna\",\n \"moderation\": null,\n \"output\": [\n {\n \"id\": + \"rs_03bd5f7fbd8827d3016ae8afd7b53c87d1bc0fc0ef472d78de\",\n \"type\": + \"reasoning\",\n \"content\": [],\n \"encrypted_content\": \"gAAAAABq6K_ZovSdcv_vSr7LVrHbHFUdOlWOLnNrmID5ps10EqcYjPJQExWKkGBinXJ0dJH2AZG8k8bs2Vxpj6iogkmXmvEEMlvQnHedzqUk0AGEAPZAu3bVWKmV-I_JavmBi9i83FSGX57Zv3zB7QV_uAlvzbv7MxYyKBelJhZSph6eZt5mrz2BCAmEE4znuM99EVHdoxFgEmVAH-sCb-QO3mHHh5tXsi5DRlBtjn-dbhPBTSewTbjK4VrlZ8f8zIUSGcG9_1F9QA1hqzKqtYJ1mUEGVihGnWnQoiUrRvDVv-vZuOyhtLEM4NdEECbuIEnDP4RnY3yvcpf9OoLrdjp-dOEQG6kPZzXNPakCY1qAG9F5SL6qVenum-dgmQ4BKR7f39R0Sl45qiF3yL7UVAm6ySOPMQAtyTm16A8j0hsiWs8GqtS34PDEiSefuGar-I_aJJbEtbI838xFnDKPJPpcOaYDDdVRPqWxWIw0ex3zsy5Es-TuWLElMD3cBIv4T8oNYb8auHlre9Eq-GkUI0lUFJOMySAVtLX4SFloz2wtc8KdtSjR9JnY9cEeCJenufro6m4t-egWXgT_DgBgKX2A97XNNB_otYKS4364qfzzePQDNV90FsWS5SzjzQ1vaR14IxRudPIhH1Jxm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aOfTxx2cPWodOEf73OVi6q3vhdenWieuzWFmd2foHsM=\",\n + \ \"summary\": [\n {\n \"type\": \"summary_text\",\n \"text\": + \"**Calculating sums and explaining**\\n\\nI'm thinking about how to calculate + some sums, including the sum of the first 10 natural numbers. I know that + to find the sum \\\\( n(n+1)/2 \\\\), I need to look at the first 10 numbers. + So, I realize that the sum is 55, and then I work out the sum of the squares, + which is 385. When I add these two results together, I get a total of 440. + Now I need to explain how I arrived at the sums.\"\n }\n ]\n },\n + \ {\n \"id\": \"msg_03bd5f7fbd8827d3016ae8afd97b0087d1bd6d46e9a0a8b9ba\",\n + \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": + [\n {\n \"type\": \"output_text\",\n \"annotations\": + [],\n \"logprobs\": [],\n \"text\": \"Using \\\\(a_n=n(n+1)\\\\), + the 10th term is\\n\\n\\\\[\\na_{10}=10\\\\cdot11=\\\\boxed{110}.\\n\\\\]\\n\\nThe + sum of the first 10 terms is\\n\\n\\\\[\\n\\\\sum_{n=1}^{10}n(n+1)\\n=\\\\sum_{n=1}^{10}(n^2+n)\\n=385+55\\n=\\\\boxed{440}.\\n\\\\]\"\n + \ }\n ],\n \"phase\": \"final_answer\",\n \"role\": \"assistant\"\n + \ }\n ],\n \"parallel_tool_calls\": true,\n \"presence_penalty\": 0.0,\n + \ \"previous_response_id\": null,\n \"prompt_cache_key\": null,\n \"prompt_cache_retention\": + \"24h\",\n \"reasoning\": {\n \"context\": \"all_turns\",\n \"effort\": + \"high\",\n \"mode\": \"standard\",\n \"summary\": \"detailed\"\n },\n + \ \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\": + false,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n },\n \"verbosity\": \"medium\"\n },\n \"tool_choice\": - \"auto\",\n \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n \"truncation\": - \"disabled\",\n \"usage\": {\n \"input_tokens\": 41,\n \"input_tokens_details\": - {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 838,\n \"output_tokens_details\": - {\n \"reasoning_tokens\": 704\n },\n \"total_tokens\": 879\n },\n - \ \"user\": null,\n \"metadata\": {}\n}" + \"auto\",\n \"tool_usage\": {\n \"image_gen\": {\n \"input_tokens\": + 0,\n \"input_tokens_details\": {\n \"image_tokens\": 0,\n \"text_tokens\": + 0\n },\n \"output_tokens\": 0,\n \"output_tokens_details\": + {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"total_tokens\": + 0\n },\n \"web_search\": {\n \"num_requests\": 0\n }\n },\n + \ \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 0.98,\n \"truncation\": + \"disabled\",\n \"usage\": {\n \"input_tokens\": 243,\n \"input_tokens_details\": + {\n \"cache_write_tokens\": 0,\n \"cached_tokens\": 0\n },\n + \ \"output_tokens\": 132,\n \"output_tokens_details\": {\n \"reasoning_tokens\": + 39\n },\n \"total_tokens\": 375\n },\n \"user\": null,\n \"metadata\": + {}\n}" headers: - Connection: + access-control-expose-headers: + - X-Request-ID, Server-Timing-Total + - CF-Ray + - CF-Ray + connection: - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:28:51 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff content-length: - - '3161' + - '4734' + content-type: + - application/json + date: + - Mon, 02 Nov 2026 15:44:25 GMT openai-processing-ms: - - '7613' + - '2863' openai-version: - '2020-10-01' - x-ratelimit-limit-requests: - - '30000' - x-ratelimit-limit-tokens: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999752' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - status: - code: 200 - message: OK -- request: - body: "{\"input\":[{\"role\":\"user\",\"content\":\"Look at this sequence: 2, - 6, 12, 20, 30. What is the pattern and what would be the formula for the nth - term?\\n\"},{\"id\":\"rs_0927450cca53dbe30069ebee9c534881978ae034fc1a9d5085\",\"summary\":[{\"text\":\"**Identifying - sequence patterns**\\n\\nThe user shared a sequence: 2, 6, 12, 20, 30, which - represents \\\"pronic\\\" or \\\"rectangular\\\" numbers defined by the formula - n(n+1). For instance, 2 is from 1*2, 6 is from 2*3, and so on. I see that this - sequence can also be viewed as double the triangular numbers, but the direct - formula remains n(n+1). I\u2019ve noticed the differences between terms (4, - 6, 8, 10) increase by 2 each time, revealing it's a second-degree polynomial.\",\"type\":\"summary_text\"},{\"text\":\"**Clarifying - pronic numbers**\\n\\nI've realized that the sequence can be understood as the - x-th even triangular numbers, leading to the formula a_n = n(n+1) for the nth - term. This reflects the product of two consecutive natural numbers, and I can - also express it as a_n = n^2 + n. The differences between terms form an arithmetic - sequence increasing by 2 each time. So, I\u2019ll confirm the sequence of pronic - numbers, summarizing that each term is derived from n multiplied by the next - integer.\",\"type\":\"summary_text\"}],\"type\":\"reasoning\"},{\"id\":\"msg_0927450cca53dbe30069ebeea2cedc81978f9bcd1c18394e29\",\"content\":[{\"annotations\":[],\"text\":\"The - terms are the \u201Cpronic\u201D (or oblong) numbers, i.e. the product of two - consecutive integers:\\n\\n 2 = 1\xB72 \\n 6 = 2\xB73 \\n12 = 3\xB74 \\n20 - = 4\xB75 \\n30 = 5\xB76 \\n\\nHence, if you index so that a\u2081=2, a\u2082=6, - \u2026, then\\n\\n a\u2099 = n\xB7(n + 1)\\n\\nYou can also write that as\\n\\n - \ a\u2099 = n\xB2 + n.\",\"type\":\"output_text\",\"logprobs\":[]}],\"role\":\"assistant\",\"status\":\"completed\",\"type\":\"message\"},{\"role\":\"user\",\"content\":\"Using - the pattern you discovered, what would be the 10th term? And can you find the - sum of the first 10 terms?\"}],\"model\":\"o4-mini\",\"reasoning\":{\"effort\":\"high\",\"summary\":\"detailed\"}}" - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '1971' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/responses - response: - body: - string: "{\n \"id\": \"resp_0927450cca53dbe30069ebeea3e89481979afa93837267ba7c\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069731,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069736,\n \"error\": null,\n - \ \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": - null,\n \"max_output_tokens\": null,\n \"max_tool_calls\": null,\n \"model\": - \"o4-mini-2025-04-16\",\n \"moderation\": null,\n \"output\": [\n {\n - \ \"id\": \"rs_0927450cca53dbe30069ebeea455308197968f95c8e31142ec\",\n - \ \"type\": \"reasoning\",\n \"summary\": []\n },\n {\n \"id\": - \"msg_0927450cca53dbe30069ebeea6fd6c8197993b17ee71fb39e2\",\n \"type\": - \"message\",\n \"status\": \"completed\",\n \"content\": [\n {\n - \ \"type\": \"output_text\",\n \"annotations\": [],\n \"logprobs\": - [],\n \"text\": \"The 10th term is \\n a\\u2081\\u2080 = 10\\u00b7(10 - + 1) = 10\\u00b711 = 110. \\n\\nThe sum of the first 10 terms is \\n S\\u2081\\u2080 - = \\u2211\\u2099\\u208c\\u2081\\u00b9\\u2070 n(n+1) \\n = \\u2211\\u2099\\u208c\\u2081\\u00b9\\u2070 - (n\\u00b2 + n) \\n = (\\u2211\\u2099\\u208c\\u2081\\u00b9\\u2070 n\\u00b2) - + (\\u2211\\u2099\\u208c\\u2081\\u00b9\\u2070 n) \\n = 385 + 55 \\n - \ = 440. \\n\\n(You can also use the closed\\u2010form S\\u2099 = n(n+1)(n+2)/3 - \\u21d2 S\\u2081\\u2080 = 10\\u00b711\\u00b712/3 = 440.)\"\n }\n ],\n - \ \"role\": \"assistant\"\n }\n ],\n \"parallel_tool_calls\": true,\n - \ \"presence_penalty\": 0.0,\n \"previous_response_id\": null,\n \"prompt_cache_key\": - null,\n \"prompt_cache_retention\": \"in_memory\",\n \"reasoning\": {\n - \ \"effort\": \"high\",\n \"summary\": \"detailed\"\n },\n \"safety_identifier\": - null,\n \"service_tier\": \"default\",\n \"store\": true,\n \"temperature\": - 1.0,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n },\n - \ \"verbosity\": \"medium\"\n },\n \"tool_choice\": \"auto\",\n \"tools\": - [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n \"truncation\": \"disabled\",\n - \ \"usage\": {\n \"input_tokens\": 193,\n \"input_tokens_details\": - {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 610,\n \"output_tokens_details\": - {\n \"reasoning_tokens\": 384\n },\n \"total_tokens\": 803\n },\n - \ \"user\": null,\n \"metadata\": {}\n}" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:28:56 GMT - Server: + server: - cloudflare - Strict-Transport-Security: + strict-transport-security: - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: + transfer-encoding: - chunked - X-Content-Type-Options: + x-content-type-options: - nosniff - content-length: - - '2195' - openai-processing-ms: - - '4343' - openai-version: - - '2020-10-01' x-ratelimit-limit-requests: - '30000' x-ratelimit-limit-tokens: - - '150000000' + - '180000000' x-ratelimit-remaining-requests: - '29999' x-ratelimit-remaining-tokens: - - '149999600' + - '180000000' x-ratelimit-reset-requests: - 2ms x-ratelimit-reset-tokens: diff --git a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/reasoning_completions.yaml b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/reasoning_completions.yaml index b279047b9..19a25200b 100644 --- a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/reasoning_completions.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/reasoning_completions.yaml @@ -1,7 +1,7 @@ interactions: - request: body: '{"messages":[{"role":"user","content":"Look at this sequence: 2, 6, 12, - 20, 30. What is the pattern and what would be the formula for the nth term?\n"}],"model":"o4-mini","reasoning_effort":"medium"}' + 20, 30. What is the pattern and what would be the formula for the nth term?\n"}],"model":"gpt-6-luna","reasoning_effort":"medium"}' headers: accept: - application/json @@ -10,7 +10,7 @@ interactions: connection: - keep-alive content-length: - - '199' + - '202' content-type: - application/json host: @@ -19,24 +19,21 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-ECrtSDJsX8y8zz1RLupVS9AJ6Kbq7\",\n \"object\": - \"chat.completion\",\n \"created\": 1786735810,\n \"model\": \"o4-mini-2025-04-16\",\n + string: "{\n \"id\": \"chatcmpl-EfoUsEjAZoiDXyW3XknVmxm9qhPDp\",\n \"object\": + \"chat.completion\",\n \"created\": 1793634266,\n \"model\": \"gpt-6-luna\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"The five terms are \\r\\n 2, 6, 12, - 20, 30 \\r\\nTheir successive differences are \\r\\n 6\u22122=4, 12\u22126=6, - 20\u221212=8, 30\u221220=10 \\r\\nso the differences go up by 2 each time. - \ Hence it\u2019s a quadratic sequence. In fact one checks \\r\\n \\r\\n - a\u2099 = n\xB2 + n \\r\\n \\r\\ngives \\r\\n a\u2081 = 1 + 1 = 2 \\r\\n - a\u2082 = 4 + 2 = 6 \\r\\n a\u2083 = 9 + 3 = 12 \\r\\n a\u2084 = 16 + 4 - = 20 \\r\\n a\u2085 = 25 + 5 = 30 \\r\\n \\r\\nEquivalently, these are - the \u201Cpronic\u201D numbers n(n + 1).\",\n \"refusal\": null,\n - \ \"annotations\": []\n },\n \"finish_reason\": \"stop\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 41,\n \"completion_tokens\": - 642,\n \"total_tokens\": 683,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 448,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": null\n}\n" + \"assistant\",\n \"content\": \"The terms are products of consecutive + integers:\\n\\n\\\\[\\n1\\\\cdot2=2,\\\\quad 2\\\\cdot3=6,\\\\quad 3\\\\cdot4=12,\\\\quad + 4\\\\cdot5=20,\\\\quad 5\\\\cdot6=30.\\n\\\\]\\n\\nSo, starting with \\\\(n=1\\\\), + the \\\\(n\\\\)th term is\\n\\n\\\\[\\n\\\\boxed{a_n=n(n+1)}.\\n\\\\]\",\n + \ \"refusal\": null,\n \"annotations\": []\n },\n \"finish_reason\": + \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 41,\n \"completion_tokens\": + 156,\n \"total_tokens\": 197,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"cache_write_tokens\": 0,\n \"audio_tokens\": 0\n },\n + \ \"completion_tokens_details\": {\n \"reasoning_tokens\": 53,\n \"audio_tokens\": + 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": + 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": + null\n}\n" headers: access-control-expose-headers: - X-Request-ID @@ -45,13 +42,13 @@ interactions: connection: - keep-alive content-length: - - '1234' + - '1029' content-type: - application/json date: - - Fri, 14 Aug 2026 19:30:16 GMT + - Mon, 02 Nov 2026 15:44:28 GMT openai-processing-ms: - - '5857' + - '2024' openai-version: - '2020-10-01' server: @@ -67,11 +64,11 @@ interactions: x-ratelimit-limit-requests: - '30000' x-ratelimit-limit-tokens: - - '150000000' + - '180000000' x-ratelimit-remaining-requests: - '29999' x-ratelimit-remaining-tokens: - - '149999970' + - '179999970' x-ratelimit-reset-requests: - 2ms x-ratelimit-reset-tokens: diff --git a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/responses_array_input.yaml b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/responses_array_input.yaml new file mode 100644 index 000000000..12a1f5ff0 --- /dev/null +++ b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/responses_array_input.yaml @@ -0,0 +1,92 @@ +interactions: +- request: + body: '{"input":[{"role":"user","content":[{"type":"input_text","text":"What is + the capital of France?"}]}],"model":"gpt-4o-mini","instructions":"Reply with + one word."}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '161' + content-type: + - application/json + host: + - api.openai.com + method: POST + uri: https://api.openai.com/v1/responses + response: + body: + string: "{\n \"id\": \"resp_00855521dfa8e98f016ae8afdc755c87d1b291d4eb5c1a2e38\",\n + \ \"object\": \"response\",\n \"created_at\": 1793634268,\n \"status\": + \"completed\",\n \"access_programs\": null,\n \"background\": false,\n \"billing\": + {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1793634268,\n \"error\": + null,\n \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": + \"Reply with one word.\",\n \"max_output_tokens\": null,\n \"max_tool_calls\": + null,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"moderation\": null,\n + \ \"output\": [\n {\n \"id\": \"msg_00855521dfa8e98f016ae8afdcd79887d1b12c565fb5ef0b4e\",\n + \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": + [\n {\n \"type\": \"output_text\",\n \"annotations\": + [],\n \"logprobs\": [],\n \"text\": \"Paris\"\n }\n + \ ],\n \"role\": \"assistant\"\n }\n ],\n \"parallel_tool_calls\": + true,\n \"presence_penalty\": 0.0,\n \"previous_response_id\": null,\n \"prompt_cache_key\": + null,\n \"prompt_cache_retention\": \"in_memory\",\n \"reasoning\": {\n + \ \"context\": null,\n \"effort\": null,\n \"summary\": null\n },\n + \ \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\": + false,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": + \"text\"\n },\n \"verbosity\": \"medium\"\n },\n \"tool_choice\": + \"auto\",\n \"tool_usage\": {\n \"image_gen\": {\n \"input_tokens\": + 0,\n \"input_tokens_details\": {\n \"image_tokens\": 0,\n \"text_tokens\": + 0\n },\n \"output_tokens\": 0,\n \"output_tokens_details\": + {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"total_tokens\": + 0\n },\n \"web_search\": {\n \"num_requests\": 0\n }\n },\n + \ \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n \"truncation\": + \"disabled\",\n \"usage\": {\n \"input_tokens\": 23,\n \"input_tokens_details\": + {\n \"cache_write_tokens\": 0,\n \"cached_tokens\": 0\n },\n + \ \"output_tokens\": 2,\n \"output_tokens_details\": {\n \"reasoning_tokens\": + 0\n },\n \"total_tokens\": 25\n },\n \"user\": null,\n \"metadata\": + {}\n}" + headers: + access-control-expose-headers: + - X-Request-ID, Server-Timing-Total + - CF-Ray + - CF-Ray + connection: + - keep-alive + content-length: + - '2020' + content-type: + - application/json + date: + - Mon, 02 Nov 2026 15:44:28 GMT + openai-processing-ms: + - '491' + openai-version: + - '2020-10-01' + server: + - cloudflare + 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: + - '149999957' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + status: + code: 200 + message: OK +version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/responses_string_input.yaml b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/responses_string_input.yaml new file mode 100644 index 000000000..53a3b623b --- /dev/null +++ b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/responses_string_input.yaml @@ -0,0 +1,91 @@ +interactions: +- request: + body: '{"input":"What is the capital of France?","model":"gpt-4o-mini","instructions":"Reply + with one word."}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '102' + content-type: + - application/json + host: + - api.openai.com + method: POST + uri: https://api.openai.com/v1/responses + response: + body: + string: "{\n \"id\": \"resp_05d389b622c51b45016ae8afdd31fc87d1ac568a5db74779e1\",\n + \ \"object\": \"response\",\n \"created_at\": 1793634269,\n \"status\": + \"completed\",\n \"access_programs\": null,\n \"background\": false,\n \"billing\": + {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1793634269,\n \"error\": + null,\n \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": + \"Reply with one word.\",\n \"max_output_tokens\": null,\n \"max_tool_calls\": + null,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"moderation\": null,\n + \ \"output\": [\n {\n \"id\": \"msg_05d389b622c51b45016ae8afddb49487d18cc888b40c54bae0\",\n + \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": + [\n {\n \"type\": \"output_text\",\n \"annotations\": + [],\n \"logprobs\": [],\n \"text\": \"Paris.\"\n }\n + \ ],\n \"role\": \"assistant\"\n }\n ],\n \"parallel_tool_calls\": + true,\n \"presence_penalty\": 0.0,\n \"previous_response_id\": null,\n \"prompt_cache_key\": + null,\n \"prompt_cache_retention\": \"in_memory\",\n \"reasoning\": {\n + \ \"context\": null,\n \"effort\": null,\n \"summary\": null\n },\n + \ \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\": + false,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": + \"text\"\n },\n \"verbosity\": \"medium\"\n },\n \"tool_choice\": + \"auto\",\n \"tool_usage\": {\n \"image_gen\": {\n \"input_tokens\": + 0,\n \"input_tokens_details\": {\n \"image_tokens\": 0,\n \"text_tokens\": + 0\n },\n \"output_tokens\": 0,\n \"output_tokens_details\": + {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"total_tokens\": + 0\n },\n \"web_search\": {\n \"num_requests\": 0\n }\n },\n + \ \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n \"truncation\": + \"disabled\",\n \"usage\": {\n \"input_tokens\": 23,\n \"input_tokens_details\": + {\n \"cache_write_tokens\": 0,\n \"cached_tokens\": 0\n },\n + \ \"output_tokens\": 3,\n \"output_tokens_details\": {\n \"reasoning_tokens\": + 0\n },\n \"total_tokens\": 26\n },\n \"user\": null,\n \"metadata\": + {}\n}" + headers: + access-control-expose-headers: + - X-Request-ID, Server-Timing-Total + - CF-Ray + - CF-Ray + connection: + - keep-alive + content-length: + - '2021' + content-type: + - application/json + date: + - Mon, 02 Nov 2026 15:44:29 GMT + openai-processing-ms: + - '608' + openai-version: + - '2020-10-01' + server: + - cloudflare + 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: + - '149999957' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + status: + code: 200 + message: OK +version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/streaming.yaml b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/streaming.yaml index c5ab1c211..c73231f53 100644 --- a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/streaming.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/streaming.yaml @@ -1,193 +1,108 @@ interactions: - request: body: '{"messages":[{"role":"system","content":"you are a thoughtful assistant"},{"role":"user","content":"Count - from 1 to 10 slowly."}],"model":"gpt-4o-mini","max_tokens":800,"stream":true,"stream_options":{"include_usage":true},"temperature":0.0}' + from 1 to 10 slowly."}],"model":"gpt-6-luna","max_completion_tokens":800,"reasoning_effort":"none","stream":true,"stream_options":{"include_usage":true},"temperature":0.0}' headers: - Accept: + accept: - application/json - Accept-Encoding: + accept-encoding: - gzip, deflate - Connection: + connection: - keep-alive - Content-Length: - - '241' - Content-Type: + content-length: + - '277' + content-type: - application/json - Host: + host: - api.openai.com method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"JZkwlGCNh"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"Sure"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Z1EZlwC"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yIsfff3wPX"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" - Here"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"f3X5eo"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" - we"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"X7LpFYVp"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" - go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"muoRFjJg"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":":\n\n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6ZBTtO"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vfTHYNoO31"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"hzcal6Yx"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"GFx1Cb6"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"2"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"sfUeXGPnPP"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XN19fldY"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"O9WNGoS"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IqelAyDTDw"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"T4PDsBlB"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yJnz12R"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"4"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RyOic0VOoe"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"06zGGnwh"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"wvBBpGo"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"5"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"nK7ADfvmVQ"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"NCJ5azsW"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"rm3X4zB"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"6"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ZPYcWb4gl6"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QkclrGYM"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"OgJKoWx"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"7"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5FcxlzHO6r"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dSaMy6o0"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jjmmSy1"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"8"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"wczzZILC2i"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cWsTY1X4"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"T9jdu3R"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"9"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8sZFdOvPg1"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"L5CdRmd8"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"klxd00a"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"10"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FwzzNHrRM"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"WIZpMCPc"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" \n\n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"aCz6x"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"Take"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"CtEih6D"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" - your"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"YXzwxO"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" - time"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"X5qSkv"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MgsYPA9gej"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"qVpuB"} - - - data: {"id":"chatcmpl-DYJJ2V0fqTR0SKSYXu32W4UJsrk9F","object":"chat.completion.chunk","created":1777069736,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[],"usage":{"prompt_tokens":25,"completion_tokens":40,"total_tokens":65,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"tUsPkse1B5"} - - - data: [DONE] - - - ' + string: "data: {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"1\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"5\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"h\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"2\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"t\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"x\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"3\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"C\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"u\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"4\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"q\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"g\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"5\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"A\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"O\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"6\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"i\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"B\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"7\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"h\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"U\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"g\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"M\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"t\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"L\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"10\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\".\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"h\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":null,\"obfuscation\":\"e0qh9yyu3RCS\"}\n\ndata: + {\"id\":\"chatcmpl-EfoUwSkKaixcLmKzY2bJbYzvea5Mb\",\"object\":\"chat.completion.chunk\",\"created\":1793634270,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[],\"usage\":{\"prompt_tokens\":24,\"completion_tokens\":32,\"total_tokens\":56,\"prompt_tokens_details\":{\"cached_tokens\":0,\"cache_write_tokens\":0,\"audio_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"audio_tokens\":0,\"accepted_prediction_tokens\":0,\"rejected_prediction_tokens\":0}},\"obfuscation\":\"kcqAeV4Zy7\"}\n\ndata: + [DONE]\n\n" headers: - Connection: + access-control-expose-headers: + - X-Request-ID + - CF-Ray + - CF-Ray + connection: - keep-alive - Content-Type: + content-type: - text/event-stream; charset=utf-8 - Date: - - Fri, 24 Apr 2026 22:28:57 GMT - Server: + date: + - Mon, 02 Nov 2026 15:44:30 GMT + openai-processing-ms: + - '631' + openai-version: + - '2020-10-01' + server: - cloudflare - Strict-Transport-Security: + strict-transport-security: - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: + transfer-encoding: - chunked - X-Content-Type-Options: + x-content-type-options: - nosniff - access-control-expose-headers: - - X-Request-ID - openai-processing-ms: - - '531' - openai-version: - - '2020-10-01' x-openai-proxy-wasm: - v0.1 x-ratelimit-limit-requests: - '30000' x-ratelimit-limit-tokens: - - '150000000' + - '180000000' x-ratelimit-remaining-requests: - '29999' x-ratelimit-remaining-tokens: - - '149999982' + - '179999982' x-ratelimit-reset-requests: - 2ms x-ratelimit-reset-tokens: diff --git a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/streaming_multiple_choices.yaml b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/streaming_multiple_choices.yaml new file mode 100644 index 000000000..378df1561 --- /dev/null +++ b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/streaming_multiple_choices.yaml @@ -0,0 +1,87 @@ +interactions: +- request: + body: '{"messages":[{"role":"system","content":"you are a concise assistant"},{"role":"user","content":"Say + hello in one word."}],"model":"gpt-6-luna","max_completion_tokens":100,"n":2,"reasoning_effort":"none","stream":true,"stream_options":{"include_usage":true},"temperature":0.0}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '276' + content-type: + - application/json + host: + - api.openai.com + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-EfoUxDFYT1iipIN3leor2ao6Ogu8d","object":"chat.completion.chunk","created":1793634271,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"finish_reason":null}],"usage":null,"obfuscation":""} + + + data: {"id":"chatcmpl-EfoUxDFYT1iipIN3leor2ao6Ogu8d","object":"chat.completion.chunk","created":1793634271,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"Hello"},"finish_reason":null}],"usage":null,"obfuscation":"sfyz6gi6lclkl"} + + + data: {"id":"chatcmpl-EfoUxDFYT1iipIN3leor2ao6Ogu8d","object":"chat.completion.chunk","created":1793634271,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"finish_reason":null}],"usage":null,"obfuscation":""} + + + data: {"id":"chatcmpl-EfoUxDFYT1iipIN3leor2ao6Ogu8d","object":"chat.completion.chunk","created":1793634271,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":1,"delta":{"content":"Hello"},"finish_reason":null}],"usage":null,"obfuscation":"YaRRWwuqdp7Ht"} + + + data: {"id":"chatcmpl-EfoUxDFYT1iipIN3leor2ao6Ogu8d","object":"chat.completion.chunk","created":1793634271,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"usage":null,"obfuscation":"R1LDPOiPfZTb"} + + + data: {"id":"chatcmpl-EfoUxDFYT1iipIN3leor2ao6Ogu8d","object":"chat.completion.chunk","created":1793634271,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":1,"delta":{},"finish_reason":"stop"}],"usage":null,"obfuscation":"wgHItZNqVH4o"} + + + data: {"id":"chatcmpl-EfoUxDFYT1iipIN3leor2ao6Ogu8d","object":"chat.completion.chunk","created":1793634271,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":21,"completion_tokens":8,"total_tokens":29,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"lCcYSXWz6BA"} + + + data: [DONE] + + + ' + headers: + access-control-expose-headers: + - X-Request-ID + - CF-Ray + - CF-Ray + connection: + - keep-alive + content-type: + - text/event-stream; charset=utf-8 + date: + - Mon, 02 Nov 2026 15:44:31 GMT + openai-processing-ms: + - '484' + openai-version: + - '2020-10-01' + server: + - cloudflare + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '180000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '179999985' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + status: + code: 200 + message: OK +version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/tools.yaml b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/tools.yaml index cb8096e7b..5a49f6921 100644 --- a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/tools.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/tools.yaml @@ -1,155 +1,79 @@ interactions: - request: body: '{"messages":[{"role":"user","content":"What is the weather like in Paris, - France?"}],"model":"gpt-4o","max_tokens":500,"temperature":0.0,"tools":[{"type":"function","function":{"name":"get_weather","description":"Get + France?"}],"model":"gpt-6-luna","max_completion_tokens":500,"reasoning_effort":"none","temperature":0.0,"tools":[{"type":"function","function":{"name":"get_weather","description":"Get the current weather for a location","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The city and state, e.g. San Francisco, CA"},"unit":{"type":"string","enum":["celsius","fahrenheit"],"description":"The unit of temperature"}},"required":["location"]}}}]}' headers: - Accept: + accept: - application/json - Accept-Encoding: + accept-encoding: - gzip, deflate - Connection: + connection: - keep-alive - Content-Length: - - '511' - Content-Type: + content-length: + - '552' + content-type: - application/json - Host: + host: - api.openai.com method: POST uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-DYJD7zL3XRvX6vXAg9uZTIO3AObg7\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069369,\n \"model\": \"gpt-4o-2024-08-06\",\n + string: "{\n \"id\": \"chatcmpl-EfoUyo9QN1kParZ57hppN1NxXrTlv\",\n \"object\": + \"chat.completion\",\n \"created\": 1793634272,\n \"model\": \"gpt-6-luna\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n - \ \"id\": \"call_Xi2ptbz1EouodHdAyAfZZOUS\",\n \"type\": + \ \"id\": \"call_oHpcnrn4ngnMeMD4P3LDtlRw\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_weather\",\n - \ \"arguments\": \"{\\\"location\\\":\\\"Paris, France\\\"}\"\n + \ \"arguments\": \"{\\\"location\\\":\\\"Paris, France\\\",\\\"unit\\\":\\\"celsius\\\"}\"\n \ }\n }\n ],\n \"refusal\": null,\n \"annotations\": - []\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 85,\n \"completion_tokens\": - 16,\n \"total_tokens\": 101,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + []\n },\n \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": + {\n \"prompt_tokens\": 166,\n \"completion_tokens\": 24,\n \"total_tokens\": + 190,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"cache_write_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_d59908c1a9\"\n}\n" + \"default\",\n \"system_fingerprint\": null\n}\n" headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:22:49 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff access-control-expose-headers: - X-Request-ID + - CF-Ray + - CF-Ray + connection: + - keep-alive content-length: - - '1092' + - '1103' + content-type: + - application/json + date: + - Mon, 02 Nov 2026 15:44:32 GMT openai-processing-ms: - - '404' + - '885' openai-version: - '2020-10-01' - x-openai-proxy-wasm: - - v0.1 - x-ratelimit-limit-requests: - - '10000' - x-ratelimit-limit-tokens: - - '30000000' - x-ratelimit-remaining-requests: - - '9999' - x-ratelimit-remaining-tokens: - - '29999987' - x-ratelimit-reset-requests: - - 6ms - x-ratelimit-reset-tokens: - - 0s - status: - code: 200 - message: OK -- request: - body: '{"messages":[{"role":"user","content":"What is the weather like in Paris, - France?"}],"model":"gpt-4o","max_tokens":500,"temperature":0.0,"tools":[{"type":"function","function":{"name":"get_weather","description":"Get - the current weather for a location","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The - city and state, e.g. San Francisco, CA"},"unit":{"type":"string","enum":["celsius","fahrenheit"],"description":"The - unit of temperature"}},"required":["location"]}}}]}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '511' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-DYJJ4uVve8jM0NGt4ufMDXOfHFpWe\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069738,\n \"model\": \"gpt-4o-2024-08-06\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n - \ \"id\": \"call_zoCC7BsA6VfFz4kmswijoiGv\",\n \"type\": - \"function\",\n \"function\": {\n \"name\": \"get_weather\",\n - \ \"arguments\": \"{\\\"location\\\":\\\"Paris, France\\\"}\"\n - \ }\n }\n ],\n \"refusal\": null,\n \"annotations\": - []\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 85,\n \"completion_tokens\": - 16,\n \"total_tokens\": 101,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_d59908c1a9\"\n}\n" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:28:58 GMT - Server: + server: - cloudflare - Strict-Transport-Security: + strict-transport-security: - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: + transfer-encoding: - chunked - X-Content-Type-Options: + x-content-type-options: - nosniff - access-control-expose-headers: - - X-Request-ID - content-length: - - '1092' - openai-processing-ms: - - '807' - openai-version: - - '2020-10-01' x-openai-proxy-wasm: - v0.1 x-ratelimit-limit-requests: - - '10000' + - '30000' x-ratelimit-limit-tokens: - - '30000000' + - '180000000' x-ratelimit-remaining-requests: - - '9999' + - '29999' x-ratelimit-remaining-tokens: - - '29999987' + - '179999988' x-ratelimit-reset-requests: - - 6ms + - 2ms x-ratelimit-reset-tokens: - 0s status: diff --git a/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/web_search.yaml b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/web_search.yaml new file mode 100644 index 000000000..d9fb002de --- /dev/null +++ b/py/src/braintrust/integrations/openai/cassettes/1.71.0/btx/web_search.yaml @@ -0,0 +1,108 @@ +interactions: +- request: + body: '{"input":[{"role":"user","content":"Search the web for a recent AI news + headline and answer in one sentence."}],"model":"gpt-6-luna","reasoning":{"effort":"none"},"tool_choice":{"type":"web_search_preview"},"tools":[{"type":"web_search_preview","search_context_size":"low"}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '275' + content-type: + - application/json + host: + - api.openai.com + method: POST + uri: https://api.openai.com/v1/responses + response: + body: + string: "{\n \"id\": \"resp_04e73c04a352e653016ae8afe11f6c87d18f5e95ef50f0ef32\",\n + \ \"object\": \"response\",\n \"created_at\": 1793634273,\n \"status\": + \"completed\",\n \"access_programs\": null,\n \"background\": false,\n \"billing\": + {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1793634276,\n \"error\": + null,\n \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": + null,\n \"max_output_tokens\": null,\n \"max_tool_calls\": null,\n \"model\": + \"gpt-6-luna\",\n \"moderation\": null,\n \"output\": [\n {\n \"id\": + \"ws_04e73c04a352e653016ae8afe1978887d1aa1119c216caa019\",\n \"type\": + \"web_search_call\",\n \"status\": \"completed\",\n \"action\": + {\n \"type\": \"search\",\n \"queries\": [\n \"AI news + latest November 2 2026 artificial intelligence headline\",\n \"AI + news November 2026 recent headline\"\n ],\n \"query\": \"AI + news latest November 2 2026 artificial intelligence headline\"\n }\n + \ },\n {\n \"id\": \"msg_04e73c04a352e653016ae8afe3ee5487d19f1bc1382d55ccb4\",\n + \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": + [\n {\n \"type\": \"output_text\",\n \"annotations\": + [\n {\n \"type\": \"url_citation\",\n \"end_index\": + 228,\n \"start_index\": 130,\n \"title\": \"Anthropic's + spending commitments surge to nearly $900 billion\",\n \"url\": + \"https://www.axios.com/2026/11/02/anthropic-spending-revenue-surge?utm_source=openai\"\n + \ }\n ],\n \"logprobs\": [],\n \"text\": + \"Axios reports that Anthropic\\u2019s disclosed AI-computing and infrastructure + spending commitments have surged to nearly $900 billion. ([axios.com](https://www.axios.com/2026/11/02/anthropic-spending-revenue-surge?utm_source=openai))\"\n + \ }\n ],\n \"phase\": \"final_answer\",\n \"role\": \"assistant\"\n + \ }\n ],\n \"parallel_tool_calls\": true,\n \"presence_penalty\": 0.0,\n + \ \"previous_response_id\": null,\n \"prompt_cache_key\": null,\n \"prompt_cache_retention\": + \"24h\",\n \"reasoning\": {\n \"context\": \"all_turns\",\n \"effort\": + \"none\",\n \"mode\": \"standard\",\n \"summary\": null\n },\n \"safety_identifier\": + null,\n \"service_tier\": \"default\",\n \"store\": false,\n \"temperature\": + 1.0,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n },\n + \ \"verbosity\": \"medium\"\n },\n \"tool_choice\": {\n \"type\": \"web_search_preview\"\n + \ },\n \"tool_usage\": {\n \"image_gen\": {\n \"input_tokens\": 0,\n + \ \"input_tokens_details\": {\n \"image_tokens\": 0,\n \"text_tokens\": + 0\n },\n \"output_tokens\": 0,\n \"output_tokens_details\": + {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"total_tokens\": + 0\n },\n \"web_search\": {\n \"num_requests\": 1\n }\n },\n + \ \"tools\": [\n {\n \"type\": \"web_search_preview\",\n \"search_content_types\": + [\n \"text\"\n ],\n \"search_context_size\": \"low\",\n \"user_location\": + {\n \"type\": \"approximate\",\n \"city\": null,\n \"country\": + \"US\",\n \"region\": null,\n \"timezone\": null\n }\n + \ }\n ],\n \"top_logprobs\": 0,\n \"top_p\": 0.98,\n \"truncation\": + \"disabled\",\n \"usage\": {\n \"input_tokens\": 8578,\n \"input_tokens_details\": + {\n \"cache_write_tokens\": 0,\n \"cached_tokens\": 4328\n },\n + \ \"output_tokens\": 88,\n \"output_tokens_details\": {\n \"reasoning_tokens\": + 46\n },\n \"total_tokens\": 8666\n },\n \"user\": null,\n \"metadata\": + {}\n}" + headers: + access-control-expose-headers: + - X-Request-ID, Server-Timing-Total + - CF-Ray + - CF-Ray + connection: + - keep-alive + content-length: + - '3397' + content-type: + - application/json + date: + - Mon, 02 Nov 2026 15:44:36 GMT + openai-processing-ms: + - '3545' + openai-version: + - '2020-10-01' + server: + - cloudflare + 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: + - '180000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '179996373' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 1ms + status: + code: 200 + message: OK +version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/latest/btx/attachments.yaml b/py/src/braintrust/integrations/openai/cassettes/latest/btx/attachments.yaml index e6ffba418..b33ad75ce 100644 --- a/py/src/braintrust/integrations/openai/cassettes/latest/btx/attachments.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/latest/btx/attachments.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"model":"gpt-4o","messages":[{"role":"system","content":"you are a helpful - assistant"},{"role":"user","content":[{"type":"text","text":"Briefly describe - these attachments"},{"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg=="}},{"type":"file","file":{"filename":"blank.pdf","file_data":"data:application/pdf;base64,JVBERi0xLjAKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE5MAolJUVPRgo="}}]}],"temperature":0.0}' + body: '{"model":"gpt-6-luna","messages":[{"role":"system","content":"you are a + helpful assistant"},{"role":"user","content":[{"type":"text","text":"Briefly + describe these attachments"},{"type":"image_url","image_url":{"url":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8z8DwHwAFBQIAX8jx0gAAAABJRU5ErkJggg=="}},{"type":"file","file":{"filename":"blank.pdf","file_data":"data:application/pdf;base64,JVBERi0xLjAKMSAwIG9iago8PCAvVHlwZSAvQ2F0YWxvZyAvUGFnZXMgMiAwIFIgPj4KZW5kb2JqCjIgMCBvYmoKPDwgL1R5cGUgL1BhZ2VzIC9LaWRzIFszIDAgUl0gL0NvdW50IDEgPj4KZW5kb2JqCjMgMCBvYmoKPDwgL1R5cGUgL1BhZ2UgL1BhcmVudCAyIDAgUiAvTWVkaWFCb3ggWzAgMCA2MTIgNzkyXSA+PgplbmRvYmoKeHJlZgowIDQKMDAwMDAwMDAwMCA2NTUzNSBmIAowMDAwMDAwMDA5IDAwMDAwIG4gCjAwMDAwMDAwNTggMDAwMDAgbiAKMDAwMDAwMDExNSAwMDAwMCBuIAp0cmFpbGVyCjw8IC9TaXplIDQgL1Jvb3QgMSAwIFIgPj4Kc3RhcnR4cmVmCjE5MAolJUVPRgo="}}]}],"reasoning_effort":"none","temperature":0.0}' headers: accept: - application/json @@ -11,7 +11,7 @@ interactions: connection: - keep-alive content-length: - - '888' + - '918' content-type: - application/json host: @@ -20,20 +20,18 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-EdEAkKpI63xSB09eW7o9PI8d1t8j7\",\n \"object\": - \"chat.completion\",\n \"created\": 1793017978,\n \"model\": \"gpt-4o-2024-08-06\",\n + string: "{\n \"id\": \"chatcmpl-EfoRwhawe6gppRkk9tnuD5XUfZiLG\",\n \"object\": + \"chat.completion\",\n \"created\": 1793634084,\n \"model\": \"gpt-6-luna\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"The first attachment is a solid red - square, likely an image with no additional content or context.\\n\\nThe second - attachment, \\\"blank.pdf,\\\" appears to be a document with no readable content - or visible text or images.\",\n \"refusal\": null,\n \"annotations\": - []\n },\n \"logprobs\": null,\n \"finish_reason\": \"stop\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 495,\n \"completion_tokens\": - 42,\n \"total_tokens\": 537,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_55e838642c\"\n}\n" + \"assistant\",\n \"content\": \"The attached PDF appears blank; no + readable text or images were detected.\",\n \"refusal\": null,\n \"annotations\": + []\n },\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": + {\n \"prompt_tokens\": 241,\n \"completion_tokens\": 17,\n \"total_tokens\": + 258,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": + 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": + 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n + \ \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"default\",\n \"system_fingerprint\": null\n}\n" headers: access-control-expose-headers: - X-Request-ID @@ -42,13 +40,13 @@ interactions: connection: - keep-alive content-length: - - '1020' + - '835' content-type: - application/json date: - - Mon, 26 Oct 2026 12:32:58 GMT + - Mon, 02 Nov 2026 15:41:25 GMT openai-processing-ms: - - '1097' + - '1253' openai-version: - '2020-10-01' server: @@ -62,23 +60,23 @@ interactions: x-openai-proxy-wasm: - v0.1 x-ratelimit-limit-input-images: - - '250000' + - '50000' x-ratelimit-limit-requests: - - '10000' + - '30000' x-ratelimit-limit-tokens: - - '30000000' + - '180000000' x-ratelimit-remaining-input-images: - - '249999' + - '49999' x-ratelimit-remaining-requests: - - '9999' + - '29999' x-ratelimit-remaining-tokens: - - '29998451' + - '179998452' x-ratelimit-reset-input-images: - - 0s + - 1ms x-ratelimit-reset-requests: - - 6ms + - 2ms x-ratelimit-reset-tokens: - - 3ms + - 0s status: code: 200 message: OK diff --git a/py/src/braintrust/integrations/openai/cassettes/latest/btx/completions.yaml b/py/src/braintrust/integrations/openai/cassettes/latest/btx/completions.yaml index dfe401e29..977f09d1e 100644 --- a/py/src/braintrust/integrations/openai/cassettes/latest/btx/completions.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/latest/btx/completions.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"model":"gpt-4o-mini","messages":[{"role":"system","content":"you are - a helpful assistant"},{"role":"user","content":"What is the capital of France?"}],"temperature":0.0}' + body: '{"model":"gpt-6-luna","messages":[{"role":"system","content":"you are a + helpful assistant"},{"role":"user","content":"What is the capital of France?"}],"reasoning_effort":"none","temperature":0.0}' headers: accept: - application/json @@ -10,7 +10,7 @@ interactions: connection: - keep-alive content-length: - - '171' + - '196' content-type: - application/json host: @@ -19,17 +19,18 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-EdEAlMSRCMJIHfMjkE9O7BzkcK9Jo\",\n \"object\": - \"chat.completion\",\n \"created\": 1793017979,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n + string: "{\n \"id\": \"chatcmpl-EfoRyS5mfrOb0I9Mf9E1rWtVS4BDw\",\n \"object\": + \"chat.completion\",\n \"created\": 1793634086,\n \"model\": \"gpt-6-luna\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"The capital of France is Paris.\",\n - \ \"refusal\": null,\n \"annotations\": []\n },\n \"logprobs\": - null,\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": - 23,\n \"completion_tokens\": 7,\n \"total_tokens\": 30,\n \"prompt_tokens_details\": - {\n \"cached_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": - 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_ccaf3fe85e\"\n}\n" + \"assistant\",\n \"content\": \"Paris.\",\n \"refusal\": null,\n + \ \"annotations\": []\n },\n \"finish_reason\": \"stop\"\n + \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 22,\n \"completion_tokens\": + 5,\n \"total_tokens\": 27,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + 0,\n \"cache_write_tokens\": 0,\n \"audio_tokens\": 0\n },\n + \ \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": + 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": + 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": + null\n}\n" headers: access-control-expose-headers: - X-Request-ID @@ -38,13 +39,13 @@ interactions: connection: - keep-alive content-length: - - '837' + - '796' content-type: - application/json date: - - Mon, 26 Oct 2026 12:32:59 GMT + - Mon, 02 Nov 2026 15:41:27 GMT openai-processing-ms: - - '432' + - '986' openai-version: - '2020-10-01' server: @@ -60,11 +61,11 @@ interactions: x-ratelimit-limit-requests: - '30000' x-ratelimit-limit-tokens: - - '150000000' + - '180000000' x-ratelimit-remaining-requests: - '29999' x-ratelimit-remaining-tokens: - - '149999982' + - '179999982' x-ratelimit-reset-requests: - 2ms x-ratelimit-reset-tokens: diff --git a/py/src/braintrust/integrations/openai/cassettes/latest/btx/reasoning.yaml b/py/src/braintrust/integrations/openai/cassettes/latest/btx/reasoning.yaml index 971c14fb0..9e35838a6 100644 --- a/py/src/braintrust/integrations/openai/cassettes/latest/btx/reasoning.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/latest/btx/reasoning.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"model":"o4-mini","input":[{"role":"user","content":"Look at this sequence: + body: '{"model":"gpt-6-luna","input":[{"role":"user","content":"Look at this sequence: 2, 6, 12, 20, 30. What is the pattern and what would be the formula for the nth term?\n"}],"reasoning":{"effort":"high","summary":"detailed"}}' headers: @@ -11,7 +11,7 @@ interactions: connection: - keep-alive content-length: - - '219' + - '222' content-type: - application/json host: @@ -20,79 +20,62 @@ interactions: uri: https://api.openai.com/v1/responses response: body: - string: "{\n \"id\": \"resp_06d8732f210e8745006ad6507ef67087d0852d282edc8ac12a\",\n - \ \"object\": \"response\",\n \"created_at\": 1792430207,\n \"status\": + string: "{\n \"id\": \"resp_03eb0707a238ef57016ae8af28256c87d18809b4208ce8f322\",\n + \ \"object\": \"response\",\n \"created_at\": 1793634088,\n \"status\": \"completed\",\n \"access_programs\": null,\n \"background\": false,\n \"billing\": - {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1792430217,\n \"error\": + {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1793634091,\n \"error\": null,\n \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"max_tool_calls\": null,\n \"model\": - \"o4-mini-2025-04-16\",\n \"moderation\": null,\n \"output\": [\n {\n - \ \"id\": \"rs_06d8732f210e8745006ad6507fe8a487d0bc33cf78b4ef9399\",\n - \ \"type\": \"reasoning\",\n \"content\": [],\n \"encrypted_content\": - \"gAAAAABq1lCKNe4xrP2U1mh0z4oVf7HLY7-TKckY-YuJ-IXx8CrSa_b3sQzOymRtAiU6p0Xj2_c1feca482ql9Go5--KhriKX1C5vUooriKiSz5Cf9sMRqhqpiA7oWCGWHEdHthjgqGI9mN2xD0p4SdgTZLJheTbKGbaJv-0bGlGHTCNq8ivd-i-YGoTB-NGLMvq7TPemOIiGDpyqAwuoVZoKvqrIEmzwPtk_cmdf1H_JYf7_ydFbE0hPvMu_w3fxsSBx2zR7kvWG4e_13nZByf7WpJ5tgMN_V_0qnDKspz0G8v7RsOM5ZJVoLDcu7ird_p8HkORwL9h5ugKzE1h2Z4MGgor_6dyNLkH40J3dGIGaf8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Kk2gSatswtwJdeJh9vg2YAevXpXmzb3BmACNFlYN1LCtO_R9VS0f0K4kdoQEqo88muRpMPy_3btTzCGgbPaUSkkFxsyheQViT7ywq4TUmQFt3THpj6HDWJOOSBh4Hs3t7lCKZyBvkdTA3iq5KMGEP1AqFPshmr1mGlIjtlVT_sz_hSRZEKI-z8SoP4bk76FZ01_ZILsR0tOP8We1XoxObb0UKgApR11d8LMfwLwISJM0hgSzmXHgpMJ2igD4RJE8usKju5fyGnagB-4dkyZkwic6LVq3Mj1FpIuQcDtLhF_t1NOret6f32y31KUvtKdeBEqOIw3H7iqGJPLEzCKjW3rGv_HgQzAiIRFa1zAxu6dTyoQdLulzLX53Mc8L2WEraHx_QHi0tDanPzM-4aW7mJtujpKI3T2a3sjr5ezvBXPnOE5tVscT79TSju50aIMexnDevMB3iyIOwbBO8J5l7cLrA95whPJiBFTl-GysJCaoSbHiV1WEeLOZxihSuDyXArKtyNXwkA_b0vLZRvkviduqUekQmSfESCYwWCTwy838fssV17rm3hkYvzpTnkDpuw8O1IOLw1IFFmll4-GvsH-1DRdv2gzdCBm1r58gPdeIsdcgHLcXy70Xfm46y4eK9gHMY7bJYPzRVD56heUdw_263teozM2QRT9W-KPeeUJblRB34gm-vUXMh57KPNl0JeX-2G9YmpGMx0USLoTqeRtjReWgyPvh5BDu8yRp-lXUg_EDK_3W7mqDpS5h_ngCiCvvXb4joZO5hFjKV5-oyuZ8e2Ghx-8oPfzmsvPPG09_in8-VPe42Qi6mBYoS0WwVdZY9kJsNOFq6k9uhmngBTim5Q1eGyZvN7ENEGBVMLvxbvPBY9MZVVcIlPNwz2dZ3KbhAzZKEKINwPwODasYEEpJKouKjC52mmdm8pasRa19EYaI6Xd2SrDL12mLbDo3QMAxY5KmjKbLmF_Xo3gyYXdm9K6NrHJ8kMbtl_lunFcw==\",\n + \"gpt-6-luna\",\n \"moderation\": null,\n \"output\": [\n {\n \"id\": + \"rs_03eb0707a238ef57016ae8af2905dc87d1a344a4cde342cb00\",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3xyHIpib5Eqpql3rkxjA5hDQU6xaWzpcPFhhCdUOh3fOmyP03nYyqUd-kLIFhd_jyQcN0mX4sAk\",\n \ \"summary\": [\n {\n \"type\": \"summary_text\",\n \"text\": - \"**Identifying a sequence pattern**\\n\\nThe user has asked about the sequence - 2, 6, 12, 20, 30, and I'm recognizing it as familiar. The general term is - n(n+1), where n starts at 1. So for example, 1 times 2 equals 2, 2 times 3 - equals 6, and so forth. The pattern involves the product of consecutive integers, - also known as pronic numbers. Alternatively, this can be expressed as 2 times - the nth triangular number. The differences between terms are increasing by - 2 as well.\"\n },\n {\n \"type\": \"summary_text\",\n - \ \"text\": \"**Determining the quadratic pattern**\\n\\nI've recognized - that the second difference being constant at 2 indicates a quadratic sequence. - I can express it in the form a_n = an\\u00b2 + bn + c. By substituting various - values of n, I can create equations to solve for a, b, and c. After solving, - I find that a_n = n\\u00b2 + n, which identifies the pattern as pronic numbers, - each being the product of consecutive integers. It's essential to note this - starts at n=1, yielding correct terms. The general formula is a_n = n(n+1).\"\n - \ },\n {\n \"type\": \"summary_text\",\n \"text\": - \"**Summarizing the pattern**\\n\\nThe pattern I've identified is that these - numbers are pronic numbers, which means each term is the product of two consecutive - integers. The formula for the nth term is a_n = n(n+1), or equivalently n\\u00b2 - + n. This conclusion clearly defines the relationship in the sequence, and - I'm confident it accurately represents the problem at hand. So, to summarize: - the pattern is pronic numbers, and the nth term can be expressed as n(n+1).\"\n - \ }\n ]\n },\n {\n \"id\": \"msg_06d8732f210e8745006ad650898c0087d09c355da502644409\",\n - \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": - [\n {\n \"type\": \"output_text\",\n \"annotations\": - [],\n \"logprobs\": [],\n \"text\": \"The sequence 2, 6, - 12, 20, 30,\\u2026 has successive differences 4, 6, 8, 10,\\u2026 so it\\u2019s - a quadratic. In fact one checks \\n 1\\u00b72=2, 2\\u00b73=6, 3\\u00b74=12, - \ 4\\u00b75=20, 5\\u00b76=30, \\u2026 \\nSo the nth term is the \\u201cpronic\\u201d - number \\n a\\u2099 = n\\u2009\\u00d7\\u2009(n + 1) = n\\u00b2 + n.\"\n - \ }\n ],\n \"role\": \"assistant\"\n }\n ],\n \"parallel_tool_calls\": - true,\n \"presence_penalty\": 0.0,\n \"previous_response_id\": null,\n \"prompt_cache_key\": - null,\n \"prompt_cache_retention\": \"in_memory\",\n \"reasoning\": {\n - \ \"context\": \"current_turn\",\n \"effort\": \"high\",\n \"mode\": - \"standard\",\n \"summary\": \"detailed\"\n },\n \"safety_identifier\": - null,\n \"service_tier\": \"default\",\n \"store\": true,\n \"temperature\": - 1.0,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n },\n - \ \"verbosity\": \"medium\"\n },\n \"tool_choice\": \"auto\",\n \"tool_usage\": - {\n \"image_gen\": {\n \"input_tokens\": 0,\n \"input_tokens_details\": - {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"output_tokens\": - 0,\n \"output_tokens_details\": {\n \"image_tokens\": 0,\n \"text_tokens\": - 0\n },\n \"total_tokens\": 0\n },\n \"web_search\": {\n \"num_requests\": - 0\n }\n },\n \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n - \ \"truncation\": \"disabled\",\n \"usage\": {\n \"input_tokens\": 41,\n - \ \"input_tokens_details\": {\n \"cache_write_tokens\": 0,\n \"cached_tokens\": - 0\n },\n \"output_tokens\": 1018,\n \"output_tokens_details\": {\n - \ \"reasoning_tokens\": 832\n },\n \"total_tokens\": 1059\n },\n - \ \"user\": null,\n \"metadata\": {}\n}" + \"**Clarifying Patterns in Sequences**\\n\\nI need to address some ambiguity + in the sequence. It seems like I'm looking at differences such as 4, 6, 8, + 10. I think the formula n(n+1) with n starting from 1 might explain the sequence. + I'm realizing that a finite sequence can show many patterns, particularly + with products of consecutive integers like 1*2, 2*3, and so on. That seems + like a good direction to pursue!\"\n }\n ]\n },\n {\n \"id\": + \"msg_03eb0707a238ef57016ae8af2b24ec87d19d59ed8e7f11e244\",\n \"type\": + \"message\",\n \"status\": \"completed\",\n \"content\": [\n {\n + \ \"type\": \"output_text\",\n \"annotations\": [],\n \"logprobs\": + [],\n \"text\": \"The terms are products of consecutive integers:\\n\\n\\\\(1\\\\cdot2=2,\\\\;2\\\\cdot3=6,\\\\;3\\\\cdot4=12,\\\\ldots\\\\)\\n\\nSo, + starting with \\\\(n=1\\\\), the \\\\(n\\\\)th term is\\n\\n\\\\[\\na_n=n(n+1).\\n\\\\]\\n\\nEquivalently, + the differences between terms are \\\\(4,6,8,10,\\\\ldots\\\\).\"\n }\n + \ ],\n \"phase\": \"final_answer\",\n \"role\": \"assistant\"\n + \ }\n ],\n \"parallel_tool_calls\": true,\n \"presence_penalty\": 0.0,\n + \ \"previous_response_id\": null,\n \"prompt_cache_key\": null,\n \"prompt_cache_retention\": + \"24h\",\n \"reasoning\": {\n \"context\": \"all_turns\",\n \"effort\": + \"high\",\n \"mode\": \"standard\",\n \"summary\": \"detailed\"\n },\n + \ \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\": + false,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": + \"text\"\n },\n \"verbosity\": \"medium\"\n },\n \"tool_choice\": + \"auto\",\n \"tool_usage\": {\n \"image_gen\": {\n \"input_tokens\": + 0,\n \"input_tokens_details\": {\n \"image_tokens\": 0,\n \"text_tokens\": + 0\n },\n \"output_tokens\": 0,\n \"output_tokens_details\": + {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"total_tokens\": + 0\n },\n \"web_search\": {\n \"num_requests\": 0\n }\n },\n + \ \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 0.98,\n \"truncation\": + \"disabled\",\n \"usage\": {\n \"input_tokens\": 41,\n \"input_tokens_details\": + {\n \"cache_write_tokens\": 0,\n \"cached_tokens\": 0\n },\n + \ \"output_tokens\": 166,\n \"output_tokens_details\": {\n \"reasoning_tokens\": + 69\n },\n \"total_tokens\": 207\n },\n \"user\": null,\n \"metadata\": + {}\n}" headers: access-control-expose-headers: - - X-Request-ID + - X-Request-ID, Server-Timing-Total - CF-Ray - CF-Ray connection: - keep-alive content-length: - - '14248' + - '5174' content-type: - application/json date: - - Mon, 19 Oct 2026 17:16:58 GMT + - Mon, 02 Nov 2026 15:41:31 GMT openai-processing-ms: - - '11196' + - '3616' openai-version: - '2020-10-01' server: @@ -106,11 +89,11 @@ interactions: x-ratelimit-limit-requests: - '30000' x-ratelimit-limit-tokens: - - '150000000' + - '180000000' x-ratelimit-remaining-requests: - '29999' x-ratelimit-remaining-tokens: - - '149999752' + - '180000000' x-ratelimit-reset-requests: - 2ms x-ratelimit-reset-tokens: @@ -119,34 +102,19 @@ interactions: code: 200 message: OK - request: - body: "{\"model\":\"o4-mini\",\"input\":[{\"role\":\"user\",\"content\":\"Look - at this sequence: 2, 6, 12, 20, 30. What is the pattern and what would be the - formula for the nth term?\\n\"},{\"id\":\"rs_06d8732f210e8745006ad6507fe8a487d0bc33cf78b4ef9399\",\"summary\":[{\"text\":\"**Identifying - a sequence pattern**\\n\\nThe user has asked about the sequence 2, 6, 12, 20, - 30, and I'm recognizing it as familiar. The general term is n(n+1), where n - starts at 1. So for example, 1 times 2 equals 2, 2 times 3 equals 6, and so - forth. The pattern involves the product of consecutive integers, also known - as pronic numbers. Alternatively, this can be expressed as 2 times the nth triangular - number. The differences between terms are increasing by 2 as well.\",\"type\":\"summary_text\"},{\"text\":\"**Determining - the quadratic pattern**\\n\\nI've recognized that the second difference being - constant at 2 indicates a quadratic sequence. I can express it in the form a_n - = an\xB2 + bn + c. By substituting various values of n, I can create equations - to solve for a, b, and c. After solving, I find that a_n = n\xB2 + n, which - identifies the pattern as pronic numbers, each being the product of consecutive - integers. It's essential to note this starts at n=1, yielding correct terms. - The general formula is a_n = n(n+1).\",\"type\":\"summary_text\"},{\"text\":\"**Summarizing - the pattern**\\n\\nThe pattern I've identified is that these numbers are pronic - numbers, which means each term is the product of two consecutive integers. The - formula for the nth term is a_n = n(n+1), or equivalently n\xB2 + n. This conclusion - clearly defines the relationship in the sequence, and I'm confident it accurately - represents the problem at hand. So, to summarize: the pattern is pronic numbers, - and the nth term can be expressed as n(n+1).\",\"type\":\"summary_text\"}],\"type\":\"reasoning\",\"content\":[],\"encrypted_content\":\"gAAAAABq1lCKNe4xrP2U1mh0z4oVf7HLY7-TKckY-YuJ-IXx8CrSa_b3sQzOymRtAiU6p0Xj2_c1feca482ql9Go5--KhriKX1C5vUooriKiSz5Cf9sMRqhqpiA7oWCGWHEdHthjgqGI9mN2xD0p4SdgTZLJheTbKGbaJv-0bGlGHTCNq8ivd-i-YGoTB-NGLMvq7TPemOIiGDpyqAwuoVZoKvqrIEmzwPtk_cmdf1H_JYf7_ydFbE0hPvMu_w3fxsSBx2zR7kvWG4e_13nZByf7WpJ5tgMN_V_0qnDKspz0G8v7RsOM5ZJVoLDcu7ird_p8HkORwL9h5ugKzE1h2Z4MGgor_6dyNLkH40J3dGIGaf8n-R7hPCvKjSZE5pHzHO0SRXnraOGb9-b23eV0LNQ4BE3o9-V1mI5gtFrJdamtz25La76uNhMG_m8F9aIaN45lOfLOIJaWlVuBfisuvW_3P995IdykxqsYKZqBn_x-sRv9SSWMXuCeV0saDumWw_WDVhHRlJRxXgI1Dpwdl09lZdKZiwn60BGj_VkSm6qHnniG0DmHwBh9Mmrkj9Gr-9TtwdZzxexyrQlt0DaIZkI_Suco-E1DUgV5Sc-Mx8p6E43kT6wdJu5fPNMB8Fn_emCVHyt2KbFLjFGJ4ZYnR7I3-LkqKTBzZx5jkkTQSju4m1HycVBYvlruGYIVliHsialHGxHzij67i6IJ1Soh4SAfBMqi2ONPzUQwyVszlINU-yCLd3I8NEl-XWu_0l11BFCpw8-KzoYeAmek6MBISBhJf-i745y04jyRb2O_2YyBq3Gkay1t0bJTXga5qQW0l2Sm0HRiD333wdhai6-mg8JWtqUMHsKYQ4Z4kCLrAm3X2Smr3D5yPUwQZFapSmpZXTVL0gDuhEL_5hVW8OawM4qCVYOW5kfpLngs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IOLw1IFFmll4-GvsH-1DRdv2gzdCBm1r58gPdeIsdcgHLcXy70Xfm46y4eK9gHMY7bJYPzRVD56heUdw_263teozM2QRT9W-KPeeUJblRB34gm-vUXMh57KPNl0JeX-2G9YmpGMx0USLoTqeRtjReWgyPvh5BDu8yRp-lXUg_EDK_3W7mqDpS5h_ngCiCvvXb4joZO5hFjKV5-oyuZ8e2Ghx-8oPfzmsvPPG09_in8-VPe42Qi6mBYoS0WwVdZY9kJsNOFq6k9uhmngBTim5Q1eGyZvN7ENEGBVMLvxbvPBY9MZVVcIlPNwz2dZ3KbhAzZKEKINwPwODasYEEpJKouKjC52mmdm8pasRa19EYaI6Xd2SrDL12mLbDo3QMAxY5KmjKbLmF_Xo3gyYXdm9K6NrHJ8kMbtl_lunFcw==\"},{\"id\":\"msg_06d8732f210e8745006ad650898c0087d09c355da502644409\",\"content\":[{\"annotations\":[],\"text\":\"The - sequence 2, 6, 12, 20, 30,\u2026 has successive differences 4, 6, 8, 10,\u2026 - so it\u2019s a quadratic. In fact one checks \\n 1\xB72=2, 2\xB73=6, 3\xB74=12, - \ 4\xB75=20, 5\xB76=30, \u2026 \\nSo the nth term is the \u201Cpronic\u201D - number \\n a\u2099 = n\u2009\xD7\u2009(n + 1) = n\xB2 + n.\",\"type\":\"output_text\",\"logprobs\":[]}],\"role\":\"assistant\",\"status\":\"completed\",\"type\":\"message\"},{\"role\":\"user\",\"content\":\"Using + body: '{"model":"gpt-6-luna","input":[{"role":"user","content":"Look at this sequence: + 2, 6, 12, 20, 30. What is the pattern and what would be the formula for the + nth term?\n"},{"id":"rs_03eb0707a238ef57016ae8af2905dc87d1a344a4cde342cb00","summary":[{"text":"**Clarifying + Patterns in Sequences**\n\nI need to address some ambiguity in the sequence. + It seems like I''m looking at differences such as 4, 6, 8, 10. I think the formula + n(n+1) with n starting from 1 might explain the sequence. I''m realizing that + a finite sequence can show many patterns, particularly with products of consecutive + integers like 1*2, 2*3, and so on. That seems like a good direction to pursue!","type":"summary_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ql3rkxjA5hDQU6xaWzpcPFhhCdUOh3fOmyP03nYyqUd-kLIFhd_jyQcN0mX4sAk"},{"id":"msg_03eb0707a238ef57016ae8af2b24ec87d19d59ed8e7f11e244","content":[{"annotations":[],"text":"The + terms are products of consecutive integers:\n\n\\(1\\cdot2=2,\\;2\\cdot3=6,\\;3\\cdot4=12,\\ldots\\)\n\nSo, + starting with \\(n=1\\), the \\(n\\)th term is\n\n\\[\na_n=n(n+1).\n\\]\n\nEquivalently, + the differences between terms are \\(4,6,8,10,\\ldots\\).","type":"output_text","logprobs":[]}],"role":"assistant","status":"completed","type":"message","phase":"final_answer"},{"role":"user","content":"Using the pattern you discovered, what would be the 10th term? And can you find the - sum of the first 10 terms?\"}],\"reasoning\":{\"effort\":\"high\",\"summary\":\"detailed\"}}" + sum of the first 10 terms?"}],"reasoning":{"effort":"high","summary":"detailed"}}' headers: accept: - application/json @@ -155,7 +123,7 @@ interactions: connection: - keep-alive content-length: - - '12512' + - '3602' content-type: - application/json host: @@ -164,65 +132,62 @@ interactions: uri: https://api.openai.com/v1/responses response: body: - string: "{\n \"id\": \"resp_06d8732f210e8745006ad6508a81cc87d0a4dc1d1f0a4bc22f\",\n - \ \"object\": \"response\",\n \"created_at\": 1792430218,\n \"status\": + string: "{\n \"id\": \"resp_03eb0707a238ef57016ae8af2bf46487d1bb0307913bc7475a\",\n + \ \"object\": \"response\",\n \"created_at\": 1793634092,\n \"status\": \"completed\",\n \"access_programs\": null,\n \"background\": false,\n \"billing\": - {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1792430222,\n \"error\": + {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1793634095,\n \"error\": null,\n \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": null,\n \"max_output_tokens\": null,\n \"max_tool_calls\": null,\n \"model\": - \"o4-mini-2025-04-16\",\n \"moderation\": null,\n \"output\": [\n {\n - \ \"id\": \"rs_06d8732f210e8745006ad6508b66a487d09fce8f1c844a13e6\",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40PzoCawHC5TKmHMXbUNAUDI2XgI30fXIxEc317E3h4DnLVf9M9MSNAL2nrBfJUtZZ5CoowwkKo1pXWjvAvdw6G0ZErCm8WLf6smZXJblawcZ4TE4vz5qtE5nZ37f4WrU3RqqA98xqhifHnipSewoEjo2T9yW32oBoaf2DRPX_UCUfnrkxjkE6UzKOcZdeunDs9R9kwVwtDfe9VQM-NAT2VwSsaOknjBu6WZxYNjlLiGuBqHp5H75wakU9J3c97WhBhm2Z4UTjHqqABBLvxrfVJicYb2nAY06_R5lO6dmF3jRx7XtL81XtJXeIO3aIfLGD9CQD6p7yKKpxNjK7gHF2SQVIfFAXLLzFWD_JmX7Hqwh7HPaDWb1_62z3dZqd4i4m24X34ka-aKwzvNZvPSrJBIOTLUEcH0k156WeV_0Q4oqbaM-M8zbZ03Cxe_Q5DJZQwqMQMxOxuWyP6NMbuzmvv18OzXw7Ik791y1mj5-8sh2CNWOhsHOm4Q4o0sBQN1a6XO8AUrFWYLies-60MoIHxI2I0P49kvfZrht8kGhwcJ-CnclbZSuowAo7ex6WtjhuqfSSrMy2_T6VYTw-9AwepjMR6Sut_HEwPahMjEi4zZ8VgNOnl00EPa3E4sIttYpnKeSYM_2nJOLPeWU5pM2cXH29qBTS7wCuJvnbNb0jkmSg==\",\n + \"gpt-6-luna\",\n \"moderation\": null,\n \"output\": [\n {\n \"id\": + \"rs_03eb0707a238ef57016ae8af2cd30487d192d2e7df96fdd1da\",\n \"type\": + \"reasoning\",\n \"content\": [],\n \"encrypted_content\": \"gAAAAABq6K8v2KBreCyJ1t3N8983hNVMEVoMPEo2Ajx_V_yXZiIlf77iQiRPOVZpPMDiofp_fqwNM1Yk1P8E-n5OEpQQU71mUAxZDFr9hC52hsOf7yILUq-wzB-fVjusR-4356gGD8Cs4KEwsHbHujt_kdtaxQk4YRA1PuBHpfISuf2T4rZv6pV-g7FbyUfnSuIBEwSaa2GPwtH-Wp1ECebY2u27MBbH84JusVsPJ0WH0ZeiM2DnzGciS3WxtI5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JIjr6sbxS7uvv-VBewX3Utfjz2a5y52dVXzRuiFyCmfDw_kjOkD5yx31lg09LKGFvrDjQ_LjHahdJ3iN6oka0Vh5cNEezfH7-VnrA1t_BGB5HN1N3nw4Ycy3JgG4XjW_Vu74gL8VLiglwBmL50uphhZb_hwXvj4NKwTypXGt4wWCT5a6lGmmPnbxU3VGVTaF-kyF5NF5k3lDUxbHxtmbiIHEqAMJ_u9DVKPVIBJtzbPdwoKih6Q30mAD-5l1dhqIcXLvtwEKIrDOAODiGa9Gga8c-DHuUFvbDsl2VsUL2kDUzTGsH2ZHkp6S_Z6wbkRCI6X_lRH9ZkqTFI_1r_jAD3i0Qld-9r40ws8Ul0Q3Mih8nU58ZipdfW6CW-TRrFJ37Pz01fow808IVbdcEONqKazdlyFvXfwDp6yia7qFnPqZJ8weoPFCBlsTebeYn_Ncz1f3yW2G-HAJ4rxJFTH7TlREQmeyBPsA5gRKy7VtqbV0OIYamz6f0j9ekZp-Rul1sUQ--SRG5eGiUuxLu7tpCQNEPf9iiEThedZ96x_kZ6VFlXFgvKAwHM6sNkNycpdKs15QqOZzU_wP43jLTGD_ftfvSC330hiU\",\n \ \"summary\": [\n {\n \"type\": \"summary_text\",\n \"text\": - \"**Calculating pronic numbers**\\n\\nI\\u2019m working through the sequence - of pronic numbers, defined as a_n = n(n+1). So for the 10th term, I compute - a_10 = 10 * 11 = 110. Next, I need to find the sum of the first 10 terms, - which turns out to be 440. Alternatively, I can also use a different formula - for the sum of pronic numbers, leading to the same result. So, the answer - is that the 10th term is 110, and the sum is 440.\"\n }\n ]\n - \ },\n {\n \"id\": \"msg_06d8732f210e8745006ad6508e9bc887d098cee265782c3446\",\n + \"**Calculating sums**\\n\\nI need to find a concise answer for the question + involving sums. First, I calculated \\\\(10 \\\\times 11 = 110\\\\). Then, + for the sum of the first 10 natural numbers using the formula \\\\(n(n+1)/2\\\\), + I determined that it equals 55. Adding the sum of the squares, which is 385, + gives me a total of 440. I wonder if providing the sequence of the first ten + terms would be helpful to clarify things!\"\n }\n ]\n },\n + \ {\n \"id\": \"msg_03eb0707a238ef57016ae8af2ecb1887d1a383bf027676dc60\",\n \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": [\n {\n \"type\": \"output_text\",\n \"annotations\": - [],\n \"logprobs\": [],\n \"text\": \"The 10th term is \\n - \ a\\u2081\\u2080 = 10\\u00b7(10+1) = 10\\u00b711 = 110. \\n\\nThe sum of - the first 10 terms is \\n S\\u2081\\u2080 = \\u2211\\u2099\\u208c\\u2081\\u00b9\\u2070 - n(n+1) \\n = \\u2211\\u2099\\u208c\\u2081\\u00b9\\u2070 n\\u00b2 + - \\u2211\\u2099\\u208c\\u2081\\u00b9\\u2070 n \\n = (10\\u00b711\\u00b721)/6 - \ + (10\\u00b711)/2 \\n = 385 + 55 \\n = 440.\"\n }\n - \ ],\n \"role\": \"assistant\"\n }\n ],\n \"parallel_tool_calls\": - true,\n \"presence_penalty\": 0.0,\n \"previous_response_id\": null,\n \"prompt_cache_key\": - null,\n \"prompt_cache_retention\": \"in_memory\",\n \"reasoning\": {\n - \ \"context\": \"current_turn\",\n \"effort\": \"high\",\n \"mode\": - \"standard\",\n \"summary\": \"detailed\"\n },\n \"safety_identifier\": - null,\n \"service_tier\": \"default\",\n \"store\": true,\n \"temperature\": - 1.0,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n },\n - \ \"verbosity\": \"medium\"\n },\n \"tool_choice\": \"auto\",\n \"tool_usage\": - {\n \"image_gen\": {\n \"input_tokens\": 0,\n \"input_tokens_details\": - {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"output_tokens\": - 0,\n \"output_tokens_details\": {\n \"image_tokens\": 0,\n \"text_tokens\": - 0\n },\n \"total_tokens\": 0\n },\n \"web_search\": {\n \"num_requests\": - 0\n }\n },\n \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n - \ \"truncation\": \"disabled\",\n \"usage\": {\n \"input_tokens\": 197,\n - \ \"input_tokens_details\": {\n \"cache_write_tokens\": 0,\n \"cached_tokens\": - 0\n },\n \"output_tokens\": 402,\n \"output_tokens_details\": {\n - \ \"reasoning_tokens\": 256\n },\n \"total_tokens\": 599\n },\n - \ \"user\": null,\n \"metadata\": {}\n}" + [],\n \"logprobs\": [],\n \"text\": \"Using \\\\(a_n=n(n+1)\\\\), + the 10th term is\\n\\n\\\\[\\na_{10}=10\\\\cdot11=\\\\boxed{110}.\\n\\\\]\\n\\nThe + sum of the first 10 terms is\\n\\n\\\\[\\n\\\\sum_{n=1}^{10}n(n+1)\\n=\\\\sum_{n=1}^{10}n^2+\\\\sum_{n=1}^{10}n\\n=385+55\\n=\\\\boxed{440}.\\n\\\\]\"\n + \ }\n ],\n \"phase\": \"final_answer\",\n \"role\": \"assistant\"\n + \ }\n ],\n \"parallel_tool_calls\": true,\n \"presence_penalty\": 0.0,\n + \ \"previous_response_id\": null,\n \"prompt_cache_key\": null,\n \"prompt_cache_retention\": + \"24h\",\n \"reasoning\": {\n \"context\": \"all_turns\",\n \"effort\": + \"high\",\n \"mode\": \"standard\",\n \"summary\": \"detailed\"\n },\n + \ \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\": + false,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": + \"text\"\n },\n \"verbosity\": \"medium\"\n },\n \"tool_choice\": + \"auto\",\n \"tool_usage\": {\n \"image_gen\": {\n \"input_tokens\": + 0,\n \"input_tokens_details\": {\n \"image_tokens\": 0,\n \"text_tokens\": + 0\n },\n \"output_tokens\": 0,\n \"output_tokens_details\": + {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"total_tokens\": + 0\n },\n \"web_search\": {\n \"num_requests\": 0\n }\n },\n + \ \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 0.98,\n \"truncation\": + \"disabled\",\n \"usage\": {\n \"input_tokens\": 241,\n \"input_tokens_details\": + {\n \"cache_write_tokens\": 0,\n \"cached_tokens\": 0\n },\n + \ \"output_tokens\": 157,\n \"output_tokens_details\": {\n \"reasoning_tokens\": + 55\n },\n \"total_tokens\": 398\n },\n \"user\": null,\n \"metadata\": + {}\n}" headers: access-control-expose-headers: - - X-Request-ID + - X-Request-ID, Server-Timing-Total - CF-Ray - CF-Ray connection: - keep-alive content-length: - - '6966' + - '4887' content-type: - application/json date: - - Mon, 19 Oct 2026 17:17:03 GMT + - Mon, 02 Nov 2026 15:41:35 GMT openai-processing-ms: - - '4607' + - '3335' openai-version: - '2020-10-01' server: @@ -236,11 +201,11 @@ interactions: x-ratelimit-limit-requests: - '30000' x-ratelimit-limit-tokens: - - '150000000' + - '180000000' x-ratelimit-remaining-requests: - '29999' x-ratelimit-remaining-tokens: - - '149999597' + - '180000000' x-ratelimit-reset-requests: - 2ms x-ratelimit-reset-tokens: diff --git a/py/src/braintrust/integrations/openai/cassettes/latest/btx/reasoning_completions.yaml b/py/src/braintrust/integrations/openai/cassettes/latest/btx/reasoning_completions.yaml index 393bf6473..6e9c9e97a 100644 --- a/py/src/braintrust/integrations/openai/cassettes/latest/btx/reasoning_completions.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/latest/btx/reasoning_completions.yaml @@ -1,8 +1,8 @@ interactions: - request: - body: '{"model":"o4-mini","messages":[{"role":"user","content":"Look at this sequence: - 2, 6, 12, 20, 30. What is the pattern and what would be the formula for the - nth term?\n"}],"reasoning_effort":"medium"}' + body: '{"model":"gpt-6-luna","messages":[{"role":"user","content":"Look at this + sequence: 2, 6, 12, 20, 30. What is the pattern and what would be the formula + for the nth term?\n"}],"reasoning_effort":"medium"}' headers: accept: - application/json @@ -11,7 +11,7 @@ interactions: connection: - keep-alive content-length: - - '199' + - '202' content-type: - application/json host: @@ -20,23 +20,19 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-EalGpv3DejXVtt7YXGLNWLzQxciky\",\n \"object\": - \"chat.completion\",\n \"created\": 1792430223,\n \"model\": \"o4-mini-2025-04-16\",\n + string: "{\n \"id\": \"chatcmpl-EfoS71mGBQexHsZNa0Zy3W7KGTcSW\",\n \"object\": + \"chat.completion\",\n \"created\": 1793634095,\n \"model\": \"gpt-6-luna\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"The given terms \\n1st: 2 \\n2nd: - 6 \\n3rd: 12 \\n4th: 20 \\n5th: 30 \\n\\nhave successive differences 6\u20132=4, - 12\u20136=6, 20\u201312=8, 30\u201320=10,\u2026 i.e. the differences are the - even numbers 4,6,8,10,\u2026\\n\\nEquivalently each term is the product of - two consecutive integers:\\n\\na\u2099 = n\xB7(n+1)\\n\\nChecking:\\nn=1 \u2192 - 1\xB72 = 2 \\nn=2 \u2192 2\xB73 = 6 \\nn=3 \u2192 3\xB74 = 12 \\nn=4 \u2192 - 4\xB75 = 20 \\nn=5 \u2192 5\xB76 = 30 \\n\\nSo the n\u1D57\u02B0 term is - a\u2099 = n\xB2 + n.\",\n \"refusal\": null,\n \"annotations\": - []\n },\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": - {\n \"prompt_tokens\": 41,\n \"completion_tokens\": 590,\n \"total_tokens\": - 631,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"audio_tokens\": - 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": - 384,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n - \ \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": + \"assistant\",\n \"content\": \"The terms follow the pattern \\\\(1\\\\cdot2,\\\\;2\\\\cdot3,\\\\;3\\\\cdot4,\\\\;4\\\\cdot5,\\\\;5\\\\cdot6\\\\). + So, starting with \\\\(n=1\\\\), the \\\\(n\\\\)th term is\\n\\n\\\\[\\na_n=n(n+1).\\n\\\\]\\n\\nThe + differences between consecutive terms are \\\\(4,6,8,10,\\\\ldots\\\\), increasing + by 2 each time.\",\n \"refusal\": null,\n \"annotations\": []\n + \ },\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n + \ \"prompt_tokens\": 41,\n \"completion_tokens\": 173,\n \"total_tokens\": + 214,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"cache_write_tokens\": + 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": + {\n \"reasoning_tokens\": 67,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": + 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": \"default\",\n \"system_fingerprint\": null\n}\n" headers: access-control-expose-headers: @@ -46,13 +42,13 @@ interactions: connection: - keep-alive content-length: - - '1219' + - '1062' content-type: - application/json date: - - Mon, 19 Oct 2026 17:17:08 GMT + - Mon, 02 Nov 2026 15:41:37 GMT openai-processing-ms: - - '4718' + - '2080' openai-version: - '2020-10-01' server: @@ -68,11 +64,11 @@ interactions: x-ratelimit-limit-requests: - '30000' x-ratelimit-limit-tokens: - - '150000000' + - '180000000' x-ratelimit-remaining-requests: - '29999' x-ratelimit-remaining-tokens: - - '149999970' + - '179999970' x-ratelimit-reset-requests: - 2ms x-ratelimit-reset-tokens: diff --git a/py/src/braintrust/integrations/openai/cassettes/latest/btx/responses_array_input.yaml b/py/src/braintrust/integrations/openai/cassettes/latest/btx/responses_array_input.yaml new file mode 100644 index 000000000..03ccac6ec --- /dev/null +++ b/py/src/braintrust/integrations/openai/cassettes/latest/btx/responses_array_input.yaml @@ -0,0 +1,91 @@ +interactions: +- request: + body: '{"model":"gpt-4o-mini","input":[{"role":"user","content":[{"type":"input_text","text":"What + is the capital of France?"}]}],"instructions":"Reply with one word."}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate, zstd + connection: + - keep-alive + content-length: + - '161' + content-type: + - application/json + host: + - api.openai.com + method: POST + uri: https://api.openai.com/v1/responses + response: + body: + string: "{\n \"id\": \"resp_0eb0a36775c9547a016ae8af31f5d087d1a9f031585c06d508\",\n + \ \"object\": \"response\",\n \"created_at\": 1793634097,\n \"status\": + \"completed\",\n \"access_programs\": null,\n \"background\": false,\n \"billing\": + {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1793634098,\n \"error\": + null,\n \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": + \"Reply with one word.\",\n \"max_output_tokens\": null,\n \"max_tool_calls\": + null,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"moderation\": null,\n + \ \"output\": [\n {\n \"id\": \"msg_0eb0a36775c9547a016ae8af32696887d18108b22895785c79\",\n + \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": + [\n {\n \"type\": \"output_text\",\n \"annotations\": + [],\n \"logprobs\": [],\n \"text\": \"Paris.\"\n }\n + \ ],\n \"role\": \"assistant\"\n }\n ],\n \"parallel_tool_calls\": + true,\n \"presence_penalty\": 0.0,\n \"previous_response_id\": null,\n \"prompt_cache_key\": + null,\n \"prompt_cache_retention\": \"in_memory\",\n \"reasoning\": {\n + \ \"context\": null,\n \"effort\": null,\n \"summary\": null\n },\n + \ \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\": + false,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": + \"text\"\n },\n \"verbosity\": \"medium\"\n },\n \"tool_choice\": + \"auto\",\n \"tool_usage\": {\n \"image_gen\": {\n \"input_tokens\": + 0,\n \"input_tokens_details\": {\n \"image_tokens\": 0,\n \"text_tokens\": + 0\n },\n \"output_tokens\": 0,\n \"output_tokens_details\": + {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"total_tokens\": + 0\n },\n \"web_search\": {\n \"num_requests\": 0\n }\n },\n + \ \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n \"truncation\": + \"disabled\",\n \"usage\": {\n \"input_tokens\": 23,\n \"input_tokens_details\": + {\n \"cache_write_tokens\": 0,\n \"cached_tokens\": 0\n },\n + \ \"output_tokens\": 3,\n \"output_tokens_details\": {\n \"reasoning_tokens\": + 0\n },\n \"total_tokens\": 26\n },\n \"user\": null,\n \"metadata\": + {}\n}" + headers: + access-control-expose-headers: + - X-Request-ID, Server-Timing-Total + - CF-Ray + - CF-Ray + connection: + - keep-alive + content-length: + - '2021' + content-type: + - application/json + date: + - Mon, 02 Nov 2026 15:41:38 GMT + openai-processing-ms: + - '554' + openai-version: + - '2020-10-01' + server: + - cloudflare + 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: + - '149999960' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + status: + code: 200 + message: OK +version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/latest/btx/responses_string_input.yaml b/py/src/braintrust/integrations/openai/cassettes/latest/btx/responses_string_input.yaml new file mode 100644 index 000000000..76aa56124 --- /dev/null +++ b/py/src/braintrust/integrations/openai/cassettes/latest/btx/responses_string_input.yaml @@ -0,0 +1,91 @@ +interactions: +- request: + body: '{"model":"gpt-4o-mini","input":"What is the capital of France?","instructions":"Reply + with one word."}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate, zstd + connection: + - keep-alive + content-length: + - '102' + content-type: + - application/json + host: + - api.openai.com + method: POST + uri: https://api.openai.com/v1/responses + response: + body: + string: "{\n \"id\": \"resp_0eee7f060dde9ac1016ae8af32e53487d1a7b7aefeaf2ae7e6\",\n + \ \"object\": \"response\",\n \"created_at\": 1793634098,\n \"status\": + \"completed\",\n \"access_programs\": null,\n \"background\": false,\n \"billing\": + {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1793634099,\n \"error\": + null,\n \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": + \"Reply with one word.\",\n \"max_output_tokens\": null,\n \"max_tool_calls\": + null,\n \"model\": \"gpt-4o-mini-2024-07-18\",\n \"moderation\": null,\n + \ \"output\": [\n {\n \"id\": \"msg_0eee7f060dde9ac1016ae8af3384d487d1a5a0b46239e2d02e\",\n + \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": + [\n {\n \"type\": \"output_text\",\n \"annotations\": + [],\n \"logprobs\": [],\n \"text\": \"Paris.\"\n }\n + \ ],\n \"role\": \"assistant\"\n }\n ],\n \"parallel_tool_calls\": + true,\n \"presence_penalty\": 0.0,\n \"previous_response_id\": null,\n \"prompt_cache_key\": + null,\n \"prompt_cache_retention\": \"in_memory\",\n \"reasoning\": {\n + \ \"context\": null,\n \"effort\": null,\n \"summary\": null\n },\n + \ \"safety_identifier\": null,\n \"service_tier\": \"default\",\n \"store\": + false,\n \"temperature\": 1.0,\n \"text\": {\n \"format\": {\n \"type\": + \"text\"\n },\n \"verbosity\": \"medium\"\n },\n \"tool_choice\": + \"auto\",\n \"tool_usage\": {\n \"image_gen\": {\n \"input_tokens\": + 0,\n \"input_tokens_details\": {\n \"image_tokens\": 0,\n \"text_tokens\": + 0\n },\n \"output_tokens\": 0,\n \"output_tokens_details\": + {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"total_tokens\": + 0\n },\n \"web_search\": {\n \"num_requests\": 0\n }\n },\n + \ \"tools\": [],\n \"top_logprobs\": 0,\n \"top_p\": 1.0,\n \"truncation\": + \"disabled\",\n \"usage\": {\n \"input_tokens\": 23,\n \"input_tokens_details\": + {\n \"cache_write_tokens\": 0,\n \"cached_tokens\": 0\n },\n + \ \"output_tokens\": 3,\n \"output_tokens_details\": {\n \"reasoning_tokens\": + 0\n },\n \"total_tokens\": 26\n },\n \"user\": null,\n \"metadata\": + {}\n}" + headers: + access-control-expose-headers: + - X-Request-ID, Server-Timing-Total + - CF-Ray + - CF-Ray + connection: + - keep-alive + content-length: + - '2021' + content-type: + - application/json + date: + - Mon, 02 Nov 2026 15:41:39 GMT + openai-processing-ms: + - '739' + openai-version: + - '2020-10-01' + server: + - cloudflare + 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: + - '149999957' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + status: + code: 200 + message: OK +version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/latest/btx/streaming.yaml b/py/src/braintrust/integrations/openai/cassettes/latest/btx/streaming.yaml index dfe442abe..224f467bb 100644 --- a/py/src/braintrust/integrations/openai/cassettes/latest/btx/streaming.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/latest/btx/streaming.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"model":"gpt-4o-mini","stream":true,"messages":[{"role":"system","content":"you - are a thoughtful assistant"},{"role":"user","content":"Count from 1 to 10 slowly."}],"max_tokens":800,"stream_options":{"include_usage":true},"temperature":0.0}' + body: '{"model":"gpt-6-luna","stream":true,"messages":[{"role":"system","content":"you + are a thoughtful assistant"},{"role":"user","content":"Count from 1 to 10 slowly."}],"max_completion_tokens":800,"reasoning_effort":"none","stream_options":{"include_usage":true},"temperature":0.0}' headers: accept: - application/json @@ -10,7 +10,7 @@ interactions: connection: - keep-alive content-length: - - '241' + - '277' content-type: - application/json host: @@ -21,148 +21,56 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: 'data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ELYDNhMuA"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"Sure"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Ldfb3J6"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"K5rFDYp1dV"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" - Here"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"72SVwA"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" - we"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"DDT7hBqX"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" - go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"9usda4Fe"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":":\n\n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"P4DyLR"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"1"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"BcPY2jL6bQ"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PcjXbV37"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kHa88bI"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"2"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MD0KpYacEd"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iwXBkq3p"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"RhcZsXq"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"3"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6jKrRZLXr0"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"qOjhetOx"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FO8Nb2I"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"4"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"N7ySvypiQF"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"ozIIyuq2"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2IVEQuz"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"5"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"XoDYQAOqfH"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"auoTTRYd"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"MXQWf3D"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"6"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"xGKEcoIFRz"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4R7DwkvZ"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"sKkXu7p"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"7"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"60WNbz7SsZ"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FAis9tER"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"iEAWxa4"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"8"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"6S6uzFYtFn"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"easkNueJ"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"thXsmBt"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"9"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cVohhQDzuz"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fpJRLUHD"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" \n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"fV3LxDY"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"10"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"prviZVNtf"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"..."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"32q57ejy"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" \n\n"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Cgxta"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"There"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HbAXsI"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" - you"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"2rH0kfp"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" - have"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"bdh4Eu"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":" - it"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0QkJU125"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{"content":"!"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IMUNxcyEzX"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"nzbNB"} - - - data: {"id":"chatcmpl-EdEAmuo9oYcD7hz0YpTO1ReSrgnPN","object":"chat.completion.chunk","created":1793017980,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_4c55ec580f","choices":[],"usage":{"prompt_tokens":25,"completion_tokens":41,"total_tokens":66,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"28Tvd8QgMD"} - - - data: [DONE] - - - ' + string: "data: {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"\",\"refusal\":null},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"1\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"r\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"t\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"2\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"G\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"1\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"3\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"q\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"p\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"4\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Q\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"x\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"5\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"n\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"M\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"6\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"A\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"Z\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"7\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"w\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"5\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"8\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"l\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"c\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"9\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"9\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \u2026\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\" + \"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"4\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{\"content\":\"10\"},\"finish_reason\":null}],\"usage\":null,\"obfuscation\":\"\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[{\"index\":0,\"delta\":{},\"finish_reason\":\"stop\"}],\"usage\":null,\"obfuscation\":\"4g9TO1KLeiH5\"}\n\ndata: + {\"id\":\"chatcmpl-EfoSCoXFfaZ2ObLX5ikxqlFvak5Cz\",\"object\":\"chat.completion.chunk\",\"created\":1793634100,\"model\":\"gpt-6-luna\",\"service_tier\":\"default\",\"system_fingerprint\":null,\"choices\":[],\"usage\":{\"prompt_tokens\":24,\"completion_tokens\":31,\"total_tokens\":55,\"prompt_tokens_details\":{\"cached_tokens\":0,\"cache_write_tokens\":0,\"audio_tokens\":0},\"completion_tokens_details\":{\"reasoning_tokens\":0,\"audio_tokens\":0,\"accepted_prediction_tokens\":0,\"rejected_prediction_tokens\":0}},\"obfuscation\":\"YLF3IgKIXA\"}\n\ndata: + [DONE]\n\n" headers: access-control-expose-headers: - X-Request-ID @@ -173,9 +81,9 @@ interactions: content-type: - text/event-stream; charset=utf-8 date: - - Mon, 26 Oct 2026 12:33:00 GMT + - Mon, 02 Nov 2026 15:41:40 GMT openai-processing-ms: - - '390' + - '777' openai-version: - '2020-10-01' server: @@ -191,11 +99,11 @@ interactions: x-ratelimit-limit-requests: - '30000' x-ratelimit-limit-tokens: - - '150000000' + - '180000000' x-ratelimit-remaining-requests: - '29999' x-ratelimit-remaining-tokens: - - '149999982' + - '179999985' x-ratelimit-reset-requests: - 2ms x-ratelimit-reset-tokens: diff --git a/py/src/braintrust/integrations/openai/cassettes/latest/btx/streaming_multiple_choices.yaml b/py/src/braintrust/integrations/openai/cassettes/latest/btx/streaming_multiple_choices.yaml new file mode 100644 index 000000000..5e46308be --- /dev/null +++ b/py/src/braintrust/integrations/openai/cassettes/latest/btx/streaming_multiple_choices.yaml @@ -0,0 +1,89 @@ +interactions: +- request: + body: '{"model":"gpt-6-luna","stream":true,"messages":[{"role":"system","content":"you + are a concise assistant"},{"role":"user","content":"Say hello in one word."}],"max_completion_tokens":100,"n":2,"reasoning_effort":"none","stream_options":{"include_usage":true},"temperature":0.0}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate, zstd + connection: + - keep-alive + content-length: + - '276' + content-type: + - application/json + host: + - api.openai.com + x-stainless-helper-method: + - chat.completions.stream + method: POST + uri: https://api.openai.com/v1/chat/completions + response: + body: + string: 'data: {"id":"chatcmpl-EfoSDCy2rRmG8pT73zttQf6824IHP","object":"chat.completion.chunk","created":1793634101,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"finish_reason":null}],"usage":null,"obfuscation":""} + + + data: {"id":"chatcmpl-EfoSDCy2rRmG8pT73zttQf6824IHP","object":"chat.completion.chunk","created":1793634101,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"Hello"},"finish_reason":null}],"usage":null,"obfuscation":"TBxOmQWuCk2GA"} + + + data: {"id":"chatcmpl-EfoSDCy2rRmG8pT73zttQf6824IHP","object":"chat.completion.chunk","created":1793634101,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":1,"delta":{"role":"assistant","content":"","refusal":null},"finish_reason":null}],"usage":null,"obfuscation":""} + + + data: {"id":"chatcmpl-EfoSDCy2rRmG8pT73zttQf6824IHP","object":"chat.completion.chunk","created":1793634101,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":1,"delta":{"content":"Hello"},"finish_reason":null}],"usage":null,"obfuscation":"w3nJMUsthWE8W"} + + + data: {"id":"chatcmpl-EfoSDCy2rRmG8pT73zttQf6824IHP","object":"chat.completion.chunk","created":1793634101,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"usage":null,"obfuscation":"XDHUlEqTbcJg"} + + + data: {"id":"chatcmpl-EfoSDCy2rRmG8pT73zttQf6824IHP","object":"chat.completion.chunk","created":1793634101,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[{"index":1,"delta":{},"finish_reason":"stop"}],"usage":null,"obfuscation":"Ey8kcxa2rcu7"} + + + data: {"id":"chatcmpl-EfoSDCy2rRmG8pT73zttQf6824IHP","object":"chat.completion.chunk","created":1793634101,"model":"gpt-6-luna","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":21,"completion_tokens":8,"total_tokens":29,"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"fiitV0aiRNf"} + + + data: [DONE] + + + ' + headers: + access-control-expose-headers: + - X-Request-ID + - CF-Ray + - CF-Ray + connection: + - keep-alive + content-type: + - text/event-stream; charset=utf-8 + date: + - Mon, 02 Nov 2026 15:41:41 GMT + openai-processing-ms: + - '492' + openai-version: + - '2020-10-01' + server: + - cloudflare + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + x-content-type-options: + - nosniff + x-openai-proxy-wasm: + - v0.1 + x-ratelimit-limit-requests: + - '30000' + x-ratelimit-limit-tokens: + - '180000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '179999982' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 0s + status: + code: 200 + message: OK +version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/latest/btx/tools.yaml b/py/src/braintrust/integrations/openai/cassettes/latest/btx/tools.yaml index d4fd63636..04d83ae8a 100644 --- a/py/src/braintrust/integrations/openai/cassettes/latest/btx/tools.yaml +++ b/py/src/braintrust/integrations/openai/cassettes/latest/btx/tools.yaml @@ -1,7 +1,7 @@ interactions: - request: - body: '{"model":"gpt-4o","messages":[{"role":"user","content":"What is the weather - like in Paris, France?"}],"max_tokens":500,"temperature":0.0,"tools":[{"type":"function","function":{"name":"get_weather","description":"Get + body: '{"model":"gpt-6-luna","messages":[{"role":"user","content":"What is the + weather like in Paris, France?"}],"max_completion_tokens":500,"reasoning_effort":"none","temperature":0.0,"tools":[{"type":"function","function":{"name":"get_weather","description":"Get the current weather for a location","parameters":{"type":"object","properties":{"location":{"type":"string","description":"The city and state, e.g. San Francisco, CA"},"unit":{"type":"string","enum":["celsius","fahrenheit"],"description":"The unit of temperature"}},"required":["location"]}}}]}' @@ -13,7 +13,7 @@ interactions: connection: - keep-alive content-length: - - '511' + - '552' content-type: - application/json host: @@ -22,21 +22,21 @@ interactions: uri: https://api.openai.com/v1/chat/completions response: body: - string: "{\n \"id\": \"chatcmpl-EdEAnxDOeZBcwMNQuYs5NaHtjnzqE\",\n \"object\": - \"chat.completion\",\n \"created\": 1793017981,\n \"model\": \"gpt-4o-2024-08-06\",\n + string: "{\n \"id\": \"chatcmpl-EfoSEzl2X1ZXFNettBJ59NqyShum0\",\n \"object\": + \"chat.completion\",\n \"created\": 1793634102,\n \"model\": \"gpt-6-luna\",\n \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": \"assistant\",\n \"content\": null,\n \"tool_calls\": [\n {\n - \ \"id\": \"call_sgM6VF3KKTa7TQfHjmCF7ean\",\n \"type\": + \ \"id\": \"call_m9SQVRoTAr6P5qCUERs5IaLm\",\n \"type\": \"function\",\n \"function\": {\n \"name\": \"get_weather\",\n - \ \"arguments\": \"{\\\"location\\\":\\\"Paris, France\\\"}\"\n + \ \"arguments\": \"{\\\"location\\\":\\\"Paris, France\\\",\\\"unit\\\":\\\"celsius\\\"}\"\n \ }\n }\n ],\n \"refusal\": null,\n \"annotations\": - []\n },\n \"logprobs\": null,\n \"finish_reason\": \"tool_calls\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 85,\n \"completion_tokens\": - 16,\n \"total_tokens\": 101,\n \"prompt_tokens_details\": {\n \"cached_tokens\": + []\n },\n \"finish_reason\": \"tool_calls\"\n }\n ],\n \"usage\": + {\n \"prompt_tokens\": 166,\n \"completion_tokens\": 24,\n \"total_tokens\": + 190,\n \"prompt_tokens_details\": {\n \"cached_tokens\": 0,\n \"cache_write_tokens\": 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": {\n \"reasoning_tokens\": 0,\n \"audio_tokens\": 0,\n \"accepted_prediction_tokens\": 0,\n \"rejected_prediction_tokens\": 0\n }\n },\n \"service_tier\": - \"default\",\n \"system_fingerprint\": \"fp_3bfbcbf18d\"\n}\n" + \"default\",\n \"system_fingerprint\": null\n}\n" headers: access-control-expose-headers: - X-Request-ID @@ -45,13 +45,13 @@ interactions: connection: - keep-alive content-length: - - '1092' + - '1103' content-type: - application/json date: - - Mon, 26 Oct 2026 12:33:02 GMT + - Mon, 02 Nov 2026 15:41:42 GMT openai-processing-ms: - - '507' + - '974' openai-version: - '2020-10-01' server: @@ -65,15 +65,15 @@ interactions: x-openai-proxy-wasm: - v0.1 x-ratelimit-limit-requests: - - '10000' + - '30000' x-ratelimit-limit-tokens: - - '30000000' + - '180000000' x-ratelimit-remaining-requests: - - '9999' + - '29999' x-ratelimit-remaining-tokens: - - '29999987' + - '179999988' x-ratelimit-reset-requests: - - 6ms + - 2ms x-ratelimit-reset-tokens: - 0s status: diff --git a/py/src/braintrust/integrations/openai/cassettes/latest/btx/web_search.yaml b/py/src/braintrust/integrations/openai/cassettes/latest/btx/web_search.yaml new file mode 100644 index 000000000..2439c9188 --- /dev/null +++ b/py/src/braintrust/integrations/openai/cassettes/latest/btx/web_search.yaml @@ -0,0 +1,107 @@ +interactions: +- request: + body: '{"model":"gpt-6-luna","input":[{"role":"user","content":"Search the web + for a recent AI news headline and answer in one sentence."}],"reasoning":{"effort":"none"},"tool_choice":{"type":"web_search_preview"},"tools":[{"type":"web_search_preview","search_context_size":"low"}]}' + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate, zstd + connection: + - keep-alive + content-length: + - '275' + content-type: + - application/json + host: + - api.openai.com + method: POST + uri: https://api.openai.com/v1/responses + response: + body: + string: "{\n \"id\": \"resp_021193c776923e6f016ae8af3735b887d1a1dd1436853723f1\",\n + \ \"object\": \"response\",\n \"created_at\": 1793634103,\n \"status\": + \"completed\",\n \"access_programs\": null,\n \"background\": false,\n \"billing\": + {\n \"payer\": \"developer\"\n },\n \"completed_at\": 1793634107,\n \"error\": + null,\n \"frequency_penalty\": 0.0,\n \"incomplete_details\": null,\n \"instructions\": + null,\n \"max_output_tokens\": null,\n \"max_tool_calls\": null,\n \"model\": + \"gpt-6-luna\",\n \"moderation\": null,\n \"output\": [\n {\n \"id\": + \"ws_021193c776923e6f016ae8af37dbb487d1b93fbcb20852f42b\",\n \"type\": + \"web_search_call\",\n \"status\": \"completed\",\n \"action\": + {\n \"type\": \"search\",\n \"queries\": [\n \"AI news + latest November 2026 headline\",\n \"recent artificial intelligence + news November 2026\"\n ],\n \"query\": \"AI news latest November + 2026 headline\"\n }\n },\n {\n \"id\": \"msg_021193c776923e6f016ae8af3a8d3087d1a73ce583361e33fa\",\n + \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": + [\n {\n \"type\": \"output_text\",\n \"annotations\": + [\n {\n \"type\": \"url_citation\",\n \"end_index\": + 226,\n \"start_index\": 133,\n \"title\": \"Argentina's + Milei pitches a regulation-free AI haven at the end of the world\",\n \"url\": + \"https://apnews.com/article/a8fab1ac14d1ea9c7992f8797099fb32?utm_source=openai\"\n + \ }\n ],\n \"logprobs\": [],\n \"text\": + \"AP reports that on November 2, 2026, Argentine President Javier Milei pitched + Argentina as a low-regulation haven for AI investment. ([apnews.com](https://apnews.com/article/a8fab1ac14d1ea9c7992f8797099fb32?utm_source=openai))\"\n + \ }\n ],\n \"phase\": \"final_answer\",\n \"role\": \"assistant\"\n + \ }\n ],\n \"parallel_tool_calls\": true,\n \"presence_penalty\": 0.0,\n + \ \"previous_response_id\": null,\n \"prompt_cache_key\": null,\n \"prompt_cache_retention\": + \"24h\",\n \"reasoning\": {\n \"context\": \"all_turns\",\n \"effort\": + \"none\",\n \"mode\": \"standard\",\n \"summary\": null\n },\n \"safety_identifier\": + null,\n \"service_tier\": \"default\",\n \"store\": false,\n \"temperature\": + 1.0,\n \"text\": {\n \"format\": {\n \"type\": \"text\"\n },\n + \ \"verbosity\": \"medium\"\n },\n \"tool_choice\": {\n \"type\": \"web_search_preview\"\n + \ },\n \"tool_usage\": {\n \"image_gen\": {\n \"input_tokens\": 0,\n + \ \"input_tokens_details\": {\n \"image_tokens\": 0,\n \"text_tokens\": + 0\n },\n \"output_tokens\": 0,\n \"output_tokens_details\": + {\n \"image_tokens\": 0,\n \"text_tokens\": 0\n },\n \"total_tokens\": + 0\n },\n \"web_search\": {\n \"num_requests\": 1\n }\n },\n + \ \"tools\": [\n {\n \"type\": \"web_search_preview\",\n \"search_content_types\": + [\n \"text\"\n ],\n \"search_context_size\": \"low\",\n \"user_location\": + {\n \"type\": \"approximate\",\n \"city\": null,\n \"country\": + \"US\",\n \"region\": null,\n \"timezone\": null\n }\n + \ }\n ],\n \"top_logprobs\": 0,\n \"top_p\": 0.98,\n \"truncation\": + \"disabled\",\n \"usage\": {\n \"input_tokens\": 8710,\n \"input_tokens_details\": + {\n \"cache_write_tokens\": 4328,\n \"cached_tokens\": 0\n },\n + \ \"output_tokens\": 90,\n \"output_tokens_details\": {\n \"reasoning_tokens\": + 42\n },\n \"total_tokens\": 8800\n },\n \"user\": null,\n \"metadata\": + {}\n}" + headers: + access-control-expose-headers: + - X-Request-ID, Server-Timing-Total + - CF-Ray + - CF-Ray + connection: + - keep-alive + content-length: + - '3359' + content-type: + - application/json + date: + - Mon, 02 Nov 2026 15:41:47 GMT + openai-processing-ms: + - '3880' + openai-version: + - '2020-10-01' + server: + - cloudflare + 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: + - '180000000' + x-ratelimit-remaining-requests: + - '29999' + x-ratelimit-remaining-tokens: + - '179996241' + x-ratelimit-reset-requests: + - 2ms + x-ratelimit-reset-tokens: + - 1ms + status: + code: 200 + message: OK +version: 1 diff --git a/py/src/braintrust/integrations/openai/test_openai.py b/py/src/braintrust/integrations/openai/test_openai.py index 439e4c028..13733d654 100644 --- a/py/src/braintrust/integrations/openai/test_openai.py +++ b/py/src/braintrust/integrations/openai/test_openai.py @@ -1510,7 +1510,10 @@ def test_openai_responses_not_given_filtering(memory_logger): assert_dict_matches( span, { - "input": TEST_PROMPT, + "input": [ + {"role": "system", "content": "Just the number please"}, + {"role": "user", "content": TEST_PROMPT}, + ], "metadata": { "model": lambda x: TEST_MODEL in x, "provider": "openai", diff --git a/py/src/braintrust/integrations/openai/tracing.py b/py/src/braintrust/integrations/openai/tracing.py index 38c835703..49163520f 100644 --- a/py/src/braintrust/integrations/openai/tracing.py +++ b/py/src/braintrust/integrations/openai/tracing.py @@ -749,6 +749,27 @@ def _postprocess_streaming_results( all_results: list[Any], *, audio_format: str | None = None, + ) -> dict[str, Any]: + indices: set[int] = set() + for result in all_results: + choices = _get_attr_or_item(result, "choices", []) or [] + for choice in choices: + indices.add(_get_attr_or_item(choice, "index", 0)) + + if len(indices) <= 1: + result = cls._postprocess_streaming_choice(all_results, audio_format=audio_format) + if indices: + result["output"][0]["index"] = next(iter(indices)) + return result + result = cls._postprocess_streaming_choice(all_results, audio_format=audio_format, choice_index=min(indices)) + for index in sorted(indices)[1:]: + choice = cls._postprocess_streaming_choice(all_results, audio_format=audio_format, choice_index=index) + result["output"].extend(choice["output"]) + return result + + @classmethod + def _postprocess_streaming_choice( + cls, all_results: list[Any], *, audio_format: str | None = None, choice_index: int | None = None ) -> dict[str, Any]: role = None content = None @@ -768,6 +789,8 @@ def _postprocess_streaming_results( metrics.update(_parse_metrics_from_usage(usage)) choices = _get_attr_or_item(result, "choices", []) or [] + if choice_index is not None: + choices = [choice for choice in choices if _get_attr_or_item(choice, "index", 0) == choice_index] if not choices: continue @@ -866,7 +889,7 @@ def _postprocess_streaming_results( "metadata": metadata, "output": [ { - "index": 0, + "index": choice_index if choice_index is not None else 0, "message": { "role": role, "content": content, @@ -1693,6 +1716,12 @@ async def gen(): def _parse_params(cls, params: dict[str, Any]) -> dict[str, Any]: ret = params.pop("span_info", {}) processed_input = _process_attachments_in_input(params.get("input")) + instructions = params.get("instructions") + if isinstance(instructions, str): + if isinstance(processed_input, str): + processed_input = [{"role": "user", "content": processed_input}] + if isinstance(processed_input, list): + processed_input = [{"role": "system", "content": instructions}, *processed_input] return merge_dicts( ret, {