openai 0.117.0 → 0.118.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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +13 -0
  3. data/README.md +1 -1
  4. data/lib/openai/models/admin/organization/projects/project_optional_service_tier.rb +24 -0
  5. data/lib/openai/models/admin/organization/projects/project_service_tier_settings.rb +88 -0
  6. data/lib/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rb +29 -0
  7. data/lib/openai/models/admin/organization/projects/service_tier_setting_update_params.rb +92 -0
  8. data/lib/openai/models/beta/beta_response.rb +1 -0
  9. data/lib/openai/models/beta/beta_response_usage.rb +33 -1
  10. data/lib/openai/models/beta/beta_responses_client_event.rb +10 -9
  11. data/lib/openai/models/beta/response_compact_params.rb +3 -3
  12. data/lib/openai/models/beta/response_create_params.rb +10 -9
  13. data/lib/openai/models/chat/completion_create_params.rb +3 -3
  14. data/lib/openai/models/responses/response.rb +1 -0
  15. data/lib/openai/models/responses/response_compact_params.rb +3 -3
  16. data/lib/openai/models/responses/response_create_params.rb +10 -9
  17. data/lib/openai/models/responses/response_usage.rb +33 -1
  18. data/lib/openai/models/responses/responses_client_event.rb +10 -9
  19. data/lib/openai/resources/admin/organization/projects/service_tier_settings.rb +77 -0
  20. data/lib/openai/resources/admin/organization/projects.rb +6 -0
  21. data/lib/openai/resources/beta/responses.rb +6 -6
  22. data/lib/openai/resources/chat/completions.rb +2 -2
  23. data/lib/openai/resources/responses.rb +3 -3
  24. data/lib/openai/version.rb +1 -1
  25. data/lib/openai.rb +5 -0
  26. data/rbi/openai/models/admin/organization/projects/project_optional_service_tier.rbi +45 -0
  27. data/rbi/openai/models/admin/organization/projects/project_service_tier_settings.rbi +143 -0
  28. data/rbi/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbi +63 -0
  29. data/rbi/openai/models/admin/organization/projects/service_tier_setting_update_params.rbi +183 -0
  30. data/rbi/openai/models/beta/beta_response.rbi +1 -0
  31. data/rbi/openai/models/beta/beta_response_usage.rbi +66 -3
  32. data/rbi/openai/models/beta/beta_responses_client_event.rbi +13 -9
  33. data/rbi/openai/models/beta/response_compact_params.rbi +3 -3
  34. data/rbi/openai/models/beta/response_create_params.rbi +10 -9
  35. data/rbi/openai/models/chat/completion_create_params.rbi +3 -3
  36. data/rbi/openai/models/responses/response.rbi +1 -0
  37. data/rbi/openai/models/responses/response_compact_params.rbi +3 -3
  38. data/rbi/openai/models/responses/response_create_params.rbi +10 -9
  39. data/rbi/openai/models/responses/response_usage.rbi +66 -3
  40. data/rbi/openai/models/responses/responses_client_event.rbi +13 -9
  41. data/rbi/openai/resources/admin/organization/projects/service_tier_settings.rbi +67 -0
  42. data/rbi/openai/resources/admin/organization/projects.rbi +3 -0
  43. data/rbi/openai/resources/beta/responses.rbi +6 -6
  44. data/rbi/openai/resources/chat/completions.rbi +2 -2
  45. data/rbi/openai/resources/responses.rbi +3 -3
  46. data/sig/openai/models/admin/organization/projects/project_optional_service_tier.rbs +23 -0
  47. data/sig/openai/models/admin/organization/projects/project_service_tier_settings.rbs +72 -0
  48. data/sig/openai/models/admin/organization/projects/service_tier_setting_retrieve_params.rbs +32 -0
  49. data/sig/openai/models/admin/organization/projects/service_tier_setting_update_params.rbs +91 -0
  50. data/sig/openai/models/beta/beta_response.rbs +2 -1
  51. data/sig/openai/models/beta/beta_response_usage.rbs +40 -3
  52. data/sig/openai/models/beta/beta_responses_client_event.rbs +11 -10
  53. data/sig/openai/models/beta/response_compact_params.rbs +2 -2
  54. data/sig/openai/models/beta/response_create_params.rbs +11 -10
  55. data/sig/openai/models/chat/completion_create_params.rbs +3 -3
  56. data/sig/openai/models/responses/response.rbs +2 -1
  57. data/sig/openai/models/responses/response_compact_params.rbs +2 -2
  58. data/sig/openai/models/responses/response_create_params.rbs +11 -10
  59. data/sig/openai/models/responses/response_usage.rbs +40 -3
  60. data/sig/openai/models/responses/responses_client_event.rbs +11 -10
  61. data/sig/openai/resources/admin/organization/projects/service_tier_settings.rbs +25 -0
  62. data/sig/openai/resources/admin/organization/projects.rbs +2 -0
  63. metadata +16 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55a123764dd864cd95a2009db727f340e39256d6caad2cb23b52b31474397fd9
