Fix openai-java latestDep tests after bumping to 4.43.0#12036
Fix openai-java latestDep tests after bumping to 4.43.0#12036AlexeyKuznetsov-DD wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
More details
The PR safely bumps openai-java from 4.41.0 to 4.43.0 and updates all 12 response fixtures with the new required cache_write_tokens field. All fixtures have valid JSON syntax and maintain backward compatibility with the pinned 3.0.1 SDK version.
📊 Validated against 12 scenarios · Open Bits AI session
🤖 Datadog Autotest · Commit 5b07986 · What is Autotest? · Any feedback? Reach out in #autotest
|
🎯 Code Coverage (details) 🔗 Commit SHA: 5b07986 | Docs | Datadog PR Page | Give us feedback! |
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
What Does This Do
Bumps
openai-javalatest-dep tests from4.41.0to4.43.0and fixes the resultinglatestDepTestfailure in theopenai-java-3.0instrumentation.4.43.0added a new fieldcache_write_tokenstoResponseUsage.InputTokensDetailsand made it required by the SDK's generatedvalidate(). The recorded Responses fixtures predate that field, soresp.parse().valid(which runs full schema validation) started returningfalse.Fix: added
"cache_write_tokens": 0to theinput_tokens_detailsblock of the affectedhttp-records/responses/*.recfixtures.Motivation
.validassertion, which forces full response parsing so all span tags get set.3.0.1testrun: an extra JSON field just lands inadditionalProperties, andvalidate()only fails on missing known fields. So both the pinnedtestand floatinglatestDepTestpass.Additional Notes
latestDepTestfloats to the newest SDK, so this class of break can recur if a future release adds another required-validated field — the fix is the same (add it to the response fixtures).test(3.0.1) +latestDepTest(4.43.0) → 190 passed, 0 failed.