Skip to content

feat(api): add gpt-6-astra and related features - #969

Merged
apcha-oai merged 1 commit into
mainfrom
castiron/promotions/pr-55
Sep 3, 2026
Merged

feat(api): add gpt-6-astra and related features#969
apcha-oai merged 1 commit into
mainfrom
castiron/promotions/pr-55

Conversation

@apcha-oai

Copy link
Copy Markdown
Contributor

Summary

Add GPT-6 Astra support, safety alert retrieval and webhooks, and response steering across the stable and beta Responses APIs. Expand model, tool, and error types for asynchronous tools, steering guidance, and safety metadata.

Changes

  • Add the GPT_6_ASTRA model constant and support it in relevant chat and Responses model selectors.
  • Add blocking, asynchronous, and raw-response safety services for retrieving safety alerts by ID.
  • Add typed safety alert models and project- and organization-level safety alert webhook events, including webhook unwrapping helpers.
  • Add stable and beta response steering inputs, required-input payloads, accepted, pending, and failed events, error codes, pending reasons, and corresponding event union variants.
  • Add optional asynchronous execution settings to stable and beta custom, function, and namespace tools and related response models.
  • Expose typed misalignment details on general, Responses, beta Responses, and video errors, including explanations, classifications, and continuation instructions.

Castiron-Internal-PR: openai/openai-java-internal#55
Castiron-Source-SHA: d78518a3bc3dcb4a6e087dbf1c0a89cb97f11806
Castiron-Public-Base-SHA: d3191b0
@apcha-oai
apcha-oai marked this pull request as ready for review September 3, 2026 19:36
@apcha-oai
apcha-oai requested a review from a team as a code owner September 3, 2026 19:36
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 3, 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-03T19:42:16.529043Z 239c0bc Draft marked ready
🔒 Security Review Completed 2026-09-03T19:38:35.043600Z 239c0bc Draft marked ready
ℹ️ 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 3, 2026

Copy link
Copy Markdown
Contributor

OkTest Summary

237/237 SDK tests passed in 16.614s for Java SDK PR #969.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 373ms
tests/chat-completions-create.test.ts ✅ Passed 575ms
tests/chat-completions-stream.test.ts ✅ Passed 381ms
tests/files-content-binary.test.ts ✅ Passed 207ms
tests/files-create-multipart.test.ts ✅ Passed 270ms
tests/files-list-pagination.test.ts ✅ Passed 253ms
tests/initialize-config.test.ts ✅ Passed 225ms
tests/instance-isolation.test.ts ✅ Passed 185ms
tests/models-list.test.ts ✅ Passed 171ms
tests/responses-background-lifecycle.test.ts ✅ Passed 369ms
tests/responses-body-method-errors.test.ts ✅ Passed 506ms
tests/responses-cancel-timeout.test.ts ✅ Passed 231ms
tests/responses-cancel.test.ts ✅ Passed 431ms
tests/responses-compact-retries.test.ts ✅ Passed 472ms
tests/responses-compact.test.ts ✅ Passed 236ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 313ms
tests/responses-create-advanced.test.ts ✅ Passed 1.431s
tests/responses-create-disconnect.test.ts ✅ Passed 1.08s
tests/responses-create-errors.test.ts ✅ Passed 369ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 317ms
tests/responses-create-retries.test.ts ✅ Passed 264ms
tests/responses-create-stream-failures.test.ts ✅ Passed 305ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 392ms
tests/responses-create-stream-wire.test.ts ✅ Passed 6.339s
tests/responses-create-stream.test.ts ✅ Passed 114ms
tests/responses-create-terminal-states.test.ts ✅ Passed 492ms
tests/responses-create-timeout.test.ts ✅ Passed 216ms
tests/responses-create.test.ts ✅ Passed 746ms
tests/responses-delete.test.ts ✅ Passed 291ms
tests/responses-input-items-errors.test.ts ✅ Passed 287ms
tests/responses-input-items-list.test.ts ✅ Passed 309ms
tests/responses-input-items-options.test.ts ✅ Passed 248ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 209ms
tests/responses-input-tokens-count.test.ts ✅ Passed 490ms
tests/responses-malformed-inputs.test.ts ✅ Passed 5.15s
tests/responses-not-found-errors.test.ts ✅ Passed 546ms
tests/responses-parse.test.ts ✅ Passed 519ms
tests/responses-retrieve-retries.test.ts ✅ Passed 344ms
tests/responses-retrieve.test.ts ✅ Passed 278ms
tests/responses-stored-method-errors.test.ts ✅ Passed 1.201s
tests/retry-behavior.test.ts ✅ Passed 3.509s
tests/sdk-error-shape.test.ts ✅ Passed 386ms

