Skip to content

Fix OpenAI Java 4.54 compatibility - #12340

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
alexeyk/fix-openai-java-4.54-muzzle
Aug 30, 2026
Merged

Fix OpenAI Java 4.54 compatibility#12340
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
alexeyk/fix-openai-java-4.54-muzzle

Conversation

@AlexeyKuznetsov-DD

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

Adds compatibility handling for ResponseInputItem.FunctionCallOutput.callId() across OpenAI Java versions. Versions before 4.54 return String; version 4.54 and later return Optional<String>. The instrumentation resolves the accessor through the existing method-handle compatibility helper and normalizes both forms to a nullable string.

Updates latest-dependency coverage to OpenAI Java 4.54.0, asserts that function-call output IDs are preserved, and adds the request fixture for the 4.54 serialization order.

Motivation

OpenAI Java 4.54.0 made function-call output call IDs optional, changing the JVM method descriptor. The existing direct invocation referenced the earlier String descriptor, causing muzzle validation to reject 4.54.0 and preventing the instrumentation from loading for that version.

Additional Notes

Validation:

  • ./gradlew :dd-java-agent:instrumentation:openai-java:openai-java-3.0:muzzle
  • ./gradlew :dd-java-agent:instrumentation:openai-java:openai-java-3.0:test :dd-java-agent:instrumentation:openai-java:openai-java-3.0:latestDepTest --tests ResponseServiceTest

The minimum-dependency suite uses OpenAI Java 3.0.1 and the latest-dependency suite uses OpenAI Java 4.54.0. The response tests passed against both versions. The compatibility fallback is intentionally silent, so an unexpected SDK shape cannot produce a debug-log entry for every function-call output.

Upstream API change: openai/openai-java#939

Contributor Checklist

Jira ticket: [PROJ-IDENT]

@AlexeyKuznetsov-DD AlexeyKuznetsov-DD added type: bug fix Bug fix comp: mlobs ML Observability (LLMObs) tag: ai generated Largely based on code generated by an AI or LLM labels Aug 29, 2026
@AlexeyKuznetsov-DD AlexeyKuznetsov-DD self-assigned this Aug 29, 2026
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD marked this pull request as ready for review August 29, 2026 02:17
@AlexeyKuznetsov-DD
AlexeyKuznetsov-DD requested a review from a team as a code owner August 29, 2026 02:17
@dd-octo-sts

dd-octo-sts Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Hi! 👋 Thanks for your pull request! 🎉

To help us review it, please make sure to:

  • Remove the issue linking keyword

If you need help, please check our contributing guidelines.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 29, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-29T20:23:14.619430Z e265663 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-prod-us1-5 datadog-prod-us1-5 Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

More details

The method handle does not bind to either SDK return descriptor. It returns the call ID for both String and Optional results.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Datadog Autotest · Commit e265663 · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@datadog-prod-us1-5

datadog-prod-us1-5 Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 69.74% (+10.93%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: a3b92de | Docs | View more details | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.03 s 13.96 s [-0.2%; +1.3%] (no difference)
startup:insecure-bank:tracing:Agent 12.94 s 12.93 s [-0.7%; +0.8%] (no difference)
startup:petclinic:appsec:Agent 16.82 s 16.69 s [-0.3%; +1.8%] (no difference)
startup:petclinic:iast:Agent 16.88 s 16.97 s [-1.3%; +0.3%] (no difference)
startup:petclinic:profiling:Agent 16.71 s 16.81 s [-1.5%; +0.4%] (no difference)
startup:petclinic:sca:Agent 16.80 s 16.62 s [+0.1%; +2.1%] (maybe worse)
startup:petclinic:tracing:Agent 16.07 s 16.12 s [-1.4%; +0.7%] (no difference)

Commit: a3b92de0 · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

@ygree

ygree commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: e2656636db

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ygree ygree left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a couple of non-critical notes, but it looks good overall.

@AlexeyKuznetsov-DD

Copy link
Copy Markdown
Contributor Author

/merge -f --reason "No need to run on MQ, since we skip Muzzle tests on MQ"

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Aug 30, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-08-30 19:57:38 UTC ℹ️ Start processing command /merge -f --reason "No need to run on MQ, since we skip Muzzle tests on MQ"


2026-08-30 19:57:44 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in master is approximately 0s (p90).


2026-08-30 19:57:52 UTC ℹ️ MergeQueue: This merge request was merged

Warning

This change was merged without running any pre merge CI checks

Reason: No need to run on MQ, since we skip Muzzle tests on MQ

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit c613d88 into master Aug 30, 2026
600 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the alexeyk/fix-openai-java-4.54-muzzle branch August 30, 2026 19:57
@github-actions github-actions Bot added this to the 1.66.0 milestone Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: mlobs ML Observability (LLMObs) tag: ai generated Largely based on code generated by an AI or LLM type: bug fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants