openai 0.57.0 → 0.59.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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +45 -0
  3. data/README.md +98 -1
  4. data/lib/openai/auth/subject_token_provider.rb +15 -0
  5. data/lib/openai/auth/subject_token_providers/azure_managed_identity_token_provider.rb +88 -0
  6. data/lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb +66 -0
  7. data/lib/openai/auth/subject_token_providers/k8s_service_account_token_provider.rb +37 -0
  8. data/lib/openai/auth/token_type.rb +10 -0
  9. data/lib/openai/auth/workload_identity.rb +23 -0
  10. data/lib/openai/auth/workload_identity_auth.rb +176 -0
  11. data/lib/openai/client.rb +59 -4
  12. data/lib/openai/errors.rb +39 -0
  13. data/lib/openai/internal/util.rb +22 -7
  14. data/lib/openai/models/conversations/message.rb +28 -1
  15. data/lib/openai/models/oauth_error_code.rb +29 -0
  16. data/lib/openai/models/realtime/realtime_session_create_request.rb +4 -3
  17. data/lib/openai/models/realtime/realtime_session_create_response.rb +7 -5
  18. data/lib/openai/models/realtime/realtime_tracing_config.rb +3 -2
  19. data/lib/openai/models/responses/response_input_file.rb +26 -1
  20. data/lib/openai/models/responses/response_input_file_content.rb +29 -1
  21. data/lib/openai/models/vector_stores/file_batch_create_params.rb +9 -5
  22. data/lib/openai/models/vector_stores/file_create_params.rb +3 -1
  23. data/lib/openai/models.rb +2 -0
  24. data/lib/openai/resources/realtime/calls.rb +1 -1
  25. data/lib/openai/version.rb +1 -1
  26. data/lib/openai.rb +8 -0
  27. data/rbi/openai/auth.rbi +55 -0
  28. data/rbi/openai/internal/util.rbi +8 -0
  29. data/rbi/openai/models/conversations/message.rbi +53 -1
  30. data/rbi/openai/models/oauth_error_code.rbi +24 -0
  31. data/rbi/openai/models/realtime/realtime_session_create_request.rbi +6 -4
  32. data/rbi/openai/models/realtime/realtime_session_create_response.rbi +9 -6
  33. data/rbi/openai/models/realtime/realtime_tracing_config.rbi +3 -2
  34. data/rbi/openai/models/responses/response_input_file.rbi +57 -0
  35. data/rbi/openai/models/responses/response_input_file_content.rbi +62 -0
  36. data/rbi/openai/models/vector_stores/file_batch_create_params.rbi +18 -10
  37. data/rbi/openai/models/vector_stores/file_create_params.rbi +6 -2
  38. data/rbi/openai/models.rbi +2 -0
  39. data/rbi/openai/resources/realtime/calls.rbi +3 -2
  40. data/rbi/openai/resources/vector_stores/file_batches.rbi +6 -4
  41. data/rbi/openai/resources/vector_stores/files.rbi +3 -1
  42. data/sig/openai/internal/util.rbs +4 -0
  43. data/sig/openai/models/conversations/message.rbs +18 -2
  44. data/sig/openai/models/oauth_error_code.rbs +14 -0
  45. data/sig/openai/models/responses/response_input_file.rbs +20 -0
  46. data/sig/openai/models/responses/response_input_file_content.rbs +20 -0
  47. data/sig/openai/models.rbs +2 -0
  48. metadata +13 -2
@@ -4,6 +4,7 @@ module OpenAI
4
4
  type response_input_file_content =
