Skip to content

Commit a6cffaf

Browse files
Update openai-java latest deps to 4.43.0 and fix response records (#12036)
Update openai-java latest deps to 4.43.0 and fix response records Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: alexey.kuznetsov <alexey.kuznetsov@datadoghq.com>
1 parent 428bb15 commit a6cffaf

13 files changed

Lines changed: 15 additions & 15 deletions

dd-java-agent/instrumentation/openai-java/openai-java-3.0/gradle.lockfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ com.google.j2objc:j2objc-annotations:2.8=annotationProcessor,latestDepTestAnnota
5454
com.google.j2objc:j2objc-annotations:3.1=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
5555
com.google.re2j:re2j:1.8=latestDepTestRuntimeClasspath,testRuntimeClasspath
5656
com.openai:openai-java-client-okhttp:3.0.1=compileClasspath,testCompileClasspath,testRuntimeClasspath
57-
com.openai:openai-java-client-okhttp:4.41.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath
57+
com.openai:openai-java-client-okhttp:4.43.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath
5858
com.openai:openai-java-core:3.0.1=compileClasspath,testCompileClasspath,testRuntimeClasspath
59-
com.openai:openai-java-core:4.41.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath
59+
com.openai:openai-java-core:4.43.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath
6060
com.openai:openai-java:3.0.1=compileClasspath,testCompileClasspath,testRuntimeClasspath
61-
com.openai:openai-java:4.41.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath
61+
com.openai:openai-java:4.43.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath
6262
com.squareup.moshi:moshi:1.11.0=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath,testRuntimeClasspath
6363
com.squareup.okhttp3:logging-interceptor:3.12.12=latestDepTestCompileClasspath,latestDepTestRuntimeClasspath,testCompileClasspath
6464
com.squareup.okhttp3:logging-interceptor:4.12.0=testRuntimeClasspath

dd-java-agent/instrumentation/openai-java/openai-java-3.0/src/test/resources/http-records/responses/1f86220a2a41110e+2b22e08e8d61835a.POST.rec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ event: response.output_item.done
145145
data: {"type":"response.output_item.done","sequence_number":40,"output_index":0,"item":{"id":"msg_00cc8ab3b2084dff016941d72d5d908190944b51c77cc1e89b","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"The weather in San Francisco is currently sunny with a temperature of 72°F and humidity at 65%. Let me know if you need a forecast for the coming days!"}],"role":"assistant"}}
146146

147147
event: response.completed
148-
data: {"type":"response.completed","sequence_number":41,"response":{"id":"resp_00cc8ab3b2084dff016941d72d1e9c8190a5e511d130ff2909","object":"response","created_at":1765922605,"status":"completed","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-4.1-2025-04-14","output":[{"id":"msg_00cc8ab3b2084dff016941d72d5d908190944b51c77cc1e89b","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"The weather in San Francisco is currently sunny with a temperature of 72°F and humidity at 65%. Let me know if you need a forecast for the coming days!"}],"role":"assistant"}],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":null,"summary":null},"safety_identifier":null,"service_tier":"default","store":false,"temperature":0.1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":60,"input_tokens_details":{"cached_tokens":0},"output_tokens":35,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":95},"user":null,"metadata":{}}}
148+
data: {"type":"response.completed","sequence_number":41,"response":{"id":"resp_00cc8ab3b2084dff016941d72d1e9c8190a5e511d130ff2909","object":"response","created_at":1765922605,"status":"completed","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-4.1-2025-04-14","output":[{"id":"msg_00cc8ab3b2084dff016941d72d5d908190944b51c77cc1e89b","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"The weather in San Francisco is currently sunny with a temperature of 72°F and humidity at 65%. Let me know if you need a forecast for the coming days!"}],"role":"assistant"}],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":null,"summary":null},"safety_identifier":null,"service_tier":"default","store":false,"temperature":0.1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":60,"input_tokens_details":{"cached_tokens":0, "cache_write_tokens": 0},"output_tokens":35,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":95},"user":null,"metadata":{}}}
149149

150150
��
151151
-- end response body --

dd-java-agent/instrumentation/openai-java/openai-java-3.0/src/test/resources/http-records/responses/25cc9c569bf2fdcb+f6c73c0265d6d64d.POST.rec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ x-request-id: req_55ed921a6d294700bce3397e0b75e7da
164164
"usage": {
165165
"input_tokens": 11236,
166166
"input_tokens_details": {
167-
"cached_tokens": 0
167+
"cached_tokens": 0, "cache_write_tokens": 0
168168
},
169169
"output_tokens": 2366,
170170
"output_tokens_details": {

dd-java-agent/instrumentation/openai-java/openai-java-3.0/src/test/resources/http-records/responses/39590e9b44463dcf+68f287a23bcd52c3.POST.rec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ x-request-id: req_6d5873ea010c45b3b89f63b5d8515e0c
299299
"usage": {
300300
"input_tokens": 21629,
301301
"input_tokens_details": {
302-
"cached_tokens": 0
302+
"cached_tokens": 0, "cache_write_tokens": 0
303303
},
304304
"output_tokens": 1760,
305305
"output_tokens_details": {

dd-java-agent/instrumentation/openai-java/openai-java-3.0/src/test/resources/http-records/responses/43357cca927dd5fd+de853cdc24b16f2a.POST.rec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ x-request-id: req_c3af1069e8d144a08bafcf9940bde90a
275275
"usage": {
276276
"input_tokens": 35835,
277277
"input_tokens_details": {
278-
"cached_tokens": 0
278+
"cached_tokens": 0, "cache_write_tokens": 0
279279
},
280280
"output_tokens": 1907,
281281
"output_tokens_details": {

dd-java-agent/instrumentation/openai-java/openai-java-3.0/src/test/resources/http-records/responses/4919ef6198916e1a+cf7135b364dfeac5.POST.rec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ x-request-id: req_dcbdd1cbcd494ff793ee2e099de4554e
9898
"usage": {
9999
"input_tokens": 67,
100100
"input_tokens_details": {
101-
"cached_tokens": 0
101+
"cached_tokens": 0, "cache_write_tokens": 0
102102
},
103103
"output_tokens": 238,
104104
"output_tokens_details": {

dd-java-agent/instrumentation/openai-java/openai-java-3.0/src/test/resources/http-records/responses/88547372cbe505bb+77909386d4b47615.POST.rec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ x-request-id: req_db65016ae7c043a99aaa6bffb6d7de02
104104
"usage": {
105105
"input_tokens": 69,
106106
"input_tokens_details": {
107-
"cached_tokens": 0
107+
"cached_tokens": 0, "cache_write_tokens": 0
108108
},
109109
"output_tokens": 23,
110110
"output_tokens_details": {

dd-java-agent/instrumentation/openai-java/openai-java-3.0/src/test/resources/http-records/responses/a8a4c449b7013574+9a07feeaa92c52c1.POST.rec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ event: response.output_item.done
147147
data: {"type":"response.output_item.done","item":{"id":"msg_05235bb0911aa18f01697a8bd738c481949b38c728dec93947","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"The current weather in San Francisco is sunny with a temperature of 72°F and humidity at 65%. Let me know if you need a forecast for the next few days!"}],"role":"assistant"},"output_index":0,"sequence_number":41}
148148

149149
event: response.completed
150-
data: {"type":"response.completed","response":{"id":"resp_05235bb0911aa18f01697a8bd6f31c8194a36b60c9b16f8ee8","object":"response","created_at":1769638870,"status":"completed","background":false,"completed_at":1769638871,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-4.1-2025-04-14","output":[{"id":"msg_05235bb0911aa18f01697a8bd738c481949b38c728dec93947","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"The current weather in San Francisco is sunny with a temperature of 72°F and humidity at 65%. Let me know if you need a forecast for the next few days!"}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":null,"summary":null},"safety_identifier":null,"service_tier":"default","store":false,"temperature":0.1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":60,"input_tokens_details":{"cached_tokens":0},"output_tokens":36,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":96},"user":null,"metadata":{}},"sequence_number":42}
150+
data: {"type":"response.completed","response":{"id":"resp_05235bb0911aa18f01697a8bd6f31c8194a36b60c9b16f8ee8","object":"response","created_at":1769638870,"status":"completed","background":false,"completed_at":1769638871,"error":null,"frequency_penalty":0.0,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"gpt-4.1-2025-04-14","output":[{"id":"msg_05235bb0911aa18f01697a8bd738c481949b38c728dec93947","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"The current weather in San Francisco is sunny with a temperature of 72°F and humidity at 65%. Let me know if you need a forecast for the next few days!"}],"role":"assistant"}],"parallel_tool_calls":true,"presence_penalty":0.0,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":null,"summary":null},"safety_identifier":null,"service_tier":"default","store":false,"temperature":0.1,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":60,"input_tokens_details":{"cached_tokens":0, "cache_write_tokens": 0},"output_tokens":36,"output_tokens_details":{"reasoning_tokens":0},"total_tokens":96},"user":null,"metadata":{}},"sequence_number":42}
151151

152152
��
153153
-- end response body --

dd-java-agent/instrumentation/openai-java/openai-java-3.0/src/test/resources/http-records/responses/b50cfc5e45c46579+2db979cef81b04c5.POST.rec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ x-request-id: req_40a85f5080bf4950a7a3f0767d0f5487
106106
"usage": {
107107
"input_tokens": 70,
108108
"input_tokens_details": {
109-
"cached_tokens": 0
109+
"cached_tokens": 0, "cache_write_tokens": 0
110110
},
111111
"output_tokens": 24,
112112
"output_tokens_details": {

dd-java-agent/instrumentation/openai-java/openai-java-3.0/src/test/resources/http-records/responses/cacab2d655cda645+7cb661ee9f414322.POST.rec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ event: response.output_item.done
130130
data: {"type":"response.output_item.done","sequence_number":35,"output_index":1,"item":{"id":"msg_00c6bd4b21da44ff01693c54595508819680f9f938648035ac","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"The number is 9, since if x + 1 = 10 then x = 10 − 1 = 9."}],"role":"assistant"}}
131131

132132
event: response.completed
133-
data: {"type":"response.completed","sequence_number":36,"response":{"id":"resp_00c6bd4b21da44ff01693c54579ff881968727cf568e228a75","object":"response","created_at":1765561431,"status":"completed","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"o4-mini-2025-04-16","output":[{"id":"rs_00c6bd4b21da44ff01693c5457f090819695b362fd1662a53e","type":"reasoning","encrypted_content":"gAAAAABpPFRZx7IQrlDTAcZQYzc2spSmEzfoQvqm6kggHESPQSNxiBypm7qfb7Px5NfQq8OQw1pMiw1vZ6Z01V1y7tkb-TZQQ3ODmenQSeQ7RgWouUfO1r3sBi_GyHbZB7Y6PNGgz8lE1WUBY88jwLt7zxc2Lcjaf8ivRMbwYu078bqKeFUmVQcn8Xxbe4T1gJ3Eb2dYLhP10ocwsXsntGAbr-G0yGPIMWw0t2Q9dFFUYQBE08rmeM6oEtVNNGTA6t7NADzxYfv5dMr6qwnAI-FLKvJ2uHIAPegmYv763B2ykEQQTZlAhox2CBKTX5RPmiy3bH_EPOi4MxyATfnb6ZnZPGWMJuEFdu73wkV9xGIn70nDCL-tMFl0xIXDqNo-WPS8xoJNiWT3kAIBnSRgvVTNbN-Xv8xKPVEJeTgmwrnLYCjz0IxKRrsQQV1JWfaYAVVG-iqMR0jmnJKjPMzHPZUWLqHKP6De3UBn_v7GuhOAX2bcYxbIncS8ztGR8sCZpiCyQzV5O4zAN9pjCrf_6HJnCsHpG6XucAc9wxULN05LHgIs77Yu4U6eRQDZtuRJMspju7lw70W8hiiY49pxpaWq9CJ2Yp0VZ2qY8YX-RMhLi1G2efTrR-uMuiOjiVRr-J_dkFIVkOVqyILeztPQVXRd7ol1yChxkCHatDyn1oyNXQ5II_hbE3x9D1bFVS_PllAOth5yXiIwOs-kGgaP3-XWAZc9DdK02HYz-WRXui4_Gxe47YvTP9RDTKeHk-mg_DNd2TkdHbRjADEcMUd9wxN6gRU-2AN99qDmtSok3kDeZ51y8isvF2ul1PgfkwpdG4ahXHVn8fzne1doPEypjD0vwhKeL4Ji5n3nsrgze1ILLacN_KhHUBRr5sAtFnzEHWjLq9rR8I29PgC16oBRXQIljeUXJEUUJJtTO8fm40SJFzvvcpcrhT6XCRc73yoJSoG0NoZBRMTizQ-B_fkF9dEbgz3mU-5wXOvPsbqQwdieY_IGzJPdd0fPzC5sRLNrbovjoMnjYQ6QplF-wtO-gSqRNsLSx1WXAovn8d5FGEUk14yrJ_e9Lhb7Ar2hnj_EwUHJDyymxSPmLoslhCOj8TBkC8CLLug-B2Y0ndtqnBC5bfF6Hu51fr2zJVPAT_PkVl0EN0kdPWmBppJZc4AP9FUx2fpznPAoa_RYNEX8AkyiNbjBwPeYrp9dva-rx2xVu1N20jlMoRxlmWZLseq3vxkYLYClzRmOnWGp1n8hWXqO8e9iACDAWH0G4w2MkoUiJ389MKbjsGX7ibt1-vVjHNhAqv2BGS2njA==","summary":[]},{"id":"msg_00c6bd4b21da44ff01693c54595508819680f9f938648035ac","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"The number is 9, since if x + 1 = 10 then x = 10 − 1 = 9."}],"role":"assistant"}],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":false,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":20,"input_tokens_details":{"cached_tokens":0},"output_tokens":97,"output_tokens_details":{"reasoning_tokens":64},"total_tokens":117},"user":null,"metadata":{}}}
133+
data: {"type":"response.completed","sequence_number":36,"response":{"id":"resp_00c6bd4b21da44ff01693c54579ff881968727cf568e228a75","object":"response","created_at":1765561431,"status":"completed","background":false,"error":null,"incomplete_details":null,"instructions":null,"max_output_tokens":null,"max_tool_calls":null,"model":"o4-mini-2025-04-16","output":[{"id":"rs_00c6bd4b21da44ff01693c5457f090819695b362fd1662a53e","type":"reasoning","encrypted_content":"gAAAAABpPFRZx7IQrlDTAcZQYzc2spSmEzfoQvqm6kggHESPQSNxiBypm7qfb7Px5NfQq8OQw1pMiw1vZ6Z01V1y7tkb-TZQQ3OD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WmBppJZc4AP9FUx2fpznPAoa_RYNEX8AkyiNbjBwPeYrp9dva-rx2xVu1N20jlMoRxlmWZLseq3vxkYLYClzRmOnWGp1n8hWXqO8e9iACDAWH0G4w2MkoUiJ389MKbjsGX7ibt1-vVjHNhAqv2BGS2njA==","summary":[]},{"id":"msg_00c6bd4b21da44ff01693c54595508819680f9f938648035ac","type":"message","status":"completed","content":[{"type":"output_text","annotations":[],"logprobs":[],"text":"The number is 9, since if x + 1 = 10 then x = 10 − 1 = 9."}],"role":"assistant"}],"parallel_tool_calls":true,"previous_response_id":null,"prompt_cache_key":null,"prompt_cache_retention":null,"reasoning":{"effort":"medium","summary":"detailed"},"safety_identifier":null,"service_tier":"default","store":false,"temperature":1.0,"text":{"format":{"type":"text"},"verbosity":"medium"},"tool_choice":"auto","tools":[],"top_logprobs":0,"top_p":1.0,"truncation":"disabled","usage":{"input_tokens":20,"input_tokens_details":{"cached_tokens":0, "cache_write_tokens": 0},"output_tokens":97,"output_tokens_details":{"reasoning_tokens":64},"total_tokens":117},"user":null,"metadata":{}}}
134134

135135
��
136136
-- end response body --

0 commit comments

Comments
 (0)