View OkTest run #33797405314

SDK merge (ea0c199a4b48) · head (239c0bcb05cf) · base (d3191b0db2f4) · OkTest (2b1bdfd25e98)

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

53 mixed files remain; 0 existing customizations changed; 16 generated baselines changed.

Compared d3191b0db2f4239c0bcb05cf. Generated baselines verified.

File Result Current custom patch
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/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/ResponseInputItem.kt Generated baseline changed +9 / −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/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/async/beta/ThreadServiceAsyncTest.kt Generated baseline changed +2 / −0
openai-java-core/src/test/kotlin/com/openai/services/async/beta/threads/RunServiceAsyncTest.kt Generated baseline changed +3 / −0
openai-java-core/src/test/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsyncTest.kt Generated baseline changed +2 / −0
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
openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/ThreadServiceTest.kt Generated baseline changed +2 / −0
openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/threads/RunServiceTest.kt Generated baseline changed +3 / −0
openai-java-core/src/test/kotlin/com/openai/services/blocking/chat/ChatCompletionServiceTest.kt Generated baseline changed +2 / −0
37 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/chat/completions/ChatCompletionToolMessageParam.kt
  • openai-java-core/src/main/kotlin/com/openai/models/embeddings/Embedding.kt
  • openai-java-core/src/main/kotlin/com/openai/models/embeddings/EmbeddingCreateParams.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.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/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/ResponseServiceAsync.kt
  • openai-java-core/src/main/kotlin/com/openai/services/async/ResponseServiceAsyncImpl.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/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/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/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/services/async/CompletionServiceAsyncTest.kt
  • openai-java-core/src/test/kotlin/com/openai/services/async/ImageServiceAsyncTest.kt
  • openai-java-core/src/test/kotlin/com/openai/services/async/WebhookServiceAsyncTest.kt
  • openai-java-core/src/test/kotlin/com/openai/services/async/audio/TranscriptionServiceAsyncTest.kt
  • openai-java-core/src/test/kotlin/com/openai/services/blocking/CompletionServiceTest.kt
  • openai-java-core/src/test/kotlin/com/openai/services/blocking/ImageServiceTest.kt
  • openai-java-core/src/test/kotlin/com/openai/services/blocking/WebhookServiceTest.kt
  • openai-java-core/src/test/kotlin/com/openai/services/blocking/audio/TranscriptionServiceTest.kt
  • scripts/castiron/README.md
  • scripts/castiron/custom_code_report.py
  • scripts/castiron/test_custom_code_report.py

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 33797459399 --repo openai/openai-java \
  --name castiron-custom-code-33797459399-1 --dir /tmp/castiron-custom-code-33797459399-1
git apply --stat /tmp/castiron-custom-code-33797459399-1/custom-code.patch
cat /tmp/castiron-custom-code-33797459399-1/custom-code.patch

Or reproduce it from an SDK checkout containing the vendored reporter:

git fetch --no-tags origin d3191b0db2f456882fd2e2edc3dce126f85505e1 239c0bcb05cf6b473ebf5aefbbdc446486c2500d
python3 scripts/castiron/custom_code_report.py report \
  --base d3191b0db2f456882fd2e2edc3dce126f85505e1 \
  --head 239c0bcb05cf6b473ebf5aefbbdc446486c2500d --fetch --require-head-hash --public \
  --out /tmp/castiron-custom-code-239c0bcb05cf
