From 551bfc20022d13326da79a73a4ca71fa4bfff437 Mon Sep 17 00:00:00 2001 From: Stefan Lobbenmeier Date: Wed, 18 Jun 2025 23:42:10 +0200 Subject: [PATCH 1/2] fix(client): consider cognitiveservices.azure.com as azure (#470) * Also consider cognitiveservices.azure.com an AzureEndpoint Fixes https://github.com/openai/openai-java/issues/469 * Add comment regarding URL format --- openai-java-core/src/main/kotlin/com/openai/core/Utils.kt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/openai-java-core/src/main/kotlin/com/openai/core/Utils.kt b/openai-java-core/src/main/kotlin/com/openai/core/Utils.kt index bedd2149..06e1cfc6 100644 --- a/openai-java-core/src/main/kotlin/com/openai/core/Utils.kt +++ b/openai-java-core/src/main/kotlin/com/openai/core/Utils.kt @@ -93,9 +93,11 @@ internal fun Any?.contentToString(): String { internal fun isAzureEndpoint(baseUrl: String): Boolean { // Azure Endpoint should be in the format of `https://.openai.azure.com`. // Or `https://.azure-api.net` for Azure OpenAI Management URL. + // Or `-random-.cognitiveservices.azure.com`. val trimmedBaseUrl = baseUrl.trim().trimEnd('/') return trimmedBaseUrl.endsWith(".openai.azure.com", true) || - trimmedBaseUrl.endsWith(".azure-api.net", true) + trimmedBaseUrl.endsWith(".azure-api.net", true) || + trimmedBaseUrl.endsWith(".cognitiveservices.azure.com", true) } internal interface Enum From 7cac65f3a82e71ffe71e40e785ff21683c31270c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 21:42:30 +0000 Subject: [PATCH 2/2] release: 2.8.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 10 +++++----- build.gradle.kts | 2 +- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 64f9ff41..108509ed 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "2.8.0" + ".": "2.8.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index d8a545b3..97864c10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 2.8.1 (2025-06-18) + +Full Changelog: [v2.8.0...v2.8.1](https://github.com/openai/openai-java/compare/v2.8.0...v2.8.1) + +### Bug Fixes + +* **client:** consider cognitiveservices.azure.com as azure ([#470](https://github.com/openai/openai-java/issues/470)) ([551bfc2](https://github.com/openai/openai-java/commit/551bfc20022d13326da79a73a4ca71fa4bfff437)) + ## 2.8.0 (2025-06-17) Full Changelog: [v2.7.0...v2.8.0](https://github.com/openai/openai-java/compare/v2.7.0...v2.8.0) diff --git a/README.md b/README.md index fe4616ca..083067e0 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/2.8.0) -[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/2.8.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/2.8.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/2.8.1) +[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/2.8.1/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/2.8.1) @@ -11,7 +11,7 @@ The OpenAI Java SDK provides convenient access to the [OpenAI REST API](https:// -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.8.0). +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.8.1). @@ -22,7 +22,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfor ### Gradle ```kotlin -implementation("com.openai:openai-java:2.8.0") +implementation("com.openai:openai-java:2.8.1") ``` ### Maven @@ -31,7 +31,7 @@ implementation("com.openai:openai-java:2.8.0") com.openai openai-java - 2.8.0 + 2.8.1 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 70c5f3fd..a17dcbe2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.openai" - version = "2.8.0" // x-release-please-version + version = "2.8.1" // x-release-please-version } subprojects {