Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.58.0"
".": "0.59.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 151
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a6eca1bd01e0c434af356fe5275c206057216a4e626d1051d294c27016cd6d05.yml
openapi_spec_hash: 68abda9122013a9ae3f084cfdbe8e8c1
config_hash: 4975e16a94e8f9901428022044131888
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7c540cce6eb30401259f4831ea9803b6d88501605d13734f98212cbb3b199e10.yml
openapi_spec_hash: 06e656be22bbb92689954253668b42fc
config_hash: 1a88b104658b6c854117996c080ebe6b
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Changelog

## 0.59.0 (2026-04-14)

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

### Features

* **api:** Add detail to InputFileContent ([b747a16](https://github.com/openai/openai-ruby/commit/b747a16153e76eafadd54fd21a58db3f71d5e597))
* **api:** add OAuthErrorCode type ([643311e](https://github.com/openai/openai-ruby/commit/643311e02e36e0cbd58f7ae954735e690d788db2))


### Documentation

* improve examples ([5aa2eba](https://github.com/openai/openai-ruby/commit/5aa2ebae024c57a4e577f52088dd5f86713da8f5))

## 0.58.0 (2026-04-08)

Full Changelog: [v0.57.0...v0.58.0](https://github.com/openai/openai-ruby/compare/v0.57.0...v0.58.0)
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ GIT
PATH
remote: .
specs:
openai (0.58.0)
openai (0.59.0)
base64
cgi
connection_pool
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
<!-- x-release-please-start-version -->

```ruby
gem "openai", "~> 0.58.0"
gem "openai", "~> 0.59.0"
```

<!-- x-release-please-end -->
Expand Down
27 changes: 26 additions & 1 deletion lib/openai/models/responses/response_input_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ class ResponseInputFile < OpenAI::Internal::Type::BaseModel
# @return [Symbol, :input_file]
required :type, const: :input_file

# @!attribute detail
# The detail level of the file to be sent to the model. Use `low` for the default
# rendering behavior, or `high` to render the file at higher quality. Defaults to
# `low`.
#
# @return [Symbol, OpenAI::Models::Responses::ResponseInputFile::Detail, nil]
optional :detail, enum: -> { OpenAI::Responses::ResponseInputFile::Detail }

# @!attribute file_data
# The content of the file to be sent to the model.
#
Expand All @@ -34,12 +42,14 @@ class ResponseInputFile < OpenAI::Internal::Type::BaseModel
# @return [String, nil]
optional :filename, String

# @!method initialize(file_data: nil, file_id: nil, file_url: nil, filename: nil, type: :input_file)
# @!method initialize(detail: nil, file_data: nil, file_id: nil, file_url: nil, filename: nil, type: :input_file)
# Some parameter documentations has been truncated, see
# {OpenAI::Models::Responses::ResponseInputFile} for more details.
#
# A file input to the model.
#
# @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
#
# @param file_data [String] The content of the file to be sent to the model.
#
# @param file_id [String, nil] The ID of the file to be sent to the model.
Expand All @@ -49,6 +59,21 @@ class ResponseInputFile < OpenAI::Internal::Type::BaseModel
# @param filename [String] The name of the file to be sent to the model.
#
# @param type [Symbol, :input_file] The type of the input item. Always `input_file`.

# The detail level of the file to be sent to the model. Use `low` for the default
# rendering behavior, or `high` to render the file at higher quality. Defaults to
# `low`.
#
# @see OpenAI::Models::Responses::ResponseInputFile#detail
module Detail
extend OpenAI::Internal::Type::Enum

LOW = :low
HIGH = :high

# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
Expand Down
30 changes: 29 additions & 1 deletion lib/openai/models/responses/response_input_file_content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,14 @@ class ResponseInputFileContent < OpenAI::Internal::Type::BaseModel
# @return [Symbol, :input_file]
required :type, const: :input_file

# @!attribute detail
# The detail level of the file to be sent to the model. Use `low` for the default
# rendering behavior, or `high` to render the file at higher quality. Defaults to
# `low`.
#
# @return [Symbol, OpenAI::Models::Responses::ResponseInputFileContent::Detail, nil]
optional :detail, enum: -> { OpenAI::Responses::ResponseInputFileContent::Detail }

# @!attribute file_data
# The base64-encoded data of the file to be sent to the model.
#
Expand All @@ -34,9 +42,14 @@ class ResponseInputFileContent < OpenAI::Internal::Type::BaseModel
# @return [String, nil]
optional :filename, String, nil?: true

# @!method initialize(file_data: nil, file_id: nil, file_url: nil, filename: nil, type: :input_file)
# @!method initialize(detail: nil, file_data: nil, file_id: nil, file_url: nil, filename: nil, type: :input_file)
# Some parameter documentations has been truncated, see
# {OpenAI::Models::Responses::ResponseInputFileContent} for more details.
#
# A file input to the model.
#
# @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
#
# @param file_data [String, nil] The base64-encoded data of the file to be sent to the model.
#
# @param file_id [String, nil] The ID of the file to be sent to the model.
Expand All @@ -46,6 +59,21 @@ class ResponseInputFileContent < OpenAI::Internal::Type::BaseModel
# @param filename [String, nil] The name of the file to be sent to the model.
#
# @param type [Symbol, :input_file] The type of the input item. Always `input_file`.

# The detail level of the file to be sent to the model. Use `low` for the default
# rendering behavior, or `high` to render the file at higher quality. Defaults to
# `low`.
#
# @see OpenAI::Models::Responses::ResponseInputFileContent#detail
module Detail
extend OpenAI::Internal::Type::Enum

LOW = :low
HIGH = :high

# @!method self.values
# @return [Array<Symbol>]
end
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/openai/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module OpenAI
VERSION = "0.58.0"
VERSION = "0.59.0"
end
57 changes: 57 additions & 0 deletions rbi/openai/models/responses/response_input_file.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@ module OpenAI
sig { returns(Symbol) }
attr_accessor :type

# The detail level of the file to be sent to the model. Use `low` for the default
# rendering behavior, or `high` to render the file at higher quality. Defaults to
# `low`.
sig do
returns(
T.nilable(OpenAI::Responses::ResponseInputFile::Detail::OrSymbol)
)
end
attr_reader :detail

sig do
params(
detail: OpenAI::Responses::ResponseInputFile::Detail::OrSymbol
).void
end
attr_writer :detail

# The content of the file to be sent to the model.
sig { returns(T.nilable(String)) }
attr_reader :file_data
Expand Down Expand Up @@ -44,6 +61,7 @@ module OpenAI
# A file input to the model.
sig do
params(
detail: OpenAI::Responses::ResponseInputFile::Detail::OrSymbol,
file_data: String,
file_id: T.nilable(String),
file_url: String,
Expand All @@ -52,6 +70,10 @@ module OpenAI
).returns(T.attached_class)
end
def self.new(
# The detail level of the file to be sent to the model. Use `low` for the default
# rendering behavior, or `high` to render the file at higher quality. Defaults to
# `low`.
detail: nil,
# The content of the file to be sent to the model.
file_data: nil,
# The ID of the file to be sent to the model.
Expand All @@ -69,6 +91,7 @@ module OpenAI
override.returns(
{
type: Symbol,
detail: OpenAI::Responses::ResponseInputFile::Detail::OrSymbol,
file_data: String,
file_id: T.nilable(String),
file_url: String,
Expand All @@ -78,6 +101,40 @@ module OpenAI
end
def to_hash
end

# The detail level of the file to be sent to the model. Use `low` for the default
# rendering behavior, or `high` to render the file at higher quality. Defaults to
# `low`.
module Detail
extend OpenAI::Internal::Type::Enum

TaggedSymbol =
T.type_alias do
T.all(Symbol, OpenAI::Responses::ResponseInputFile::Detail)
end
OrSymbol = T.type_alias { T.any(Symbol, String) }

LOW =
T.let(
:low,
OpenAI::Responses::ResponseInputFile::Detail::TaggedSymbol
)
HIGH =
T.let(
:high,
OpenAI::Responses::ResponseInputFile::Detail::TaggedSymbol
)

sig do
override.returns(
T::Array[
OpenAI::Responses::ResponseInputFile::Detail::TaggedSymbol
]
)
end
def self.values
end
end
end
end
end
Expand Down
62 changes: 62 additions & 0 deletions rbi/openai/models/responses/response_input_file_content.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,26 @@ module OpenAI
sig { returns(Symbol) }
attr_accessor :type

# The detail level of the file to be sent to the model. Use `low` for the default
# rendering behavior, or `high` to render the file at higher quality. Defaults to
# `low`.
sig do
returns(
T.nilable(
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol
)
)
end
attr_reader :detail

sig do
params(
detail:
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol
).void
end
attr_writer :detail

# The base64-encoded data of the file to be sent to the model.
sig { returns(T.nilable(String)) }
attr_accessor :file_data
Expand All @@ -35,6 +55,8 @@ module OpenAI
# A file input to the model.
sig do
params(
detail:
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol,
file_data: T.nilable(String),
file_id: T.nilable(String),
file_url: T.nilable(String),
Expand All @@ -43,6 +65,10 @@ module OpenAI
).returns(T.attached_class)
end
def self.new(
# The detail level of the file to be sent to the model. Use `low` for the default
# rendering behavior, or `high` to render the file at higher quality. Defaults to
# `low`.
detail: nil,
# The base64-encoded data of the file to be sent to the model.
file_data: nil,
# The ID of the file to be sent to the model.
Expand All @@ -60,6 +86,8 @@ module OpenAI
override.returns(
{
type: Symbol,
detail:
OpenAI::Responses::ResponseInputFileContent::Detail::OrSymbol,
file_data: T.nilable(String),
file_id: T.nilable(String),
file_url: T.nilable(String),
Expand All @@ -69,6 +97,40 @@ module OpenAI
end
def to_hash
end

# The detail level of the file to be sent to the model. Use `low` for the default
# rendering behavior, or `high` to render the file at higher quality. Defaults to
# `low`.
module Detail
extend OpenAI::Internal::Type::Enum

TaggedSymbol =
T.type_alias do
T.all(Symbol, OpenAI::Responses::ResponseInputFileContent::Detail)
end
OrSymbol = T.type_alias { T.any(Symbol, String) }

LOW =
T.let(
:low,
OpenAI::Responses::ResponseInputFileContent::Detail::TaggedSymbol
)
HIGH =
T.let(
:high,
OpenAI::Responses::ResponseInputFileContent::Detail::TaggedSymbol
)

sig do
override.returns(
T::Array[
OpenAI::Responses::ResponseInputFileContent::Detail::TaggedSymbol
]
)
end
def self.values
end
end
end
end
end
Expand Down
Loading