openai 0.122.0 → 0.123.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e626227e1b39d49f4cd4a67ca94f7620f6f9754869c3c0dc0d49d0ae4bee5112
4
- data.tar.gz: ecea01c3956430baa9b93d1a303ccd6f13e005ccadd9187700d9e1952dc5057d
3
+ metadata.gz: c94cbc1845194c892da00630d5143feac80c478c518f1325ba36f510afc6d355
4
+ data.tar.gz: e5f5dd4b686a977b6f6354e5772f0d7cb024f9ae1060c57c9c5cf9da8f9f2b4e
5
5
  SHA512:
6
- metadata.gz: 9c1d4813c21265f186456dde40358658eb9ea44bc70eb26b13831de047c7dbd40183b99761d173367d3c4b3ac4dffe944ed0e74041b810a66a87225c17691b55
7
- data.tar.gz: a3acd477371f52e953e0768c2ca35942d09bd71ac7a2c413ebfdf65fb2d4926597425734a817676f68e5b50b50f808f18db48b94b50289094c8b8e524e01f678
6
+ metadata.gz: 0c56d4ef6354d585b97eb289a6275268ab3fdeb77b8afc77c2d53b6dc2e8727edacd801b12f7f6746d426bff8a285fcbd3c75ae821ee49e033f3c84a2d275491
7
+ data.tar.gz: cca0b2b708f90ebdb233cf56b73f073cba6d9c7009e1f33b9eb9fb33a6c1ec961f7bc42238e605955d3c99b5e195921f484c77c53a1479e8ff8a9b769c9afc3f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.123.0](https://github.com/openai/openai-ruby/compare/v0.122.0...v0.123.0) (2026-11-12)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** expose reasoning input transformations on responses ([#1059](https://github.com/openai/openai-ruby/issues/1059)) ([17a24fd](https://github.com/openai/openai-ruby/commit/17a24fdca4557f9d581b50440f06bb681c8f4de9))
9
+
10
+
11
+ ### Chores
12
+
13
+ * **deps:** bump ruby/setup-ruby from 1.336.0 to 1.338.0 ([#1048](https://github.com/openai/openai-ruby/issues/1048)) ([ad2c3c8](https://github.com/openai/openai-ruby/commit/ad2c3c8926768441059c7e618c9629c34327f493))
14
+
15
+
16
+ ### Documentation
17
+
18
+ * simplify review handoff instructions ([#1056](https://github.com/openai/openai-ruby/issues/1056)) ([c0c7a26](https://github.com/openai/openai-ruby/commit/c0c7a26c093b5d9c290598239ec52ae31ca3dc6e))
19
+
3
20
  ## [0.122.0](https://github.com/openai/openai-ruby/compare/v0.121.0...v0.122.0) (2026-11-10)
4
21
 
5
22
 
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "openai", "~> 0.122.0"
18
+ gem "openai", "~> 0.123.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -169,6 +169,15 @@ module OpenAI
169
169
  # @return [OpenAI::Models::Beta::BetaResponse::Image, nil]
170
170
  optional :image, -> { OpenAI::Beta::BetaResponse::Image }
171
171
 
172
+ # @!attribute input_transformations
173
+ # Reasoning inputs withheld from the model, in input order.
174
+ #
175
+ # @return [Array<OpenAI::Models::Beta::BetaResponse::InputTransformation>, nil]
176
+ optional(
177
+ :input_transformations,
178
+ -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::BetaResponse::InputTransformation] }
179
+ )
180
+
172
181
  # @!attribute max_output_tokens
173
182
  # An upper bound for the number of tokens that can be generated for a response,
174
183
  # including visible output tokens and
@@ -380,7 +389,7 @@ module OpenAI
380
389
  # @return [String, nil]
381
390
  optional :user, String
382
391
 
383
- # @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, image: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, tool_usage: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
392
+ # @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, image: nil, input_transformations: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, tool_usage: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
384
393
  # @param id [String]
385
394
  # Unique identifier for this Response.
386
395
  #
@@ -483,6 +492,9 @@ module OpenAI
483
492
  #
484
493
  # @param image [OpenAI::Models::Beta::BetaResponse::Image]
485
494
  #
495
+ # @param input_transformations [Array<OpenAI::Models::Beta::BetaResponse::InputTransformation>]
496
+ # Reasoning inputs withheld from the model, in input order.
497
+ #
486
498
  # @param max_output_tokens [Integer, nil]
487
499
  # An upper bound for the number of tokens that can be generated for a response,
488
500
  # including visible output tokens and
@@ -1439,6 +1451,53 @@ module OpenAI
1439
1451
  end
1440
1452
  end
1441
1453
 
1454
+ class InputTransformation < OpenAI::Internal::Type::BaseModel
1455
+ # @!attribute id
1456
+ # The original reasoning item ID.
1457
+ #
1458
+ # @return [String]
1459
+ required :id, String
1460
+
1461
+ # @!attribute action
1462
+ #
1463
+ # @return [Symbol, :removed]
1464
+ required :action, const: :removed
1465
+
1466
+ # @!attribute reason
1467
+ #
1468
+ # @return [Symbol, OpenAI::Models::Beta::BetaResponse::InputTransformation::Reason]
1469
+ required :reason, enum: -> { OpenAI::Beta::BetaResponse::InputTransformation::Reason }
1470
+
1471
+ # @!attribute type
1472
+ #
1473
+ # @return [Symbol, :reasoning]
1474
+ required :type, const: :reasoning
1475
+
1476
+ # @!method initialize(id:, reason:, action: :removed, type: :reasoning)
1477
+ # @param id [String]
1478
+ # The original reasoning item ID.
1479
+ #
1480
+ # @param reason [Symbol, OpenAI::Models::Beta::BetaResponse::InputTransformation::Reason]
1481
+ #
1482
+ # @param action [Symbol, :removed]
1483
+ #
1484
+ # @param type [Symbol, :reasoning]
1485
+
1486
+ # @see OpenAI::Models::Beta::BetaResponse::InputTransformation#reason
1487
+ module Reason
1488
+ extend OpenAI::Internal::Type::Enum
1489
+
1490
+ ORGANIZATION_MISMATCH = :organization_mismatch
1491
+ END_USER_MISMATCH = :end_user_mismatch
1492
+ MODEL_MISMATCH = :model_mismatch
1493
+ PREFIX_MISMATCH = :prefix_mismatch
1494
+ TURN_BOUNDARY = :turn_boundary
1495
+
1496
+ # @!method self.values
1497
+ # @return [Array<Symbol>]
1498
+ end
1499
+ end
1500
+
1442
1501
  # @see OpenAI::Models::Beta::BetaResponse#moderation
1443
1502
  class Moderation < OpenAI::Internal::Type::BaseModel
1444
1503
  # @!attribute input
@@ -169,6 +169,15 @@ module OpenAI
169
169
  # @return [OpenAI::Models::Responses::Response::Image, nil]
170
170
  optional :image, -> { OpenAI::Responses::Response::Image }
171
171
 
172
+ # @!attribute input_transformations
173
+ # Reasoning inputs withheld from the model, in input order.
174
+ #
175
+ # @return [Array<OpenAI::Models::Responses::Response::InputTransformation>, nil]
176
+ optional(
177
+ :input_transformations,
178
+ -> { OpenAI::Internal::Type::ArrayOf[OpenAI::Responses::Response::InputTransformation] }
179
+ )
180
+
172
181
  # @!attribute max_output_tokens
173
182
  # An upper bound for the number of tokens that can be generated for a response,
174
183
  # including visible output tokens and
@@ -380,7 +389,7 @@ module OpenAI
380
389
  # @return [String, nil]
381
390
  optional :user, String
382
391
 
383
- # @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, image: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, tool_usage: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
392
+ # @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, image: nil, input_transformations: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, tool_usage: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
384
393
  # @param id [String]
385
394
  # Unique identifier for this Response.
386
395
  #
@@ -483,6 +492,9 @@ module OpenAI
483
492
  #
484
493
  # @param image [OpenAI::Models::Responses::Response::Image]
485
494
  #
495
+ # @param input_transformations [Array<OpenAI::Models::Responses::Response::InputTransformation>]
496
+ # Reasoning inputs withheld from the model, in input order.
497
+ #
486
498
  # @param max_output_tokens [Integer, nil]
487
499
  # An upper bound for the number of tokens that can be generated for a response,
488
500
  # including visible output tokens and
@@ -820,6 +832,53 @@ module OpenAI
820
832
  end
821
833
  end
822
834
 
835
+ class InputTransformation < OpenAI::Internal::Type::BaseModel
836
+ # @!attribute id
837
+ # The original reasoning item ID.
838
+ #
839
+ # @return [String]
840
+ required :id, String
841
+
842
+ # @!attribute action
843
+ #
844
+ # @return [Symbol, :removed]
845
+ required :action, const: :removed
846
+
847
+ # @!attribute reason
848
+ #
849
+ # @return [Symbol, OpenAI::Models::Responses::Response::InputTransformation::Reason]
850
+ required :reason, enum: -> { OpenAI::Responses::Response::InputTransformation::Reason }
851
+
852
+ # @!attribute type
853
+ #
854
+ # @return [Symbol, :reasoning]
855
+ required :type, const: :reasoning
856
+
857
+ # @!method initialize(id:, reason:, action: :removed, type: :reasoning)
858
+ # @param id [String]
859
+ # The original reasoning item ID.
860
+ #
861
+ # @param reason [Symbol, OpenAI::Models::Responses::Response::InputTransformation::Reason]
862
+ #
863
+ # @param action [Symbol, :removed]
864
+ #
865
+ # @param type [Symbol, :reasoning]
866
+
867
+ # @see OpenAI::Models::Responses::Response::InputTransformation#reason
868
+ module Reason
869
+ extend OpenAI::Internal::Type::Enum
870
+
871
+ ORGANIZATION_MISMATCH = :organization_mismatch
872
+ END_USER_MISMATCH = :end_user_mismatch
873
+ MODEL_MISMATCH = :model_mismatch
874
+ PREFIX_MISMATCH = :prefix_mismatch
875
+ TURN_BOUNDARY = :turn_boundary
876
+
877
+ # @!method self.values
878
+ # @return [Array<Symbol>]
879
+ end
880
+ end
881
+
823
882
  # @see OpenAI::Models::Responses::Response#moderation
824
883
  class Moderation < OpenAI::Internal::Type::BaseModel
825
884
  # @!attribute input
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenAI
4
- VERSION = "0.122.0"
4
+ VERSION = "0.123.0"
5
5
  end
@@ -155,6 +155,13 @@ module OpenAI
155
155
  sig { params(image: OpenAI::Beta::BetaResponse::Image::OrHash).void }
156
156
  attr_writer :image
157
157
 
158
+ # Reasoning inputs withheld from the model, in input order.
159
+ sig { returns(T.nilable(T::Array[OpenAI::Beta::BetaResponse::InputTransformation])) }
160
+ attr_reader :input_transformations
161
+
162
+ sig { params(input_transformations: T::Array[OpenAI::Beta::BetaResponse::InputTransformation::OrHash]).void }
163
+ attr_writer :input_transformations
164
+
158
165
  # An upper bound for the number of tokens that can be generated for a response,
159
166
  # including visible output tokens and
160
167
  # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
@@ -462,6 +469,8 @@ module OpenAI
462
469
 
463
470
  image: OpenAI::Beta::BetaResponse::Image::OrHash,
464
471
 
472
+ input_transformations: T::Array[OpenAI::Beta::BetaResponse::InputTransformation::OrHash],
473
+
465
474
  max_output_tokens: T.nilable(Integer),
466
475
 
467
476
  max_tool_calls: T.nilable(Integer),
@@ -613,6 +622,9 @@ module OpenAI
613
622
 
614
623
  image: nil,
615
624
 
625
+ # Reasoning inputs withheld from the model, in input order.
626
+ input_transformations: nil,
627
+
616
628
  # An upper bound for the number of tokens that can be generated for a response,
617
629
  # including visible output tokens and
618
630
  # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
@@ -787,6 +799,7 @@ module OpenAI
787
799
  completed_at: T.nilable(Float),
788
800
  conversation: T.nilable(OpenAI::Beta::BetaResponse::Conversation),
789
801
  image: OpenAI::Beta::BetaResponse::Image,
802
+ input_transformations: T::Array[OpenAI::Beta::BetaResponse::InputTransformation],
790
803
  max_output_tokens: T.nilable(Integer),
791
804
  max_tool_calls: T.nilable(Integer),
792
805
  moderation: T.nilable(OpenAI::Beta::BetaResponse::Moderation),
@@ -1274,6 +1287,96 @@ module OpenAI
1274
1287
  end
1275
1288
  end
1276
1289
 
1290
+ class InputTransformation < OpenAI::Internal::Type::BaseModel
1291
+ OrHash = T.type_alias do
1292
+ T.any(
1293
+ OpenAI::Beta::BetaResponse::InputTransformation,
1294
+ OpenAI::Internal::AnyHash
1295
+ )
1296
+ end
1297
+
1298
+ # The original reasoning item ID.
1299
+ sig { returns(String) }
1300
+ attr_accessor :id
1301
+
1302
+ sig { returns(Symbol) }
1303
+ attr_accessor :action
1304
+
1305
+ sig { returns(OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol) }
1306
+ attr_accessor :reason
1307
+
1308
+ sig { returns(Symbol) }
1309
+ attr_accessor :type
1310
+
1311
+ sig do
1312
+ params(
1313
+
1314
+ id: String,
1315
+
1316
+ reason: OpenAI::Beta::BetaResponse::InputTransformation::Reason::OrSymbol,
1317
+
1318
+ action: Symbol,
1319
+
1320
+ type: Symbol
1321
+ )
1322
+ .returns(T.attached_class)
1323
+ end
1324
+ def self.new(
1325
+
1326
+ # The original reasoning item ID.
1327
+ id:,
1328
+
1329
+ reason:,
1330
+
1331
+ action: :removed,
1332
+
1333
+ type: :reasoning
1334
+ )
1335
+ end
1336
+
1337
+ sig do
1338
+ override.returns(
1339
+ {
1340
+ id: String,
1341
+ action: Symbol,
1342
+ reason: OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol,
1343
+ type: Symbol
1344
+ }
1345
+ )
1346
+ end
1347
+ def to_hash
1348
+ end
1349
+
1350
+ module Reason
1351
+ extend OpenAI::Internal::Type::Enum
1352
+
1353
+ TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::BetaResponse::InputTransformation::Reason) }
1354
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1355
+
1356
+ ORGANIZATION_MISMATCH = T.let(
1357
+ :organization_mismatch,
1358
+ OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol
1359
+ )
1360
+ END_USER_MISMATCH = T.let(
1361
+ :end_user_mismatch,
1362
+ OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol
1363
+ )
1364
+ MODEL_MISMATCH = T.let(
1365
+ :model_mismatch,
1366
+ OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol
1367
+ )
1368
+ PREFIX_MISMATCH = T.let(
1369
+ :prefix_mismatch,
1370
+ OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol
1371
+ )
1372
+ TURN_BOUNDARY = T.let(:turn_boundary, OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol)
1373
+
1374
+ sig { override.returns(T::Array[OpenAI::Beta::BetaResponse::InputTransformation::Reason::TaggedSymbol]) }
1375
+ def self.values
1376
+ end
1377
+ end
1378
+ end
1379
+
1277
1380
  class Moderation < OpenAI::Internal::Type::BaseModel
1278
1381
  OrHash = T.type_alias do
1279
1382
  T.any(
@@ -153,6 +153,13 @@ module OpenAI
153
153
  sig { params(image: OpenAI::Responses::Response::Image::OrHash).void }
154
154
  attr_writer :image
155
155
 
156
+ # Reasoning inputs withheld from the model, in input order.
157
+ sig { returns(T.nilable(T::Array[OpenAI::Responses::Response::InputTransformation])) }
158
+ attr_reader :input_transformations
159
+
160
+ sig { params(input_transformations: T::Array[OpenAI::Responses::Response::InputTransformation::OrHash]).void }
161
+ attr_writer :input_transformations
162
+
156
163
  # An upper bound for the number of tokens that can be generated for a response,
157
164
  # including visible output tokens and
158
165
  # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
@@ -457,6 +464,8 @@ module OpenAI
457
464
 
458
465
  image: OpenAI::Responses::Response::Image::OrHash,
459
466
 
467
+ input_transformations: T::Array[OpenAI::Responses::Response::InputTransformation::OrHash],
468
+
460
469
  max_output_tokens: T.nilable(Integer),
461
470
 
462
471
  max_tool_calls: T.nilable(Integer),
@@ -608,6 +617,9 @@ module OpenAI
608
617
 
609
618
  image: nil,
610
619
 
620
+ # Reasoning inputs withheld from the model, in input order.
621
+ input_transformations: nil,
622
+
611
623
  # An upper bound for the number of tokens that can be generated for a response,
612
624
  # including visible output tokens and
613
625
  # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
@@ -782,6 +794,7 @@ module OpenAI
782
794
  completed_at: T.nilable(Float),
783
795
  conversation: T.nilable(OpenAI::Responses::Response::Conversation),
784
796
  image: OpenAI::Responses::Response::Image,
797
+ input_transformations: T::Array[OpenAI::Responses::Response::InputTransformation],
785
798
  max_output_tokens: T.nilable(Integer),
786
799
  max_tool_calls: T.nilable(Integer),
787
800
  moderation: T.nilable(OpenAI::Responses::Response::Moderation),
@@ -1102,6 +1115,99 @@ module OpenAI
1102
1115
  end
1103
1116
  end
1104
1117
 
1118
+ class InputTransformation < OpenAI::Internal::Type::BaseModel
1119
+ OrHash = T.type_alias do
1120
+ T.any(
1121
+ OpenAI::Responses::Response::InputTransformation,
1122
+ OpenAI::Internal::AnyHash
1123
+ )
1124
+ end
1125
+
1126
+ # The original reasoning item ID.
1127
+ sig { returns(String) }
1128
+ attr_accessor :id
1129
+
1130
+ sig { returns(Symbol) }
1131
+ attr_accessor :action
1132
+
1133
+ sig { returns(OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol) }
1134
+ attr_accessor :reason
1135
+
1136
+ sig { returns(Symbol) }
1137
+ attr_accessor :type
1138
+
1139
+ sig do
1140
+ params(
1141
+
1142
+ id: String,
1143
+
1144
+ reason: OpenAI::Responses::Response::InputTransformation::Reason::OrSymbol,
1145
+
1146
+ action: Symbol,
1147
+
1148
+ type: Symbol
1149
+ )
1150
+ .returns(T.attached_class)
1151
+ end
1152
+ def self.new(
1153
+
1154
+ # The original reasoning item ID.
1155
+ id:,
1156
+
1157
+ reason:,
1158
+
1159
+ action: :removed,
1160
+
1161
+ type: :reasoning
1162
+ )
1163
+ end
1164
+
1165
+ sig do
1166
+ override.returns(
1167
+ {
1168
+ id: String,
1169
+ action: Symbol,
1170
+ reason: OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol,
1171
+ type: Symbol
1172
+ }
1173
+ )
1174
+ end
1175
+ def to_hash
1176
+ end
1177
+
1178
+ module Reason
1179
+ extend OpenAI::Internal::Type::Enum
1180
+
1181
+ TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Responses::Response::InputTransformation::Reason) }
1182
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1183
+
1184
+ ORGANIZATION_MISMATCH = T.let(
1185
+ :organization_mismatch,
1186
+ OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol
1187
+ )
1188
+ END_USER_MISMATCH = T.let(
1189
+ :end_user_mismatch,
1190
+ OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol
1191
+ )
1192
+ MODEL_MISMATCH = T.let(
1193
+ :model_mismatch,
1194
+ OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol
1195
+ )
1196
+ PREFIX_MISMATCH = T.let(
1197
+ :prefix_mismatch,
1198
+ OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol
1199
+ )
1200
+ TURN_BOUNDARY = T.let(
1201
+ :turn_boundary,
1202
+ OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol
1203
+ )
1204
+
1205
+ sig { override.returns(T::Array[OpenAI::Responses::Response::InputTransformation::Reason::TaggedSymbol]) }
1206
+ def self.values
1207
+ end
1208
+ end
1209
+ end
1210
+
1105
1211
  class Moderation < OpenAI::Internal::Type::BaseModel
1106
1212
  OrHash = T.type_alias do
1107
1213
  T.any(
@@ -24,6 +24,7 @@ module OpenAI
24
24
  ?completed_at: Float?,
25
25
  ?conversation: OpenAI::Beta::BetaResponse::Conversation?,
26
26
  ?image: OpenAI::Beta::BetaResponse::Image,
27
+ ?input_transformations: ::Array[OpenAI::Beta::BetaResponse::InputTransformation],
27
28
  ?max_output_tokens: Integer?,
28
29
  ?max_tool_calls: Integer?,
29
30
  ?moderation: OpenAI::Beta::BetaResponse::Moderation?,
@@ -155,6 +156,14 @@ module OpenAI
155
156
  OpenAI::Beta::BetaResponse::Image
156
157
  ) -> OpenAI::Beta::BetaResponse::Image
157
158
 
159
+ # Reasoning inputs withheld from the model, in input order.
160
+ attr_reader input_transformations: ::Array[OpenAI::Beta::BetaResponse::InputTransformation]?
161
+
162
+ # Reasoning inputs withheld from the model, in input order.
163
+ def input_transformations=: (
164
+ ::Array[OpenAI::Beta::BetaResponse::InputTransformation]
165
+ ) -> ::Array[OpenAI::Beta::BetaResponse::InputTransformation]
166
+
158
167
  # An upper bound for the number of tokens that can be generated for a response,
