diff --git a/py/noxfile.py b/py/noxfile.py index dc06bb9d1..cab9caf4b 100644 --- a/py/noxfile.py +++ b/py/noxfile.py @@ -307,6 +307,7 @@ def test_instructor(session, version): OPENAI_VERSIONS = _get_matrix_versions("openai") +OPENAI_ENDPOINT_VERSIONS = (OPENAI_VERSIONS[0], OPENAI_VERSIONS[-1]) @nox.session() @@ -320,7 +321,7 @@ def test_openai(session, version): @nox.session() -@nox.parametrize("version", OPENAI_VERSIONS, ids=OPENAI_VERSIONS) +@nox.parametrize("version", OPENAI_ENDPOINT_VERSIONS, ids=OPENAI_ENDPOINT_VERSIONS) def test_openai_http2_streaming(session, version): _install_test_deps(session) _install_matrix_dep(session, "openai", version) @@ -331,7 +332,7 @@ def test_openai_http2_streaming(session, version): @nox.session() -@nox.parametrize("version", OPENAI_VERSIONS, ids=OPENAI_VERSIONS) +@nox.parametrize("version", OPENAI_ENDPOINT_VERSIONS, ids=OPENAI_ENDPOINT_VERSIONS) def test_btx_openai(session, version): """Run the BTX cross-language LLM-span spec tests (OpenAI provider).""" _install_test_deps(session) @@ -557,12 +558,11 @@ def test_pydantic_ai_wrap_openai(session, version): @nox.session() @nox.parametrize("version", AUTOEVALS_VERSIONS, ids=AUTOEVALS_VERSIONS) def test_autoevals(session, version): - # Run all of our core tests with autoevals installed. Some tests - # specifically validate scores from autoevals work properly, so - # we need some tests with it installed. + # Only this test exercises the changed scorer behavior. Running the full + # core suite here duplicates test_core without extending package coverage. _install_test_deps(session) _install_matrix_dep(session, "autoevals", version) - _run_core_tests(session) + _run_tests(session, f"{SRC_DIR}/test_framework.py::test_run_evaluator_with_many_scorers") # google-genai 1.29.0 has a broken async streaming path unless aiohttp is installed. @@ -805,12 +805,11 @@ def test_api_codegen(session): @nox.session() def test_braintrust_core(session): - # Some tests do specific things if braintrust_core is installed, so run our - # common tests with it installed. Testing the latest (aka the last ever version) - # is enough. + # This is the core test whose scorer behavior changes with braintrust_core. + # The rest of the core suite already runs in test_core. _install_test_deps(session) _install_matrix_dep(session, "braintrust-core", LATEST) - _run_core_tests(session) + _run_tests(session, f"{SRC_DIR}/test_framework.py::test_run_evaluator_with_many_scorers") @nox.session() diff --git a/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/attachments.yaml b/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/attachments.yaml deleted file mode 100644 index 591d4bbe2..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/attachments.yaml +++ /dev/null @@ -1,83 +0,0 @@ -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}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '888' - content-type: - - application/json - host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-ECrtC6p5r231hX1SognW6WQdvpMrJ\",\n \"object\": - \"chat.completion\",\n \"created\": 1786735794,\n \"model\": \"gpt-4o-2024-08-06\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"The first attachment is a solid red - square image. The second attachment, \\\"blank.pdf,\\\" contains no readable - content 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\": - 25,\n \"total_tokens\": 520,\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" - headers: - access-control-expose-headers: - - X-Request-ID - - CF-Ray - - CF-Ray - connection: - - keep-alive - content-length: - - '931' - content-type: - - application/json - date: - - Fri, 14 Aug 2026 19:29:55 GMT - openai-processing-ms: - - '780' - 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-input-images: - - '250000' - x-ratelimit-limit-requests: - - '10000' - x-ratelimit-limit-tokens: - - '30000000' - x-ratelimit-remaining-input-images: - - '249999' - x-ratelimit-remaining-requests: - - '9999' - x-ratelimit-remaining-tokens: - - '29998451' - x-ratelimit-reset-input-images: - - 0s - x-ratelimit-reset-requests: - - 6ms - x-ratelimit-reset-tokens: - - 3ms - status: - code: 200 - message: OK -version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/completions.yaml b/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/completions.yaml deleted file mode 100644 index f78f2dddc..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/completions.yaml +++ /dev/null @@ -1,144 +0,0 @@ -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}' - 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-DYJDB8J55hZsMnEugAR51ComruBFJ\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069373,\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:22:53 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 - content-length: - - '837' - openai-processing-ms: - - '386' - 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: - - '149999982' - 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-DYJJ7hpCG6zcloH0dZRgF2UQ8Zx3O\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069741,\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:29:02 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 - content-length: - - '837' - openai-processing-ms: - - '428' - 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: - - '149999982' - 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.77.0/btx/reasoning.yaml b/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/reasoning.yaml deleted file mode 100644 index 5565d9e8b..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/reasoning.yaml +++ /dev/null @@ -1,455 +0,0 @@ -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"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '219' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/responses - response: - body: - string: "{\n \"id\": \"resp_0aeafcf19e06f5560069ebed3d8bbc8193a67124cc7e06b1b4\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069373,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069381,\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_0aeafcf19e06f5560069ebed3e799c8193b9582173f1c80da0\",\n - \ \"type\": \"reasoning\",\n \"summary\": [\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Analyzing the sequence pattern**\\n\\nThe - user presented the sequence: 2, 6, 12, 20, 30, prompting me to find a pattern - and formula for the nth term. By examining the differences, I noted they're - increasing by 2 each time, leading me to suspect the formula might be n(n+1). - Testing it confirms this since a_n equals n(n+1) fits perfectly. This sequence - represents pronic numbers, which are products of two consecutive integers. - So, the formula can be expressed as n^2 + n.\"\n },\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Finalizing the sequence explanation**\\n\\nI've - concluded that the nth term for the sequence is related to pronic numbers, - represented as a_n = n(n+1). The pattern also highlights that the differences - between terms increase by 2 each time. So, I\\u2019ll present it in both ways: - the formula and the observation about the differences. That should cover everything - clearly and concisely. It feels good to wrap this up!\"\n }\n ]\n - \ },\n {\n \"id\": \"msg_0aeafcf19e06f5560069ebed4533648193b1d6739e4dc07bae\",\n - \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": - [\n {\n \"type\": \"output_text\",\n \"annotations\": - [],\n \"logprobs\": [],\n \"text\": \"The \\u201cadd even - numbers\\u201d pattern\\n\\n1. Differences between terms are \\n 6\\u20132=4, - 12\\u20136=6, 20\\u201312=8, 30\\u201320=10, \\u2026 \\n i.e. you keep - adding 4, then 6, then 8, then 10, \\u2026\\n\\n2. Equivalently each term - is a product of two consecutive integers (a \\u201cpronic\\u201d number): - \ \\n a\\u2081=1\\u22c52=2, a\\u2082=2\\u22c53=6, a\\u2083=3\\u22c54=12, - \\u2026\\n\\nSo the nth term is \\n a\\u2099 = n\\u00b7(n + 1) \\nor expanded - \ \\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\": \"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\": 536,\n \"output_tokens_details\": {\n \"reasoning_tokens\": - 320\n },\n \"total_tokens\": 577\n },\n \"user\": null,\n \"metadata\": - {}\n}" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:23:01 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - content-length: - - '3221' - openai-processing-ms: - - '8252' - 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_0aeafcf19e06f5560069ebed3e799c8193b9582173f1c80da0\",\"summary\":[{\"text\":\"**Analyzing - the sequence pattern**\\n\\nThe user presented the sequence: 2, 6, 12, 20, 30, - prompting me to find a pattern and formula for the nth term. By examining the - differences, I noted they're increasing by 2 each time, leading me to suspect - the formula might be n(n+1). Testing it confirms this since a_n equals n(n+1) - fits perfectly. This sequence represents pronic numbers, which are products - of two consecutive integers. So, the formula can be expressed as n^2 + n.\",\"type\":\"summary_text\"},{\"text\":\"**Finalizing - the sequence explanation**\\n\\nI've concluded that the nth term for the sequence - is related to pronic numbers, represented as a_n = n(n+1). The pattern also - highlights that the differences between terms increase by 2 each time. So, I\u2019ll - present it in both ways: the formula and the observation about the differences. - That should cover everything clearly and concisely. It feels good to wrap this - up!\",\"type\":\"summary_text\"}],\"type\":\"reasoning\"},{\"id\":\"msg_0aeafcf19e06f5560069ebed4533648193b1d6739e4dc07bae\",\"content\":[{\"annotations\":[],\"text\":\"The - \u201Cadd even numbers\u201D pattern\\n\\n1. Differences between terms are - \ \\n 6\u20132=4, 12\u20136=6, 20\u201312=8, 30\u201320=10, \u2026 \\n i.e. - you keep adding 4, then 6, then 8, then 10, \u2026\\n\\n2. Equivalently each - term is a product of two consecutive integers (a \u201Cpronic\u201D number): - \ \\n a\u2081=1\u22C52=2, a\u2082=2\u22C53=6, a\u2083=3\u22C54=12, \u2026\\n\\nSo - the nth term is \\n a\u2099 = n\xB7(n + 1) \\nor expanded \\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: - - '2018' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/responses - response: - body: - string: "{\n \"id\": \"resp_0aeafcf19e06f5560069ebed4632e481938a3955781dd49a1e\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069382,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069389,\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_0aeafcf19e06f5560069ebed46b4b48193a3daafd94603a3df\",\n - \ \"type\": \"reasoning\",\n \"summary\": [\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Evaluating pronic numbers**\\n\\nThe - user has found that the sequence involves pronic numbers defined by the formula - \\\\( a_n = n(n+1) \\\\). For the 10th term, I calculate \\\\( a_{10} = 10 - \\\\times 11 = 110 \\\\). The sum of the first 10 terms is computed by adding - the sums of \\\\( n \\\\) and \\\\( n^2 \\\\). This gives \\\\( S = 440 \\\\). - So, I see that the 10th term is 110, and the sum of the first 10 terms is - 440.\"\n },\n {\n \"type\": \"summary_text\",\n \"text\": - \"**Calculating pronic numbers**\\n\\nI've determined the 10th pronic number, - \\\\( a_{10} \\\\), by calculating \\\\( 10 \\\\times 11 = 110 \\\\). Now - for the sum of the first 10 terms, I find that \\\\( S_{10} = \\\\text{sum - } n(n+1) \\\\) can be expressed as the sum of squares plus the sum of integers. - This gives me \\\\( 385 + 55 = 440 \\\\). Alternatively, using the formula - for the sum, I also confirm \\\\( S_{10} = \\\\frac{10 \\\\times 11 \\\\times - 12}{3} = 440 \\\\). So, final results are 10th term = 110, sum = 440.\"\n - \ }\n ]\n },\n {\n \"id\": \"msg_0aeafcf19e06f5560069ebed4d3eb0819381933504ee6f9ece\",\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_{n=1}^{10} n(n+1) \\n - \ = \\u2211 n\\u00b2 + \\u2211 n \\n = (10\\u00b711\\u00b721)/6 - \ + (10\\u00b711)/2 \\n = 385 + 55 \\n = 440 \\n\\n(You can - also use the closed form S\\u2099 = n(n+1)(n+2)/3, which for n=10 gives 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\": 242,\n \"input_tokens_details\": - {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 496,\n \"output_tokens_details\": - {\n \"reasoning_tokens\": 320\n },\n \"total_tokens\": 738\n },\n - \ \"user\": null,\n \"metadata\": {}\n}" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:23:10 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - content-length: - - '3153' - openai-processing-ms: - - '7972' - openai-version: - - '2020-10-01' - x-ratelimit-limit-requests: - - '30000' - x-ratelimit-limit-tokens: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999550' - 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"}],"model":"o4-mini","reasoning":{"effort":"high","summary":"detailed"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '219' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/responses - response: - body: - string: "{\n \"id\": \"resp_07be4096a3e2a5ab0069ebeeaea3b88190b5c6c2677a465392\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069742,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069753,\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_07be4096a3e2a5ab0069ebeeaf2970819098900f21f121f92f\",\n - \ \"type\": \"reasoning\",\n \"summary\": [\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Analyzing the sequence**\\n\\nThe - user presents the sequence: 2, 6, 12, 20, 30 and asks for the pattern. I realize - the values are generated by multiplying consecutive integers: 1*2, 2*3, 3*4, - and so on. The formula for the nth term is n(n+1), indicating they're pronic - numbers, or oblong numbers. These can also be expressed as twice the nth triangular - number, leading to 2T_n. Additionally, the differences between terms increase - by 2, hinting at a quadratic nature.\"\n },\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Defining the pattern**\\n\\nTo - clarify, the general formula I've landed on is a_n = n(n+1), which describes - pronic numbers. The sequence starts at n=1, and as n increases, the differences - grow by 2: 4, 6, 8, 10, indicating a quadratic relationship. If I consider - indexing from n=0, I'd use a_n = (n)(n+1), but it feels clearer to start with - n=1. So ultimately, I\\u2019ll express the nth term as a_n = n(n+1). Thus, - the sequence captures products of consecutive integers.\"\n },\n {\n - \ \"type\": \"summary_text\",\n \"text\": \"**Summarizing - the pattern**\\n\\nThe pattern I've identified shows that each term is the - product of its index and the next index. Thus, the formula for the nth term - is a_n = n(n+1), which can also be expressed as n^2 + n. This represents pronic - numbers, where the differences between terms increase by 2, confirming its - quadratic nature: for instance, 6-2 equals 4, then 12-6 equals 6, and so on. - So overall, the nth term is n(n+1), and the sequence consists of products - of consecutive integers.\"\n }\n ]\n },\n {\n \"id\": - \"msg_07be4096a3e2a5ab0069ebeeb8f0c08190b19c397fe99bbec9\",\n \"type\": - \"message\",\n \"status\": \"completed\",\n \"content\": [\n {\n - \ \"type\": \"output_text\",\n \"annotations\": [],\n \"logprobs\": - [],\n \"text\": \"The \\u201cmystery\\u201d sequence is \\n 2, 6, - 12, 20, 30, \\u2026 \\nNotice \\n 2=1\\u00b72, \\n 6=2\\u00b73, \\n 12=3\\u00b74, - \ \\n 20=4\\u00b75, \\n 30=5\\u00b76, \\u2026 \\n\\nSo the nth term is the - product of two consecutive integers. If we start counting terms at n=1, then\\n\\n\\u2003a\\u2099 - = n\\u00b7(n + 1) = n\\u00b2 + n.\\n\\nYou can check:\\n\\nn=1 \\u21d2 1\\u00b72=2 - \ \\nn=2 \\u21d2 2\\u00b73=6 \\nn=3 \\u21d2 3\\u00b74=12 \\n\\u2026 and - so on.\"\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\": 41,\n \"input_tokens_details\": - {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 1292,\n \"output_tokens_details\": - {\n \"reasoning_tokens\": 1088\n },\n \"total_tokens\": 1333\n - \ },\n \"user\": null,\n \"metadata\": {}\n}" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:29:13 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - content-length: - - '3795' - openai-processing-ms: - - '10910' - 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_07be4096a3e2a5ab0069ebeeaf2970819098900f21f121f92f\",\"summary\":[{\"text\":\"**Analyzing - the sequence**\\n\\nThe user presents the sequence: 2, 6, 12, 20, 30 and asks - for the pattern. I realize the values are generated by multiplying consecutive - integers: 1*2, 2*3, 3*4, and so on. The formula for the nth term is n(n+1), - indicating they're pronic numbers, or oblong numbers. These can also be expressed - as twice the nth triangular number, leading to 2T_n. Additionally, the differences - between terms increase by 2, hinting at a quadratic nature.\",\"type\":\"summary_text\"},{\"text\":\"**Defining - the pattern**\\n\\nTo clarify, the general formula I've landed on is a_n = n(n+1), - which describes pronic numbers. The sequence starts at n=1, and as n increases, - the differences grow by 2: 4, 6, 8, 10, indicating a quadratic relationship. - If I consider indexing from n=0, I'd use a_n = (n)(n+1), but it feels clearer - to start with n=1. So ultimately, I\u2019ll express the nth term as a_n = n(n+1). - Thus, the sequence captures products of consecutive integers.\",\"type\":\"summary_text\"},{\"text\":\"**Summarizing - the pattern**\\n\\nThe pattern I've identified shows that each term is the product - of its index and the next index. Thus, the formula for the nth term is a_n = - n(n+1), which can also be expressed as n^2 + n. This represents pronic numbers, - where the differences between terms increase by 2, confirming its quadratic - nature: for instance, 6-2 equals 4, then 12-6 equals 6, and so on. So overall, - the nth term is n(n+1), and the sequence consists of products of consecutive - integers.\",\"type\":\"summary_text\"}],\"type\":\"reasoning\"},{\"id\":\"msg_07be4096a3e2a5ab0069ebeeb8f0c08190b19c397fe99bbec9\",\"content\":[{\"annotations\":[],\"text\":\"The - \u201Cmystery\u201D sequence is \\n 2, 6, 12, 20, 30, \u2026 \\nNotice \\n - 2=1\xB72, \\n 6=2\xB73, \\n 12=3\xB74, \\n 20=4\xB75, \\n 30=5\xB76, \u2026 - \ \\n\\nSo the nth term is the product of two consecutive integers. If we start - counting terms at n=1, then\\n\\n\u2003a\u2099 = n\xB7(n + 1) = n\xB2 + n.\\n\\nYou - can check:\\n\\nn=1 \u21D2 1\xB72=2 \\nn=2 \u21D2 2\xB73=6 \\nn=3 \u21D2 3\xB74=12 - \ \\n\u2026 and so on.\",\"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: - - '2542' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/responses - response: - body: - string: "{\n \"id\": \"resp_07be4096a3e2a5ab0069ebeeb9c3f08190bec5d5da7fe56f2a\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069753,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069759,\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_07be4096a3e2a5ab0069ebeeba3b048190a004fd413d9ae87c\",\n - \ \"type\": \"reasoning\",\n \"summary\": [\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Finding the nth term and sum**\\n\\nThe - user wants to find the 10th term of the sequence defined by \\\\( a_n = n(n+1) - = n^2 + n \\\\) and the sum of the first 10 terms. The 10th term is straightforward: - \\\\( 10 \\\\times 11 = 110 \\\\). \\n\\nFor the sum, I calculate \\\\( \\\\sum_{n=1}^{10} - n(n+1) \\\\), breaking it down into the sum of squares and the arithmetic - series. After some calculations, I find the sum is 440. So, the answers are: - the 10th term is 110, and the total sum is 440.\"\n }\n ]\n },\n - \ {\n \"id\": \"msg_07be4096a3e2a5ab0069ebeebe8c3881909ba966122bc8be18\",\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\\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]\\u22156 + [10\\u00b711]\\u22152 \\n - \ = 385 + 55 \\n = 440. \\n\\nEquivalently, one can use the closed\\u2010form - \ \\nS\\u2081\\u2080 = 10\\u00b711\\u00b712\\u22153 = 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\": 234,\n \"input_tokens_details\": - {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 493,\n \"output_tokens_details\": - {\n \"reasoning_tokens\": 256\n },\n \"total_tokens\": 727\n },\n - \ \"user\": null,\n \"metadata\": {}\n}" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:29:19 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - content-length: - - '2721' - openai-processing-ms: - - '5588' - openai-version: - - '2020-10-01' - x-ratelimit-limit-requests: - - '30000' - x-ratelimit-limit-tokens: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999560' - 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.77.0/btx/reasoning_completions.yaml b/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/reasoning_completions.yaml deleted file mode 100644 index 7332e2a20..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/reasoning_completions.yaml +++ /dev/null @@ -1,80 +0,0 @@ -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"}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '199' - content-type: - - application/json - host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-ECrtDoEsWx1AcgF0pI6EYTSr6m3U3\",\n \"object\": - \"chat.completion\",\n \"created\": 1786735795,\n \"model\": \"o4-mini-2025-04-16\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"The terms 2, 6, 12, 20, 30,\u2026 are - the so-called \u201Cpronic\u201D or \u201Coblong\u201D numbers, i.e. \\n1\xB72, - 2\xB73, 3\xB74, 4\xB75, 5\xB76, \u2026 \\n\\nEquivalently the differences - go 4, 6, 8, 10,\u2026 = 2\xB72, 2\xB73, 2\xB74, 2\xB75,\u2026 so one shows - by induction that\\n\\n\u2003a\u2081 = 2, \\n\u2003a\u2099 = a\u2099\u208B\u2081 - + 2n \\n\\nand hence in closed\u2010form \\n\\n\u2003a\u2099 = n(n + 1).\",\n - \ \"refusal\": null,\n \"annotations\": []\n },\n \"finish_reason\": - \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\": 41,\n \"completion_tokens\": - 876,\n \"total_tokens\": 917,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 704,\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 - - CF-Ray - - CF-Ray - connection: - - keep-alive - content-length: - - '1115' - content-type: - - application/json - date: - - Fri, 14 Aug 2026 19:30:03 GMT - openai-processing-ms: - - '7870' - 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: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999970' - 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.77.0/btx/streaming.yaml b/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/streaming.yaml deleted file mode 100644 index f79f45b5c..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/streaming.yaml +++ /dev/null @@ -1,198 +0,0 @@ -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}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '241' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: 'data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"wvG1Rbij1"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"jr0VhpF"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"2lmUcNrjsv"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"UL5iQe"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"rovKnPoG"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"r5oZnz2t"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"EmR5kC"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"RlMRsY2hJy"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"95RD2grK"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"tVfYBq1"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"Lu5ntee5bJ"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"jhmzgWKu"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"9xQUBau"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"OFt8JbVyPi"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"gFn42Oxd"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"uIBKEpb"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"MVhQWVf0Vv"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"YJLhHaGB"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"1HbrBbz"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"dQvUeAARUX"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"USBf9WuB"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"w8hUhbU"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"geVcIjM2Zt"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"LPJjqxjP"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"137ZE5C"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"ZzoSYjYez4"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"jnhOh5Tq"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"cohGxKD"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"ZJT7ig2nQq"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"3kMmdBBc"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"U0lhUSC"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"QMHGFNnP0x"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"vleBeXCO"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"WZ90nyj"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"VjwXIh7lt"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"YlAgiAKJ"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"HpC3o"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"4wpmT3u"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"qc2m8s"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"4GGmGu"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"mTWmN1XuWN"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"HEEaj"} - - - data: {"id":"chatcmpl-DYJJPz2UngFguw8TGua6HviapLDAN","object":"chat.completion.chunk","created":1777069759,"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":"hK3jBg58c7"} - - - data: [DONE] - - - ' - headers: - Connection: - - keep-alive - Content-Type: - - text/event-stream; charset=utf-8 - Date: - - Fri, 24 Apr 2026 22:29:19 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 - openai-processing-ms: - - '246' - 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: - - '149999982' - 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.77.0/btx/tools.yaml b/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/tools.yaml deleted file mode 100644 index f0e8bb837..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.77.0/btx/tools.yaml +++ /dev/null @@ -1,158 +0,0 @@ -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 - 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-DYJDSw4PFUYPborsY0CMkOrqXCBav\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069390,\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_M3GczbwANYwRFzTo5sjnHqhF\",\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:23:10 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 - content-length: - - '1092' - openai-processing-ms: - - '461' - 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-DYJJQLlMkjGt6C2DQZW3eIXlsisnP\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069760,\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_dP2RPhZ9Cq7n66oHHw5qjVdq\",\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:29:21 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 - content-length: - - '1092' - openai-processing-ms: - - '486' - 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: - - '29999986' - x-ratelimit-reset-requests: - - 6ms - x-ratelimit-reset-tokens: - - 0s - status: - code: 200 - message: OK -version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/1.77.0/test_openai_chat_streaming_async_http2_context_manager_preserves_wrapper.yaml b/py/src/braintrust/integrations/openai/cassettes/1.77.0/test_openai_chat_streaming_async_http2_context_manager_preserves_wrapper.yaml deleted file mode 100644 index e25ddf9ef..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.77.0/test_openai_chat_streaming_async_http2_context_manager_preserves_wrapper.yaml +++ /dev/null @@ -1,132 +0,0 @@ -interactions: -- request: - body: '{"messages":[{"role":"user","content":"What''s 12 + 12?"}],"model":"gpt-4o-mini","stream":true,"stream_options":{"include_usage":true}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '134' - Content-Type: - - application/json - Host: - - api.openai.com - User-Agent: - - AsyncOpenAI/Python 1.77.0 - X-Stainless-Arch: - - arm64 - X-Stainless-Async: - - async:asyncio - X-Stainless-Lang: - - python - X-Stainless-OS: - - MacOS - X-Stainless-Package-Version: - - 1.77.0 - X-Stainless-Runtime: - - CPython - X-Stainless-Runtime-Version: - - 3.13.3 - x-stainless-read-timeout: - - '600' - x-stainless-retry-count: - - '0' - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: 'data: {"id":"chatcmpl-DV3S01XV7HKVOlkZOitA2x6TnO5I1","object":"chat.completion.chunk","created":1776293804,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Ybyk4pfH8"} - - - data: {"id":"chatcmpl-DV3S01XV7HKVOlkZOitA2x6TnO5I1","object":"chat.completion.chunk","created":1776293804,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"12"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jaRjHYtqF"} - - - data: {"id":"chatcmpl-DV3S01XV7HKVOlkZOitA2x6TnO5I1","object":"chat.completion.chunk","created":1776293804,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - +"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zhhWxSaFn"} - - - data: {"id":"chatcmpl-DV3S01XV7HKVOlkZOitA2x6TnO5I1","object":"chat.completion.chunk","created":1776293804,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3MUnd1gwAw"} - - - data: {"id":"chatcmpl-DV3S01XV7HKVOlkZOitA2x6TnO5I1","object":"chat.completion.chunk","created":1776293804,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"12"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"vaSECJRUa"} - - - data: {"id":"chatcmpl-DV3S01XV7HKVOlkZOitA2x6TnO5I1","object":"chat.completion.chunk","created":1776293804,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - equals"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"HSuN"} - - - data: {"id":"chatcmpl-DV3S01XV7HKVOlkZOitA2x6TnO5I1","object":"chat.completion.chunk","created":1776293804,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"LmOe17z45r"} - - - data: {"id":"chatcmpl-DV3S01XV7HKVOlkZOitA2x6TnO5I1","object":"chat.completion.chunk","created":1776293804,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"24"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"VpeyaQJVm"} - - - data: {"id":"chatcmpl-DV3S01XV7HKVOlkZOitA2x6TnO5I1","object":"chat.completion.chunk","created":1776293804,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"dD023vP2Kk"} - - - data: {"id":"chatcmpl-DV3S01XV7HKVOlkZOitA2x6TnO5I1","object":"chat.completion.chunk","created":1776293804,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"Z8Pih"} - - - data: {"id":"chatcmpl-DV3S01XV7HKVOlkZOitA2x6TnO5I1","object":"chat.completion.chunk","created":1776293804,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[],"usage":{"prompt_tokens":14,"completion_tokens":8,"total_tokens":22,"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":"Ar21JedPrpN"} - - - data: [DONE] - - - ' - headers: - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - cf-ray: - - 9ece8b93ac23fcd9-YYZ - content-type: - - text/event-stream; charset=utf-8 - date: - - Wed, 15 Apr 2026 22:56:44 GMT - openai-organization: - - braintrust-data - openai-processing-ms: - - '145' - openai-project: - - proj_vsCSXafhhByzWOThMrJcZiw9 - openai-version: - - '2020-10-01' - server: - - cloudflare - set-cookie: - - __cf_bm=zYzU8Qzl9UaSmaYcJ1JdUvXQgw3f1BKtFGaVv3dev1A-1776293804.1059859-1.0.1.1-INBuAalCAQ.4dECZAZBY5taD.WAYOyGi3b8.9x6CoUyyGXQ4_B_eKxNRYQjPdfhWqfT9pobPDxMSiS4mbO9soFFAhsNkIrSKiNDdq_9AD5rxCI2uq65fwstkPJ8gJiW6; - HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Wed, 15 Apr 2026 - 23:26:44 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-content-type-options: - - nosniff - 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: - - '149999995' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_baa029e4295b476c8e0197f1759c25d1 - status: - code: 200 - message: OK -version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/1.77.0/test_openai_chat_streaming_sync_http2_context_manager_preserves_wrapper.yaml b/py/src/braintrust/integrations/openai/cassettes/1.77.0/test_openai_chat_streaming_sync_http2_context_manager_preserves_wrapper.yaml deleted file mode 100644 index b76568154..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.77.0/test_openai_chat_streaming_sync_http2_context_manager_preserves_wrapper.yaml +++ /dev/null @@ -1,132 +0,0 @@ -interactions: -- request: - body: '{"messages":[{"role":"user","content":"What''s 12 + 12?"}],"model":"gpt-4o-mini","stream":true,"stream_options":{"include_usage":true}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '134' - Content-Type: - - application/json - Host: - - api.openai.com - User-Agent: - - OpenAI/Python 1.77.0 - X-Stainless-Arch: - - arm64 - X-Stainless-Async: - - 'false' - X-Stainless-Lang: - - python - X-Stainless-OS: - - MacOS - X-Stainless-Package-Version: - - 1.77.0 - X-Stainless-Runtime: - - CPython - X-Stainless-Runtime-Version: - - 3.13.3 - x-stainless-read-timeout: - - '600' - x-stainless-retry-count: - - '0' - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: 'data: {"id":"chatcmpl-DV3RzFbqIBxOgcAmzE9LWKmde4nKx","object":"chat.completion.chunk","created":1776293803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5gadSMihj"} - - - data: {"id":"chatcmpl-DV3RzFbqIBxOgcAmzE9LWKmde4nKx","object":"chat.completion.chunk","created":1776293803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"12"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"8a4hPwIfD"} - - - data: {"id":"chatcmpl-DV3RzFbqIBxOgcAmzE9LWKmde4nKx","object":"chat.completion.chunk","created":1776293803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - +"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"7cPJUScur"} - - - data: {"id":"chatcmpl-DV3RzFbqIBxOgcAmzE9LWKmde4nKx","object":"chat.completion.chunk","created":1776293803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"4PvxnnnL4m"} - - - data: {"id":"chatcmpl-DV3RzFbqIBxOgcAmzE9LWKmde4nKx","object":"chat.completion.chunk","created":1776293803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"12"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mcqwvrqU7"} - - - data: {"id":"chatcmpl-DV3RzFbqIBxOgcAmzE9LWKmde4nKx","object":"chat.completion.chunk","created":1776293803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - equals"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"3SYv"} - - - data: {"id":"chatcmpl-DV3RzFbqIBxOgcAmzE9LWKmde4nKx","object":"chat.completion.chunk","created":1776293803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PVNRcKna6i"} - - - data: {"id":"chatcmpl-DV3RzFbqIBxOgcAmzE9LWKmde4nKx","object":"chat.completion.chunk","created":1776293803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"24"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cmEHvHbEG"} - - - data: {"id":"chatcmpl-DV3RzFbqIBxOgcAmzE9LWKmde4nKx","object":"chat.completion.chunk","created":1776293803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"0kvXXvp64Z"} - - - data: {"id":"chatcmpl-DV3RzFbqIBxOgcAmzE9LWKmde4nKx","object":"chat.completion.chunk","created":1776293803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"mR5br"} - - - data: {"id":"chatcmpl-DV3RzFbqIBxOgcAmzE9LWKmde4nKx","object":"chat.completion.chunk","created":1776293803,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[],"usage":{"prompt_tokens":14,"completion_tokens":8,"total_tokens":22,"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":"4jvF5TuIszw"} - - - data: [DONE] - - - ' - headers: - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - cf-ray: - - 9ece8b904cf219cf-YYZ - content-type: - - text/event-stream; charset=utf-8 - date: - - Wed, 15 Apr 2026 22:56:43 GMT - openai-organization: - - braintrust-data - openai-processing-ms: - - '297' - openai-project: - - proj_vsCSXafhhByzWOThMrJcZiw9 - openai-version: - - '2020-10-01' - server: - - cloudflare - set-cookie: - - __cf_bm=2yEq_zJ4gHssMhITfO4Oph3_KSotCa6q1qi7m9juW5Q-1776293803.5636942-1.0.1.1-IeKSGJQa5OnQzkEyY21wkFWbOC7A1WbvUL3C2qsJ7ki6HVpiiTdcst9mGYxUbCG1ZJI3_IpPZ5H8ySHFc8qH4szaowvAqQGqBfARGPqNHVg.KKiY0Aquit0o9OjjXwNV; - HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Wed, 15 Apr 2026 - 23:26:43 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-content-type-options: - - nosniff - 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: - - '149999992' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_df4bcc1e09ee4638a747235238ebfb73 - status: - code: 200 - message: OK -version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/attachments.yaml b/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/attachments.yaml deleted file mode 100644 index 0dea4fc1b..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/attachments.yaml +++ /dev/null @@ -1,83 +0,0 @@ -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}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '888' - content-type: - - application/json - host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-ECrt0LcL1SVu9I4v9TCBBXnVVMoX6\",\n \"object\": - \"chat.completion\",\n \"created\": 1786735782,\n \"model\": \"gpt-4o-2024-08-06\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"The first attachment is a solid red - square image. The second attachment, \\\"blank.pdf,\\\" contains no readable - content 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\": - 25,\n \"total_tokens\": 520,\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" - headers: - access-control-expose-headers: - - X-Request-ID - - CF-Ray - - CF-Ray - connection: - - keep-alive - content-length: - - '931' - content-type: - - application/json - date: - - Fri, 14 Aug 2026 19:29:43 GMT - openai-processing-ms: - - '785' - 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-input-images: - - '250000' - x-ratelimit-limit-requests: - - '10000' - x-ratelimit-limit-tokens: - - '30000000' - x-ratelimit-remaining-input-images: - - '249999' - x-ratelimit-remaining-requests: - - '9999' - x-ratelimit-remaining-tokens: - - '29998450' - x-ratelimit-reset-input-images: - - 0s - x-ratelimit-reset-requests: - - 6ms - x-ratelimit-reset-tokens: - - 3ms - status: - code: 200 - message: OK -version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/completions.yaml b/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/completions.yaml deleted file mode 100644 index 0065dc1a7..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/completions.yaml +++ /dev/null @@ -1,144 +0,0 @@ -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}' - 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-DYJDWj8sT15GVWarUZKjT1j7kTIzq\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069394,\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:23:14 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 - content-length: - - '837' - openai-processing-ms: - - '434' - 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: - - '149999982' - 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-DYJJU9nPRFsslXSGWG10qHx0rWy0Z\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069764,\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:29:24 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 - content-length: - - '837' - openai-processing-ms: - - '373' - 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: - - '149999982' - 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.92.0/btx/reasoning.yaml b/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/reasoning.yaml deleted file mode 100644 index cb88637cf..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/reasoning.yaml +++ /dev/null @@ -1,459 +0,0 @@ -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"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '219' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/responses - response: - body: - string: "{\n \"id\": \"resp_0ec7311e7547baf10069ebed52c0c8819780f28f73f074e6d7\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069394,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069409,\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_0ec7311e7547baf10069ebed538d5881978e67f50149ef553a\",\n - \ \"type\": \"reasoning\",\n \"summary\": [\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Identifying sequence patterns**\\n\\nThe - user presented the sequence: 2, 6, 12, 20, 30, and I'm exploring its pattern. - It seems to relate to triangular numbers multiplied by 2. Triangular numbers - can be calculated with T_n = n(n+1)/2, and doubling that formula leads to - n(n+1). I also see another way to express it as a_n = n\\u00b2 + n. The differences - between terms increase by 2, confirming this is a quadratic sequence, indicating - it represents pronic numbers. So, the nth term is n(n+1).\"\n },\n - \ {\n \"type\": \"summary_text\",\n \"text\": \"**Exploring - numeric patterns**\\n\\nI'm finding that the sequence can also be viewed as - the sum of the first n even numbers. For example, 2 + 4 + 6 + 8 + 10 equals - 30, and this sum can be expressed as S_n = n(n+1). It matches with earlier - findings that each term can be defined as n(n+1). This confirms the pattern - represents pronic numbers or triangular numbers multiplied by 2. The differences - between terms keep increasing by 2, leading to the nth term formula: a_n = - n(n+1) for n starting at 1.\"\n },\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Clarifying the nth term**\\n\\nThe - formula for the nth term of the sequence is a_n = n\\u00b2 + n. Since that - corresponds to triangular numbers, I can also express it as a_n = 2T_n, where - T_n = n(n+1)/2. The pattern emerges as pronic numbers, where each term is - the product of n and its next integer. The differences between the terms increase - sequentially by 2, confirming that the nth term is quadratic: a_n = n(n+1) - starting from n=1.\"\n }\n ]\n },\n {\n \"id\": \"msg_0ec7311e7547baf10069ebed6080288197aebe0635f6dbcdfb\",\n - \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": - [\n {\n \"type\": \"output_text\",\n \"annotations\": - [],\n \"logprobs\": [],\n \"text\": \"The \\u201cgaps\\u201d - between consecutive terms are \\n 6\\u20132=4, 12\\u20136=6, 20\\u201312=8, - 30\\u201320=10 \\u2026 \\nso you\\u2019re adding 4, then 6, then 8, then - 10, \\u2026 i.e. successive even numbers. \\nEquivalently each term is a - product of two consecutive integers:\\n\\n term 1: 1\\u00b72=2 \\n term 2: - 2\\u00b73=6 \\n term 3: 3\\u00b74=12 \\n term 4: 4\\u00b75=20 \\n term - 5: 5\\u00b76=30 \\n\\nHence if you label the first term by n=1, the nth term - is\\n\\n a\\u2099 = n\\u00b7(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 - \ \"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\": 41,\n \"input_tokens_details\": {\n - \ \"cached_tokens\": 0\n },\n \"output_tokens\": 1488,\n \"output_tokens_details\": - {\n \"reasoning_tokens\": 1280\n },\n \"total_tokens\": 1529\n - \ },\n \"user\": null,\n \"metadata\": {}\n}" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:23:29 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - content-length: - - '3849' - openai-processing-ms: - - '14786' - 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_0ec7311e7547baf10069ebed538d5881978e67f50149ef553a\",\"summary\":[{\"text\":\"**Identifying - sequence patterns**\\n\\nThe user presented the sequence: 2, 6, 12, 20, 30, - and I'm exploring its pattern. It seems to relate to triangular numbers multiplied - by 2. Triangular numbers can be calculated with T_n = n(n+1)/2, and doubling - that formula leads to n(n+1). I also see another way to express it as a_n = - n\xB2 + n. The differences between terms increase by 2, confirming this is a - quadratic sequence, indicating it represents pronic numbers. So, the nth term - is n(n+1).\",\"type\":\"summary_text\"},{\"text\":\"**Exploring numeric patterns**\\n\\nI'm - finding that the sequence can also be viewed as the sum of the first n even - numbers. For example, 2 + 4 + 6 + 8 + 10 equals 30, and this sum can be expressed - as S_n = n(n+1). It matches with earlier findings that each term can be defined - as n(n+1). This confirms the pattern represents pronic numbers or triangular - numbers multiplied by 2. The differences between terms keep increasing by 2, - leading to the nth term formula: a_n = n(n+1) for n starting at 1.\",\"type\":\"summary_text\"},{\"text\":\"**Clarifying - the nth term**\\n\\nThe formula for the nth term of the sequence is a_n = n\xB2 - + n. Since that corresponds to triangular numbers, I can also express it as - a_n = 2T_n, where T_n = n(n+1)/2. The pattern emerges as pronic numbers, where - each term is the product of n and its next integer. The differences between - the terms increase sequentially by 2, confirming that the nth term is quadratic: - a_n = n(n+1) starting from n=1.\",\"type\":\"summary_text\"}],\"type\":\"reasoning\"},{\"id\":\"msg_0ec7311e7547baf10069ebed6080288197aebe0635f6dbcdfb\",\"content\":[{\"annotations\":[],\"text\":\"The - \u201Cgaps\u201D between consecutive terms are \\n 6\u20132=4, 12\u20136=6, - 20\u201312=8, 30\u201320=10 \u2026 \\nso you\u2019re adding 4, then 6, then - 8, then 10, \u2026 i.e. successive even numbers. \\nEquivalently each term - is a product of two consecutive integers:\\n\\n term 1: 1\xB72=2 \\n term 2: - 2\xB73=6 \\n term 3: 3\xB74=12 \\n term 4: 4\xB75=20 \\n term 5: 5\xB76=30 - \ \\n\\nHence if you label the first term by n=1, the nth term is\\n\\n a\u2099 - = n\xB7(n+1) = 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: - - '2603' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/responses - response: - body: - string: "{\n \"id\": \"resp_0ec7311e7547baf10069ebed61d7c4819788756cc7b9597bdb\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069409,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069418,\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_0ec7311e7547baf10069ebed628de08197a146124fcb75b5f5\",\n - \ \"type\": \"reasoning\",\n \"summary\": [\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Calculating term and sum**\\n\\nThe - user wants to know the 10th term and the sum of the first 10 terms in a pattern. - Earlier, we found that the nth term is given by a_n = n(n+1). So, for the - 10th term, a_10 = 10 * 11, which equals 110. \\n\\nTo find the sum of the - first 10 terms, I calculated the sum of n(n+1) from 1 to 10, which gives us - 440. Thus, the 10th term is 110, and the sum of the first 10 terms is 440.\"\n - \ },\n {\n \"type\": \"summary_text\",\n \"text\": - \"**Summing pronic numbers**\\n\\nI've noticed that the terms we're discussing - are pronic numbers, also known as rectangular or oblong numbers. The 10th - term is straightforward: it's 10 times 11, which equals 110. \\n\\nFor the - sum of the first 10 terms, I derived the formula and found it's 440. This - comes from summing \\\\( n^2 + n \\\\), leading to the total being 385 (for - \\\\( n^2 \\\\)) plus 55 (for \\\\( n \\\\)). \\n\\nSo, the final answers - are: \\n- 10th term: 110 \\n- Sum of the first 10 terms: 440.\"\n }\n - \ ]\n },\n {\n \"id\": \"msg_0ec7311e7547baf10069ebed69f3388197aff44b644c688e25\",\n - \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": - [\n {\n \"type\": \"output_text\",\n \"annotations\": - [],\n \"logprobs\": [],\n \"text\": \"The nth term is a\\u2099 - = n\\u00b7(n+1). \\n1. 10th term: \\n a\\u2081\\u2080 = 10\\u00b7(10+1) - = 10\\u00b711 = 110. \\n2. Sum of the first 10 terms: \\n S\\u2081\\u2080 - = \\u03a3\\u2099\\u208c\\u2081\\u00b9\\u2070 n(n+1) = \\u03a3 n\\u00b2 + \\u03a3 - n \\n = [10\\u00b711\\u00b721/6] + [10\\u00b711/2] \\n = 385 - + 55 \\n = 440. \\n\\n(You can also use the closed-form S_N = N(N+1)(N+2)/3, - which for N=10 gives 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\": 248,\n \"input_tokens_details\": - {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 884,\n \"output_tokens_details\": - {\n \"reasoning_tokens\": 704\n },\n \"total_tokens\": 1132\n },\n - \ \"user\": null,\n \"metadata\": {}\n}" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:23:38 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - content-length: - - '3198' - openai-processing-ms: - - '8887' - openai-version: - - '2020-10-01' - x-ratelimit-limit-requests: - - '30000' - x-ratelimit-limit-tokens: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999545' - 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"}],"model":"o4-mini","reasoning":{"effort":"high","summary":"detailed"}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '219' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/responses - response: - body: - string: "{\n \"id\": \"resp_0f0e19b1e33659e70069ebeec4ac90819395dd1386b77bc12a\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069764,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069774,\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_0f0e19b1e33659e70069ebeec5129c8193bfdc8491336cba05\",\n - \ \"type\": \"reasoning\",\n \"summary\": [\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Determining nth term formula**\\n\\nThe - user is interested in identifying the pattern in the sequence: 2, 6, 12, 20, - 30. I notice that each term corresponds to n multiplied by (n + 1): 1*2, 2*3, - 3*4, and so forth. The formula for the nth term is a_n = n(n + 1). Alternatively, - these can be viewed as twice the triangular numbers, and the terms stack up - as pronic numbers. So, the formula remains consistent as a_n = n(n + 1).\"\n - \ },\n {\n \"type\": \"summary_text\",\n \"text\": - \"**Identifying the pronic pattern**\\n\\nThe user asks about the pattern - in the sequence, and it appears to follow a quadratic form resulting from - the product of two consecutive integers, also known as pronic numbers. Each - term can be represented as a_n = n(n + 1). Additionally, I noticed that the - differences between terms\\u20144, 6, 8, 10\\u2014show a consistent second - difference of 2, supporting the quadratic nature. Therefore, the formula for - the nth term is clearly a_n = n(n + 1).\"\n },\n {\n \"type\": - \"summary_text\",\n \"text\": \"**Summarizing the pattern**\\n\\nThe - final answer is that the pattern involves each term being the product of two - consecutive integers, represented by the general term a_n = n(n + 1). The - differences between the terms increase by 2: +4, +6, +8, and so on. The sequence - can also be referred to as pronic numbers. So, for n \\u2265 1, the formula - is a_n = n^2 + n. Alternatively, it falls under the category of oblong or - heteromecic numbers.\"\n }\n ]\n },\n {\n \"id\": \"msg_0f0e19b1e33659e70069ebeece64c08193a62ba6ae521cec7a\",\n - \ \"type\": \"message\",\n \"status\": \"completed\",\n \"content\": - [\n {\n \"type\": \"output_text\",\n \"annotations\": - [],\n \"logprobs\": [],\n \"text\": \"The \\u201cgaps\\u201d - between terms are \\n6\\u20132=4, 12\\u20136=6, 20\\u201312=8, 30\\u201320=10, - \\u2026 \\nso you\\u2019re adding 4,6,8,10,\\u2026 (i.e. the even numbers - increasing by 2). \\nThat makes the sequence quadratic, and one checks that - \ \\na\\u2081=2, a\\u2082=6, a\\u2083=12,\\u2026 all fit \\n\\u2003a\\u2099=n\\u00b2+n. - \ \\n\\nEquivalently, each term is the product of two consecutive integers - (the pronic or oblong numbers): \\n\\u2003a\\u2099 = n\\u00b7(n+1).\"\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\": 41,\n \"input_tokens_details\": {\n - \ \"cached_tokens\": 0\n },\n \"output_tokens\": 1259,\n \"output_tokens_details\": - {\n \"reasoning_tokens\": 1088\n },\n \"total_tokens\": 1300\n - \ },\n \"user\": null,\n \"metadata\": {}\n}" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:29:35 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - content-length: - - '3737' - openai-processing-ms: - - '10398' - 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_0f0e19b1e33659e70069ebeec5129c8193bfdc8491336cba05\",\"summary\":[{\"text\":\"**Determining - nth term formula**\\n\\nThe user is interested in identifying the pattern in - the sequence: 2, 6, 12, 20, 30. I notice that each term corresponds to n multiplied - by (n + 1): 1*2, 2*3, 3*4, and so forth. The formula for the nth term is a_n - = n(n + 1). Alternatively, these can be viewed as twice the triangular numbers, - and the terms stack up as pronic numbers. So, the formula remains consistent - as a_n = n(n + 1).\",\"type\":\"summary_text\"},{\"text\":\"**Identifying the - pronic pattern**\\n\\nThe user asks about the pattern in the sequence, and it - appears to follow a quadratic form resulting from the product of two consecutive - integers, also known as pronic numbers. Each term can be represented as a_n - = n(n + 1). Additionally, I noticed that the differences between terms\u20144, - 6, 8, 10\u2014show a consistent second difference of 2, supporting the quadratic - nature. Therefore, the formula for the nth term is clearly a_n = n(n + 1).\",\"type\":\"summary_text\"},{\"text\":\"**Summarizing - the pattern**\\n\\nThe final answer is that the pattern involves each term being - the product of two consecutive integers, represented by the general term a_n - = n(n + 1). The differences between the terms increase by 2: +4, +6, +8, and - so on. The sequence can also be referred to as pronic numbers. So, for n \u2265 - 1, the formula is a_n = n^2 + n. Alternatively, it falls under the category - of oblong or heteromecic numbers.\",\"type\":\"summary_text\"}],\"type\":\"reasoning\"},{\"id\":\"msg_0f0e19b1e33659e70069ebeece64c08193a62ba6ae521cec7a\",\"content\":[{\"annotations\":[],\"text\":\"The - \u201Cgaps\u201D between terms are \\n6\u20132=4, 12\u20136=6, 20\u201312=8, - 30\u201320=10, \u2026 \\nso you\u2019re adding 4,6,8,10,\u2026 (i.e. the even - numbers increasing by 2). \\nThat makes the sequence quadratic, and one checks - that \\na\u2081=2, a\u2082=6, a\u2083=12,\u2026 all fit \\n\u2003a\u2099=n\xB2+n. - \ \\n\\nEquivalently, each term is the product of two consecutive integers (the - pronic or oblong numbers): \\n\u2003a\u2099 = n\xB7(n+1).\",\"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: - - '2489' - Content-Type: - - application/json - Host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/responses - response: - body: - string: "{\n \"id\": \"resp_0f0e19b1e33659e70069ebeecf4d4c81939852c1b829c85cfa\",\n - \ \"object\": \"response\",\n \"created_at\": 1777069775,\n \"status\": - \"completed\",\n \"background\": false,\n \"billing\": {\n \"payer\": - \"developer\"\n },\n \"completed_at\": 1777069782,\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_0f0e19b1e33659e70069ebeecfe85c81939654f22182d7bf01\",\n - \ \"type\": \"reasoning\",\n \"summary\": []\n },\n {\n \"id\": - \"msg_0f0e19b1e33659e70069ebeed5a2688193803ea2a253dadd96\",\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) - = 110. \\nThe sum of the first 10 terms is \\n \\u2211\\u2099\\u208c\\u2081\\u00b9\\u2070 - n(n+1) = \\u2211n\\u00b2 + \\u2211n = 385 + 55 = 440. \\n\\n(Equivalently, - \\u2211\\u2099\\u208c\\u2081\\u207f n(n+1) = n(n+1)(n+2)/3, so 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\": 218,\n \"input_tokens_details\": - {\n \"cached_tokens\": 0\n },\n \"output_tokens\": 718,\n \"output_tokens_details\": - {\n \"reasoning_tokens\": 576\n },\n \"total_tokens\": 936\n },\n - \ \"user\": null,\n \"metadata\": {}\n}" - headers: - Connection: - - keep-alive - Content-Type: - - application/json - Date: - - Fri, 24 Apr 2026 22:29:42 GMT - Server: - - cloudflare - Strict-Transport-Security: - - max-age=31536000; includeSubDomains; preload - Transfer-Encoding: - - chunked - X-Content-Type-Options: - - nosniff - content-length: - - '2002' - openai-processing-ms: - - '7064' - openai-version: - - '2020-10-01' - x-ratelimit-limit-requests: - - '30000' - x-ratelimit-limit-tokens: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999575' - 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.92.0/btx/reasoning_completions.yaml b/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/reasoning_completions.yaml deleted file mode 100644 index 1bf6dff77..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/reasoning_completions.yaml +++ /dev/null @@ -1,78 +0,0 @@ -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"}' - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '199' - content-type: - - application/json - host: - - api.openai.com - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: "{\n \"id\": \"chatcmpl-ECrt1nHs6K3Li9SHoEj6fXW9doI7C\",\n \"object\": - \"chat.completion\",\n \"created\": 1786735783,\n \"model\": \"o4-mini-2025-04-16\",\n - \ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\": - \"assistant\",\n \"content\": \"The terms are the \u201Cpronic\u201D - or \u201Coblong\u201D numbers: \\n2=1\xB72, 6=2\xB73, 12=3\xB74, 20=4\xB75, - 30=5\xB76,\u2026 \\n\\nIf you let n start at 1 (so a\u2081=2, a\u2082=6, - \u2026), then \\n\u2003a\u2099 = n\xB7(n+1) = n\xB2 + n.\",\n \"refusal\": - null,\n \"annotations\": []\n },\n \"finish_reason\": \"stop\"\n - \ }\n ],\n \"usage\": {\n \"prompt_tokens\": 41,\n \"completion_tokens\": - 816,\n \"total_tokens\": 857,\n \"prompt_tokens_details\": {\n \"cached_tokens\": - 0,\n \"audio_tokens\": 0\n },\n \"completion_tokens_details\": - {\n \"reasoning_tokens\": 704,\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 - - CF-Ray - - CF-Ray - connection: - - keep-alive - content-length: - - '969' - content-type: - - application/json - date: - - Fri, 14 Aug 2026 19:29:49 GMT - openai-processing-ms: - - '6002' - 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: - - '150000000' - x-ratelimit-remaining-requests: - - '29999' - x-ratelimit-remaining-tokens: - - '149999970' - 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.92.0/btx/streaming.yaml b/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/streaming.yaml deleted file mode 100644 index 52d5aeed6..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/streaming.yaml +++ /dev/null @@ -1,402 +0,0 @@ -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}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '241' - 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-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"6ILSJ3H83"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"0HUQHXV"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"WDbW7aXpY0"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"92QYSQ"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"OiPq9mC5"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"b2llJLZn"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"klFQCV"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"LXr7eoheIl"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"nb0F7NXA"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"LfkBggM"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"hpcDI3G4n2"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"QRqsqegc"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"XREPAMg"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"KYGOLw44ko"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"XyfWB7v2"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"z2gHRL9"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"XdCCiSXD59"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"hg0U7yyA"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"thWPgIC"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"PGPXboZ6io"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"McuVtsel"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"dV3hU3y"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"G8imTMWQGb"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"HRqBvkdg"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"zm0zS2A"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"gf5rDQuP9P"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"lzH5QDtQ"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"1MNZhBI"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"ZeOEIC60IC"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"EpSJ3q5E"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"gYXd9gx"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"jqBdqVtQqy"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"Pub1Ypu6"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"uH5iomU"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"FYfYAhORM"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"tRzb82lM"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"2fcOT"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":"There"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"neHgnz"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" - you"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gOgKud0"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" - have"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"IxOAME"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","choices":[{"index":0,"delta":{"content":" - it"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Hs5yTXdx"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"gnwvibghB8"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"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":"MdxBv"} - - - data: {"id":"chatcmpl-DYJDvoCMPbusuYo8H3SsPIc0I5bZJ","object":"chat.completion.chunk","created":1777069419,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_77c1b30b18","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":"uFNDrrqCMC"} - - - data: [DONE] - - - ' - headers: - Connection: - - keep-alive - Content-Type: - - text/event-stream; charset=utf-8 - Date: - - Fri, 24 Apr 2026 22:23:39 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 - openai-processing-ms: - - '251' - 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: - - '149999982' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - status: - code: 200 - message: OK -- 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}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '241' - 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-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"O1Ay0f6KZ"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"hijBbiM"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"pTYkwoohgI"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"cFs2HD"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"3i9qpfPQ"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"xFO7yiyC"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"hKat17"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"7GA4p4r3eQ"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"i4g6E3SY"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"SEXyjZV"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"5WlajAo2A5"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"LdGs8y5E"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"NISipUj"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"3SxCMJVFWn"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"2W4DZCxc"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"OxbqPYF"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"RF7unYdtGZ"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"i6FRCnTf"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"lPW0Ufz"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"5YNUSwydpi"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"TSCCSenq"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"us8lJ23"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"kvq3isboGx"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"dw0qCGap"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"JWKavIT"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"8wyPEV767o"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"tNqWX4hM"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"PWft3xz"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"uFNVWHWO03"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"OxAq5zem"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"FSXjOAy"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"Nes3UFVaak"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"T3BF9KTo"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"ivKwGyt"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"jlPDLWyY8"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"iRfNkTIU"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"ZtJ7z"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"VXH8oqG"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"GCnHFg"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"It5SMF"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"tHtMSkPOdm"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"GY7w0"} - - - data: {"id":"chatcmpl-DYJJmPaxUZh0YogB6BNia2VHxcZ39","object":"chat.completion.chunk","created":1777069782,"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":"zhvVBZX62K"} - - - data: [DONE] - - - ' - headers: - Connection: - - keep-alive - Content-Type: - - text/event-stream; charset=utf-8 - Date: - - Fri, 24 Apr 2026 22:29:43 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 - openai-processing-ms: - - '1134' - 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: - - '149999982' - 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.92.0/btx/tools.yaml b/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/tools.yaml deleted file mode 100644 index 6f0801a0a..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.92.0/btx/tools.yaml +++ /dev/null @@ -1,158 +0,0 @@ -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 - 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-DYJDwm57pZIPaUtAFW19MIDtT7HHa\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069420,\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_rhT4SgoSZp4MlzC8NlsLcesf\",\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:23:40 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 - content-length: - - '1092' - openai-processing-ms: - - '430' - 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-DYJJoe6WpECm6FP0hr0aQp3Hh1uAa\",\n \"object\": - \"chat.completion\",\n \"created\": 1777069784,\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_90SKpviW2gcXhBVkVkiQLrKw\",\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:29:45 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 - content-length: - - '1092' - openai-processing-ms: - - '634' - 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 -version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/1.92.0/test_openai_chat_streaming_async_http2_context_manager_preserves_wrapper.yaml b/py/src/braintrust/integrations/openai/cassettes/1.92.0/test_openai_chat_streaming_async_http2_context_manager_preserves_wrapper.yaml deleted file mode 100644 index 1e86885a9..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.92.0/test_openai_chat_streaming_async_http2_context_manager_preserves_wrapper.yaml +++ /dev/null @@ -1,132 +0,0 @@ -interactions: -- request: - body: '{"messages":[{"role":"user","content":"What''s 12 + 12?"}],"model":"gpt-4o-mini","stream":true,"stream_options":{"include_usage":true}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '134' - Content-Type: - - application/json - Host: - - api.openai.com - User-Agent: - - AsyncOpenAI/Python 1.92.0 - X-Stainless-Arch: - - arm64 - X-Stainless-Async: - - async:asyncio - X-Stainless-Lang: - - python - X-Stainless-OS: - - MacOS - X-Stainless-Package-Version: - - 1.92.0 - X-Stainless-Runtime: - - CPython - X-Stainless-Runtime-Version: - - 3.13.3 - x-stainless-read-timeout: - - '600' - x-stainless-retry-count: - - '0' - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: 'data: {"id":"chatcmpl-DV3SPr6OfZNMNWbj5jA69uOdnD7pn","object":"chat.completion.chunk","created":1776293829,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_96faa08953","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"n4AG8qMLC"} - - - data: {"id":"chatcmpl-DV3SPr6OfZNMNWbj5jA69uOdnD7pn","object":"chat.completion.chunk","created":1776293829,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_96faa08953","choices":[{"index":0,"delta":{"content":"12"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"083b8MmQv"} - - - data: {"id":"chatcmpl-DV3SPr6OfZNMNWbj5jA69uOdnD7pn","object":"chat.completion.chunk","created":1776293829,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_96faa08953","choices":[{"index":0,"delta":{"content":" - +"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"VkCPn3GbN"} - - - data: {"id":"chatcmpl-DV3SPr6OfZNMNWbj5jA69uOdnD7pn","object":"chat.completion.chunk","created":1776293829,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_96faa08953","choices":[{"index":0,"delta":{"content":" - "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"msf90t5pYe"} - - - data: {"id":"chatcmpl-DV3SPr6OfZNMNWbj5jA69uOdnD7pn","object":"chat.completion.chunk","created":1776293829,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_96faa08953","choices":[{"index":0,"delta":{"content":"12"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Vipc7OQgR"} - - - data: {"id":"chatcmpl-DV3SPr6OfZNMNWbj5jA69uOdnD7pn","object":"chat.completion.chunk","created":1776293829,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_96faa08953","choices":[{"index":0,"delta":{"content":" - equals"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"jdH3"} - - - data: {"id":"chatcmpl-DV3SPr6OfZNMNWbj5jA69uOdnD7pn","object":"chat.completion.chunk","created":1776293829,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_96faa08953","choices":[{"index":0,"delta":{"content":" - "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"gOv9dqD6cf"} - - - data: {"id":"chatcmpl-DV3SPr6OfZNMNWbj5jA69uOdnD7pn","object":"chat.completion.chunk","created":1776293829,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_96faa08953","choices":[{"index":0,"delta":{"content":"24"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"H0OQ5HCPN"} - - - data: {"id":"chatcmpl-DV3SPr6OfZNMNWbj5jA69uOdnD7pn","object":"chat.completion.chunk","created":1776293829,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_96faa08953","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"1SKi4b1ZKQ"} - - - data: {"id":"chatcmpl-DV3SPr6OfZNMNWbj5jA69uOdnD7pn","object":"chat.completion.chunk","created":1776293829,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_96faa08953","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"CQRR7"} - - - data: {"id":"chatcmpl-DV3SPr6OfZNMNWbj5jA69uOdnD7pn","object":"chat.completion.chunk","created":1776293829,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_96faa08953","choices":[],"usage":{"prompt_tokens":14,"completion_tokens":8,"total_tokens":22,"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":"jO2U5V1PXc0"} - - - data: [DONE] - - - ' - headers: - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - cf-ray: - - 9ece8c30ba3b1707-YYZ - content-type: - - text/event-stream; charset=utf-8 - date: - - Wed, 15 Apr 2026 22:57:09 GMT - openai-organization: - - braintrust-data - openai-processing-ms: - - '363' - openai-project: - - proj_vsCSXafhhByzWOThMrJcZiw9 - openai-version: - - '2020-10-01' - server: - - cloudflare - set-cookie: - - __cf_bm=mUIBK_6gy1Y8fzKU7Ey0BYQrIdH_SCWf9GUKE6EAwZU-1776293829.2320962-1.0.1.1-mvIa1KCimQ.ldhQt46DwzdM_ikFCOtHhne66OsxqWr6a56_rx65Lw1rYAnBg8CPcw46pGv_HaMZGX6K8UuEZoam5s68UY7Soqt_Ezsj2UnqAm54g16U02QimjqaGwmOR; - HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Wed, 15 Apr 2026 - 23:27:09 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-content-type-options: - - nosniff - 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: - - '149999992' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_a87041c3d3294080ba0c2d18ecce5a07 - status: - code: 200 - message: OK -version: 1 diff --git a/py/src/braintrust/integrations/openai/cassettes/1.92.0/test_openai_chat_streaming_sync_http2_context_manager_preserves_wrapper.yaml b/py/src/braintrust/integrations/openai/cassettes/1.92.0/test_openai_chat_streaming_sync_http2_context_manager_preserves_wrapper.yaml deleted file mode 100644 index fb26161a2..000000000 --- a/py/src/braintrust/integrations/openai/cassettes/1.92.0/test_openai_chat_streaming_sync_http2_context_manager_preserves_wrapper.yaml +++ /dev/null @@ -1,132 +0,0 @@ -interactions: -- request: - body: '{"messages":[{"role":"user","content":"What''s 12 + 12?"}],"model":"gpt-4o-mini","stream":true,"stream_options":{"include_usage":true}}' - headers: - Accept: - - application/json - Accept-Encoding: - - gzip, deflate - Connection: - - keep-alive - Content-Length: - - '134' - Content-Type: - - application/json - Host: - - api.openai.com - User-Agent: - - OpenAI/Python 1.92.0 - X-Stainless-Arch: - - arm64 - X-Stainless-Async: - - 'false' - X-Stainless-Lang: - - python - X-Stainless-OS: - - MacOS - X-Stainless-Package-Version: - - 1.92.0 - X-Stainless-Runtime: - - CPython - X-Stainless-Runtime-Version: - - 3.13.3 - x-stainless-read-timeout: - - '600' - x-stainless-retry-count: - - '0' - method: POST - uri: https://api.openai.com/v1/chat/completions - response: - body: - string: 'data: {"id":"chatcmpl-DV3SO85XLHUvkLLI7ArHN8qSKJh8P","object":"chat.completion.chunk","created":1776293828,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"mz932Pwr2"} - - - data: {"id":"chatcmpl-DV3SO85XLHUvkLLI7ArHN8qSKJh8P","object":"chat.completion.chunk","created":1776293828,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"12"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"o0LF8h4XM"} - - - data: {"id":"chatcmpl-DV3SO85XLHUvkLLI7ArHN8qSKJh8P","object":"chat.completion.chunk","created":1776293828,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - +"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Zy6Qv17wU"} - - - data: {"id":"chatcmpl-DV3SO85XLHUvkLLI7ArHN8qSKJh8P","object":"chat.completion.chunk","created":1776293828,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"f6iXWx6WIV"} - - - data: {"id":"chatcmpl-DV3SO85XLHUvkLLI7ArHN8qSKJh8P","object":"chat.completion.chunk","created":1776293828,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"12"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"FinepMPsL"} - - - data: {"id":"chatcmpl-DV3SO85XLHUvkLLI7ArHN8qSKJh8P","object":"chat.completion.chunk","created":1776293828,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - equals"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"oL7F"} - - - data: {"id":"chatcmpl-DV3SO85XLHUvkLLI7ArHN8qSKJh8P","object":"chat.completion.chunk","created":1776293828,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":" - "},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"yXQmRNcTyR"} - - - data: {"id":"chatcmpl-DV3SO85XLHUvkLLI7ArHN8qSKJh8P","object":"chat.completion.chunk","created":1776293828,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"24"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Nbtj4Zhwt"} - - - data: {"id":"chatcmpl-DV3SO85XLHUvkLLI7ArHN8qSKJh8P","object":"chat.completion.chunk","created":1776293828,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{"content":"."},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"uGO8M2Qkql"} - - - data: {"id":"chatcmpl-DV3SO85XLHUvkLLI7ArHN8qSKJh8P","object":"chat.completion.chunk","created":1776293828,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"LHowv"} - - - data: {"id":"chatcmpl-DV3SO85XLHUvkLLI7ArHN8qSKJh8P","object":"chat.completion.chunk","created":1776293828,"model":"gpt-4o-mini-2024-07-18","service_tier":"default","system_fingerprint":"fp_fe7a5277a8","choices":[],"usage":{"prompt_tokens":14,"completion_tokens":8,"total_tokens":22,"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":"pPkn0jDkdvt"} - - - data: [DONE] - - - ' - headers: - access-control-expose-headers: - - X-Request-ID - alt-svc: - - h3=":443"; ma=86400 - cf-cache-status: - - DYNAMIC - cf-ray: - - 9ece8c2d7c20c48a-YYZ - content-type: - - text/event-stream; charset=utf-8 - date: - - Wed, 15 Apr 2026 22:57:08 GMT - openai-organization: - - braintrust-data - openai-processing-ms: - - '161' - openai-project: - - proj_vsCSXafhhByzWOThMrJcZiw9 - openai-version: - - '2020-10-01' - server: - - cloudflare - set-cookie: - - __cf_bm=Fv0wLQCiUns_t84NuKynvUhb_7G.BsxfnoHGs_B976w-1776293828.716643-1.0.1.1-aOnsUQ6dYHsWPF.Qfc89Qgr34bJv3Qm9hcSNiX7_JvbE9ht8wg6_QE63Y4L8i5m1jxop3fIV.JpnKNDRQ1ZXdclKpJOMyeJqffOXnYIpNxsJeg75Ab94vULKSc_mMIoW; - HttpOnly; Secure; Path=/; Domain=api.openai.com; Expires=Wed, 15 Apr 2026 - 23:27:08 GMT - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - x-content-type-options: - - nosniff - 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: - - '149999995' - x-ratelimit-reset-requests: - - 2ms - x-ratelimit-reset-tokens: - - 0s - x-request-id: - - req_94fec5ccd6154f18a8d9b498db1b9c66 - status: - code: 200 - message: OK -version: 1