Class: OpenAI::Models::Reasoning

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/reasoning.rb

Defined Under Namespace

Modules: GenerateSummary, Summary

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(effort: nil, generate_summary: nil, summary: nil) ⇒ Object

Some parameter documentations has been truncated, see OpenAI::Models::Reasoning for more details.

**gpt-5 and o-series models only**

Configuration options for [reasoning models](platform.openai.com/docs/guides/reasoning).

Parameters:



# File 'lib/openai/models/reasoning.rb', line 45

Instance Attribute Details

#effortSymbol, ...

Constrains effort on reasoning for [reasoning models](platform.openai.com/docs/guides/reasoning). Currently supported values are ‘none`, `minimal`, `low`, `medium`, and `high`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.

  • ‘gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.

  • All models before ‘gpt-5.1` default to `medium` reasoning effort, and do not support `none`.

  • The ‘gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.

Returns:



21
# File 'lib/openai/models/reasoning.rb', line 21

optional :effort, enum: -> { OpenAI::ReasoningEffort }, nil?: true

#generate_summarySymbol, ...

Deprecated.

Deprecated: use ‘summary` instead.

A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model’s reasoning process. One of ‘auto`, `concise`, or `detailed`.



33
# File 'lib/openai/models/reasoning.rb', line 33

optional :generate_summary, enum: -> { OpenAI::Reasoning::GenerateSummary }, nil?: true

#summarySymbol, ...

A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model’s reasoning process. One of ‘auto`, `concise`, or `detailed`.

‘concise` is only supported for `computer-use-preview` models.

Returns:



43
# File 'lib/openai/models/reasoning.rb', line 43

optional :summary, enum: -> { OpenAI::Reasoning::Summary }, nil?: true

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/openai/models/reasoning.rb', line 76