159
168
  # including visible output tokens and
160
169
  # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
@@ -438,6 +447,8 @@ module OpenAI
438
447
  # @param conversation
439
448
  # The conversation that this response belonged to. Input items and output items
440
449
  # from this response were automatically added to this conversation.
450
+ # @param input_transformations
451
+ # Reasoning inputs withheld from the model, in input order.
441
452
  # @param max_output_tokens
442
453
  # An upper bound for the number of tokens that can be generated for a response,
443
454
  # including visible output tokens and
@@ -586,6 +597,7 @@ module OpenAI
586
597
  ?completed_at: Float?,
587
598
  ?conversation: OpenAI::Beta::BetaResponse::Conversation?,
588
599
  ?image: OpenAI::Beta::BetaResponse::Image,
600
+ ?input_transformations: ::Array[OpenAI::Beta::BetaResponse::InputTransformation],
589
601
  ?max_output_tokens: Integer?,
590
602
  ?max_tool_calls: Integer?,
591
603
  ?moderation: OpenAI::Beta::BetaResponse::Moderation?,
@@ -628,6 +640,7 @@ module OpenAI
628
640
  ?completed_at: Float?,
629
641
  ?conversation: OpenAI::Beta::BetaResponse::Conversation?,
630
642
  ?image: OpenAI::Beta::BetaResponse::Image,