cat /tmp/castiron-custom-code-239c0bcb05cf/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

@apcha-oai
apcha-oai merged commit 39f1715 into main Sep 3, 2026
10 checks passed
@openai-sdks openai-sdks Bot mentioned this pull request Sep 3, 2026

@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: 239c0bcb05

ℹ️ 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 on lines 40 to +43
class ResponsesClientEvent
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
private val type: JsonValue,
private val background: JsonField<Boolean>,
private val contextManagement: JsonField<List<ContextManagement>>,
private val conversation: JsonField<Conversation>,
private val include: JsonField<List<ResponseIncludable>>,
private val input: JsonField<Input>,
private val instructions: JsonField<String>,
private val maxOutputTokens: JsonField<Long>,
private val maxToolCalls: JsonField<Long>,
private val metadata: JsonField<Metadata>,
private val model: JsonField<ResponsesModel>,
private val moderation: JsonField<Moderation>,
private val parallelToolCalls: JsonField<Boolean>,
private val previousResponseId: JsonField<String>,
private val prompt: JsonField<ResponsePrompt>,
private val promptCacheKey: JsonField<String>,
private val promptCacheOptions: JsonField<PromptCacheOptions>,
private val promptCacheRetention: JsonField<PromptCacheRetention>,
private val reasoning: JsonField<Reasoning>,
private val safetyIdentifier: JsonField<String>,
private val serviceTier: JsonField<ServiceTier>,
private val store: JsonField<Boolean>,
private val stream: JsonField<Boolean>,
private val streamId: JsonField<String>,
private val streamOptions: JsonField<StreamOptions>,
private val temperature: JsonField<Double>,
private val text: JsonField<ResponseTextConfig>,
private val toolChoice: JsonField<ToolChoice>,
private val tools: JsonField<List<Tool>>,
private val topLogprobs: JsonField<Long>,
private val topP: JsonField<Double>,
private val truncation: JsonField<Truncation>,
private val user: JsonField<String>,
private val additionalProperties: MutableMap<String, JsonValue>,
private val responseCreate: ResponseCreate? = null,
private val responseSteer: ResponseSteerEvent? = null,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve the existing ResponsesClientEvent builder API

Existing WebSocket clients that construct ResponsesClientEvent.builder().model(...).build() or reference nested types such as ResponsesClientEvent.ContextManagement will no longer compile after upgrading, and already-compiled clients can fail with NoSuchMethodError, because this change replaces the released concrete event API with a union and moves the create payload under ResponseCreate without a compatibility façade. Retain deprecated builder/accessor/type bridges while exposing the new steering variant.

AGENTS.md reference: AGENTS.md:L5-L8

Useful? React with 👍 / 👎.

Comment on lines +264 to +265
private val message: Message? = null,
private val functionCallOutput: FunctionCallOutput? = null,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove unsupported tool outputs from steering input

When a caller uses this typed functionCallOutput variant, the serializer emits a tool-output item in response.steer.input, even though the newly added ResponseSteerEvent.input contract explicitly permits only user messages and says tool outputs are unsupported; such an event is therefore rejected as invalid input despite being constructible through the SDK. Align the authoritative steering-item schema with that contract and regenerate both stable and beta models.

AGENTS.md reference: AGENTS.md:L5-L8

Useful? React with 👍 / 👎.

apcha-oai pushed a commit that referenced this pull request Sep 3, 2026
Automated Release PR
---


##
[4.57.0](v4.56.0...v4.57.0)
(2026-09-03)


### Features

* **api:** add gpt-6-astra and related features
([#969](#969))
([39f1715](39f1715))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: openai-sdks[bot] <284451331+openai-sdks[bot]@users.noreply.github.com>
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.

1 participant