Skip to content

feat(api): add access programs and credential metadata - #1088

Merged
dpiet-oai merged 1 commit into
mainfrom
castiron/promotions/pr-154
Sep 25, 2026
Merged

dpiet-oai merged 1 commit into
mainfrom
castiron/promotions/pr-154

Conversation

@dpiet-oai

@dpiet-oai dpiet-oai commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

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 return Optional<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

  • Verify server-side readiness for newly modeled Agents capabilities before release; SDK enum support does not establish access or availability.

API contract

The Agents ultrafast request and response enum values are present in the published OpenAPI specification. This change adds Java typing for that contract.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Mixed files: 92 → 93

4 newly customized · 3 customizations removed · 2 existing customizations changed · 26 generated baselines changed

Compared 2bfb7186eac7 → bb06497160e4. Generated baselines verified.

File Result Current custom patch
openai-java-core/src/main/kotlin/com/openai/models/audio/transcriptions/TranscriptionCreateParams.kt Generated baseline changed None
openai-java-core/src/main/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuth.kt Generated baseline changed +19 / −4
openai-java-core/src/main/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuthCreateParam.kt Generated baseline changed +29 / −5
openai-java-core/src/main/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuthRotateParam.kt Generated baseline changed +29 / −5
openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponse.kt Generated baseline changed +2 / −3
openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseStreamEvent.kt Generated baseline changed +2 / −0
openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponsesServerEvent.kt Generated baseline changed +2 / −0
openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.kt Generated baseline changed +42 / −57
openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionToolMessageParam.kt Generated baseline changed +9 / −0
openai-java-core/src/main/kotlin/com/openai/models/embeddings/EmbeddingCreateParams.kt Generated baseline changed +2 / −1
openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt Generated baseline changed +2 / −3
openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt Generated baseline changed +58 / −0
openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCall.kt Generated baseline changed +16 / −0
openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt Generated baseline changed +22 / −22
openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputItem.kt Generated baseline changed +9 / −0
openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseStreamEvent.kt Generated baseline changed +2 / −0
openai-java-core/src/main/kotlin/com/openai/models/responses/ResponsesServerEvent.kt Generated baseline changed +2 / −0
openai-java-core/src/main/kotlin/com/openai/models/webhooks/UnwrapWebhookEvent.kt Generated baseline changed +3 / −2
openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranscriptionServiceAsync.kt Customization removed None
openai-java-core/src/main/kotlin/com/openai/services/blocking/audio/TranscriptionService.kt Customization removed None
openai-java-core/src/test/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuthRotateParamTest.kt Existing customization changed +175 / −0
openai-java-core/src/test/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuthTest.kt Existing customization changed +121 / −1
openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseTest.kt Generated baseline changed +27 / −0
openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponsesServerEventTest.kt Generated baseline changed +101 / −0
openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseTest.kt Generated baseline changed +27 / −0
openai-java-core/src/test/kotlin/com/openai/models/responses/ResponsesServerEventTest.kt Generated baseline changed +101 / −0
openai-java-core/src/test/kotlin/com/openai/services/async/ResponseServiceAsyncTest.kt Generated baseline changed +3 / −0
openai-java-core/src/test/kotlin/com/openai/services/async/beta/ResponseServiceAsyncTest.kt Generated baseline changed +1 / −4
openai-java-core/src/test/kotlin/com/openai/services/blocking/ResponseServiceTest.kt Generated baseline changed +3 / −0
openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/ResponseServiceTest.kt Generated baseline changed +1 / −3
66 existing customizations unchanged
  • openai-java-core/src/main/kotlin/com/openai/models/audio/AudioResponseFormat.kt
  • openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionMessageFunctionToolCall.kt
  • openai-java-core/src/main/kotlin/com/openai/models/embeddings/Embedding.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseTextConfig.kt
  • openai-java-core/src/main/kotlin/com/openai/models/videos/Video.kt
  • openai-java-core/src/main/kotlin/com/openai/models/webhooks/WebhookEndpointWithSecret.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/BetaServiceAsync.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/BetaServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsync.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/SkillServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/VideoServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/WebhookServiceAsync.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/WebhookServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranscriptionServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/audio/TranslationServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/beta/agents/SessionServiceAsync.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/beta/agents/SessionServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsync.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/finetuning/checkpoints/PermissionServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/skills/VersionServiceAsyncImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/BetaService.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/BetaServiceImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/ResponseService.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/ResponseServiceImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/WebhookService.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/WebhookServiceImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/audio/TranscriptionServiceImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/audio/TranslationServiceImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/beta/agents/SessionService.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/beta/agents/SessionServiceImpl.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/chat/ChatCompletionService.kt
  • openai-java-core/src/main/kotlin/com/openai/services/blocking/finetuning/checkpoints/PermissionServiceImpl.kt
  • openai-java-core/src/test/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuthCreateParamTest.kt
  • openai-java-core/src/test/kotlin/com/openai/models/beta/responses/BetaResponseFunctionWebSearchTest.kt
  • openai-java-core/src/test/kotlin/com/openai/models/live/ClientEventTest.kt
  • openai-java-core/src/test/kotlin/com/openai/models/live/ServerEventTest.kt
  • openai-java-core/src/test/kotlin/com/openai/models/live/SessionClosedEventTest.kt
  • openai-java-core/src/test/kotlin/com/openai/models/live/SessionStartEventTest.kt