643
+ ?input_transformations: ::Array[OpenAI::Beta::BetaResponse::InputTransformation],
631
644
  ?max_output_tokens: Integer?,
632
645
  ?max_tool_calls: Integer?,
633
646
  ?moderation: OpenAI::Beta::BetaResponse::Moderation?,
@@ -1042,6 +1055,60 @@ module OpenAI
1042
1055
  end
1043
1056
  end
1044
1057
 
1058
+ type input_transformation =
1059
+ {
1060
+ id: String,
1061
+ ?action: :removed,
1062
+ reason: OpenAI::Models::Beta::BetaResponse::InputTransformation::reason,
1063
+ ?type: :reasoning
1064
+ }
1065
+
1066
+ class InputTransformation < OpenAI::Internal::Type::BaseModel
1067
+ # The original reasoning item ID.
1068
+ attr_accessor id: String
1069
+
1070
+ attr_accessor action: :removed
1071
+
1072
+ attr_accessor reason: OpenAI::Models::Beta::BetaResponse::InputTransformation::reason
1073
+
1074
+ attr_accessor type: :reasoning
1075
+
1076
+ # @param id
1077
+ # The original reasoning item ID.
1078
+ def initialize: (
1079
+ id: String,
1080
+ reason: OpenAI::Models::Beta::BetaResponse::InputTransformation::reason,
1081
+ ?action: :removed,
1082
+ ?type: :reasoning
1083
+ ) -> void
1084
+
1085
+ def to_hash: -> {
1086
+ id: String,
1087
+ ?action: :removed,
1088
+ reason: OpenAI::Models::Beta::BetaResponse::InputTransformation::reason,
1089
+ ?type: :reasoning
1090
+ }
1091
+
1092
+ type reason =
1093
+ :organization_mismatch
1094
+ | :end_user_mismatch
1095
+ | :model_mismatch
1096
+ | :prefix_mismatch
1097
+ | :turn_boundary
1098
+
1099
+ module Reason
1100
+ extend OpenAI::Internal::Type::Enum
1101
+
1102
+ ORGANIZATION_MISMATCH: :organization_mismatch
1103
+ END_USER_MISMATCH: :end_user_mismatch
1104
+ MODEL_MISMATCH: :model_mismatch
1105
+ PREFIX_MISMATCH: :prefix_mismatch
1106
+ TURN_BOUNDARY: :turn_boundary
1107
+
1108
+ def self?.values: -> ::Array[OpenAI::Models::Beta::BetaResponse::InputTransformation::reason]
1109
+ end
1110
+ end
1111
+
1045
1112
  type moderation =
