Skip to content

build(deps): upgrade Kotlin declarations together to 2.2.21 - #1079

Merged
dpiet-oai merged 1 commit into
mainfrom
fix/kotlin-compatible-upgrade
Sep 24, 2026
Merged

dpiet-oai merged 1 commit into
mainfrom
fix/kotlin-compatible-upgrade

Conversation

@dpiet-oai

Copy link
Copy Markdown
Contributor

Summary

Upgrade both Kotlin build declarations together from 1.9.20 to 2.2.21.

Supersedes #909 and #930. Their separate 2.4.10 bumps leave the declarations mismatched and do not support the SDK's pinned Kotlin 1.8 language level. Kotlin 2.2.21 supports the existing Gradle 8.12 and Kotlin 1.8 language/API settings.

The diff changes only the two version declarations. Java runtime floors, Kotlin language/API 1.8, stdlib 1.8.0, and Gradle/Dokka/publishing configuration remain unchanged. Expected SDK release treatment: patch within the existing compatibility contract.

Validation

  • Build logic tests and full CI build command (Jackson compatibility run separately)
  • Kotlin and Java lint
  • Baseline/proposed API compatibility checks against main at 2cbf22c
  • All four artifact runtime probes on Java 21
  • Offline tests with SKIP_MOCK_TESTS=true, including Jackson compatibility and ProGuard/R8
  • Generated Maven POMs for all four artifacts still declare kotlin-stdlib-jdk8 1.8.0
  • Two consecutive clean adversarial-review rounds, each with two independent reviewers; dependency/security scope reviewed
  • git diff --check

GitHub CI will additionally run mock-server tests and Java 8/25 runtime probes. Gradle emits an embedded-Kotlin version warning and Kotlin 1.8 deprecation warnings; the local validations above pass with those warnings. This is not a claim of security remediation.

References

@dpiet-oai
dpiet-oai requested a review from a team as a code owner September 24, 2026 22:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 24, 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-24T22:29:28.466676Z eb1859d PR opened
🔒 Security Review ✅ Completed 2026-09-24T22:29:01.603388Z eb1859d PR opened
ℹ️ 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 24, 2026 •

Copy link
Copy Markdown
Contributor

OkTest Summary

✅ 236/236 SDK tests passed in 17.376s for Java SDK PR #1079.

Test results — 42 files
Test Result Time
tests/chat-completions-complex-body.test.ts ✅ Passed 248ms
tests/chat-completions-create.test.ts ✅ Passed 815ms
tests/chat-completions-stream.test.ts ✅ Passed 731ms
tests/files-content-binary.test.ts ✅ Passed 340ms
tests/files-create-multipart.test.ts ✅ Passed 447ms
tests/files-list-pagination.test.ts ✅ Passed 263ms
tests/initialize-config.test.ts ✅ Passed 181ms
tests/instance-isolation.test.ts ✅ Passed 264ms
tests/models-list.test.ts ✅ Passed 311ms
tests/responses-background-lifecycle.test.ts ✅ Passed 274ms
tests/responses-body-method-errors.test.ts ✅ Passed 459ms
tests/responses-cancel-timeout.test.ts ✅ Passed 264ms
tests/responses-cancel.test.ts ✅ Passed 333ms
tests/responses-compact-retries.test.ts ✅ Passed 302ms
tests/responses-compact.test.ts ✅ Passed 238ms
tests/responses-create-advanced-stream.test.ts ✅ Passed 337ms
tests/responses-create-advanced.test.ts ✅ Passed 1.586s
tests/responses-create-disconnect.test.ts ✅ Passed 1.108s
tests/responses-create-errors.test.ts ✅ Passed 314ms
tests/responses-create-malformed-api-responses.test.ts ✅ Passed 295ms
tests/responses-create-retries.test.ts ✅ Passed 382ms
tests/responses-create-stream-failures.test.ts ✅ Passed 339ms
tests/responses-create-stream-timeout.test.ts ✅ Passed 334ms
tests/responses-create-stream-wire.test.ts ✅ Passed 6.603s
tests/responses-create-stream.test.ts ✅ Passed 500ms
tests/responses-create-terminal-states.test.ts ✅ Passed 424ms
tests/responses-create-timeout.test.ts ✅ Passed 251ms
tests/responses-create.test.ts ✅ Passed 907ms
tests/responses-delete.test.ts ✅ Passed 312ms
tests/responses-input-items-errors.test.ts ✅ Passed 304ms
tests/responses-input-items-list.test.ts ✅ Passed 285ms
tests/responses-input-items-options.test.ts ✅ Passed 209ms
tests/responses-input-tokens-count-timeout.test.ts ✅ Passed 222ms
tests/responses-input-tokens-count.test.ts ✅ Passed 444ms
tests/responses-malformed-inputs.test.ts ✅ Passed 5.441s
tests/responses-not-found-errors.test.ts ✅ Passed 487ms
tests/responses-parse.test.ts ✅ Passed 716ms
tests/responses-retrieve-retries.test.ts ✅ Passed 302ms
tests/responses-retrieve.test.ts ✅ Passed 362ms
tests/responses-stored-method-errors.test.ts ✅ Passed 1.004s
tests/retry-behavior.test.ts ✅ Passed 3.393s
tests/sdk-error-shape.test.ts ✅ Passed 445ms