4
- data.tar.gz: bb293c23c56337711290c5b443befd3f335643edbb9c0b322420514f2d0ac8fa
3
+ metadata.gz: e37e3fb7c53769a3fb7bbe6a79b7c3f5d4b9d5c3d5f13fb6c5317f489019086a
4
+ data.tar.gz: c9d804e63b8ff116a72bbc6c471ad398c303d7373af5fba01aa5bba7c3996297
5
5
  SHA512:
6
- metadata.gz: 911802a98612e72b29e84f8b0bb83f8e4e40e4ca9b9766ecb1342586de425f426a69cf0c06c112af70549254d751e810a8eef69d1cd5204086d44063f665c6b1
7
- data.tar.gz: cffeaaafe610bf866cdd0e89d3172583d441bbb435bdb6c7809023a0f5693922a832c8418ffd8f1b26dd763b0f12d3037dc65418de0e6e50e4a3a11ce1c47e7b
6
+ metadata.gz: d991c961da46c6b12a857e0412afc71177ecef975a7b09a5ccfa93235678621a94d2c53614844f8e05f8f5194afbd24d39a11fa7d1c2558ab104e8e0fcb30a31
7
+ data.tar.gz: 9e9bf4dfd8ad78e2f2fda579f962cb105047c4b443bb81e88c19b61c7ed900260a4d31c85cc781a4e3005ad2c23c7c733c4e6eb37d4a110c6a524938bc08f53d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.118.0](https://github.com/openai/openai-ruby/compare/v0.117.0...v0.118.0) (2026-11-03)
4
+
5
+
6
+ ### Features
7
+
8
+ * **api:** add 12-hour Responses caching and cache-write usage ([#1029](https://github.com/openai/openai-ruby/issues/1029)) ([32b30ff](https://github.com/openai/openai-ruby/commit/32b30ffb3ce07fad285fd2df3afef76df7e9f901))
9
+ * **api:** add project service tier settings ([#1028](https://github.com/openai/openai-ruby/issues/1028)) ([8c8e4e8](https://github.com/openai/openai-ruby/commit/8c8e4e8e28e9f412eb32ab839b447224e6f1cd87))
10
+
11
+
12
+ ### Documentation
13
+
14
+ * clarify generated-file ownership ([#1030](https://github.com/openai/openai-ruby/issues/1030)) ([51508aa](https://github.com/openai/openai-ruby/commit/51508aa5047698ed1e792003a65f84934e51b77f))
15
+
3
16
  ## [0.117.0](https://github.com/openai/openai-ruby/compare/v0.116.0...v0.117.0) (2026-11-03)
4
17
 
5
18
 
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.117.0"
18
+ gem "openai", "~> 0.118.0"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Admin
6
+ module Organization
7
+ module Projects
8
+ module ProjectOptionalServiceTier
9
+ extend OpenAI::Internal::Type::Enum
10
+
11
+ FLEX = :flex
12
+ FAST = :fast
13
+ ULTRAFAST = :ultrafast
14
+
15
+ # @!method self.values
16
+ # @return [Array<Symbol>]
17
+ end
18
+ end
19
+
20
+ ProjectOptionalServiceTier = Projects::ProjectOptionalServiceTier
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,88 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Admin
6
+ module Organization
7
+ module Projects
8
+ # @see OpenAI::Resources::Admin::Organization::Projects::ServiceTierSettings#retrieve
9
+ class ProjectServiceTierSettings < OpenAI::Internal::Type::BaseModel
10
+ # @!attribute default
11
+ # Default tier for requests that omit service_tier or use auto.
12
+ #
13
+ # @return [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::Default]
14
+ required :default, enum: -> { OpenAI::Admin::Organization::Projects::ProjectServiceTierSettings::Default }
15
+
16
+ # @!attribute enabled_tiers
17
+ # Additional service tiers enabled for this project. "all" includes future tiers.
18
+ # An empty array allows only Standard. Organization policy and eligibility still
19
+ # apply.
20
+ #
21
+ # @return [Symbol, :all, Array<Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectOptionalServiceTier>]
22
+ required(
23
+ :enabled_tiers,
24
+ union: -> { OpenAI::Admin::Organization::Projects::ProjectServiceTierSettings::EnabledTiers }
25
+ )
26
+
27
+ # @!attribute object
28
+ #
29
+ # @return [Symbol, :"project.service_tier_settings"]
30
+ required :object, const: :"project.service_tier_settings"
31
+
32
+ # @!method initialize(default:, enabled_tiers:, object: :"project.service_tier_settings")
33
+ # @param default [Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::Default]
34
+ # Default tier for requests that omit service_tier or use auto.
35
+ #
36
+ # @param enabled_tiers [Symbol, :all, Array<Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectOptionalServiceTier>]
37
+ # Additional service tiers enabled for this project. "all" includes future tiers.
38
+ # An empty array allows only Standard. Organization policy and eligibility still
39
+ # apply.
40
+ #
41
+ # @param object [Symbol, :"project.service_tier_settings"]
42
+
43
+ # Default tier for requests that omit service_tier or use auto.
44
+ #
45
+ # @see OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings#default
46
+ module Default
47
+ extend OpenAI::Internal::Type::Enum
48
+
49
+ STANDARD = :standard
50
+ FAST = :fast
51
+ SCALE = :scale
52
+
53
+ # @!method self.values
54
+ # @return [Array<Symbol>]
55
+ end
56
+
57
+ # Additional service tiers enabled for this project. "all" includes future tiers.
58
+ # An empty array allows only Standard. Organization policy and eligibility still
59
+ # apply.
60
+ #
61
+ # @see OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings#enabled_tiers
62
+ module EnabledTiers
63
+ extend OpenAI::Internal::Type::Union
64
+
65
+ variant const: :all
66
+
67
+ variant(
68
+ -> {
69
+ OpenAI::Models::Admin::Organization::Projects::ProjectServiceTierSettings::EnabledTiers::ProjectOptionalServiceTierArray
70
+ }
71
+ )
72
+
73
+ # @!method self.variants
74
+ # @return [Array(Symbol, :all, Array<Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectOptionalServiceTier>)]
75
+
76
+ # @type [OpenAI::Internal::Type::Converter]
77
+ ProjectOptionalServiceTierArray = OpenAI::Internal::Type::ArrayOf[
78
+ enum: -> { OpenAI::Models::Admin::Organization::Projects::ProjectOptionalServiceTier }
79
+ ]
80
+ end
81
+ end
82
+ end
83
+
84
+ ProjectServiceTierSettings = Projects::ProjectServiceTierSettings
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Admin
6
+ module Organization
7
+ module Projects
8
+ # @see OpenAI::Resources::Admin::Organization::Projects::ServiceTierSettings#retrieve
9
+ class ServiceTierSettingRetrieveParams < OpenAI::Internal::Type::BaseModel
10
+ extend OpenAI::Internal::Type::RequestParameters::Converter
11
+ include OpenAI::Internal::Type::RequestParameters
12
+
13
+ # @!attribute project_id
14
+ # The ID of the project
15
+ #
16
+ # @return [String]
17
+ required :project_id, String
18
+
19
+ # @!method initialize(project_id:, request_options: {})
20
+ # @param project_id [String]
21
+ # The ID of the project
22
+ #
23
+ # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
24
+ end
25
+ end
26
+ end
27
+ end
28
+ end
29
+ end
@@ -0,0 +1,92 @@
1
+ # frozen_string_literal: true
2
+
3
+ module OpenAI
4
+ module Models
5
+ module Admin
6
+ module Organization
7
+ module Projects
8
+ # @see OpenAI::Resources::Admin::Organization::Projects::ServiceTierSettings#update
9
+ class ServiceTierSettingUpdateParams < OpenAI::Internal::Type::BaseModel
10
+ extend OpenAI::Internal::Type::RequestParameters::Converter
11
+ include OpenAI::Internal::Type::RequestParameters
12
+
13
+ # @!attribute project_id
14
+ # The ID of the project
15
+ #
16
+ # @return [String]
17
+ required :project_id, String
18
+
19
+ # @!attribute default
20
+ # Default tier for requests that omit service_tier or use auto.
21
+ #
22
+ # @return [Symbol, OpenAI::Models::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default, nil]
23
+ optional(
24
+ :default,
25
+ enum: -> { OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default }
26
+ )
27
+
28
+ # @!attribute enabled_tiers
29
+ # Additional service tiers enabled for this project. "all" includes future tiers.
30
+ # An empty array allows only Standard. Organization policy and eligibility still
31
+ # apply.
32
+ #
33
+ # @return [Symbol, :all, Array<Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectOptionalServiceTier>, nil]
34
+ optional(
35
+ :enabled_tiers,
36
+ union: -> { OpenAI::Admin::Organization::Projects::ServiceTierSettingUpdateParams::EnabledTiers }
37
+ )
38
+
39
+ # @!method initialize(project_id:, default: nil, enabled_tiers: nil, request_options: {})
40
+ # @param project_id [String]
41
+ # The ID of the project
42
+ #
43
+ # @param default [Symbol, OpenAI::Models::Admin::Organization::Projects::ServiceTierSettingUpdateParams::Default]
44
+ # Default tier for requests that omit service_tier or use auto.
45
+ #
46
+ # @param enabled_tiers [Symbol, :all, Array<Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectOptionalServiceTier>]
47
+ # Additional service tiers enabled for this project. "all" includes future tiers.
48
+ # An empty array allows only Standard. Organization policy and eligibility still
49
+ # apply.
50
+ #
51
+ # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
52
+
53
+ # Default tier for requests that omit service_tier or use auto.
54
+ module Default
55
+ extend OpenAI::Internal::Type::Enum
56
+
57
+ STANDARD = :standard
58
+ FAST = :fast
59
+ SCALE = :scale
60
+
61
+ # @!method self.values
62
+ # @return [Array<Symbol>]
63
+ end
64
+
65
+ # Additional service tiers enabled for this project. "all" includes future tiers.
66
+ # An empty array allows only Standard. Organization policy and eligibility still
67
+ # apply.
68
+ module EnabledTiers
69
+ extend OpenAI::Internal::Type::Union
70
+
71
+ variant const: :all
72
+
73
+ variant(
74
+ -> {
75
+ OpenAI::Models::Admin::Organization::Projects::ServiceTierSettingUpdateParams::EnabledTiers::ProjectOptionalServiceTierArray
76
+ }
77
+ )
78
+
79
+ # @!method self.variants
80
+ # @return [Array(Symbol, :all, Array<Symbol, OpenAI::Models::Admin::Organization::Projects::ProjectOptionalServiceTier>)]
81
+
82
+ # @type [OpenAI::Internal::Type::Converter]
83
+ ProjectOptionalServiceTierArray = OpenAI::Internal::Type::ArrayOf[
84
+ enum: -> { OpenAI::Models::Admin::Organization::Projects::ProjectOptionalServiceTier }
85
+ ]
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -1855,6 +1855,7 @@ module OpenAI
1855
1855
  extend OpenAI::Internal::Type::Enum
1856
1856
 
1857
1857
  TTL_30M = :"30m"
1858
+ TTL_12H = :"12h"
1858
1859
 
1859
1860
  # @!method self.values
1860
1861
  # @return [Array<Symbol>]
@@ -68,7 +68,15 @@ module OpenAI
68
68
  # @return [Integer]
69
69
  required :cached_tokens, Integer
70
70
 
71
- # @!method initialize(cache_write_tokens:, cached_tokens:)
71
+ # @!attribute cache_write_tokens_details
72
+ #
73
+ # @return [OpenAI::Models::Beta::BetaResponseUsage::InputTokensDetails::CacheWriteTokensDetails, nil]
74
+ optional(
75
+ :cache_write_tokens_details,
76
+ -> { OpenAI::Beta::BetaResponseUsage::InputTokensDetails::CacheWriteTokensDetails }
77
+ )
78
+
79
+ # @!method initialize(cache_write_tokens:, cached_tokens:, cache_write_tokens_details: nil)
72
80
  # A detailed breakdown of the input tokens.
73
81
  #
74
82
  # @param cache_write_tokens [Integer]
@@ -77,6 +85,30 @@ module OpenAI
77
85
  # @param cached_tokens [Integer]
78
86
  # The number of tokens that were retrieved from the cache.
79
87
  # [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).
88
+ #
89
+ # @param cache_write_tokens_details [OpenAI::Models::Beta::BetaResponseUsage::InputTokensDetails::CacheWriteTokensDetails]
90
+
91
+ # @see OpenAI::Models::Beta::BetaResponseUsage::InputTokensDetails#cache_write_tokens_details
92
+ class CacheWriteTokensDetails < OpenAI::Internal::Type::BaseModel
93
+ # @!attribute ttl_12h_tokens
94
+ # The number of input tokens written with 12-hour retention.
95
+ #
96
+ # @return [Integer]
97
+ required :ttl_12h_tokens, Integer
98
+
99
+ # @!attribute ttl_30m_tokens
100
+ # The number of input tokens written with 30-minute retention.
101
+ #
102
+ # @return [Integer]
103
+ required :ttl_30m_tokens, Integer
104
+
105
+ # @!method initialize(ttl_12h_tokens:, ttl_30m_tokens:)
106
+ # @param ttl_12h_tokens [Integer]
107
+ # The number of input tokens written with 12-hour retention.
108
+ #
109
+ # @param ttl_30m_tokens [Integer]
110
+ # The number of input tokens written with 30-minute retention.
111
+ end
80
112
  end
81
113
 
82
114
  # @see OpenAI::Models::Beta::BetaResponseUsage#output_tokens_details
@@ -253,7 +253,7 @@ module OpenAI
253
253
  # request can write up to four breakpoints. For cache matching, OpenAI considers
254
254
  # up to the latest 80 breakpoints in the conversation, without a content-block
255
255
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
256
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
256
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
257
257
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
258
258
  # for current details.
259
259
  #
@@ -617,7 +617,7 @@ module OpenAI
617
617
  # request can write up to four breakpoints. For cache matching, OpenAI considers
618
618
  # up to the latest 80 breakpoints in the conversation, without a content-block
619
619
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
620
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
620
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
621
621
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
622
622
  # for current details.
623
623
  #
@@ -1884,8 +1884,8 @@ module OpenAI
1884
1884
 
1885
1885
  # @!attribute ttl
1886
1886
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
1887
- # written by the request. Defaults to `30m`, which is currently the only supported
1888
- # value. The backend may retain cache entries for longer.
1887
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
1888
+ # backend may retain cache entries for longer.
1889
1889
  #
1890
1890
  # @return [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl, nil]
1891
1891
  optional(
@@ -1900,7 +1900,7 @@ module OpenAI
1900
1900
  # request can write up to four breakpoints. For cache matching, OpenAI considers
1901
1901
  # up to the latest 80 breakpoints in the conversation, without a content-block
1902
1902
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
1903
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
1903
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
1904
1904
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
1905
1905
  # for current details.
1906
1906
  #
@@ -1922,8 +1922,8 @@ module OpenAI
1922
1922
  #
1923
1923
  # @param ttl [Symbol, OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions::Ttl]
1924
1924
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
1925
- # written by the request. Defaults to `30m`, which is currently the only supported
1926
- # value. The backend may retain cache entries for longer.
1925
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
1926
+ # backend may retain cache entries for longer.
1927
1927
 
1928
1928
  # Controls whether OpenAI automatically creates an implicit cache breakpoint.
1929
1929
  # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
@@ -1944,14 +1944,15 @@ module OpenAI
1944
1944
  end
1945
1945
 
1946
1946
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
1947
- # written by the request. Defaults to `30m`, which is currently the only supported
1948
- # value. The backend may retain cache entries for longer.
1947
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
1948
+ # backend may retain cache entries for longer.
1949
1949
  #
1950
1950
  # @see OpenAI::Models::Beta::BetaResponsesClientEvent::ResponseCreate::PromptCacheOptions#ttl
1951
1951
  module Ttl
1952
1952
  extend OpenAI::Internal::Type::Enum
1953
1953
 
1954
1954
  TTL_30M = :"30m"
1955
+ TTL_12H = :"12h"
1955
1956
 
1956
1957
  # @!method self.values
1957
1958
  # @return [Array<Symbol>]
@@ -55,7 +55,7 @@ module OpenAI
55
55
  # request can write up to four breakpoints. For cache matching, OpenAI considers
56
56
  # up to the latest 80 breakpoints in the conversation, without a content-block
57
57
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
58
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
58
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
59
59
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
60
60
  # for current details.
61
61
  #
@@ -139,7 +139,7 @@ module OpenAI
139
139
  # request can write up to four breakpoints. For cache matching, OpenAI considers
140
140
  # up to the latest 80 breakpoints in the conversation, without a content-block
141
141
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
142
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
142
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
143
143
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
144
144
  # for current details.
145
145
  #
@@ -830,7 +830,7 @@ module OpenAI
830
830
  # request can write up to four breakpoints. For cache matching, OpenAI considers
831
831
  # up to the latest 80 breakpoints in the conversation, without a content-block
832
832
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
833
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
833
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
834
834
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
835
835
  # for current details.
836
836
  #
@@ -182,7 +182,7 @@ module OpenAI
182
182
  # request can write up to four breakpoints. For cache matching, OpenAI considers
183
183
  # up to the latest 80 breakpoints in the conversation, without a content-block
184
184
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
185
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
185
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
186
186
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
187
187
  # for current details.
188
188
  #
@@ -494,7 +494,7 @@ module OpenAI
494
494
  # request can write up to four breakpoints. For cache matching, OpenAI considers
495
495
  # up to the latest 80 breakpoints in the conversation, without a content-block
496
496
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
497
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
497
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
498
498
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
499
499
  # for current details.
500
500
  #
@@ -1533,8 +1533,8 @@ module OpenAI
1533
1533
 
1534
1534
  # @!attribute ttl
1535
1535
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
1536
- # written by the request. Defaults to `30m`, which is currently the only supported
1537
- # value. The backend may retain cache entries for longer.
1536
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
1537
+ # backend may retain cache entries for longer.
1538
1538
  #
1539
1539
  # @return [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::Ttl, nil]
1540
1540
  optional :ttl, enum: -> { OpenAI::Beta::ResponseCreateParams::PromptCacheOptions::Ttl }
@@ -1546,7 +1546,7 @@ module OpenAI
1546
1546
  # request can write up to four breakpoints. For cache matching, OpenAI considers
1547
1547
  # up to the latest 80 breakpoints in the conversation, without a content-block
1548
1548
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
1549
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
1549
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
1550
1550
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
1551
1551
  # for current details.
1552
1552
  #
@@ -1568,8 +1568,8 @@ module OpenAI
1568
1568
  #
1569
1569
  # @param ttl [Symbol, OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions::Ttl]
1570
1570
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
1571
- # written by the request. Defaults to `30m`, which is currently the only supported
1572
- # value. The backend may retain cache entries for longer.
1571
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
1572
+ # backend may retain cache entries for longer.
1573
1573
 
1574
1574
  # Controls whether OpenAI automatically creates an implicit cache breakpoint.
1575
1575
  # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
@@ -1590,14 +1590,15 @@ module OpenAI
1590
1590
  end
1591
1591
 
1592
1592
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
1593
- # written by the request. Defaults to `30m`, which is currently the only supported
1594
- # value. The backend may retain cache entries for longer.
1593
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
1594
+ # backend may retain cache entries for longer.
1595
1595
  #
1596
1596
  # @see OpenAI::Models::Beta::ResponseCreateParams::PromptCacheOptions#ttl
1597
1597
  module Ttl
1598
1598
  extend OpenAI::Internal::Type::Enum
1599
1599
 
1600
1600
  TTL_30M = :"30m"
1601
+ TTL_12H = :"12h"
1601
1602
 
1602
1603
  # @!method self.values
1603
1604
  # @return [Array<Symbol>]
@@ -212,7 +212,7 @@ module OpenAI
212
212
  # request can write up to four breakpoints. For cache matching, OpenAI considers
213
213
  # up to the latest 80 breakpoints in the conversation, without a content-block
214
214
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
215
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
215
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
216
216
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
217
217
  # for current details.
218
218
  #
@@ -569,7 +569,7 @@ module OpenAI
569
569
  # request can write up to four breakpoints. For cache matching, OpenAI considers
570
570
  # up to the latest 80 breakpoints in the conversation, without a content-block
571
571
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
572
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
572
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
573
573
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
574
574
  # for current details.
575
575
  #
@@ -979,7 +979,7 @@ module OpenAI
979
979
  # request can write up to four breakpoints. For cache matching, OpenAI considers
980
980
  # up to the latest 80 breakpoints in the conversation, without a content-block
981
981
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
982
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
982
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
983
983
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
984
984
  # for current details.
985
985
  #
@@ -1239,6 +1239,7 @@ module OpenAI
1239
1239
  extend OpenAI::Internal::Type::Enum
1240
1240
 
1241
1241
  TTL_30M = :"30m"
1242
+ TTL_12H = :"12h"
1242
1243
 
1243
1244
  # @!method self.values
1244
1245
  # @return [Array<Symbol>]
@@ -55,7 +55,7 @@ module OpenAI
55
55
  # request can write up to four breakpoints. For cache matching, OpenAI considers
56
56
  # up to the latest 80 breakpoints in the conversation, without a content-block
57
57
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
58
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
58
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
59
59
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
60
60
  # for current details.
61
61
  #
@@ -132,7 +132,7 @@ module OpenAI
132
132
  # request can write up to four breakpoints. For cache matching, OpenAI considers
133
133
  # up to the latest 80 breakpoints in the conversation, without a content-block
134
134
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
135
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
135
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
136
136
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
137
137
  # for current details.
138
138
  #
@@ -833,7 +833,7 @@ module OpenAI
833
833
  # request can write up to four breakpoints. For cache matching, OpenAI considers
834
834
  # up to the latest 80 breakpoints in the conversation, without a content-block
835
835
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
836
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
836
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
837
837
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
838
838
  # for current details.
839
839
  #
@@ -182,7 +182,7 @@ module OpenAI
182
182
  # request can write up to four breakpoints. For cache matching, OpenAI considers
183
183
  # up to the latest 80 breakpoints in the conversation, without a content-block
184
184
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
185
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
185
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
186
186
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
187
187
  # for current details.
188
188
  #
@@ -491,7 +491,7 @@ module OpenAI
491
491
  # request can write up to four breakpoints. For cache matching, OpenAI considers
492
492
  # up to the latest 80 breakpoints in the conversation, without a content-block
493
493
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
494
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
494
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
495
495
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
496
496
  # for current details.
497
497
  #
@@ -887,8 +887,8 @@ module OpenAI
887
887
 
888
888
  # @!attribute ttl
889
889
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
890
- # written by the request. Defaults to `30m`, which is currently the only supported
891
- # value. The backend may retain cache entries for longer.
890
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
891
+ # backend may retain cache entries for longer.
892
892
  #
893
893
  # @return [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::Ttl, nil]
894
894
  optional :ttl, enum: -> { OpenAI::Responses::ResponseCreateParams::PromptCacheOptions::Ttl }
@@ -900,7 +900,7 @@ module OpenAI
900
900
  # request can write up to four breakpoints. For cache matching, OpenAI considers
901
901
  # up to the latest 80 breakpoints in the conversation, without a content-block
902
902
  # lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
903
- # `ttl` defaults to `30m`, which is currently the only supported value. See the
903
+ # `ttl` defaults to `30m`. Supported lifetimes depend on the API. See the
904
904
  # [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
905
905
  # for current details.
906
906
  #
@@ -922,8 +922,8 @@ module OpenAI
922
922
  #
923
923
  # @param ttl [Symbol, OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions::Ttl]
924
924
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
925
- # written by the request. Defaults to `30m`, which is currently the only supported
926
- # value. The backend may retain cache entries for longer.
925
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
926
+ # backend may retain cache entries for longer.
927
927
 
928
928
  # Controls whether OpenAI automatically creates an implicit cache breakpoint.
929
929
  # Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
@@ -944,14 +944,15 @@ module OpenAI
944
944
  end
945
945
 
946
946
  # The minimum lifetime applied to every implicit and explicit cache breakpoint
947
- # written by the request. Defaults to `30m`, which is currently the only supported
948
- # value. The backend may retain cache entries for longer.
947
+ # written by the request. Supported values are `30m` (the default) and `12h`. The
948
+ # backend may retain cache entries for longer.
949
949
  #
950
950
  # @see OpenAI::Models::Responses::ResponseCreateParams::PromptCacheOptions#ttl
951
951
  module Ttl
952
952
  extend OpenAI::Internal::Type::Enum
953
953
 
954
954
  TTL_30M = :"30m"
955
+ TTL_12H = :"12h"
955
956
 
956
957
  # @!method self.values
957
958
  # @return [Array<Symbol>]