1046
1113
  {
1047
1114
  input: OpenAI::Models::Beta::BetaResponse::Moderation::input,
@@ -22,6 +22,7 @@ module OpenAI
22
22
  ?completed_at: Float?,
23
23
  ?conversation: OpenAI::Responses::Response::Conversation?,
24
24
  ?image: OpenAI::Responses::Response::Image,
25
+ ?input_transformations: ::Array[OpenAI::Responses::Response::InputTransformation],
25
26
  ?max_output_tokens: Integer?,
26
27
  ?max_tool_calls: Integer?,
27
28
  ?moderation: OpenAI::Responses::Response::Moderation?,
@@ -153,6 +154,14 @@ module OpenAI
153
154
  OpenAI::Responses::Response::Image
154
155
  ) -> OpenAI::Responses::Response::Image
155
156
 
157
+ # Reasoning inputs withheld from the model, in input order.
158
+ attr_reader input_transformations: ::Array[OpenAI::Responses::Response::InputTransformation]?
159
+
160
+ # Reasoning inputs withheld from the model, in input order.
161
+ def input_transformations=: (
162
+ ::Array[OpenAI::Responses::Response::InputTransformation]
163
+ ) -> ::Array[OpenAI::Responses::Response::InputTransformation]
164
+
156
165
  # An upper bound for the number of tokens that can be generated for a response,