View OkTest run #36067471387

SDK merge (c850bdc487f2) · head (eb1859da94ff) · base (2cbf22ca1926) · OkTest (bc2ef6ca05ab)

@github-actions

Copy link
Copy Markdown
Contributor

Castiron custom code

✅ No new custom-code files detected.

87 mixed files remain; 0 existing customizations changed.

Compared 2cbf22ca1926 → eb1859da94ff. Generated baselines verified.

87 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/BetaResponseStreamEvent.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/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/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/ResponsesServerEvent.kt
  • openai-java-core/src/main/kotlin/com/openai/models/videos/Video.kt
  • openai-java-core/src/main/kotlin/com/openai/models/webhooks/UnwrapWebhookEvent.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/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

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

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

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

@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 eb1859da94ff8e1f44ea7125641231f476dba211; no blocking findings.

The complete diff changes only the two Kotlin version values in buildSrc/build.gradle.kts, keeping the build plugin and convention-plugin dependency aligned. Eight independent source/base checks confirm that the Java runtime floors, Kotlin language/API 1.8 settings, stdlib 1.8.0 setting, JVM-default mode, Gradle wrapper, and publication configuration are unchanged. Kotlin 2.2.21 includes Gradle 8.12 in its supported Gradle range, and language level 1.8 remains supported with a deprecation warning.

Verified exact-head CI run 36067469210: build, lint, tests, API compatibility, Jackson compatibility, and Java 8/25 consumer probes passed. The logs confirm actual build-logic tests, ProGuard/R8 tests, and all four Java 8 artifact probes executed. The embedded-Kotlin and language-level warnings are present but did not fail those checks. I did not independently rerun Gradle or regenerate the Maven POMs locally; no source changes or review scratch files were created.

@dpiet-oai
dpiet-oai added this pull request to the merge queue Sep 24, 2026

@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 eb1859d. Both Kotlin declarations move together to 2.2.21, while the SDK convention retains Kotlin language/API 1.8, stdlib 1.8.0 and the Java 8 target/release policy. The selected compiler supports the pinned Gradle 8.12; no actionable compatibility or structural issue found in this two-line change.

Source-only review; no local workloads run. Exact-head hosted build, lint, Jackson compatibility, Java 8/25 runtime checks and the required CI gate passed. The embedded-Kotlin mismatch and language-level deprecation warnings remain known caveats; generated POMs/artifacts were not independently inspected.

Merged via the queue into main with commit 465742d Sep 24, 2026
14 checks passed
@openai-sdks openai-sdks Bot mentioned this pull request Sep 24, 2026
arimu1 pushed a commit to arimu1/openai-java that referenced this pull request Sep 27, 2026
Automated Release PR
---


##
[4.69.3](openai/openai-java@v4.69.2...v4.69.3)
(2026-09-25)


### Chores

* **api:** document files and uploads error responses
([openai#1081](openai#1081))
([69a4e21](openai@69a4e21))
* **api:** document Responses not-found errors
([openai#1080](openai#1080))
([e8cbf5d](openai@e8cbf5d))


### Build System

* **deps:** bump Maven Publish to 0.34.0
([openai#910](openai#910))
([2cbf22c](openai@2cbf22c))
* **deps:** bump Shadow to 9.2.2
([openai#904](openai#904))
([09b8c60](openai@09b8c60))
* **deps:** upgrade Kotlin declarations together to 2.2.21
([openai#1079](openai#1079))
([465742d](openai@465742d))

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

3 participants