Skip to content

Commit f380c56

Browse files
release: 2.18.1 (#549)
* fix: actually add system properties * docs: fix readme link * release: 2.18.1 --------- Co-authored-by: Tomer Aberbach <[email protected]> Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 472b7e4 commit f380c56

File tree

5 files changed

+32
-15
lines changed

5 files changed

+32
-15
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "2.18.0"
2+
".": "2.18.1"
33
}

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 2.18.1 (2025-07-22)
4+
5+
Full Changelog: [v2.18.0...v2.18.1](https://github.com/openai/openai-java/compare/v2.18.0...v2.18.1)
6+
7+
### Bug Fixes
8+
9+
* actually add system properties ([09bb653](https://github.com/openai/openai-java/commit/09bb653a31e6cf89ddac952c776ded8f77903128))
10+
11+
12+
### Documentation
13+
14+
* fix readme link ([d98571c](https://github.com/openai/openai-java/commit/d98571c70ebf646497dd1139b13848882261af8f))
15+
316
## 2.18.0 (2025-07-22)
417

518
Full Changelog: [v2.17.0...v2.18.0](https://github.com/openai/openai-java/compare/v2.17.0...v2.18.0)

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22

33
<!-- x-release-please-start-version -->
44

5-
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/2.18.0)
6-
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/2.18.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/2.18.0)
5+
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/2.18.1)
6+
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/2.18.1/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/2.18.1)
77

88
<!-- x-release-please-end -->
99

1010
The OpenAI Java SDK provides convenient access to the [OpenAI REST API](https://platform.openai.com/docs) from applications written in Java.
1111

1212
<!-- x-release-please-start-version -->
1313

14-
The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/2.18.0).
14+
The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/2.18.1).
1515

1616
<!-- x-release-please-end -->
1717

@@ -24,7 +24,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfor
2424
### Gradle
2525

2626
```kotlin
27-
implementation("com.openai:openai-java:2.18.0")
27+
implementation("com.openai:openai-java:2.18.1")
2828
```
2929

3030
### Maven
@@ -33,7 +33,7 @@ implementation("com.openai:openai-java:2.18.0")
3333
<dependency>
3434
<groupId>com.openai</groupId>
3535
<artifactId>openai-java</artifactId>
36-
<version>2.18.0</version>
36+
<version>2.18.1</version>
3737
</dependency>
3838
```
3939

@@ -1321,7 +1321,7 @@ If you're using Spring Boot, then you can use the SDK's [Spring Boot starter](ht
13211321
#### Gradle
13221322

13231323
```kotlin
1324-
implementation("com.openai:openai-java-spring-boot-starter:2.18.0")
1324+
implementation("com.openai:openai-java-spring-boot-starter:2.18.1")
13251325
```
13261326

13271327
#### Maven
@@ -1330,7 +1330,7 @@ implementation("com.openai:openai-java-spring-boot-starter:2.18.0")
13301330
<dependency>
13311331
<groupId>com.openai</groupId>
13321332
<artifactId>openai-java-spring-boot-starter</artifactId>
1333-
<version>2.18.0</version>
1333+
<version>2.18.1</version>
13341334
</dependency>
13351335
```
13361336

@@ -1363,7 +1363,7 @@ openai:
13631363
13641364
#### Other configuration
13651365
1366-
Configure any other client option by providing one or more instances of [`OpenAIClientCustomizer`](openai-java-core/src/main/kotlin/com/openai/springboot/OpenAIClientCustomizer.kt). For example, here's how you'd set [`maxRetries`](#retries):
1366+
Configure any other client option by providing one or more instances of [`OpenAIClientCustomizer`](openai-java-spring-boot-starter/src/main/kotlin/com/openai/springboot/OpenAIClientCustomizer.kt). For example, here's how you'd set [`maxRetries`](#retries):
13671367

13681368
```java
13691369
import com.openai.springboot.OpenAIClientCustomizer;

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ repositories {
88

99
allprojects {
1010
group = "com.openai"
11-
version = "2.18.0" // x-release-please-version
11+
version = "2.18.1" // x-release-please-version
1212
}
1313

1414
subprojects {

openai-java-core/src/main/kotlin/com/openai/core/ClientOptions.kt

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -277,13 +277,17 @@ private constructor(
277277
fun timeout(): Timeout = timeout
278278

279279
fun fromEnv() = apply {
280-
System.getenv("OPENAI_BASE_URL")?.let { baseUrl(it) }
280+
(System.getProperty("openai.baseUrl") ?: System.getenv("OPENAI_BASE_URL"))?.let {
281+
baseUrl(it)
282+
}
281283

282-
val openAIKey = System.getenv("OPENAI_API_KEY")
283-
val openAIOrgId = System.getenv("OPENAI_ORG_ID")
284-
val openAIProjectId = System.getenv("OPENAI_PROJECT_ID")
284+
val openAIKey = System.getProperty("openai.apiKey") ?: System.getenv("OPENAI_API_KEY")
285+
val openAIOrgId = System.getProperty("openai.orgId") ?: System.getenv("OPENAI_ORG_ID")
286+
val openAIProjectId =
287+
System.getProperty("openai.projectId") ?: System.getenv("OPENAI_PROJECT_ID")
285288
val azureOpenAIKey = System.getenv("AZURE_OPENAI_KEY")
286-
val openAIWebhookSecret = System.getenv("OPENAI_WEBHOOK_SECRET")
289+
val openAIWebhookSecret =
290+
System.getProperty("openai.webhookSecret") ?: System.getenv("OPENAI_WEBHOOK_SECRET")
287291
if (!openAIWebhookSecret.isNullOrEmpty()) {
288292
webhookSecret(openAIWebhookSecret)
289293
}

0 commit comments

Comments
 (0)