Skip to content

Commit 58e8bde

Browse files
Merge pull request #153 from openai/release-please--branches--main--changes--next
release: 0.6.0
2 parents 7e2e96b + 5218970 commit 58e8bde

File tree

13 files changed

+49
-17
lines changed

13 files changed

+49
-17
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-
".": "0.5.1"
2+
".": "0.6.0"
33
}

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 109
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-2bcc845d8635bf93ddcf9ee723af4d7928248412a417bee5fc10d863a1e13867.yml
3-
openapi_spec_hash: 865230cb3abeb01bd85de05891af23c4
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-0205acb1015d29b2312a48526734c0399f93026d4fe2dff5c7768f566e333fd2.yml
3+
openapi_spec_hash: 1772cc9056c2f6dfb2a4e9cb77ee6343
44
config_hash: ed1e6b3c5f93d12b80d31167f55c557c

CHANGELOG.md

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

3+
## 0.6.0 (2025-06-03)
4+
5+
Full Changelog: [v0.5.1...v0.6.0](https://github.com/openai/openai-ruby/compare/v0.5.1...v0.6.0)
6+
7+
### Features
8+
9+
* **api:** add new realtime and audio models, realtime session options ([315f0b0](https://github.com/openai/openai-ruby/commit/315f0b0ec3a663a7bc1f2c05ecc6ebfe8af99796))
10+
11+
12+
### Bug Fixes
13+
14+
* `to_sorbet_type` should not return branded types ([4a1f14b](https://github.com/openai/openai-ruby/commit/4a1f14beeea6f1ef08d753fb3c3fa8607ebbe2c2))
15+
16+
17+
### Chores
18+
19+
* prune whitespace ([d7335ac](https://github.com/openai/openai-ruby/commit/d7335ac4942eeccfa341eaf2fb2d45ec83df4dd3))
20+
321
## 0.5.1 (2025-06-02)
422

523
Full Changelog: [v0.5.0...v0.5.1](https://github.com/openai/openai-ruby/compare/v0.5.0...v0.5.1)

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ GIT
1111
PATH
1212
remote: .
1313
specs:
14-
openai (0.5.1)
14+
openai (0.6.0)
1515
connection_pool
1616

1717
GEM

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
1515
<!-- x-release-please-start-version -->
1616

1717
```ruby
18-
gem "openai", "~> 0.5.1"
18+
gem "openai", "~> 0.6.0"
1919
```
2020

2121
<!-- x-release-please-end -->

lib/openai/internal/type/enum.rb

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,11 +116,14 @@ def coerce(value, state:)
116116
#
117117
# @return [Object]
118118
def to_sorbet_type
119-
case values
119+
types = values.map { OpenAI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
120+
case types
120121
in []
121122
T.noreturn
122-
in [value, *_]
123-
T.all(OpenAI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(value), self)
123+
in [type]
124+
type
125+
else
126+
T.any(*types)
124127
end
125128
end
126129

lib/openai/internal/type/union.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,11 +220,14 @@ def dump(value, state:)
220220
#
221221
# @return [Object]
222222
def to_sorbet_type
223-
case (v = variants)
223+
types = variants.map { OpenAI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) }.uniq
224+
case types
224225
in []
225226
T.noreturn
227+
in [type]
228+
type
226229
else
227-
T.any(*v.map { OpenAI::Internal::Util::SorbetRuntimeSupport.to_sorbet_type(_1) })
230+
T.any(*types)
228231
end
229232
end
230233

lib/openai/models.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@ module OpenAI
1111
mod.constants.each do |name|
1212
case mod.const_get(name)
1313
in true | false
14-
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T.all(T::Boolean, mod) } }
14+
mod.define_sorbet_constant!(:TaggedBoolean) { T.type_alias { T::Boolean } }
1515
mod.define_sorbet_constant!(:OrBoolean) { T.type_alias { T::Boolean } }
1616
in Integer
17-
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { T.all(Integer, mod) } }
17+
mod.define_sorbet_constant!(:TaggedInteger) { T.type_alias { Integer } }
1818
mod.define_sorbet_constant!(:OrInteger) { T.type_alias { Integer } }
1919
in Float
20-
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { T.all(Float, mod) } }
20+
mod.define_sorbet_constant!(:TaggedFloat) { T.type_alias { Float } }
2121
mod.define_sorbet_constant!(:OrFloat) { T.type_alias { Float } }
2222
in Symbol
23-
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { T.all(Symbol, mod) } }
23+
mod.define_sorbet_constant!(:TaggedSymbol) { T.type_alias { Symbol } }
2424
mod.define_sorbet_constant!(:OrSymbol) { T.type_alias { T.any(Symbol, String) } }
2525
else
2626
end

lib/openai/models/chat_model.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ module ChatModel
3030
GPT_4O_AUDIO_PREVIEW = :"gpt-4o-audio-preview"
3131
GPT_4O_AUDIO_PREVIEW_2024_10_01 = :"gpt-4o-audio-preview-2024-10-01"
3232
GPT_4O_AUDIO_PREVIEW_2024_12_17 = :"gpt-4o-audio-preview-2024-12-17"
33+
GPT_4O_AUDIO_PREVIEW_2025_06_03 = :"gpt-4o-audio-preview-2025-06-03"
3334
GPT_4O_MINI_AUDIO_PREVIEW = :"gpt-4o-mini-audio-preview"
3435
GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17 = :"gpt-4o-mini-audio-preview-2024-12-17"
3536
GPT_4O_SEARCH_PREVIEW = :"gpt-4o-search-preview"

lib/openai/resources/beta/threads.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ def create_and_run(params)
177177
options: {extra_headers: {"OpenAI-Beta" => "assistants=v2"}, **options}
178178
)
179179
end
180-
180+
181181
def stream
182182
raise NotImplementedError.new("higher level helpers are coming soon!")
183183
end
184-
184+
185185
# @deprecated The Assistants API is deprecated in favor of the Responses API
186186
#
187187
# See {OpenAI::Resources::Beta::Threads#create_and_run} for non-streaming

0 commit comments

Comments
 (0)