157
166
  # including visible output tokens and
158
167
  # [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
@@ -436,6 +445,8 @@ module OpenAI
436
445
  # @param conversation
437
446
  # The conversation that this response belonged to. Input items and output items
438
447
  # from this response were automatically added to this conversation.
448
+ # @param input_transformations
449
+ # Reasoning inputs withheld from the model, in input order.
439
450
  # @param max_output_tokens
440
451
  # An upper bound for the number of tokens that can be generated for a response,
441
452
  # including visible output tokens and
@@ -584,6 +595,7 @@ module OpenAI
584
595
  ?completed_at: Float?,
585
596
  ?conversation: OpenAI::Responses::Response::Conversation?,
586
597
  ?image: OpenAI::Responses::Response::Image,
598
+ ?input_transformations: ::Array[OpenAI::Responses::Response::InputTransformation],
587
599
  ?max_output_tokens: Integer?,
588
600
  ?max_tool_calls: Integer?,
589
601
  ?moderation: OpenAI::Responses::Response::Moderation?,
@@ -626,6 +638,7 @@ module OpenAI
626
638
  ?completed_at: Float?,
627
639
  ?conversation: OpenAI::Responses::Response::Conversation?,
628
640
  ?image: OpenAI::Responses::Response::Image,
641
+ ?input_transformations: ::Array[OpenAI::Responses::Response::InputTransformation],
629
642
  ?max_output_tokens: Integer?,