26 more in the full report.

A changed generated baseline means this report cannot reliably identify which handwritten lines changed.

Inspect the custom-code diff

Download 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.patch

Or 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.patch

This is the current full custom patch for mixed files, not an attribution of only the handwritten lines changed by this PR.

Full report and patch

@dpiet-oai
dpiet-oai marked this pull request as ready for review September 25, 2026 21:03
@dpiet-oai
dpiet-oai requested a review from a team as a code owner September 25, 2026 21:03
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 25, 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-09-25T21:50:13.795927Z bb06497 New commits
🔒 Security Review ✅ Completed 2026-09-25T21:50:03.542613Z bb06497 New commits
ℹ️ 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.

@openai-sdks

openai-sdks Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 17.173s for Java SDK PR #1088.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 596ms
tests/chat-completions-create.test.ts ✅ Passed 736ms
tests/chat-completions-stream.test.ts ✅ Passed 544ms
tests/files-content-binary.test.ts ✅ Passed 272ms
tests/files-create-multipart.test.ts ✅ Passed 288ms
tests/files-list-pagination.test.ts ✅ Passed 336ms
tests/initialize-config.test.ts ✅ Passed 230ms
tests/instance-isolation.test.ts ✅ Passed 196ms
tests/models-list.test.ts ✅ Passed 342ms
tests/responses-background-lifecycle.test.ts ✅ Passed 207ms
tests/responses-body-method-errors.test.ts ✅ Passed 728ms
tests/responses-cancel-timeout.test.ts ✅ Passed 241ms
tests/responses-cancel.test.ts ✅ Passed 233ms
tests/responses-compact-retries.test.ts ✅ Passed 289ms
tests/responses-compact.test.ts ✅ Passed 265ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 381ms
tests/responses-create-advanced.test.ts ✅ Passed 1.401s
tests/responses-create-disconnect.test.ts ✅ Passed 1.093s
tests/responses-create-errors.test.ts ✅ Passed 417ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 299ms
tests/responses-create-retries.test.ts ✅ Passed 325ms
tests/responses-create-stream-failures.test.ts ✅ Passed 1.495s
tests/responses-create-stream-timeout.test.ts ✅ Passed 258ms
tests/responses-create-stream-wire.test.ts ✅ Passed 6.373s
tests/responses-create-stream.test.ts ✅ Passed 257ms
tests/responses-create-terminal-states.test.ts ✅ Passed 460ms
tests/responses-create-timeout.test.ts ✅ Passed 267ms
tests/responses-create.test.ts ✅ Passed 426ms
tests/responses-delete.test.ts ✅ Passed 280ms
tests/responses-input-items-errors.test.ts ✅ Passed 257ms
tests/responses-input-items-list.test.ts ✅ Passed 324ms
tests/responses-input-items-options.test.ts ✅ Passed 157ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 305ms
tests/responses-input-tokens-count.test.ts ✅ Passed 224ms
tests/responses-malformed-inputs.test.ts ✅ Passed 5.245s
tests/responses-not-found-errors.test.ts ✅ Passed 452ms
tests/responses-parse.test.ts ✅ Passed 604ms
tests/responses-retrieve-retries.test.ts ✅ Passed 232ms
tests/responses-retrieve.test.ts ✅ Passed 258ms
tests/responses-stored-method-errors.test.ts ✅ Passed 996ms
tests/retry-behavior.test.ts ✅ Passed 3.503s
tests/sdk-error-shape.test.ts ✅ Passed 381ms

View OkTest run #36193430316

SDK merge (b61928f8bf4a) · head (bb06497160e4) · base (2bfb7186eac7) · OkTest (f9111d4e2fcd)

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread api_reference/openapi.transformed.yml Outdated
Comment thread api_reference/openapi.transformed.yml

@dpiet-oai dpiet-oai left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The current OpenAPI snapshot still needs reconciliation before this public promotion can safely merge.

Comment thread api_reference/openapi.transformed.yml

@markstuart-oai markstuart-oai 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.

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/plain from 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 jbeckwith-oai 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.

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/plain success 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
@dpiet-oai

Copy link
Copy Markdown
Contributor Author

Updated to bb06497160e4c0649272849fe55387ae606959ba and requested re-review from @markstuart-oai and @jbeckwith-oai.

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.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread api_reference/openapi.transformed.yml

@jbeckwith-oai jbeckwith-oai 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.

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 markstuart-oai 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.

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.

@dpiet-oai
dpiet-oai enabled auto-merge September 25, 2026 21:58
@dpiet-oai
dpiet-oai added this pull request to the merge queue Sep 25, 2026
Merged via the queue into main with commit c197342 Sep 25, 2026
16 checks passed
@openai-sdks openai-sdks Bot mentioned this pull request Sep 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants