Skip to content

feat(api): add prewarmed hosted environments - #1155

Merged
dpiet-oai merged 1 commit into
mainfrom
castiron/promotions/pr-223
Oct 9, 2026
Merged

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

Conversation

@dpiet-oai

Copy link
Copy Markdown
Contributor

Prepare an OpenAI-hosted environment before creating a beta Agents session. Add environment creation and paginated listing, session attachment by environment ID, the standalone ready status, and ready/failed webhook parsing. Prewarming access and OpenAI-Beta: agents=v1 remain required.

Environment creation generates one idempotency key per call and reuses it across retries. Explicit caller keys retain precedence. Diagnostic strings redact environment configuration without changing request serialization. Existing webhook visitors retain their unknown-event fallback.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Castiron custom code

Evaluated main: e887c46208c575faf7163721f71e4d8d15256dfc.

Mixed files: 102 → 105

3 newly customized · 0 customizations removed · 0 existing customizations changed · 5 generated baselines changed

Compared 130684e8b0fb → 080fd78823c4. Generated baselines verified.

File Result Current custom patch
openai-java-core/src/main/kotlin/com/openai/models/beta/agents/environments/EnvironmentCreateParams.kt Newly customized +4 / −7
openai-java-core/src/main/kotlin/com/openai/models/webhooks/UnwrapWebhookEvent.kt Generated baseline changed +15 / −9
openai-java-core/src/main/kotlin/com/openai/services/async/beta/agents/EnvironmentServiceAsyncImpl.kt Generated baseline changed +10 / −0
openai-java-core/src/main/kotlin/com/openai/services/blocking/beta/agents/EnvironmentServiceImpl.kt Generated baseline changed +10 / −0
openai-java-core/src/test/kotlin/com/openai/services/async/WebhookServiceAsyncTest.kt Generated baseline changed +58 / −6
openai-java-core/src/test/kotlin/com/openai/services/blocking/WebhookServiceTest.kt Generated baseline changed +69 / −6
99 existing customizations unchanged
  • openai-java-core/src/main/kotlin/com/openai/models/audio/AudioResponseFormat.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuth.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuthCreateParam.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/agents/vaults/credentials/CredentialAuthRotateParam.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponse.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInjectEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseInjectFailedEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseStreamEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponseToolSearchOutputItemParam.kt
  • openai-java-core/src/main/kotlin/com/openai/models/beta/responses/BetaResponsesServerEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.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/conversations/ConversationCreateParams.kt
  • openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ItemCreateParams.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/live/ResponseItemCreateEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionToolCall.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputItem.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseStreamEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseTextConfig.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseToolSearchOutputItemParam.kt
  • openai-java-core/src/main/kotlin/com/openai/models/responses/ResponsesServerEvent.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

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

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

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

@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 b59caced025155fd7b381d74af50dca94d2c75a4; no blocking source findings. Sync and async creation generate one idempotency key before retries and preserve caller keys. Pagination carries filters forward; environment-ID attachment and ready/failed webhook parsing follow the schema. New webhook visitor methods retain the unknown-event fallback, and create diagnostics redact configuration without changing JSON. The large generated create model represents a narrower contract than the session environment union and reuses shared nested types.

Hosted build, lint, Jackson/API compatibility, Java 8/25 runtime, version-support, and Castiron checks passed. The test job failed in the unchanged AgentTurnResultsTest async-cancellation test, and the required gate failed with it; its cause remains unverified. This approval does not establish green CI. Validation was source-only; I did not run repository workloads or exercise the live prewarming service. Beta access and the agents=v1 header remain required. This review does not establish server rollout or release readiness.

Castiron-Internal-PR: openai/openai-java-internal#223
Castiron-Source-SHA: a3c9c78bb5f6646fcd966efd706c439f8db64568
Castiron-Public-Base-SHA: 130684e
@dpiet-oai
dpiet-oai force-pushed the castiron/promotions/pr-223 branch from b59cace to 080fd78 Compare October 8, 2026 23:52
@dpiet-oai
dpiet-oai marked this pull request as ready for review October 9, 2026 00:11
@dpiet-oai
dpiet-oai requested a review from a team as a code owner October 9, 2026 00:11
@dpiet-oai
dpiet-oai added this pull request to the merge queue Oct 9, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 9, 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-10-09T00:14:28.402491Z 080fd78 Draft marked ready
🔒 Security Review ✅ Completed 2026-10-09T00:14:21.537883Z 080fd78 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 Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 11.166s for Java SDK PR #1155.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 86ms
tests/chat-completions-create.test.ts ✅ Passed 431ms
tests/chat-completions-stream.test.ts ✅ Passed 296ms
tests/files-content-binary.test.ts ✅ Passed 197ms
tests/files-create-multipart.test.ts ✅ Passed 374ms
tests/files-list-pagination.test.ts ✅ Passed 160ms
tests/initialize-config.test.ts ✅ Passed 131ms
tests/instance-isolation.test.ts ✅ Passed 99ms
tests/models-list.test.ts ✅ Passed 140ms
tests/responses-background-lifecycle.test.ts ✅ Passed 179ms
tests/responses-body-method-errors.test.ts ✅ Passed 429ms
tests/responses-cancel-timeout.test.ts ✅ Passed 164ms
tests/responses-cancel.test.ts ✅ Passed 250ms
tests/responses-compact-retries.test.ts ✅ Passed 227ms
tests/responses-compact.test.ts ✅ Passed 175ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 421ms
tests/responses-create-advanced.test.ts ✅ Passed 823ms
tests/responses-create-disconnect.test.ts ✅ Passed 1.042s
tests/responses-create-errors.test.ts ✅ Passed 277ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 114ms
tests/responses-create-retries.test.ts ✅ Passed 171ms
tests/responses-create-stream-failures.test.ts ✅ Passed 115ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 181ms
tests/responses-create-stream-wire.test.ts ✅ Passed 3.977s
tests/responses-create-stream.test.ts ✅ Passed 53ms
tests/responses-create-terminal-states.test.ts ✅ Passed 202ms
tests/responses-create-timeout.test.ts ✅ Passed 146ms
tests/responses-create.test.ts ✅ Passed 531ms
tests/responses-delete.test.ts ✅ Passed 182ms
tests/responses-input-items-errors.test.ts ✅ Passed 200ms
tests/responses-input-items-list.test.ts ✅ Passed 196ms
tests/responses-input-items-options.test.ts ✅ Passed 111ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 212ms
tests/responses-input-tokens-count.test.ts ✅ Passed 156ms
tests/responses-malformed-inputs.test.ts ✅ Passed 3.173s
tests/responses-not-found-errors.test.ts ✅ Passed 322ms
tests/responses-parse.test.ts ✅ Passed 334ms
tests/responses-retrieve-retries.test.ts ✅ Passed 181ms
tests/responses-retrieve.test.ts ✅ Passed 199ms
tests/responses-stored-method-errors.test.ts ✅ Passed 824ms
tests/retry-behavior.test.ts ✅ Passed 3.232s
tests/sdk-error-shape.test.ts ✅ Passed 376ms

View OkTest run #37863513308

SDK merge (84031ba3cef8) · head (080fd78823c4) · base (130684e8b0fb) · OkTest (505ac0e34283)

Merged via the queue into main with commit 4264044 Oct 9, 2026
16 checks passed
@openai-sdks openai-sdks Bot mentioned this pull request Oct 9, 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.

2 participants