630
643
  ?max_tool_calls: Integer?,
631
644
  ?moderation: OpenAI::Responses::Response::Moderation?,
@@ -808,6 +821,60 @@ module OpenAI
808
821
  end
809
822
  end
810
823
 
824
+ type input_transformation =
825
+ {
826
+ id: String,
827
+ ?action: :removed,
828
+ reason: OpenAI::Models::Responses::Response::InputTransformation::reason,
829
+ ?type: :reasoning
830
+ }
831
+
832
+ class InputTransformation < OpenAI::Internal::Type::BaseModel
833
+ # The original reasoning item ID.
834
+ attr_accessor id: String
835
+
836
+ attr_accessor action: :removed
837
+
838
+ attr_accessor reason: OpenAI::Models::Responses::Response::InputTransformation::reason
839
+
840
+ attr_accessor type: :reasoning
841
+
842
+ # @param id
843
+ # The original reasoning item ID.
844
+ def initialize: (
845
+ id: String,
846
+ reason: OpenAI::Models::Responses::Response::InputTransformation::reason,
847
+ ?action: :removed,
848
+ ?type: :reasoning
849
+ ) -> void
850
+
851
+ def to_hash: -> {
852
+ id: String,
853
+ ?action: :removed,
854
+ reason: OpenAI::Models::Responses::Response::InputTransformation::reason,
855
+ ?type: :reasoning
856
+ }
857
+
858
+ type reason =
859
+ :organization_mismatch
860
+ | :end_user_mismatch
861
+ | :model_mismatch
862
+ | :prefix_mismatch
863
+ | :turn_boundary
864
+
865
+ module Reason
866
+ extend OpenAI::Internal::Type::Enum
867
+
868
+ ORGANIZATION_MISMATCH: :organization_mismatch
869
+ END_USER_MISMATCH: :end_user_mismatch
870
+ MODEL_MISMATCH: :model_mismatch
871
+ PREFIX_MISMATCH: :prefix_mismatch
872
+ TURN_BOUNDARY: :turn_boundary
873
+
874
+ def self?.values: -> ::Array[OpenAI::Models::Responses::Response::InputTransformation::reason]
875
+ end
876
+ end
877
+
811
878
  type moderation =
812
879
  {
813
880
  input: OpenAI::Models::Responses::Response::Moderation::input,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.122.0
4
+ version: 0.123.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAI