feat(api): add access programs and credential metadata - #1088
Conversation
Castiron custom codeMixed files: 92 → 93 4 newly customized · 3 customizations removed · 2 existing customizations changed · 26 generated baselines changed Compared
66 existing customizations unchanged
26 more in the full report. A changed generated baseline means this report cannot reliably identify which handwritten lines changed. Inspect the custom-code diffDownload the exact patch produced by this run (requires repository access): gh run download 36193560091 --repo openai/openai-java \
--name castiron-custom-code-36193560091-1 --dir /tmp/castiron-custom-code-36193560091-1
git apply --stat /tmp/castiron-custom-code-36193560091-1/custom-code.patch
cat /tmp/castiron-custom-code-36193560091-1/custom-code.patchOr reproduce it from an SDK checkout containing the vendored reporter: git fetch --no-tags origin 2bfb7186eac7af18ba080eb3effd417a1ea44844 bb06497160e4c0649272849fe55387ae606959ba
python3 scripts/castiron/custom_code_report.py report \
--base 2bfb7186eac7af18ba080eb3effd417a1ea44844 \
--head bb06497160e4c0649272849fe55387ae606959ba --fetch --require-head-hash --public \
--out /tmp/castiron-custom-code-bb06497160e4
cat /tmp/castiron-custom-code-bb06497160e4/custom-code.patchThis is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0980af735
ℹ️ 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".
dpiet-oai
left a comment
There was a problem hiding this comment.
The current OpenAPI snapshot still needs reconciliation before this public promotion can safely merge.
markstuart-oai
left a comment
There was a problem hiding this comment.
Reviewed f0980af735257622352e474d18c9a3a4c98ebd5d. The OpenAPI reconciliation noted in the PR is still needed before approval. I independently confirmed these two existing findings:
- Plain-text audio responses: the snapshot drops
text/plainfrom transcription and translation responses, although the request formats and response handlers still support text output. Restore those variants in the authoritative schema and regenerate the reference. - Stored Chat Completions errors: the list/retrieve/update/delete and messages operations lose their documented error responses. Carry the existing status-code and error-body definitions forward in the source schema rather than overwriting the recent documentation improvements.
The access-program models, credential metadata and metadata-only updates, enum additions, and sanitized unknown-union errors follow the existing model/serialization patterns; I found no additional substantive issue in those changes. Referencing the existing inline discussions above to keep each fix in one place.
Source-only review against the pinned base and head; no repository tests, build, or generation were run locally. Hosted build, lint, version-support-matrix, and baseline-consistency checks passed at this head; tests and compatibility checks were still running when checked.
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Reviewed f0980af735257622352e474d18c9a3a4c98ebd5d against 6b226243eac24cd295dd26fcc18cf45f19358b54. Requesting changes for the OpenAPI reconciliation already noted in the description:
- [P2] Preserve the audio response contract. The snapshot removes 16 documented error responses across speech/transcription/translation, six speech success media types, and the
text/plainsuccess variants for transcription and translation. The existing response handlers still support those text formats. This regresses the committed API reference even though the Java runtime behavior remains. Please carry forward these annotations in the authoritative schema and regenerate. This confirms the existing audio discussion and reconciliation finding. - [P2] Preserve stored Chat Completions error responses. All five stored-chat operations lose their current error definitions: 17 responses in total, covering applicable 400/404/429/500 cases. Restore the existing status codes and error-body schemas alongside the new feature changes. Confirming the existing stored-chat discussion, without duplicating its inline comment.
I reviewed the access-program request/response/client-event models and structured delegates, credential metadata and metadata-only updates, new enum values, video headers, and unknown-union diagnostic changes. The stable/beta paths are consistent; existing stable Response builder chains retain their null default. I found no additional blocking issue in those changes.
Validation: all 340 file diffs accounted for, including 270 mechanically checked payload-only exception-message changes; complete base/head YAML parsing, duplicate-key/reference checks (3,951 local references resolve), and generation-hash verification. The audio parsing paths were inspected directly. No repository build or JVM tests were run locally. Hosted build, lint, version matrix, Jackson compatibility, Java 8/25 runtime compatibility, and baseline checks passed when checked; tests and API compatibility were still running.
Castiron-Internal-PR: openai/openai-java-internal#154 Castiron-Source-SHA: 732659ebd2b2ac1b82985c50c503e7527d46168c Castiron-Public-Base-SHA: 2bfb718
f0980af to
bb06497
Compare
|
Updated to The source response definitions have been reconciled and the SDK regenerated against current main. The update restores all 16 audio error responses, six speech media types, both transcription/translation text responses, and all 17 stored Chat Completions error responses identified in review. It also preserves the newer fine-tuning/model annotations: 71 error-response definitions and eight success media types in total, checked against the public baseline. The three annotation threads are resolved. I replied to the credential-builder suggestion with the rationale for retaining the current auth-only/metadata-only/combined update shape; that discussion remains open for reviewer confirmation. The incremental Java changes are documentation only. The full candidate passed internal CI, and public CI is running on this commit. No merge or release has been performed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bb06497160
ℹ️ 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".
jbeckwith-oai
left a comment
There was a problem hiding this comment.
Re-reviewed bb06497160e4c0649272849fe55387ae606959ba against current base 2bfb7186eac7af18ba080eb3effd417a1ea44844. My earlier blocking findings are fixed; approving this revision.
I independently verified that all 71 restored error-response definitions and eight audio success media types exactly match the public baseline, including the 16 audio and 17 stored-chat errors I flagged. The other 38 definitions preserve the newer fine-tuning/model documentation. The transcription description and generated method documentation now accurately include text/SRT/VTT output.
The exact old-head/new-head tree comparison contains only five changed files: generation metadata, the OpenAPI snapshot, and three KDoc-only transcription files. Removing KDoc leaves those Kotlin files byte-identical; all other runtime, test, compatibility, workflow, and budget files are unchanged from the head already reviewed. Full YAML validation found only the 71 response restorations, eight media-type restorations, and transcription-description update; all 4,019 local references resolve, with no duplicate keys and a matching generation hash.
I also read the credential-builder rationale. Individual optional fields and server-side validation of the at-least-one-field constraint are consistent with this generated API shape. The separate GCP typing suggestion concerns explicitly Java-skipped schemas; this scoped change does not claim typed GCP support or remove an existing Java provider variant.
No local JVM build or tests were run for this documentation/schema-only follow-up. The previous runtime-equivalent head passed repository CI and 236/236 OkTest cases. Current-head lint/version-matrix/baseline checks have passed; the new public build/tests/compatibility run is still pending and must finish before merge.
markstuart-oai
left a comment
There was a problem hiding this comment.
Re-reviewed bb06497160e4c0649272849fe55387ae606959ba. My prior audio and stored Chat Completions findings are addressed: all 71 restored error responses and eight success media types match the current-main baseline exactly, and the transcription documentation again lists the supported text formats. No further actionable findings.
The runtime/model changes are unchanged from the previous review; the incremental edits are the schema restoration, generated transcription documentation, and generation metadata. I also checked the new GCP comment: typed GCP support is explicitly excluded for Java, while the documented raw-JSON fallback and opt-in, non-forward-compatible response validation retain their existing behavior. That is a feature-scope limitation rather than an introduced regression.
Source-only review; no local tests, builds, or generation were run. Hosted lint, version-support matrix, and baseline consistency checks pass; the public build and downstream checks have not all completed.
Summary
Adds typed access-program selection to Responses requests, client events, and response models, including the structured-output helpers. Adds metadata to vault credentials and allows metadata-only credential updates. Adds the ultrafast Agents service tier, explicit fable/onyx/nova speech voice values, the session misalignment_policy_violation error code, and video retry-header details.
Unknown union-variant exceptions now omit raw JSON values from their messages. The API reference preserves the published audio response formats and documented errors for audio, stored Chat Completions, fine-tuning, and models.
Compatibility
This is a minor feature release. Credential-update
auth()getters now returnOptional<CredentialAuthRotateParam>; callers reading the old direct value must handle presence explicitly. Manually constructed credential responses must supply metadata (an empty metadata object is valid). These are changes to the Agents beta surface. The targeted compatibility exception was introduced in #1085.Existing stable Response builder chains remain valid when access programs are omitted.
Validation
Regenerated against current public main after reconciling the source response definitions. Verified that all 71 restored error-response definitions and eight success media types match the public baseline. The incremental Java changes are documentation only; SDK configuration and existing runtime/compatibility fixes are unchanged. Public CI is running for the updated commit.
Before merge
API contract
The Agents
ultrafastrequest and response enum values are present in the published OpenAPI specification. This change adds Java typing for that contract.