5
5
  {
6
6
  type: :input_file,
7
+ detail: OpenAI::Models::Responses::ResponseInputFileContent::detail,
7
8
  file_data: String?,
8
9
  file_id: String?,
9
10
  file_url: String?,
@@ -13,6 +14,12 @@ module OpenAI
13
14
  class ResponseInputFileContent < OpenAI::Internal::Type::BaseModel
14
15
  attr_accessor type: :input_file
15
16
 
17
+ attr_reader detail: OpenAI::Models::Responses::ResponseInputFileContent::detail?
18
+
19
+ def detail=: (
20
+ OpenAI::Models::Responses::ResponseInputFileContent::detail
21
+ ) -> OpenAI::Models::Responses::ResponseInputFileContent::detail
22
+
16
23
  attr_accessor file_data: String?
17
24
 
18
25
  attr_accessor file_id: String?
@@ -22,6 +29,7 @@ module OpenAI
22
29
  attr_accessor filename: String?
23
30
 
24
31
  def initialize: (
32
+ ?detail: OpenAI::Models::Responses::ResponseInputFileContent::detail,
25
33
  ?file_data: String?,
26
34
  ?file_id: String?,
27
35
  ?file_url: String?,
@@ -31,11 +39,23 @@ module OpenAI
31
39
 
32
40
  def to_hash: -> {
33
41
  type: :input_file,
42
+ detail: OpenAI::Models::Responses::ResponseInputFileContent::detail,
34
43
  file_data: String?,
35
44
  file_id: String?,
36
45
  file_url: String?,
37
46
  filename: String?
38
47
  }
48
+
49
+ type detail = :low | :high
50
+
51
+ module Detail
52
+ extend OpenAI::Internal::Type::Enum
53
+
54
+ LOW: :low
55
+ HIGH: :high
56
+
57
+ def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseInputFileContent::detail]
58
+ end
39
59
  end
40
60
  end
41
61
  end
@@ -165,6 +165,8 @@ module OpenAI
165
165
 
166
166
  class ModerationTextInput = OpenAI::Models::ModerationTextInput
167
167
 
168
+ module OAuthErrorCode = OpenAI::Models::OAuthErrorCode
169
+
168
170
  class OtherFileChunkingStrategyObject = OpenAI::Models::OtherFileChunkingStrategyObject
169
171
 
170
172
  module Realtime = OpenAI::Models::Realtime
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.57.0
4
+ version: 0.59.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-03-25 00:00:00.000000000 Z
11
+ date: 2026-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -64,6 +64,13 @@ files:
64
64
  - README.md
65
65
  - SECURITY.md
66
66
  - lib/openai.rb
67
+ - lib/openai/auth/subject_token_provider.rb
68
+ - lib/openai/auth/subject_token_providers/azure_managed_identity_token_provider.rb
69
+ - lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb
70
+ - lib/openai/auth/subject_token_providers/k8s_service_account_token_provider.rb
71
+ - lib/openai/auth/token_type.rb
72
+ - lib/openai/auth/workload_identity.rb
73
+ - lib/openai/auth/workload_identity_auth.rb
67
74
  - lib/openai/client.rb
68
75
  - lib/openai/errors.rb
69
76
  - lib/openai/file_part.rb
@@ -450,6 +457,7 @@ files:
450
457
  - lib/openai/models/moderation_model.rb
451
458
  - lib/openai/models/moderation_multi_modal_input.rb
452
459
  - lib/openai/models/moderation_text_input.rb
460
+ - lib/openai/models/oauth_error_code.rb
453
461
  - lib/openai/models/other_file_chunking_strategy_object.rb
454
462
  - lib/openai/models/realtime/audio_transcription.rb
455
463
  - lib/openai/models/realtime/call_accept_params.rb
@@ -872,6 +880,7 @@ files:
872
880
  - lib/openai/structured_output.rb
873
881
  - lib/openai/version.rb
874
882
  - manifest.yaml
883
+ - rbi/openai/auth.rbi
875
884
  - rbi/openai/client.rbi
876
885
  - rbi/openai/errors.rbi
877
886
  - rbi/openai/file_part.rbi
@@ -1253,6 +1262,7 @@ files:
1253
1262
  - rbi/openai/models/moderation_model.rbi
1254
1263
  - rbi/openai/models/moderation_multi_modal_input.rbi
1255
1264
  - rbi/openai/models/moderation_text_input.rbi
1265
+ - rbi/openai/models/oauth_error_code.rbi
1256
1266
  - rbi/openai/models/other_file_chunking_strategy_object.rbi
1257
1267
  - rbi/openai/models/realtime/audio_transcription.rbi
1258
1268
  - rbi/openai/models/realtime/call_accept_params.rbi
@@ -2046,6 +2056,7 @@ files:
2046
2056
  - sig/openai/models/moderation_model.rbs
2047
2057
  - sig/openai/models/moderation_multi_modal_input.rbs
2048
2058
  - sig/openai/models/moderation_text_input.rbs
2059
+ - sig/openai/models/oauth_error_code.rbs
2049
2060
  - sig/openai/models/other_file_chunking_strategy_object.rbs
2050
2061
  - sig/openai/models/realtime/audio_transcription.rbs
2051
2062
  - sig/openai/models/realtime/call_accept_params.rbs