diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 408b1eb4e..c205ee0d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,7 +23,7 @@ jobs: permissions: contents: read id-token: write - runs-on: ${{ github.repository == 'stainless-sdks/openai-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: |- github.repository == 'stainless-sdks/openai-ruby' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') @@ -62,7 +62,7 @@ jobs: name: lint permissions: contents: read - runs-on: ${{ github.repository == 'stainless-sdks/openai-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: @@ -83,7 +83,7 @@ jobs: name: test (ruby ${{ matrix.ruby-version }}) permissions: contents: read - runs-on: ${{ github.repository == 'stainless-sdks/openai-ruby' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + runs-on: ${{ startsWith(github.repository, 'stainless-sdks/') && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork strategy: fail-fast: false diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6772f01dc..6f257c8d7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.71.0" + ".": "0.72.0" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index 6cf2e1841..1da9b7cca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 271 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-8ed7dcb0d163e7f5205dbe172d6ad5b7ce367b23c20629830e39a0aee920a029.yml -openapi_spec_hash: 011cdae0c67909fb80a4a5eb54ca5bca +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-5555d8e0f800f68d951749454d94fa8b899fc3722550657578b1d8a9fd3322e8.yml +openapi_spec_hash: 754a2e573085f55d60f02dbc3a5ef2b1 config_hash: 896f0f71bc7d1ee09435813cdef97523 diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cdeb3602..60a232927 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 0.72.0 (2026-07-22) + +Full Changelog: [v0.71.0...v0.72.0](https://github.com/openai/openai-ruby/compare/v0.71.0...v0.72.0) + +### Features + +* **api:** accept `None` for prompt_cache_key/safety_identifier ([dcff6be](https://github.com/openai/openai-ruby/commit/dcff6bee4daca61b24dd03096f4772c3d276c93d)) +* **stlc:** configurable CI runner and private-production-repo support in workflow templates ([da769b4](https://github.com/openai/openai-ruby/commit/da769b419c0d1d51af2ad471ac63fdf18705be5b)) + ## 0.71.0 (2026-07-17) Full Changelog: [v0.70.0...v0.71.0](https://github.com/openai/openai-ruby/compare/v0.70.0...v0.71.0) diff --git a/Gemfile.lock b/Gemfile.lock index 8b73d44e1..d5889f800 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - openai (0.71.0) + openai (0.72.0) base64 cgi connection_pool diff --git a/README.md b/README.md index 2fb8aa89e..3a8912f92 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "openai", "~> 0.71.0" +gem "openai", "~> 0.72.0" ``` diff --git a/lib/openai/models/beta/beta_response.rb b/lib/openai/models/beta/beta_response.rb index aebe1b93f..d7ae99740 100644 --- a/lib/openai/models/beta/beta_response.rb +++ b/lib/openai/models/beta/beta_response.rb @@ -204,7 +204,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). # # @return [String, nil] - optional :prompt_cache_key, String + optional :prompt_cache_key, String, nil?: true # @!attribute prompt_cache_options # The prompt-caching options that were applied to the response. Supported for @@ -257,7 +257,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). # # @return [String, nil] - optional :safety_identifier, String + optional :safety_identifier, String, nil?: true # @!attribute service_tier # Specifies the processing type used for serving the request. @@ -382,7 +382,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables. # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi # # @param prompt_cache_options [OpenAI::Models::Beta::BetaResponse::PromptCacheOptions] The prompt-caching options that were applied to the response. Supported for `gpt # @@ -390,7 +390,7 @@ class BetaResponse < OpenAI::Internal::Type::BaseModel # # @param reasoning [OpenAI::Models::Beta::BetaResponse::Reasoning, nil] **gpt-5 and o-series models only** # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi + # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi # # @param service_tier [Symbol, OpenAI::Models::Beta::BetaResponse::ServiceTier, nil] Specifies the processing type used for serving the request. # @@ -1190,7 +1190,10 @@ module PromptCacheRetention # @see OpenAI::Models::Beta::BetaResponse#reasoning class Reasoning < OpenAI::Internal::Type::BaseModel # @!attribute context - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. # @@ -1260,7 +1263,10 @@ class Reasoning < OpenAI::Internal::Type::BaseModel # # @param summary [Symbol, OpenAI::Models::Beta::BetaResponse::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. # diff --git a/lib/openai/models/beta/beta_response_error.rb b/lib/openai/models/beta/beta_response_error.rb index 0c643f8db..338b9edfa 100644 --- a/lib/openai/models/beta/beta_response_error.rb +++ b/lib/openai/models/beta/beta_response_error.rb @@ -35,6 +35,7 @@ module Code SERVER_ERROR = :server_error RATE_LIMIT_EXCEEDED = :rate_limit_exceeded INVALID_PROMPT = :invalid_prompt + DATA_RESIDENCY_MISMATCH = :data_residency_mismatch BIO_POLICY = :bio_policy VECTOR_STORE_TIMEOUT = :vector_store_timeout INVALID_IMAGE = :invalid_image diff --git a/lib/openai/models/beta/beta_response_text_config.rb b/lib/openai/models/beta/beta_response_text_config.rb index 17d7d6863..574e3f002 100644 --- a/lib/openai/models/beta/beta_response_text_config.rb +++ b/lib/openai/models/beta/beta_response_text_config.rb @@ -25,7 +25,8 @@ class BetaResponseTextConfig < OpenAI::Internal::Type::BaseModel # @!attribute verbosity # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # # @return [Symbol, OpenAI::Models::Beta::BetaResponseTextConfig::Verbosity, nil] optional :verbosity, enum: -> { OpenAI::Beta::BetaResponseTextConfig::Verbosity }, nil?: true @@ -46,7 +47,8 @@ class BetaResponseTextConfig < OpenAI::Internal::Type::BaseModel # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # # @see OpenAI::Models::Beta::BetaResponseTextConfig#verbosity module Verbosity diff --git a/lib/openai/models/beta/beta_responses_client_event.rb b/lib/openai/models/beta/beta_responses_client_event.rb index e885f0599..415a46d21 100644 --- a/lib/openai/models/beta/beta_responses_client_event.rb +++ b/lib/openai/models/beta/beta_responses_client_event.rb @@ -188,7 +188,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). # # @return [String, nil] - optional :prompt_cache_key, String + optional :prompt_cache_key, String, nil?: true # @!attribute prompt_cache_options # Options for prompt caching. Supported for `gpt-5.6` and later models. By @@ -253,7 +253,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). # # @return [String, nil] - optional :safety_identifier, String + optional :safety_identifier, String, nil?: true # @!attribute service_tier # Specifies the processing type used for serving the request. @@ -443,7 +443,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables. # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi # # @param prompt_cache_options [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default # @@ -451,7 +451,7 @@ class ResponseCreate < OpenAI::Internal::Type::BaseModel # # @param reasoning [OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning, nil] **gpt-5 and o-series models only** # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi + # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi # # @param service_tier [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier, nil] Specifies the processing type used for serving the request. # @@ -1102,7 +1102,10 @@ module PromptCacheRetention # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate#reasoning class Reasoning < OpenAI::Internal::Type::BaseModel # @!attribute context - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. # @@ -1181,7 +1184,10 @@ class Reasoning < OpenAI::Internal::Type::BaseModel # # @param summary [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. # diff --git a/lib/openai/models/beta/response_create_params.rb b/lib/openai/models/beta/response_create_params.rb index 90202be80..d45c646a0 100644 --- a/lib/openai/models/beta/response_create_params.rb +++ b/lib/openai/models/beta/response_create_params.rb @@ -163,7 +163,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). # # @return [String, nil] - optional :prompt_cache_key, String + optional :prompt_cache_key, String, nil?: true # @!attribute prompt_cache_options # Options for prompt caching. Supported for `gpt-5.6` and later models. By @@ -223,7 +223,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). # # @return [String, nil] - optional :safety_identifier, String + optional :safety_identifier, String, nil?: true # @!attribute service_tier # Specifies the processing type used for serving the request. @@ -392,7 +392,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Reference to a prompt template and its variables. # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi # # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default # @@ -400,7 +400,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # # @param reasoning [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] **gpt-5 and o-series models only** # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi + # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi # # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. # @@ -1027,7 +1027,10 @@ module PromptCacheRetention class Reasoning < OpenAI::Internal::Type::BaseModel # @!attribute context - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. # @@ -1097,7 +1100,10 @@ class Reasoning < OpenAI::Internal::Type::BaseModel # # @param summary [Symbol, OpenAI::Models::Beta::ResponseCreateParams::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. # diff --git a/lib/openai/models/beta/responses/input_token_count_params.rb b/lib/openai/models/beta/responses/input_token_count_params.rb index 108986b9b..eae8a9d2c 100644 --- a/lib/openai/models/beta/responses/input_token_count_params.rb +++ b/lib/openai/models/beta/responses/input_token_count_params.rb @@ -214,7 +214,10 @@ module Personality class Reasoning < OpenAI::Internal::Type::BaseModel # @!attribute context - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. # @@ -289,7 +292,10 @@ class Reasoning < OpenAI::Internal::Type::BaseModel # # @param summary [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. # @@ -419,7 +425,8 @@ class Text < OpenAI::Internal::Type::BaseModel # @!attribute verbosity # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # # @return [Symbol, OpenAI::Models::Beta::Responses::InputTokenCountParams::Text::Verbosity, nil] optional :verbosity, @@ -442,7 +449,8 @@ class Text < OpenAI::Internal::Type::BaseModel # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # # @see OpenAI::Models::Beta::Responses::InputTokenCountParams::Text#verbosity module Verbosity diff --git a/lib/openai/models/chat/completion_create_params.rb b/lib/openai/models/chat/completion_create_params.rb index e5162fd6e..5bb0f74ef 100644 --- a/lib/openai/models/chat/completion_create_params.rb +++ b/lib/openai/models/chat/completion_create_params.rb @@ -194,7 +194,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). # # @return [String, nil] - optional :prompt_cache_key, String + optional :prompt_cache_key, String, nil?: true # @!attribute prompt_cache_options # Options for prompt caching. Supported for `gpt-5.6` and later models. By @@ -271,7 +271,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). # # @return [String, nil] - optional :safety_identifier, String + optional :safety_identifier, String, nil?: true # @!attribute seed # @deprecated @@ -401,7 +401,8 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # @!attribute verbosity # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # # @return [Symbol, OpenAI::Models::Chat::CompletionCreateParams::Verbosity, nil] optional :verbosity, enum: -> { OpenAI::Chat::CompletionCreateParams::Verbosity }, nil?: true @@ -452,7 +453,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # # @param presence_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi # # @param prompt_cache_options [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default # @@ -462,7 +463,7 @@ class CompletionCreateParams < OpenAI::Internal::Type::BaseModel # # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::StructuredOutput::JsonSchemaConverter, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi + # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi # # @param seed [Integer, nil] This feature is in Beta. # @@ -894,7 +895,8 @@ module Stop # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. module Verbosity extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/reasoning.rb b/lib/openai/models/reasoning.rb index 2b48e2d10..8d3744a0c 100644 --- a/lib/openai/models/reasoning.rb +++ b/lib/openai/models/reasoning.rb @@ -4,7 +4,10 @@ module OpenAI module Models class Reasoning < OpenAI::Internal::Type::BaseModel # @!attribute context - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. # @@ -72,7 +75,10 @@ class Reasoning < OpenAI::Internal::Type::BaseModel # # @param summary [Symbol, OpenAI::Models::Reasoning::Summary, nil] A summary of the reasoning performed by the model. This can be - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. # diff --git a/lib/openai/models/responses/input_token_count_params.rb b/lib/openai/models/responses/input_token_count_params.rb index b581d7e45..7ec8cac1b 100644 --- a/lib/openai/models/responses/input_token_count_params.rb +++ b/lib/openai/models/responses/input_token_count_params.rb @@ -225,7 +225,8 @@ class Text < OpenAI::Internal::Type::BaseModel # @!attribute verbosity # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # # @return [Symbol, OpenAI::Models::Responses::InputTokenCountParams::Text::Verbosity, nil] optional :verbosity, @@ -250,7 +251,8 @@ class Text < OpenAI::Internal::Type::BaseModel # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # # @see OpenAI::Models::Responses::InputTokenCountParams::Text#verbosity module Verbosity diff --git a/lib/openai/models/responses/response.rb b/lib/openai/models/responses/response.rb index cad5afff3..985ba47ff 100644 --- a/lib/openai/models/responses/response.rb +++ b/lib/openai/models/responses/response.rb @@ -204,7 +204,7 @@ class Response < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). # # @return [String, nil] - optional :prompt_cache_key, String + optional :prompt_cache_key, String, nil?: true # @!attribute prompt_cache_options # The prompt-caching options that were applied to the response. Supported for @@ -257,7 +257,7 @@ class Response < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). # # @return [String, nil] - optional :safety_identifier, String + optional :safety_identifier, String, nil?: true # @!attribute service_tier # Specifies the processing type used for serving the request. @@ -402,7 +402,7 @@ def output_text # # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi # # @param prompt_cache_options [OpenAI::Models::Responses::Response::PromptCacheOptions] The prompt-caching options that were applied to the response. Supported for `gpt # @@ -410,7 +410,7 @@ def output_text # # @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only** # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi + # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi # # @param service_tier [Symbol, OpenAI::Models::Responses::Response::ServiceTier, nil] Specifies the processing type used for serving the request. # diff --git a/lib/openai/models/responses/response_create_params.rb b/lib/openai/models/responses/response_create_params.rb index c79a90110..39efe9078 100644 --- a/lib/openai/models/responses/response_create_params.rb +++ b/lib/openai/models/responses/response_create_params.rb @@ -161,7 +161,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). # # @return [String, nil] - optional :prompt_cache_key, String + optional :prompt_cache_key, String, nil?: true # @!attribute prompt_cache_options # Options for prompt caching. Supported for `gpt-5.6` and later models. By @@ -221,7 +221,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). # # @return [String, nil] - optional :safety_identifier, String + optional :safety_identifier, String, nil?: true # @!attribute service_tier # Specifies the processing type used for serving the request. @@ -389,7 +389,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi # # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default # @@ -397,7 +397,7 @@ class ResponseCreateParams < OpenAI::Internal::Type::BaseModel # # @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only** # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi + # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi # # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. # diff --git a/lib/openai/models/responses/response_error.rb b/lib/openai/models/responses/response_error.rb index 22b4da4ef..2f3b5f462 100644 --- a/lib/openai/models/responses/response_error.rb +++ b/lib/openai/models/responses/response_error.rb @@ -35,6 +35,7 @@ module Code SERVER_ERROR = :server_error RATE_LIMIT_EXCEEDED = :rate_limit_exceeded INVALID_PROMPT = :invalid_prompt + DATA_RESIDENCY_MISMATCH = :data_residency_mismatch BIO_POLICY = :bio_policy VECTOR_STORE_TIMEOUT = :vector_store_timeout INVALID_IMAGE = :invalid_image diff --git a/lib/openai/models/responses/response_text_config.rb b/lib/openai/models/responses/response_text_config.rb index 7017ea8ff..f108358f8 100644 --- a/lib/openai/models/responses/response_text_config.rb +++ b/lib/openai/models/responses/response_text_config.rb @@ -25,7 +25,8 @@ class ResponseTextConfig < OpenAI::Internal::Type::BaseModel # @!attribute verbosity # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # # @return [Symbol, OpenAI::Models::Responses::ResponseTextConfig::Verbosity, nil] optional :verbosity, enum: -> { OpenAI::Responses::ResponseTextConfig::Verbosity }, nil?: true @@ -46,7 +47,8 @@ class ResponseTextConfig < OpenAI::Internal::Type::BaseModel # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. # # @see OpenAI::Models::Responses::ResponseTextConfig#verbosity module Verbosity diff --git a/lib/openai/models/responses/responses_client_event.rb b/lib/openai/models/responses/responses_client_event.rb index 5bb73eb62..55101564a 100644 --- a/lib/openai/models/responses/responses_client_event.rb +++ b/lib/openai/models/responses/responses_client_event.rb @@ -161,7 +161,7 @@ class ResponsesClientEvent < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). # # @return [String, nil] - optional :prompt_cache_key, String + optional :prompt_cache_key, String, nil?: true # @!attribute prompt_cache_options # Options for prompt caching. Supported for `gpt-5.6` and later models. By @@ -221,7 +221,7 @@ class ResponsesClientEvent < OpenAI::Internal::Type::BaseModel # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). # # @return [String, nil] - optional :safety_identifier, String + optional :safety_identifier, String, nil?: true # @!attribute service_tier # Specifies the processing type used for serving the request. @@ -394,7 +394,7 @@ class ResponsesClientEvent < OpenAI::Internal::Type::BaseModel # # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi # # @param prompt_cache_options [OpenAI::Models::Responses::ResponsesClientEvent::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default # @@ -402,7 +402,7 @@ class ResponsesClientEvent < OpenAI::Internal::Type::BaseModel # # @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only** # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi + # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi # # @param service_tier [Symbol, OpenAI::Models::Responses::ResponsesClientEvent::ServiceTier, nil] Specifies the processing type used for serving the request. # diff --git a/lib/openai/resources/beta/responses.rb b/lib/openai/resources/beta/responses.rb index 95d458f32..f7f130103 100644 --- a/lib/openai/resources/beta/responses.rb +++ b/lib/openai/resources/beta/responses.rb @@ -59,7 +59,7 @@ class Responses # # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Body param: Reference to a prompt template and its variables. # - # @param prompt_cache_key [String] Body param: Used by OpenAI to cache responses for similar requests to optimize y + # @param prompt_cache_key [String, nil] Body param: Used by OpenAI to cache responses for similar requests to optimize y # # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions] Body param: Options for prompt caching. Supported for `gpt-5.6` and later models # @@ -67,7 +67,7 @@ class Responses # # @param reasoning [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] Body param: **gpt-5 and o-series models only** # - # @param safety_identifier [String] Body param: A stable identifier used to help detect users of your application th + # @param safety_identifier [String, nil] Body param: A stable identifier used to help detect users of your application th # # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCreateParams::ServiceTier, nil] Body param: Specifies the processing type used for serving the request. # @@ -165,7 +165,7 @@ def create(params = {}) # # @param prompt [OpenAI::Models::Beta::BetaResponsePrompt, nil] Body param: Reference to a prompt template and its variables. # - # @param prompt_cache_key [String] Body param: Used by OpenAI to cache responses for similar requests to optimize y + # @param prompt_cache_key [String, nil] Body param: Used by OpenAI to cache responses for similar requests to optimize y # # @param prompt_cache_options [OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions] Body param: Options for prompt caching. Supported for `gpt-5.6` and later models # @@ -173,7 +173,7 @@ def create(params = {}) # # @param reasoning [OpenAI::Models::Beta::ResponseCreateParams::Reasoning, nil] Body param: **gpt-5 and o-series models only** # - # @param safety_identifier [String] Body param: A stable identifier used to help detect users of your application th + # @param safety_identifier [String, nil] Body param: A stable identifier used to help detect users of your application th # # @param service_tier [Symbol, OpenAI::Models::Beta::ResponseCreateParams::ServiceTier, nil] Body param: Specifies the processing type used for serving the request. # diff --git a/lib/openai/resources/chat/completions.rb b/lib/openai/resources/chat/completions.rb index b3c63c0c1..dadcc8adb 100644 --- a/lib/openai/resources/chat/completions.rb +++ b/lib/openai/resources/chat/completions.rb @@ -73,7 +73,7 @@ class Completions # # @param presence_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi # # @param prompt_cache_options [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default # @@ -83,7 +83,7 @@ class Completions # # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi + # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi # # @param seed [Integer, nil] This feature is in Beta. # @@ -329,7 +329,7 @@ def stream(params) # # @param presence_penalty [Float, nil] Number between -2.0 and 2.0. Positive values penalize new tokens based on # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi # # @param prompt_cache_options [OpenAI::Models::Chat::CompletionCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default # @@ -339,7 +339,7 @@ def stream(params) # # @param response_format [OpenAI::Models::ResponseFormatText, OpenAI::Models::ResponseFormatJSONSchema, OpenAI::Models::ResponseFormatJSONObject] An object specifying the format that the model must output. # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi + # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi # # @param seed [Integer, nil] This feature is in Beta. # diff --git a/lib/openai/resources/responses.rb b/lib/openai/resources/responses.rb index bab445d94..4254940a2 100644 --- a/lib/openai/resources/responses.rb +++ b/lib/openai/resources/responses.rb @@ -56,7 +56,7 @@ class Responses # # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi # # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default # @@ -64,7 +64,7 @@ class Responses # # @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only** # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi + # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi # # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. # @@ -287,7 +287,7 @@ def stream(params) # # @param prompt [OpenAI::Models::Responses::ResponsePrompt, nil] Reference to a prompt template and its variables. # - # @param prompt_cache_key [String] Used by OpenAI to cache responses for similar requests to optimize your cache hi + # @param prompt_cache_key [String, nil] Used by OpenAI to cache responses for similar requests to optimize your cache hi # # @param prompt_cache_options [OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions] Options for prompt caching. Supported for `gpt-5.6` and later models. By default # @@ -295,7 +295,7 @@ def stream(params) # # @param reasoning [OpenAI::Models::Reasoning, nil] **gpt-5 and o-series models only** # - # @param safety_identifier [String] A stable identifier used to help detect users of your application that may be vi + # @param safety_identifier [String, nil] A stable identifier used to help detect users of your application that may be vi # # @param service_tier [Symbol, OpenAI::Models::Responses::ResponseCreateParams::ServiceTier, nil] Specifies the processing type used for serving the request. # diff --git a/lib/openai/version.rb b/lib/openai/version.rb index 53d1ee61e..949517eec 100644 --- a/lib/openai/version.rb +++ b/lib/openai/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module OpenAI - VERSION = "0.71.0" + VERSION = "0.72.0" end diff --git a/rbi/openai/models/beta/beta_response.rbi b/rbi/openai/models/beta/beta_response.rbi index de356d643..0c5136084 100644 --- a/rbi/openai/models/beta/beta_response.rbi +++ b/rbi/openai/models/beta/beta_response.rbi @@ -204,10 +204,7 @@ module OpenAI # hit rates. Replaces the `user` field. # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } - attr_reader :prompt_cache_key - - sig { params(prompt_cache_key: String).void } - attr_writer :prompt_cache_key + attr_accessor :prompt_cache_key # The prompt-caching options that were applied to the response. Supported for # `gpt-5.6` and later models. @@ -271,10 +268,7 @@ module OpenAI # identifying information. # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). sig { returns(T.nilable(String)) } - attr_reader :safety_identifier - - sig { params(safety_identifier: String).void } - attr_writer :safety_identifier + attr_accessor :safety_identifier # Specifies the processing type used for serving the request. # @@ -452,7 +446,7 @@ module OpenAI T.nilable(OpenAI::Beta::BetaResponse::Moderation::OrHash), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt::OrHash), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Beta::BetaResponse::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -460,7 +454,7 @@ module OpenAI OpenAI::Beta::BetaResponse::PromptCacheRetention::OrSymbol ), reasoning: T.nilable(OpenAI::Beta::BetaResponse::Reasoning::OrHash), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable(OpenAI::Beta::BetaResponse::ServiceTier::OrSymbol), status: OpenAI::Beta::BetaResponseStatus::OrSymbol, @@ -691,7 +685,7 @@ module OpenAI moderation: T.nilable(OpenAI::Beta::BetaResponse::Moderation), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Beta::BetaResponse::PromptCacheOptions, prompt_cache_retention: @@ -699,7 +693,7 @@ module OpenAI OpenAI::Beta::BetaResponse::PromptCacheRetention::TaggedSymbol ), reasoning: T.nilable(OpenAI::Beta::BetaResponse::Reasoning), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Beta::BetaResponse::ServiceTier::TaggedSymbol @@ -2014,7 +2008,10 @@ module OpenAI ) end - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. sig do @@ -2121,7 +2118,10 @@ module OpenAI ).returns(T.attached_class) end def self.new( - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. context: nil, @@ -2178,7 +2178,10 @@ module OpenAI def to_hash end - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. module Context diff --git a/rbi/openai/models/beta/beta_response_error.rbi b/rbi/openai/models/beta/beta_response_error.rbi index 7ab96ea8d..ae72b9bd5 100644 --- a/rbi/openai/models/beta/beta_response_error.rbi +++ b/rbi/openai/models/beta/beta_response_error.rbi @@ -70,6 +70,11 @@ module OpenAI :invalid_prompt, OpenAI::Beta::BetaResponseError::Code::TaggedSymbol ) + DATA_RESIDENCY_MISMATCH = + T.let( + :data_residency_mismatch, + OpenAI::Beta::BetaResponseError::Code::TaggedSymbol + ) BIO_POLICY = T.let( :bio_policy, diff --git a/rbi/openai/models/beta/beta_response_text_config.rbi b/rbi/openai/models/beta/beta_response_text_config.rbi index ac168cc5f..6d5273241 100644 --- a/rbi/openai/models/beta/beta_response_text_config.rbi +++ b/rbi/openai/models/beta/beta_response_text_config.rbi @@ -54,7 +54,8 @@ module OpenAI # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. sig do returns( T.nilable(OpenAI::Beta::BetaResponseTextConfig::Verbosity::OrSymbol) @@ -98,7 +99,8 @@ module OpenAI format_: nil, # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. verbosity: nil ) end @@ -124,7 +126,8 @@ module OpenAI # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. module Verbosity extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/beta/beta_responses_client_event.rbi b/rbi/openai/models/beta/beta_responses_client_event.rbi index 82783bb85..e9bc1adcc 100644 --- a/rbi/openai/models/beta/beta_responses_client_event.rbi +++ b/rbi/openai/models/beta/beta_responses_client_event.rbi @@ -238,10 +238,7 @@ module OpenAI # hit rates. Replaces the `user` field. # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } - attr_reader :prompt_cache_key - - sig { params(prompt_cache_key: String).void } - attr_writer :prompt_cache_key + attr_accessor :prompt_cache_key # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -325,10 +322,7 @@ module OpenAI # identifying information. # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). sig { returns(T.nilable(String)) } - attr_reader :safety_identifier - - sig { params(safety_identifier: String).void } - attr_writer :safety_identifier + attr_accessor :safety_identifier # Specifies the processing type used for serving the request. # @@ -612,7 +606,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt::OrHash), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -623,7 +617,7 @@ module OpenAI T.nilable( OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning::OrHash ), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::OrSymbol @@ -938,7 +932,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions, prompt_cache_retention: @@ -949,7 +943,7 @@ module OpenAI T.nilable( OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning ), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::ServiceTier::OrSymbol @@ -2198,7 +2192,10 @@ module OpenAI ) end - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. sig do @@ -2310,7 +2307,10 @@ module OpenAI ).returns(T.attached_class) end def self.new( - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. context: nil, @@ -2371,7 +2371,10 @@ module OpenAI def to_hash end - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. module Context diff --git a/rbi/openai/models/beta/response_create_params.rbi b/rbi/openai/models/beta/response_create_params.rbi index 3a6194c2e..ab3328258 100644 --- a/rbi/openai/models/beta/response_create_params.rbi +++ b/rbi/openai/models/beta/response_create_params.rbi @@ -195,10 +195,7 @@ module OpenAI # hit rates. Replaces the `user` field. # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } - attr_reader :prompt_cache_key - - sig { params(prompt_cache_key: String).void } - attr_writer :prompt_cache_key + attr_accessor :prompt_cache_key # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -274,10 +271,7 @@ module OpenAI # identifying information. # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). sig { returns(T.nilable(String)) } - attr_reader :safety_identifier - - sig { params(safety_identifier: String).void } - attr_writer :safety_identifier + attr_accessor :safety_identifier # Specifies the processing type used for serving the request. # @@ -546,7 +540,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt::OrHash), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -555,7 +549,7 @@ module OpenAI ), reasoning: T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning::OrHash), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Beta::ResponseCreateParams::ServiceTier::OrSymbol @@ -857,7 +851,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Beta::ResponseCreateParams::PromptCacheOptions, prompt_cache_retention: @@ -866,7 +860,7 @@ module OpenAI ), reasoning: T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Beta::ResponseCreateParams::ServiceTier::OrSymbol @@ -2099,7 +2093,10 @@ module OpenAI ) end - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. sig do @@ -2211,7 +2208,10 @@ module OpenAI ).returns(T.attached_class) end def self.new( - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. context: nil, @@ -2272,7 +2272,10 @@ module OpenAI def to_hash end - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. module Context diff --git a/rbi/openai/models/beta/responses/input_token_count_params.rbi b/rbi/openai/models/beta/responses/input_token_count_params.rbi index 1f0c61650..4abbaa9ee 100644 --- a/rbi/openai/models/beta/responses/input_token_count_params.rbi +++ b/rbi/openai/models/beta/responses/input_token_count_params.rbi @@ -544,7 +544,10 @@ module OpenAI ) end - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. sig do @@ -654,7 +657,10 @@ module OpenAI ).returns(T.attached_class) end def self.new( - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. context: nil, @@ -715,7 +721,10 @@ module OpenAI def to_hash end - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. module Context @@ -1006,7 +1015,8 @@ module OpenAI # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. sig do returns( T.nilable( @@ -1052,7 +1062,8 @@ module OpenAI format_: nil, # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. verbosity: nil ) end @@ -1078,7 +1089,8 @@ module OpenAI # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. module Verbosity extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/chat/completion_create_params.rbi b/rbi/openai/models/chat/completion_create_params.rbi index d60e70944..bd06ae759 100644 --- a/rbi/openai/models/chat/completion_create_params.rbi +++ b/rbi/openai/models/chat/completion_create_params.rbi @@ -236,10 +236,7 @@ module OpenAI # hit rates. Replaces the `user` field. # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } - attr_reader :prompt_cache_key - - sig { params(prompt_cache_key: String).void } - attr_writer :prompt_cache_key + attr_accessor :prompt_cache_key # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -344,10 +341,7 @@ module OpenAI # identifying information. # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). sig { returns(T.nilable(String)) } - attr_reader :safety_identifier - - sig { params(safety_identifier: String).void } - attr_writer :safety_identifier + attr_accessor :safety_identifier # This feature is in Beta. If specified, our system will make a best effort to # sample deterministically, such that repeated requests with the same `seed` and @@ -515,7 +509,8 @@ module OpenAI # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. sig do returns( T.nilable(OpenAI::Chat::CompletionCreateParams::Verbosity::OrSymbol) @@ -584,7 +579,7 @@ module OpenAI prediction: T.nilable(OpenAI::Chat::ChatCompletionPredictionContent::OrHash), presence_penalty: T.nilable(Float), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Chat::CompletionCreateParams::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -599,7 +594,7 @@ module OpenAI OpenAI::StructuredOutput::JsonSchemaConverter, OpenAI::ResponseFormatJSONObject::OrHash ), - safety_identifier: String, + safety_identifier: T.nilable(String), seed: T.nilable(Integer), service_tier: T.nilable( @@ -870,7 +865,8 @@ module OpenAI user: nil, # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. verbosity: nil, # This tool searches the web for relevant results to use in a response. Learn more # about the @@ -922,7 +918,7 @@ module OpenAI prediction: T.nilable(OpenAI::Chat::ChatCompletionPredictionContent), presence_penalty: T.nilable(Float), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Chat::CompletionCreateParams::PromptCacheOptions, prompt_cache_retention: @@ -936,7 +932,7 @@ module OpenAI OpenAI::ResponseFormatJSONSchema, OpenAI::ResponseFormatJSONObject ), - safety_identifier: String, + safety_identifier: T.nilable(String), seed: T.nilable(Integer), service_tier: T.nilable( @@ -1819,7 +1815,8 @@ module OpenAI # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. module Verbosity extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/reasoning.rbi b/rbi/openai/models/reasoning.rbi index d1274b01f..b7e476ed7 100644 --- a/rbi/openai/models/reasoning.rbi +++ b/rbi/openai/models/reasoning.rbi @@ -6,7 +6,10 @@ module OpenAI OrHash = T.type_alias { T.any(OpenAI::Reasoning, OpenAI::Internal::AnyHash) } - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. sig { returns(T.nilable(OpenAI::Reasoning::Context::OrSymbol)) } @@ -66,7 +69,10 @@ module OpenAI ).returns(T.attached_class) end def self.new( - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. context: nil, @@ -112,7 +118,10 @@ module OpenAI def to_hash end - # Controls which reasoning items are rendered back to the model on later turns. + # Controls which reasoning items are rendered back to the model on later turns. If + # omitted or set to `auto`, the model determines the context mode. The `gpt-5.6` + # model family defaults to `all_turns`; earlier models default to `current_turn`. + # # When returned on a response, this is the effective reasoning context mode used # for the response. module Context diff --git a/rbi/openai/models/responses/input_token_count_params.rbi b/rbi/openai/models/responses/input_token_count_params.rbi index 1d2e465c5..11557ff57 100644 --- a/rbi/openai/models/responses/input_token_count_params.rbi +++ b/rbi/openai/models/responses/input_token_count_params.rbi @@ -523,7 +523,8 @@ module OpenAI # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. sig do returns( T.nilable( @@ -569,7 +570,8 @@ module OpenAI format_: nil, # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. verbosity: nil ) end @@ -595,7 +597,8 @@ module OpenAI # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. module Verbosity extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/responses/response.rbi b/rbi/openai/models/responses/response.rbi index 5cec954d9..fc71cec60 100644 --- a/rbi/openai/models/responses/response.rbi +++ b/rbi/openai/models/responses/response.rbi @@ -206,10 +206,7 @@ module OpenAI # hit rates. Replaces the `user` field. # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } - attr_reader :prompt_cache_key - - sig { params(prompt_cache_key: String).void } - attr_writer :prompt_cache_key + attr_accessor :prompt_cache_key # The prompt-caching options that were applied to the response. Supported for # `gpt-5.6` and later models. @@ -269,10 +266,7 @@ module OpenAI # identifying information. # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). sig { returns(T.nilable(String)) } - attr_reader :safety_identifier - - sig { params(safety_identifier: String).void } - attr_writer :safety_identifier + attr_accessor :safety_identifier # Specifies the processing type used for serving the request. # @@ -452,7 +446,7 @@ module OpenAI T.nilable(OpenAI::Responses::Response::Moderation::OrHash), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Responses::Response::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -460,7 +454,7 @@ module OpenAI OpenAI::Responses::Response::PromptCacheRetention::OrSymbol ), reasoning: T.nilable(OpenAI::Reasoning::OrHash), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable(OpenAI::Responses::Response::ServiceTier::OrSymbol), status: OpenAI::Responses::ResponseStatus::OrSymbol, @@ -692,7 +686,7 @@ module OpenAI moderation: T.nilable(OpenAI::Responses::Response::Moderation), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Responses::ResponsePrompt), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Responses::Response::PromptCacheOptions, prompt_cache_retention: @@ -700,7 +694,7 @@ module OpenAI OpenAI::Responses::Response::PromptCacheRetention::TaggedSymbol ), reasoning: T.nilable(OpenAI::Reasoning), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Responses::Response::ServiceTier::TaggedSymbol diff --git a/rbi/openai/models/responses/response_create_params.rbi b/rbi/openai/models/responses/response_create_params.rbi index f52752e1b..279821075 100644 --- a/rbi/openai/models/responses/response_create_params.rbi +++ b/rbi/openai/models/responses/response_create_params.rbi @@ -198,10 +198,7 @@ module OpenAI # hit rates. Replaces the `user` field. # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } - attr_reader :prompt_cache_key - - sig { params(prompt_cache_key: String).void } - attr_writer :prompt_cache_key + attr_accessor :prompt_cache_key # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -272,10 +269,7 @@ module OpenAI # identifying information. # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). sig { returns(T.nilable(String)) } - attr_reader :safety_identifier - - sig { params(safety_identifier: String).void } - attr_writer :safety_identifier + attr_accessor :safety_identifier # Specifies the processing type used for serving the request. # @@ -543,7 +537,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Responses::ResponseCreateParams::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -551,7 +545,7 @@ module OpenAI OpenAI::Responses::ResponseCreateParams::PromptCacheRetention::OrSymbol ), reasoning: T.nilable(OpenAI::Reasoning::OrHash), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Responses::ResponseCreateParams::ServiceTier::OrSymbol @@ -848,7 +842,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Responses::ResponsePrompt), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Responses::ResponseCreateParams::PromptCacheOptions, prompt_cache_retention: @@ -856,7 +850,7 @@ module OpenAI OpenAI::Responses::ResponseCreateParams::PromptCacheRetention::OrSymbol ), reasoning: T.nilable(OpenAI::Reasoning), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Responses::ResponseCreateParams::ServiceTier::OrSymbol diff --git a/rbi/openai/models/responses/response_error.rbi b/rbi/openai/models/responses/response_error.rbi index e26caac75..e289aafa7 100644 --- a/rbi/openai/models/responses/response_error.rbi +++ b/rbi/openai/models/responses/response_error.rbi @@ -68,6 +68,11 @@ module OpenAI :invalid_prompt, OpenAI::Responses::ResponseError::Code::TaggedSymbol ) + DATA_RESIDENCY_MISMATCH = + T.let( + :data_residency_mismatch, + OpenAI::Responses::ResponseError::Code::TaggedSymbol + ) BIO_POLICY = T.let( :bio_policy, diff --git a/rbi/openai/models/responses/response_text_config.rbi b/rbi/openai/models/responses/response_text_config.rbi index e36e1bacf..3e37ccd32 100644 --- a/rbi/openai/models/responses/response_text_config.rbi +++ b/rbi/openai/models/responses/response_text_config.rbi @@ -52,7 +52,8 @@ module OpenAI # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. sig do returns( T.nilable( @@ -98,7 +99,8 @@ module OpenAI format_: nil, # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. verbosity: nil ) end @@ -124,7 +126,8 @@ module OpenAI # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. module Verbosity extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/responses/responses_client_event.rbi b/rbi/openai/models/responses/responses_client_event.rbi index 668931fa7..12838a108 100644 --- a/rbi/openai/models/responses/responses_client_event.rbi +++ b/rbi/openai/models/responses/responses_client_event.rbi @@ -199,10 +199,7 @@ module OpenAI # hit rates. Replaces the `user` field. # [Learn more](https://platform.openai.com/docs/guides/prompt-caching). sig { returns(T.nilable(String)) } - attr_reader :prompt_cache_key - - sig { params(prompt_cache_key: String).void } - attr_writer :prompt_cache_key + attr_accessor :prompt_cache_key # Options for prompt caching. Supported for `gpt-5.6` and later models. By # default, OpenAI automatically chooses one implicit cache breakpoint. You can add @@ -273,10 +270,7 @@ module OpenAI # identifying information. # [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers). sig { returns(T.nilable(String)) } - attr_reader :safety_identifier - - sig { params(safety_identifier: String).void } - attr_writer :safety_identifier + attr_accessor :safety_identifier # Specifies the processing type used for serving the request. # @@ -545,7 +539,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -553,7 +547,7 @@ module OpenAI OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention::OrSymbol ), reasoning: T.nilable(OpenAI::Reasoning::OrHash), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Responses::ResponsesClientEvent::ServiceTier::OrSymbol @@ -860,7 +854,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Responses::ResponsePrompt), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions, prompt_cache_retention: @@ -868,7 +862,7 @@ module OpenAI OpenAI::Responses::ResponsesClientEvent::PromptCacheRetention::OrSymbol ), reasoning: T.nilable(OpenAI::Reasoning), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Responses::ResponsesClientEvent::ServiceTier::OrSymbol diff --git a/rbi/openai/resources/beta/responses.rbi b/rbi/openai/resources/beta/responses.rbi index e8abea5e4..447361364 100644 --- a/rbi/openai/resources/beta/responses.rbi +++ b/rbi/openai/resources/beta/responses.rbi @@ -60,7 +60,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt::OrHash), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -69,7 +69,7 @@ module OpenAI ), reasoning: T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning::OrHash), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Beta::ResponseCreateParams::ServiceTier::OrSymbol @@ -399,7 +399,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Beta::BetaResponsePrompt::OrHash), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -408,7 +408,7 @@ module OpenAI ), reasoning: T.nilable(OpenAI::Beta::ResponseCreateParams::Reasoning::OrHash), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Beta::ResponseCreateParams::ServiceTier::OrSymbol diff --git a/rbi/openai/resources/chat/completions.rbi b/rbi/openai/resources/chat/completions.rbi index bd4ba1013..e4d30a775 100644 --- a/rbi/openai/resources/chat/completions.rbi +++ b/rbi/openai/resources/chat/completions.rbi @@ -76,7 +76,7 @@ module OpenAI prediction: T.nilable(OpenAI::Chat::ChatCompletionPredictionContent::OrHash), presence_penalty: T.nilable(Float), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Chat::CompletionCreateParams::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -91,7 +91,7 @@ module OpenAI OpenAI::StructuredOutput::JsonSchemaConverter, OpenAI::ResponseFormatJSONObject::OrHash ), - safety_identifier: String, + safety_identifier: T.nilable(String), seed: T.nilable(Integer), service_tier: T.nilable( @@ -363,7 +363,8 @@ module OpenAI user: nil, # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. verbosity: nil, # This tool searches the web for relevant results to use in a response. Learn more # about the @@ -441,7 +442,7 @@ module OpenAI prediction: T.nilable(OpenAI::Chat::ChatCompletionPredictionContent::OrHash), presence_penalty: T.nilable(Float), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Chat::CompletionCreateParams::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -455,7 +456,7 @@ module OpenAI OpenAI::ResponseFormatJSONSchema::OrHash, OpenAI::ResponseFormatJSONObject::OrHash ), - safety_identifier: String, + safety_identifier: T.nilable(String), seed: T.nilable(Integer), service_tier: T.nilable( @@ -726,7 +727,8 @@ module OpenAI user: nil, # Constrains the verbosity of the model's response. Lower values will result in # more concise responses, while higher values will result in more verbose - # responses. Currently supported values are `low`, `medium`, and `high`. + # responses. Currently supported values are `low`, `medium`, and `high`. The + # default is `medium`. verbosity: nil, # This tool searches the web for relevant results to use in a response. Learn more # about the diff --git a/rbi/openai/resources/responses.rbi b/rbi/openai/resources/responses.rbi index 5362b0fcd..308a7674a 100644 --- a/rbi/openai/resources/responses.rbi +++ b/rbi/openai/resources/responses.rbi @@ -60,7 +60,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Responses::ResponseCreateParams::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -68,7 +68,7 @@ module OpenAI OpenAI::Responses::ResponseCreateParams::PromptCacheRetention::OrSymbol ), reasoning: T.nilable(OpenAI::Reasoning::OrHash), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Responses::ResponseCreateParams::ServiceTier::OrSymbol @@ -390,7 +390,7 @@ module OpenAI parallel_tool_calls: T.nilable(T::Boolean), previous_response_id: T.nilable(String), prompt: T.nilable(OpenAI::Responses::ResponsePrompt::OrHash), - prompt_cache_key: String, + prompt_cache_key: T.nilable(String), prompt_cache_options: OpenAI::Responses::ResponseCreateParams::PromptCacheOptions::OrHash, prompt_cache_retention: @@ -398,7 +398,7 @@ module OpenAI OpenAI::Responses::ResponseCreateParams::PromptCacheRetention::OrSymbol ), reasoning: T.nilable(OpenAI::Reasoning::OrHash), - safety_identifier: String, + safety_identifier: T.nilable(String), service_tier: T.nilable( OpenAI::Responses::ResponseCreateParams::ServiceTier::OrSymbol diff --git a/sig/openai/models/beta/beta_response.rbs b/sig/openai/models/beta/beta_response.rbs index 4d7a86440..6b8adeb93 100644 --- a/sig/openai/models/beta/beta_response.rbs +++ b/sig/openai/models/beta/beta_response.rbs @@ -27,11 +27,11 @@ module OpenAI moderation: OpenAI::Beta::BetaResponse::Moderation?, previous_response_id: String?, prompt: OpenAI::Beta::BetaResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Beta::BetaResponse::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Beta::BetaResponse::prompt_cache_retention?, reasoning: OpenAI::Beta::BetaResponse::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Beta::BetaResponse::service_tier?, status: OpenAI::Models::Beta::beta_response_status, text: OpenAI::Beta::BetaResponseTextConfig, @@ -86,9 +86,7 @@ module OpenAI attr_accessor prompt: OpenAI::Beta::BetaResponsePrompt? - attr_reader prompt_cache_key: String? - - def prompt_cache_key=: (String) -> String + attr_accessor prompt_cache_key: String? attr_reader prompt_cache_options: OpenAI::Beta::BetaResponse::PromptCacheOptions? @@ -100,9 +98,7 @@ module OpenAI attr_accessor reasoning: OpenAI::Beta::BetaResponse::Reasoning? - attr_reader safety_identifier: String? - - def safety_identifier=: (String) -> String + attr_accessor safety_identifier: String? attr_accessor service_tier: OpenAI::Models::Beta::BetaResponse::service_tier? @@ -154,11 +150,11 @@ module OpenAI ?moderation: OpenAI::Beta::BetaResponse::Moderation?, ?previous_response_id: String?, ?prompt: OpenAI::Beta::BetaResponsePrompt?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Beta::BetaResponse::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Beta::BetaResponse::prompt_cache_retention?, ?reasoning: OpenAI::Beta::BetaResponse::Reasoning?, - ?safety_identifier: String, + ?safety_identifier: String?, ?service_tier: OpenAI::Models::Beta::BetaResponse::service_tier?, ?status: OpenAI::Models::Beta::beta_response_status, ?text: OpenAI::Beta::BetaResponseTextConfig, @@ -192,11 +188,11 @@ module OpenAI moderation: OpenAI::Beta::BetaResponse::Moderation?, previous_response_id: String?, prompt: OpenAI::Beta::BetaResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Beta::BetaResponse::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Beta::BetaResponse::prompt_cache_retention?, reasoning: OpenAI::Beta::BetaResponse::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Beta::BetaResponse::service_tier?, status: OpenAI::Models::Beta::beta_response_status, text: OpenAI::Beta::BetaResponseTextConfig, diff --git a/sig/openai/models/beta/beta_response_error.rbs b/sig/openai/models/beta/beta_response_error.rbs index b3ab1537e..ade4971de 100644 --- a/sig/openai/models/beta/beta_response_error.rbs +++ b/sig/openai/models/beta/beta_response_error.rbs @@ -25,6 +25,7 @@ module OpenAI :server_error | :rate_limit_exceeded | :invalid_prompt + | :data_residency_mismatch | :bio_policy | :vector_store_timeout | :invalid_image @@ -48,6 +49,7 @@ module OpenAI SERVER_ERROR: :server_error RATE_LIMIT_EXCEEDED: :rate_limit_exceeded INVALID_PROMPT: :invalid_prompt + DATA_RESIDENCY_MISMATCH: :data_residency_mismatch BIO_POLICY: :bio_policy VECTOR_STORE_TIMEOUT: :vector_store_timeout INVALID_IMAGE: :invalid_image diff --git a/sig/openai/models/beta/beta_responses_client_event.rbs b/sig/openai/models/beta/beta_responses_client_event.rbs index a56bd9c95..78c79f73f 100644 --- a/sig/openai/models/beta/beta_responses_client_event.rbs +++ b/sig/openai/models/beta/beta_responses_client_event.rbs @@ -28,11 +28,11 @@ module OpenAI parallel_tool_calls: bool?, previous_response_id: String?, prompt: OpenAI::Beta::BetaResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::prompt_cache_retention?, reasoning: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::service_tier?, store: bool?, stream: bool?, @@ -88,9 +88,7 @@ module OpenAI attr_accessor prompt: OpenAI::Beta::BetaResponsePrompt? - attr_reader prompt_cache_key: String? - - def prompt_cache_key=: (String) -> String + attr_accessor prompt_cache_key: String? attr_reader prompt_cache_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions? @@ -102,9 +100,7 @@ module OpenAI attr_accessor reasoning: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning? - attr_reader safety_identifier: String? - - def safety_identifier=: (String) -> String + attr_accessor safety_identifier: String? attr_accessor service_tier: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::service_tier? @@ -160,11 +156,11 @@ module OpenAI ?parallel_tool_calls: bool?, ?previous_response_id: String?, ?prompt: OpenAI::Beta::BetaResponsePrompt?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::prompt_cache_retention?, ?reasoning: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning?, - ?safety_identifier: String, + ?safety_identifier: String?, ?service_tier: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::service_tier?, ?store: bool?, ?stream: bool?, @@ -197,11 +193,11 @@ module OpenAI parallel_tool_calls: bool?, previous_response_id: String?, prompt: OpenAI::Beta::BetaResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::prompt_cache_retention?, reasoning: OpenAI::Beta::BetaResponsesClientEvent::ResponseCreate::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::service_tier?, store: bool?, stream: bool?, diff --git a/sig/openai/models/beta/response_create_params.rbs b/sig/openai/models/beta/response_create_params.rbs index 0fa9636f6..4038d5e15 100644 --- a/sig/openai/models/beta/response_create_params.rbs +++ b/sig/openai/models/beta/response_create_params.rbs @@ -18,11 +18,11 @@ module OpenAI parallel_tool_calls: bool?, previous_response_id: String?, prompt: OpenAI::Beta::BetaResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Beta::ResponseCreateParams::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Beta::ResponseCreateParams::prompt_cache_retention?, reasoning: OpenAI::Beta::ResponseCreateParams::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Beta::ResponseCreateParams::service_tier?, store: bool?, stream_options: OpenAI::Beta::ResponseCreateParams::StreamOptions?, @@ -80,9 +80,7 @@ module OpenAI attr_accessor prompt: OpenAI::Beta::BetaResponsePrompt? - attr_reader prompt_cache_key: String? - - def prompt_cache_key=: (String) -> String + attr_accessor prompt_cache_key: String? attr_reader prompt_cache_options: OpenAI::Beta::ResponseCreateParams::PromptCacheOptions? @@ -94,9 +92,7 @@ module OpenAI attr_accessor reasoning: OpenAI::Beta::ResponseCreateParams::Reasoning? - attr_reader safety_identifier: String? - - def safety_identifier=: (String) -> String + attr_accessor safety_identifier: String? attr_accessor service_tier: OpenAI::Models::Beta::ResponseCreateParams::service_tier? @@ -156,11 +152,11 @@ module OpenAI ?parallel_tool_calls: bool?, ?previous_response_id: String?, ?prompt: OpenAI::Beta::BetaResponsePrompt?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Beta::ResponseCreateParams::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Beta::ResponseCreateParams::prompt_cache_retention?, ?reasoning: OpenAI::Beta::ResponseCreateParams::Reasoning?, - ?safety_identifier: String, + ?safety_identifier: String?, ?service_tier: OpenAI::Models::Beta::ResponseCreateParams::service_tier?, ?store: bool?, ?stream_options: OpenAI::Beta::ResponseCreateParams::StreamOptions?, @@ -192,11 +188,11 @@ module OpenAI parallel_tool_calls: bool?, previous_response_id: String?, prompt: OpenAI::Beta::BetaResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Beta::ResponseCreateParams::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Beta::ResponseCreateParams::prompt_cache_retention?, reasoning: OpenAI::Beta::ResponseCreateParams::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Beta::ResponseCreateParams::service_tier?, store: bool?, stream_options: OpenAI::Beta::ResponseCreateParams::StreamOptions?, diff --git a/sig/openai/models/chat/completion_create_params.rbs b/sig/openai/models/chat/completion_create_params.rbs index f67d61344..818c52462 100644 --- a/sig/openai/models/chat/completion_create_params.rbs +++ b/sig/openai/models/chat/completion_create_params.rbs @@ -20,12 +20,12 @@ module OpenAI parallel_tool_calls: bool, prediction: OpenAI::Chat::ChatCompletionPredictionContent?, presence_penalty: Float?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Chat::CompletionCreateParams::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Chat::CompletionCreateParams::prompt_cache_retention?, reasoning_effort: OpenAI::Models::reasoning_effort?, response_format: OpenAI::Models::Chat::CompletionCreateParams::response_format, - safety_identifier: String, + safety_identifier: String?, seed: Integer?, service_tier: OpenAI::Models::Chat::CompletionCreateParams::service_tier?, stop: OpenAI::Models::Chat::CompletionCreateParams::stop?, @@ -90,9 +90,7 @@ module OpenAI attr_accessor presence_penalty: Float? - attr_reader prompt_cache_key: String? - - def prompt_cache_key=: (String) -> String + attr_accessor prompt_cache_key: String? attr_reader prompt_cache_options: OpenAI::Chat::CompletionCreateParams::PromptCacheOptions? @@ -110,9 +108,7 @@ module OpenAI OpenAI::Models::Chat::CompletionCreateParams::response_format ) -> OpenAI::Models::Chat::CompletionCreateParams::response_format - attr_reader safety_identifier: String? - - def safety_identifier=: (String) -> String + attr_accessor safety_identifier: String? attr_accessor seed: Integer? @@ -172,12 +168,12 @@ module OpenAI ?parallel_tool_calls: bool, ?prediction: OpenAI::Chat::ChatCompletionPredictionContent?, ?presence_penalty: Float?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Chat::CompletionCreateParams::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Chat::CompletionCreateParams::prompt_cache_retention?, ?reasoning_effort: OpenAI::Models::reasoning_effort?, ?response_format: OpenAI::Models::Chat::CompletionCreateParams::response_format, - ?safety_identifier: String, + ?safety_identifier: String?, ?seed: Integer?, ?service_tier: OpenAI::Models::Chat::CompletionCreateParams::service_tier?, ?stop: OpenAI::Models::Chat::CompletionCreateParams::stop?, @@ -212,12 +208,12 @@ module OpenAI parallel_tool_calls: bool, prediction: OpenAI::Chat::ChatCompletionPredictionContent?, presence_penalty: Float?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Chat::CompletionCreateParams::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Chat::CompletionCreateParams::prompt_cache_retention?, reasoning_effort: OpenAI::Models::reasoning_effort?, response_format: OpenAI::Models::Chat::CompletionCreateParams::response_format, - safety_identifier: String, + safety_identifier: String?, seed: Integer?, service_tier: OpenAI::Models::Chat::CompletionCreateParams::service_tier?, stop: OpenAI::Models::Chat::CompletionCreateParams::stop?, diff --git a/sig/openai/models/responses/response.rbs b/sig/openai/models/responses/response.rbs index 681b734df..1c49b7f65 100644 --- a/sig/openai/models/responses/response.rbs +++ b/sig/openai/models/responses/response.rbs @@ -25,11 +25,11 @@ module OpenAI moderation: OpenAI::Responses::Response::Moderation?, previous_response_id: String?, prompt: OpenAI::Responses::ResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Responses::Response::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Responses::Response::prompt_cache_retention?, reasoning: OpenAI::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Responses::Response::service_tier?, status: OpenAI::Models::Responses::response_status, text: OpenAI::Responses::ResponseTextConfig, @@ -84,9 +84,7 @@ module OpenAI attr_accessor prompt: OpenAI::Responses::ResponsePrompt? - attr_reader prompt_cache_key: String? - - def prompt_cache_key=: (String) -> String + attr_accessor prompt_cache_key: String? attr_reader prompt_cache_options: OpenAI::Responses::Response::PromptCacheOptions? @@ -98,9 +96,7 @@ module OpenAI attr_accessor reasoning: OpenAI::Reasoning? - attr_reader safety_identifier: String? - - def safety_identifier=: (String) -> String + attr_accessor safety_identifier: String? attr_accessor service_tier: OpenAI::Models::Responses::Response::service_tier? @@ -152,11 +148,11 @@ module OpenAI ?moderation: OpenAI::Responses::Response::Moderation?, ?previous_response_id: String?, ?prompt: OpenAI::Responses::ResponsePrompt?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Responses::Response::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Responses::Response::prompt_cache_retention?, ?reasoning: OpenAI::Reasoning?, - ?safety_identifier: String, + ?safety_identifier: String?, ?service_tier: OpenAI::Models::Responses::Response::service_tier?, ?status: OpenAI::Models::Responses::response_status, ?text: OpenAI::Responses::ResponseTextConfig, @@ -190,11 +186,11 @@ module OpenAI moderation: OpenAI::Responses::Response::Moderation?, previous_response_id: String?, prompt: OpenAI::Responses::ResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Responses::Response::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Responses::Response::prompt_cache_retention?, reasoning: OpenAI::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Responses::Response::service_tier?, status: OpenAI::Models::Responses::response_status, text: OpenAI::Responses::ResponseTextConfig, diff --git a/sig/openai/models/responses/response_create_params.rbs b/sig/openai/models/responses/response_create_params.rbs index 6053ab3ba..c54346735 100644 --- a/sig/openai/models/responses/response_create_params.rbs +++ b/sig/openai/models/responses/response_create_params.rbs @@ -17,11 +17,11 @@ module OpenAI parallel_tool_calls: bool?, previous_response_id: String?, prompt: OpenAI::Responses::ResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Responses::ResponseCreateParams::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Responses::ResponseCreateParams::prompt_cache_retention?, reasoning: OpenAI::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Responses::ResponseCreateParams::service_tier?, store: bool?, stream_options: OpenAI::Responses::ResponseCreateParams::StreamOptions?, @@ -76,9 +76,7 @@ module OpenAI attr_accessor prompt: OpenAI::Responses::ResponsePrompt? - attr_reader prompt_cache_key: String? - - def prompt_cache_key=: (String) -> String + attr_accessor prompt_cache_key: String? attr_reader prompt_cache_options: OpenAI::Responses::ResponseCreateParams::PromptCacheOptions? @@ -90,9 +88,7 @@ module OpenAI attr_accessor reasoning: OpenAI::Reasoning? - attr_reader safety_identifier: String? - - def safety_identifier=: (String) -> String + attr_accessor safety_identifier: String? attr_accessor service_tier: OpenAI::Models::Responses::ResponseCreateParams::service_tier? @@ -145,11 +141,11 @@ module OpenAI ?parallel_tool_calls: bool?, ?previous_response_id: String?, ?prompt: OpenAI::Responses::ResponsePrompt?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Responses::ResponseCreateParams::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Responses::ResponseCreateParams::prompt_cache_retention?, ?reasoning: OpenAI::Reasoning?, - ?safety_identifier: String, + ?safety_identifier: String?, ?service_tier: OpenAI::Models::Responses::ResponseCreateParams::service_tier?, ?store: bool?, ?stream_options: OpenAI::Responses::ResponseCreateParams::StreamOptions?, @@ -179,11 +175,11 @@ module OpenAI parallel_tool_calls: bool?, previous_response_id: String?, prompt: OpenAI::Responses::ResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Responses::ResponseCreateParams::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Responses::ResponseCreateParams::prompt_cache_retention?, reasoning: OpenAI::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Responses::ResponseCreateParams::service_tier?, store: bool?, stream_options: OpenAI::Responses::ResponseCreateParams::StreamOptions?, diff --git a/sig/openai/models/responses/response_error.rbs b/sig/openai/models/responses/response_error.rbs index b5a39c095..090e43925 100644 --- a/sig/openai/models/responses/response_error.rbs +++ b/sig/openai/models/responses/response_error.rbs @@ -26,6 +26,7 @@ module OpenAI :server_error | :rate_limit_exceeded | :invalid_prompt + | :data_residency_mismatch | :bio_policy | :vector_store_timeout | :invalid_image @@ -49,6 +50,7 @@ module OpenAI SERVER_ERROR: :server_error RATE_LIMIT_EXCEEDED: :rate_limit_exceeded INVALID_PROMPT: :invalid_prompt + DATA_RESIDENCY_MISMATCH: :data_residency_mismatch BIO_POLICY: :bio_policy VECTOR_STORE_TIMEOUT: :vector_store_timeout INVALID_IMAGE: :invalid_image diff --git a/sig/openai/models/responses/responses_client_event.rbs b/sig/openai/models/responses/responses_client_event.rbs index e9ca6190b..44552d6ae 100644 --- a/sig/openai/models/responses/responses_client_event.rbs +++ b/sig/openai/models/responses/responses_client_event.rbs @@ -18,11 +18,11 @@ module OpenAI parallel_tool_calls: bool?, previous_response_id: String?, prompt: OpenAI::Responses::ResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Responses::ResponsesClientEvent::prompt_cache_retention?, reasoning: OpenAI::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Responses::ResponsesClientEvent::service_tier?, store: bool?, stream: bool?, @@ -76,9 +76,7 @@ module OpenAI attr_accessor prompt: OpenAI::Responses::ResponsePrompt? - attr_reader prompt_cache_key: String? - - def prompt_cache_key=: (String) -> String + attr_accessor prompt_cache_key: String? attr_reader prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions? @@ -90,9 +88,7 @@ module OpenAI attr_accessor reasoning: OpenAI::Reasoning? - attr_reader safety_identifier: String? - - def safety_identifier=: (String) -> String + attr_accessor safety_identifier: String? attr_accessor service_tier: OpenAI::Models::Responses::ResponsesClientEvent::service_tier? @@ -147,11 +143,11 @@ module OpenAI ?parallel_tool_calls: bool?, ?previous_response_id: String?, ?prompt: OpenAI::Responses::ResponsePrompt?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Responses::ResponsesClientEvent::prompt_cache_retention?, ?reasoning: OpenAI::Reasoning?, - ?safety_identifier: String, + ?safety_identifier: String?, ?service_tier: OpenAI::Models::Responses::ResponsesClientEvent::service_tier?, ?store: bool?, ?stream: bool?, @@ -183,11 +179,11 @@ module OpenAI parallel_tool_calls: bool?, previous_response_id: String?, prompt: OpenAI::Responses::ResponsePrompt?, - prompt_cache_key: String, + prompt_cache_key: String?, prompt_cache_options: OpenAI::Responses::ResponsesClientEvent::PromptCacheOptions, prompt_cache_retention: OpenAI::Models::Responses::ResponsesClientEvent::prompt_cache_retention?, reasoning: OpenAI::Reasoning?, - safety_identifier: String, + safety_identifier: String?, service_tier: OpenAI::Models::Responses::ResponsesClientEvent::service_tier?, store: bool?, stream: bool?, diff --git a/sig/openai/resources/beta/responses.rbs b/sig/openai/resources/beta/responses.rbs index afdd07141..bd7f263e0 100644 --- a/sig/openai/resources/beta/responses.rbs +++ b/sig/openai/resources/beta/responses.rbs @@ -22,11 +22,11 @@ module OpenAI ?parallel_tool_calls: bool?, ?previous_response_id: String?, ?prompt: OpenAI::Beta::BetaResponsePrompt?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Beta::ResponseCreateParams::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Beta::ResponseCreateParams::prompt_cache_retention?, ?reasoning: OpenAI::Beta::ResponseCreateParams::Reasoning?, - ?safety_identifier: String, + ?safety_identifier: String?, ?service_tier: OpenAI::Models::Beta::ResponseCreateParams::service_tier?, ?store: bool?, ?stream_options: OpenAI::Beta::ResponseCreateParams::StreamOptions?, @@ -58,11 +58,11 @@ module OpenAI ?parallel_tool_calls: bool?, ?previous_response_id: String?, ?prompt: OpenAI::Beta::BetaResponsePrompt?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Beta::ResponseCreateParams::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Beta::ResponseCreateParams::prompt_cache_retention?, ?reasoning: OpenAI::Beta::ResponseCreateParams::Reasoning?, - ?safety_identifier: String, + ?safety_identifier: String?, ?service_tier: OpenAI::Models::Beta::ResponseCreateParams::service_tier?, ?store: bool?, ?stream_options: OpenAI::Beta::ResponseCreateParams::StreamOptions?, diff --git a/sig/openai/resources/chat/completions.rbs b/sig/openai/resources/chat/completions.rbs index a7270c220..9b383e171 100644 --- a/sig/openai/resources/chat/completions.rbs +++ b/sig/openai/resources/chat/completions.rbs @@ -22,12 +22,12 @@ module OpenAI ?parallel_tool_calls: bool, ?prediction: OpenAI::Chat::ChatCompletionPredictionContent?, ?presence_penalty: Float?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Chat::CompletionCreateParams::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Chat::CompletionCreateParams::prompt_cache_retention?, ?reasoning_effort: OpenAI::Models::reasoning_effort?, ?response_format: OpenAI::Models::Chat::CompletionCreateParams::response_format, - ?safety_identifier: String, + ?safety_identifier: String?, ?seed: Integer?, ?service_tier: OpenAI::Models::Chat::CompletionCreateParams::service_tier?, ?stop: OpenAI::Models::Chat::CompletionCreateParams::stop?, @@ -62,12 +62,12 @@ module OpenAI ?parallel_tool_calls: bool, ?prediction: OpenAI::Chat::ChatCompletionPredictionContent?, ?presence_penalty: Float?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Chat::CompletionCreateParams::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Chat::CompletionCreateParams::prompt_cache_retention?, ?reasoning_effort: OpenAI::Models::reasoning_effort?, ?response_format: OpenAI::Models::Chat::CompletionCreateParams::response_format, - ?safety_identifier: String, + ?safety_identifier: String?, ?seed: Integer?, ?service_tier: OpenAI::Models::Chat::CompletionCreateParams::service_tier?, ?stop: OpenAI::Models::Chat::CompletionCreateParams::stop?, diff --git a/sig/openai/resources/responses.rbs b/sig/openai/resources/responses.rbs index 7136a0e0e..73cebc272 100644 --- a/sig/openai/resources/responses.rbs +++ b/sig/openai/resources/responses.rbs @@ -20,11 +20,11 @@ module OpenAI ?parallel_tool_calls: bool?, ?previous_response_id: String?, ?prompt: OpenAI::Responses::ResponsePrompt?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Responses::ResponseCreateParams::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Responses::ResponseCreateParams::prompt_cache_retention?, ?reasoning: OpenAI::Reasoning?, - ?safety_identifier: String, + ?safety_identifier: String?, ?service_tier: OpenAI::Models::Responses::ResponseCreateParams::service_tier?, ?store: bool?, ?stream_options: OpenAI::Responses::ResponseCreateParams::StreamOptions?, @@ -54,11 +54,11 @@ module OpenAI ?parallel_tool_calls: bool?, ?previous_response_id: String?, ?prompt: OpenAI::Responses::ResponsePrompt?, - ?prompt_cache_key: String, + ?prompt_cache_key: String?, ?prompt_cache_options: OpenAI::Responses::ResponseCreateParams::PromptCacheOptions, ?prompt_cache_retention: OpenAI::Models::Responses::ResponseCreateParams::prompt_cache_retention?, ?reasoning: OpenAI::Reasoning?, - ?safety_identifier: String, + ?safety_identifier: String?, ?service_tier: OpenAI::Models::Responses::ResponseCreateParams::service_tier?, ?store: bool?, ?stream_options: OpenAI::Responses::ResponseCreateParams::StreamOptions?,