Skip to content

Commit 0b2b516

Browse files
release: 0.59.0 (#264)
* codegen metadata * feat(api): add OAuthErrorCode type * codegen metadata * feat(api): Add detail to InputFileContent * codegen metadata * docs: improve examples * codegen metadata * release: 0.59.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent 9b2d7f5 commit 0b2b516

13 files changed

Lines changed: 236 additions & 10 deletions

File tree

.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.58.0"
2+
".": "0.59.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 151
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a6eca1bd01e0c434af356fe5275c206057216a4e626d1051d294c27016cd6d05.yml
3-
openapi_spec_hash: 68abda9122013a9ae3f084cfdbe8e8c1
4-
config_hash: 4975e16a94e8f9901428022044131888
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7c540cce6eb30401259f4831ea9803b6d88501605d13734f98212cbb3b199e10.yml
3+
openapi_spec_hash: 06e656be22bbb92689954253668b42fc
4+
config_hash: 1a88b104658b6c854117996c080ebe6b

CHANGELOG.md

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

3+
## 0.59.0 (2026-04-14)
4+
5+
Full Changelog: [v0.58.0...v0.59.0](https://github.com/openai/openai-ruby/compare/v0.58.0...v0.59.0)
6+
7+
### Features
8+
9+
* **api:** Add detail to InputFileContent ([b747a16](https://github.com/openai/openai-ruby/commit/b747a16153e76eafadd54fd21a58db3f71d5e597))
10+
* **api:** add OAuthErrorCode type ([643311e](https://github.com/openai/openai-ruby/commit/643311e02e36e0cbd58f7ae954735e690d788db2))
11+
12+
13+
### Documentation
14+
15+
* improve examples ([5aa2eba](https://github.com/openai/openai-ruby/commit/5aa2ebae024c57a4e577f52088dd5f86713da8f5))
16+
317
## 0.58.0 (2026-04-08)
418

519
Full Changelog: [v0.57.0...v0.58.0](https://github.com/openai/openai-ruby/compare/v0.57.0...v0.58.0)

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.58.0)
14+
openai (0.59.0)
1515
base64
1616
cgi
1717
connection_pool

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.58.0"
18+
gem "openai", "~> 0.59.0"
1919
```
2020

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

lib/openai/models/responses/response_input_file.rb

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ class ResponseInputFile < OpenAI::Internal::Type::BaseModel
1010
# @return [Symbol, :input_file]
1111
required :type, const: :input_file
1212

13+
# @!attribute detail
14+
# The detail level of the file to be sent to the model. Use `low` for the default
15+
# rendering behavior, or `high` to render the file at higher quality. Defaults to
16+
# `low`.
17+
#
18+
# @return [Symbol, OpenAI::Models::Responses::ResponseInputFile::Detail, nil]
19+
optional :detail, enum: -> { OpenAI::Responses::ResponseInputFile::Detail }
20+
1321
# @!attribute file_data
1422
# The content of the file to be sent to the model.
1523
#
@@ -34,12 +42,14 @@ class ResponseInputFile < OpenAI::Internal::Type::BaseModel
3442
# @return [String, nil]
3543
optional :filename, String
3644

37-
# @!method initialize(file_data: nil, file_id: nil, file_url: nil, filename: nil, type: :input_file)
45+
# @!method initialize(detail: nil, file_data: nil, file_id: nil, file_url: nil, filename: nil, type: :input_file)
3846
# Some parameter documentations has been truncated, see
3947
# {OpenAI::Models::Responses::ResponseInputFile} for more details.
4048
#
4149
# A file input to the model.
4250
#
51+
# @param detail [Symbol, OpenAI::Models::Responses::ResponseInputFile::Detail] The detail level of the file to be sent to the model. Use `low` for the default
52+
#
4353
# @param file_data [String] The content of the file to be sent to the model.
4454
#
4555
# @param file_id [String, nil] The ID of the file to be sent to the model.
@@ -49,6 +59,21 @@ class ResponseInputFile < OpenAI::Internal::Type::BaseModel
4959
# @param filename [String] The name of the file to be sent to the model.
5060
#
5161
# @param type [Symbol, :input_file] The type of the input item. Always `input_file`.
62+
63+
# The detail level of the file to be sent to the model. Use `low` for the default
64+
# rendering behavior, or `high` to render the file at higher quality. Defaults to
65+
# `low`.
66+
#
67+
# @see OpenAI::Models::Responses::ResponseInputFile#detail
68+
module Detail
69+
extend OpenAI::Internal::Type::Enum
70+
71+
LOW = :low
72+
HIGH = :high
73+
74+
# @!method self.values
75+
# @return [Array<Symbol>]
76+
end
5277
end
5378
end
5479
end

lib/openai/models/responses/response_input_file_content.rb

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,14 @@ class ResponseInputFileContent < OpenAI::Internal::Type::BaseModel
1010
# @return [Symbol, :input_file]
1111
required :type, const: :input_file
1212

13+
# @!attribute detail
14+
# The detail level of the file to be sent to the model. Use `low` for the default
15+
# rendering behavior, or `high` to render the file at higher quality. Defaults to
16+
# `low`.
17+
#
18+
# @return [Symbol, OpenAI::Models::Responses::ResponseInputFileContent::Detail, nil]
19+
optional :detail, enum: -> { OpenAI::Responses::ResponseInputFileContent::Detail }
20+
1321
# @!attribute file_data
1422
# The base64-encoded data of the file to be sent to the model.
1523
#
@@ -34,9 +42,14 @@ class ResponseInputFileContent < OpenAI::Internal::Type::BaseModel
3442
# @return [String, nil]
3543
optional :filename, String, nil?: true
3644

37-
# @!method initialize(file_data: nil, file_id: nil, file_url: nil, filename: nil, type: :input_file)
45+
# @!method initialize(detail: nil, file_data: nil, file_id: nil, file_url: nil, filename: nil, type: :input_file)
46+
# Some parameter documentations has been truncated, see
47+
# {OpenAI::Models::Responses::ResponseInputFileContent} for more details.
48+
#
3849
# A file input to the model.
3950
#
51+
# @param detail [Symbol, OpenAI::Models::Responses::ResponseInputFileContent::Detail] The detail level of the file to be sent to the model. Use `low` for the default
52+
#
4053
# @param file_data [String, nil] The base64-encoded data of the file to be sent to the model.
4154
#
4255
# @param file_id [String, nil] The ID of the file to be sent to the model.
@@ -46,6 +59,21 @@ class ResponseInputFileContent < OpenAI::Internal::Type::BaseModel
4659
# @param filename [String, nil] The name of the file to be sent to the model.
4760
#
4861
# @param type [Symbol, :input_file] The type of the input item. Always `input_file`.
62+
63+
# The detail level of the file to be sent to the model. Use `low` for the default
64+
# rendering behavior, or `high` to render the file at higher quality. Defaults to
65+
# `low`.
66+
#
67+
# @see OpenAI::Models::Responses::ResponseInputFileContent#detail
68+
module Detail
69+
extend OpenAI::Internal::Type::Enum
70+
71+
LOW = :low
72+
HIGH = :high
73+
74+
# @!method self.values
75+
# @return [Array<Symbol>]
76+
end
4977
end
5078
end
5179
end

lib/openai/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module OpenAI
4-
VERSION = "0.58.0"
4+
VERSION = "0.59.0"
55
end

rbi/openai/models/responses/response_input_file.rbi

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,23 @@ module OpenAI
1616
sig { returns(Symbol) }
1717
attr_accessor :type
1818

19+
# The detail level of the file to be sent to the model. Use `low` for the default
20+
# rendering behavior, or `high` to render the file at higher quality. Defaults to
21+
# `low`.
22+
sig do
23+
returns(
24+
T.nilable(OpenAI::Responses::ResponseInputFile::Detail::OrSymbol)
25+
)
26+
end
27+
attr_reader :detail
28+
29+
sig do
30+
params(
31+
detail: OpenAI::Responses::ResponseInputFile::Detail::OrSymbol
32+
).void
33+
end
34+
attr_writer :detail
35+
1936
# The content of the file to be sent to the model.
2037
sig { returns(T.nilable(String)) }
2138
attr_reader :file_data
@@ -44,6 +61,7 @@ module OpenAI
4461
# A file input to the model.
4562
sig do
4663
params(
64+
detail: OpenAI::Responses::ResponseInputFile::Detail::OrSymbol,
4765
file_data: String,
4866
file_id: T.nilable(String),
4967
file_url: String,
@@ -52,6 +70,10 @@ module OpenAI
5270
).returns(T.attached_class)
5371
end
5472
def self.new(
73+
# The detail level of the file to be sent to the model. Use `low` for the default
74+
# rendering behavior, or `high` to render the file at higher quality. Defaults to
75+
# `low`.
76+
detail: nil,
5577
# The content of the file to be sent to the model.
5678
file_data: nil,
5779
# The ID of the file to be sent to the model.
@@ -69,6 +91,7 @@ module OpenAI
6991
override.returns(
7092
{
7193
type: Symbol,
94+
detail: OpenAI::Responses::ResponseInputFile::Detail::OrSymbol,
7295
file_data: String,
7396
file_id: T.nilable(String),
7497
file_url: String,
@@ -78,6 +101,40 @@ module OpenAI
78101
end
79102
def to_hash
80103
end
104+
105+
# The detail level of the file to be sent to the model. Use `low` for the default
106+
# rendering behavior, or `high` to render the file at higher quality. Defaults to
107+
# `low`.
108+
module Detail
109+
extend OpenAI::Internal::Type::Enum
110+
111+
TaggedSymbol =
112+
T.type_alias do
113+
T.all(Symbol, OpenAI::Responses::ResponseInputFile::Detail)
114+
end
115+
OrSymbol = T.type_alias { T.any(Symbol, String) }
116+
117+
LOW =
118+
T.let(
119+
:low,
120+
OpenAI::Responses::ResponseInputFile::Detail::TaggedSymbol
121+
)
122+
HIGH =
123+
T.let(
124+
:high,
125+
OpenAI::Responses::ResponseInputFile::Detail::TaggedSymbol
126+
)
127+
128+
sig do
129+
override.returns(
130+
T::Array[
131+
OpenAI::Responses::ResponseInputFile::Detail::TaggedSymbol
132+
]
133+
)
134+
end
135+
def self.values
136+
end
137+
end
81138
end
82139
end
83140
end

rbi/openai/models/responses/response_input_file_content.rbi

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,26 @@ module OpenAI
1616
sig { returns(Symbol) }
1717
attr_accessor :type
1818

19+
# The detail level of the file to be sent to the model. Use `low` for the default
20+
# rendering behavior, or `high` to render the file at higher quality. Defaults to
21+
# `low`.
22+
sig do
23+
returns(
24+
T.nilable(
25+
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol
26+
)
27+
)
28+
end
29+
attr_reader :detail
30+
31+
sig do
32+
params(
33+
detail:
34+
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol
35+
).void
36+
end
37+
attr_writer :detail
38+
1939
# The base64-encoded data of the file to be sent to the model.
2040
sig { returns(T.nilable(String)) }
2141
attr_accessor :file_data
@@ -35,6 +55,8 @@ module OpenAI
3555
# A file input to the model.
3656
sig do
3757
params(
58+
detail:
59+
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol,
3860
file_data: T.nilable(String),
3961
file_id: T.nilable(String),
4062
file_url: T.nilable(String),
@@ -43,6 +65,10 @@ module OpenAI
4365
).returns(T.attached_class)
4466
end
4567
def self.new(
68+
# The detail level of the file to be sent to the model. Use `low` for the default
69+
# rendering behavior, or `high` to render the file at higher quality. Defaults to
70+
# `low`.
71+
detail: nil,
4672
# The base64-encoded data of the file to be sent to the model.
4773
file_data: nil,
4874
# The ID of the file to be sent to the model.
@@ -60,6 +86,8 @@ module OpenAI
6086
override.returns(
6187
{
6288
type: Symbol,
89+
detail:
90+
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol,
6391
file_data: T.nilable(String),
6492
file_id: T.nilable(String),
6593
file_url: T.nilable(String),
@@ -69,6 +97,40 @@ module OpenAI
6997
end
7098
def to_hash
7199
end
100+
101+
# The detail level of the file to be sent to the model. Use `low` for the default
102+
# rendering behavior, or `high` to render the file at higher quality. Defaults to
103+
# `low`.
104+
module Detail
105+
extend OpenAI::Internal::Type::Enum
106+
107+
TaggedSymbol =
108+
T.type_alias do
109+
T.all(Symbol, OpenAI::Responses::ResponseInputFileContent::Detail)
110+
end
111+
OrSymbol = T.type_alias { T.any(Symbol, String) }
112+
113+
LOW =
114+
T.let(
115+
:low,
116+
OpenAI::Responses::ResponseInputFileContent::Detail::TaggedSymbol
117+
)
118+
HIGH =
119+
T.let(
120+
:high,
121+
OpenAI::Responses::ResponseInputFileContent::Detail::TaggedSymbol
122+
)
123+
124+
sig do
125+
override.returns(
126+
T::Array[
127+
OpenAI::Responses::ResponseInputFileContent::Detail::TaggedSymbol
128+
]
129+
)
130+
end
131+
def self.values
132+
end
133+
end
72134
end
73135
end
74136
end

0 commit comments

Comments
 (0)