openai 0.79.0 → 0.80.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 +4 -4
- data/CHANGELOG.md +19 -0
- data/README.md +1 -1
- data/bedrock.md +67 -2
- data/lib/openai/models/all_models.rb +2 -0
- data/lib/openai/models/beta/beta_mcp_tool_call_error.rb +84 -0
- data/lib/openai/models/beta/beta_response.rb +18 -0
- data/lib/openai/models/beta/beta_response_input_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_output_item.rb +3 -3
- data/lib/openai/models/beta/beta_response_output_item_added_event.rb +5 -2
- data/lib/openai/models/beta/beta_response_output_text_annotation_added_event.rb +201 -4
- data/lib/openai/models/beta/beta_response_reasoning_item.rb +5 -0
- data/lib/openai/models/beta/beta_responses_client_event.rb +18 -0
- data/lib/openai/models/beta/beta_responses_server_event.rb +126 -22
- data/lib/openai/models/beta/beta_web_search_tool.rb +11 -1
- data/lib/openai/models/beta/response_compact_params.rb +9 -0
- data/lib/openai/models/beta/response_create_params.rb +18 -0
- data/lib/openai/models/chat_model.rb +1 -0
- data/lib/openai/models/completion_usage.rb +26 -2
- data/lib/openai/models/conversations/conversation_item.rb +3 -3
- data/lib/openai/models/model.rb +9 -1
- data/lib/openai/models/responses/mcp_tool_call_error.rb +82 -0
- data/lib/openai/models/responses/response.rb +9 -0
- data/lib/openai/models/responses/response_compact_params.rb +9 -0
- data/lib/openai/models/responses/response_create_params.rb +9 -0
- data/lib/openai/models/responses/response_input_item.rb +3 -3
- data/lib/openai/models/responses/response_item.rb +3 -3
- data/lib/openai/models/responses/response_output_item.rb +3 -3
- data/lib/openai/models/responses/response_output_item_added_event.rb +5 -2
- data/lib/openai/models/responses/response_output_text_annotation_added_event.rb +201 -4
- data/lib/openai/models/responses/response_reasoning_item.rb +5 -0
- data/lib/openai/models/responses/responses_client_event.rb +9 -0
- data/lib/openai/models/responses/responses_server_event.rb +100 -22
- data/lib/openai/models/responses/web_search_tool.rb +11 -1
- data/lib/openai/models/responses_model.rb +2 -0
- data/lib/openai/providers/bedrock.rb +127 -16
- data/lib/openai/resources/files.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +4 -2
- data/rbi/openai/models/all_models.rbi +10 -0
- data/rbi/openai/models/beta/beta_mcp_tool_call_error.rbi +122 -0
- data/rbi/openai/models/beta/beta_response.rbi +32 -0
- data/rbi/openai/models/beta/beta_response_input_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_output_item.rbi +27 -3
- data/rbi/openai/models/beta/beta_response_output_item_added_event.rbi +8 -2
- data/rbi/openai/models/beta/beta_response_output_text_annotation_added_event.rbi +297 -5
- data/rbi/openai/models/beta/beta_response_reasoning_item.rbi +10 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +32 -0
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +221 -67
- data/rbi/openai/models/beta/beta_web_search_tool.rbi +15 -0
- data/rbi/openai/models/beta/response_compact_params.rbi +15 -0
- data/rbi/openai/models/beta/response_create_params.rbi +32 -0
- data/rbi/openai/models/chat_model.rbi +2 -0
- data/rbi/openai/models/completion_usage.rbi +39 -6
- data/rbi/openai/models/conversations/conversation_item.rbi +12 -3
- data/rbi/openai/models/model.rbi +14 -1
- data/rbi/openai/models/responses/mcp_tool_call_error.rbi +120 -0
- data/rbi/openai/models/responses/response.rbi +17 -0
- data/rbi/openai/models/responses/response_compact_params.rbi +15 -0
- data/rbi/openai/models/responses/response_create_params.rbi +17 -0
- data/rbi/openai/models/responses/response_input_item.rbi +27 -3
- data/rbi/openai/models/responses/response_item.rbi +27 -3
- data/rbi/openai/models/responses/response_output_item.rbi +27 -3
- data/rbi/openai/models/responses/response_output_item_added_event.rbi +8 -2
- data/rbi/openai/models/responses/response_output_text_annotation_added_event.rbi +297 -5
- data/rbi/openai/models/responses/response_reasoning_item.rbi +10 -0
- data/rbi/openai/models/responses/responses_client_event.rbi +17 -0
- data/rbi/openai/models/responses/responses_server_event.rbi +165 -62
- data/rbi/openai/models/responses/web_search_tool.rbi +15 -0
- data/rbi/openai/models/responses_model.rbi +10 -0
- data/rbi/openai/providers.rbi +2 -0
- data/rbi/openai/resources/beta/responses.rbi +8 -0
- data/rbi/openai/resources/files.rbi +1 -1
- data/rbi/openai/resources/responses.rbi +8 -0
- data/sig/openai/models/all_models.rbs +4 -0
- data/sig/openai/models/beta/beta_mcp_tool_call_error.rbs +75 -0
- data/sig/openai/models/beta/beta_response.rbs +8 -1
- data/sig/openai/models/beta/beta_response_input_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_output_item.rbs +4 -4
- data/sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs +149 -4
- data/sig/openai/models/beta/beta_responses_client_event.rbs +8 -1
- data/sig/openai/models/beta/beta_responses_server_event.rbs +99 -39
- data/sig/openai/models/beta/beta_web_search_tool.rbs +7 -0
- data/sig/openai/models/beta/response_compact_params.rbs +6 -0
- data/sig/openai/models/beta/response_create_params.rbs +8 -1
- data/sig/openai/models/chat_model.rbs +2 -0
- data/sig/openai/models/completion_usage.rbs +27 -6
- data/sig/openai/models/conversations/conversation_item.rbs +4 -4
- data/sig/openai/models/model.rbs +12 -2
- data/sig/openai/models/responses/mcp_tool_call_error.rbs +73 -0
- data/sig/openai/models/responses/response.rbs +2 -1
- data/sig/openai/models/responses/response_compact_params.rbs +6 -0
- data/sig/openai/models/responses/response_create_params.rbs +2 -1
- data/sig/openai/models/responses/response_input_item.rbs +4 -4
- data/sig/openai/models/responses/response_item.rbs +4 -4
- data/sig/openai/models/responses/response_output_item.rbs +4 -4
- data/sig/openai/models/responses/response_output_text_annotation_added_event.rbs +149 -4
- data/sig/openai/models/responses/responses_client_event.rbs +2 -1
- data/sig/openai/models/responses/responses_server_event.rbs +84 -36
- data/sig/openai/models/responses/web_search_tool.rbs +7 -0
- data/sig/openai/models/responses_model.rbs +4 -0
- data/sig/openai/providers.rbs +1 -0
- metadata +7 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 04e35fa6de9362524ec8eb2967901334c36bc49af09ac5e3b1a5ca2b7cac0a79
|
|
4
|
+
data.tar.gz: bc0d81dc930ca951a59c5470444728d9152abad4bc7ed86e22738819718d8115
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 72ee61370ccfd94c541c06726fc17fcf3a1626234a6fd10259f1a2a1fda4b56ccaf6bc02c3dfea7f5142cd568abf073c6382fd6878c0a6185c1f27e71eaee5df
|
|
7
|
+
data.tar.gz: 9258b2d20da4c2a5bd4c509bd5f55505921a96fc1db97a421f2679f5ae2316fd33729d3f6fcf1130f0964aec1e5a8334c07db38afd2a8443ce7cd2037e45b065
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.80.0](https://github.com/openai/openai-ruby/compare/v0.79.0...v0.80.0) (2026-08-17)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add Amazon Bedrock Runtime support ([#424](https://github.com/openai/openai-ruby/issues/424)) ([cf48c01](https://github.com/openai/openai-ruby/commit/cf48c0157183797b5c4c66635ad4bfcb14fe2b3a))
|
|
9
|
+
* **api:** Ultrafast tier, structured MCP and websocket errors, separate websocket events ([#414](https://github.com/openai/openai-ruby/issues/414)) ([c1f3525](https://github.com/openai/openai-ruby/commit/c1f35252bc042445ba419e413b744a2f55c514ce))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* validate RuboCop directives without a Git checkout ([#425](https://github.com/openai/openai-ruby/issues/425)) ([a3cae51](https://github.com/openai/openai-ruby/commit/a3cae518dc18d1cc222558ed86332cc97f1316cc))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Chores
|
|
18
|
+
|
|
19
|
+
* enforce heredoc method call position ([#431](https://github.com/openai/openai-ruby/issues/431)) ([70cebe3](https://github.com/openai/openai-ruby/commit/70cebe3c460a659c5d181b66f92d620d2f6654f5))
|
|
20
|
+
* remove SDK namespace line-length exemption ([#419](https://github.com/openai/openai-ruby/issues/419)) ([a089ee1](https://github.com/openai/openai-ruby/commit/a089ee1788b9399fa0570896dc422ae375b6baf3))
|
|
21
|
+
|
|
3
22
|
## [0.79.0](https://github.com/openai/openai-ruby/compare/v0.78.0...v0.79.0) (2026-08-14)
|
|
4
23
|
|
|
5
24
|
|
data/README.md
CHANGED
data/bedrock.md
CHANGED
|
@@ -19,15 +19,69 @@ puts(response.output_text)
|
|
|
19
19
|
|
|
20
20
|
The provider uses `https://bedrock-mantle.<region>.api.aws/v1` by default and exposes the normal SDK resources. AWS controls which endpoints and features are supported; unsupported calls surface as normal API errors.
|
|
21
21
|
|
|
22
|
+
## Bedrock Runtime
|
|
23
|
+
|
|
24
|
+
Pass `endpoint: :runtime` to use the Bedrock Runtime OpenAI-compatible endpoint. The provider routes requests to `https://bedrock-runtime.<region>.amazonaws.com/openai/v1` and uses the AWS SigV4 signing service `bedrock` when AWS credentials are selected:
|
|
25
|
+
|
|
26
|
+
```ruby
|
|
27
|
+
require "openai"
|
|
28
|
+
|
|
29
|
+
client = OpenAI::Client.new(
|
|
30
|
+
provider: OpenAI::Providers.bedrock(
|
|
31
|
+
endpoint: :runtime,
|
|
32
|
+
region: "us-east-1"
|
|
33
|
+
)
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
completion = client.chat.completions.create(
|
|
37
|
+
model: "us.openai.gpt-5.6-sol",
|
|
38
|
+
messages: [{role: :user, content: "Say hello!"}]
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
puts(completion.choices.first.message.content)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Use the inference profile configured for your AWS account, for example `us.openai.gpt-5.6-sol`, `us.openai.gpt-5.6-terra`, or `us.openai.gpt-5.6-luna`. Global inference profiles, such as `global.openai.gpt-5.6-sol`, require the appropriate AWS account and regional permissions. Set `BEDROCK_MODEL` to override the model used by [`examples/bedrock_runtime.rb`](examples/bedrock_runtime.rb). The example uses Chat Completions by default; set `BEDROCK_RESPONSES=1` to also use Responses or `BEDROCK_STREAM=1` to also stream Chat Completions. Set `BEDROCK_AUTH_MODE=sigv4` to explicitly select AWS authentication when a bearer credential is also present.
|
|
45
|
+
|
|
46
|
+
The same client supports Responses and response streaming when AWS makes those APIs available for the selected model:
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
response = client.responses.create(
|
|
50
|
+
model: "us.openai.gpt-5.6-sol",
|
|
51
|
+
input: "Say hello!"
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
stream = client.chat.completions.stream(
|
|
55
|
+
model: "us.openai.gpt-5.6-sol",
|
|
56
|
+
messages: [{role: :user, content: "Say hello!"}]
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
stream.text.each { |text| print(text) }
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The existing Mantle endpoint remains the default. Pass `endpoint: :mantle` when you need to explicitly select it. Both endpoint symbols and the strings `"runtime"` and `"mantle"` are accepted.
|
|
63
|
+
|
|
64
|
+
| Endpoint | Default URL | SigV4 signing service |
|
|
65
|
+
| --- | --- | --- |
|
|
66
|
+
| `:mantle` (default) | `https://bedrock-mantle.<region>.api.aws/v1` | `bedrock-mantle` |
|
|
67
|
+
| `:runtime` | `https://bedrock-runtime.<region>.amazonaws.com/openai/v1` | `bedrock` |
|
|
68
|
+
|
|
69
|
+
Runtime URLs automatically use the correct DNS suffix for AWS China, European Sovereign Cloud, and isolated partitions. Canonical Runtime, FIPS, and dual-stack `base_url` values automatically select Runtime when `endpoint` is omitted. Canonical AWS endpoint URLs must use HTTPS, match the selected endpoint family, and agree with the configured AWS region.
|
|
70
|
+
|
|
71
|
+
## Endpoint configuration
|
|
72
|
+
|
|
22
73
|
The region is resolved from the explicit `region` option, `AWS_REGION`, `AWS_DEFAULT_REGION`, or the selected AWS profile. Override the endpoint with `base_url` or `AWS_BEDROCK_BASE_URL`:
|
|
23
74
|
|
|
24
75
|
```ruby
|
|
25
76
|
provider = OpenAI::Providers.bedrock(
|
|
77
|
+
endpoint: :runtime,
|
|
26
78
|
region: "us-west-2",
|
|
27
|
-
base_url: "https://bedrock.example.com/v1"
|
|
79
|
+
base_url: "https://bedrock.example.com/openai/v1"
|
|
28
80
|
)
|
|
29
81
|
```
|
|
30
82
|
|
|
83
|
+
Custom endpoints using AWS credentials default to Mantle signing when `endpoint` is omitted; pass `endpoint: :runtime` to use Runtime signing. Local HTTP proxies remain supported when the endpoint is selected explicitly. Custom endpoints using bearer credentials can omit `endpoint`; in that case the default remains Mantle.
|
|
84
|
+
|
|
31
85
|
## Authentication
|
|
32
86
|
|
|
33
87
|
The provider selects authentication in this order:
|
|
@@ -101,7 +155,7 @@ client = OpenAI::Client.new(
|
|
|
101
155
|
)
|
|
102
156
|
```
|
|
103
157
|
|
|
104
|
-
The provider signs each finalized attempt with AWS SigV4 service name `bedrock-mantle
|
|
158
|
+
The provider signs each finalized attempt with AWS SigV4 service name `bedrock-mantle` for Mantle or `bedrock` for Runtime. Standard JSON API requests have replayable bodies and work normally. SigV4 rejects one-shot request streams before sending, and signed requests do not automatically follow redirects because a new target requires a new signature. Response streaming is unaffected.
|
|
105
159
|
|
|
106
160
|
### Bearer authentication
|
|
107
161
|
|
|
@@ -127,6 +181,17 @@ client = OpenAI::Client.new(
|
|
|
127
181
|
|
|
128
182
|
Bearer authentication does not load or require `aws-sdk-core`. Passing `api_key: nil` explicitly skips `AWS_BEARER_TOKEN_BEDROCK` and selects AWS authentication.
|
|
129
183
|
|
|
184
|
+
## Live verification
|
|
185
|
+
|
|
186
|
+
Real AWS requests are disabled in the test suite unless `BEDROCK_LIVE_TEST=1` is explicitly set. To exercise Runtime against all three default US inference profiles, run:
|
|
187
|
+
|
|
188
|
+
```sh
|
|
189
|
+
AWS_REGION=us-east-1 BEDROCK_LIVE_TEST=1 \
|
|
190
|
+
bundle exec ruby test/openai/providers/bedrock_live_test.rb
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
Set `BEDROCK_AUTH_MODE` to `auto`, `bearer`, `token-provider`, `sigv4`, `static`, or `profile` to select credentials. Use `BEDROCK_MODEL` for one inference profile or `BEDROCK_LIVE_MODELS` for a comma-separated list. Set `BEDROCK_LIVE_RESPONSES=1` to also verify Responses and `BEDROCK_LIVE_STREAM=1` to verify Chat Completions streaming.
|
|
194
|
+
|
|
130
195
|
## Security
|
|
131
196
|
|
|
132
197
|
Use Bedrock from a server-side Ruby runtime. Prefer roles, profiles, SSO, and temporary credentials over long-lived static keys. Do not send AWS access keys, session tokens, bearer credentials, or signed authorization headers to browsers or application logs.
|
|
@@ -24,6 +24,8 @@ module OpenAI
|
|
|
24
24
|
O4_MINI_DEEP_RESEARCH_2025_06_26 = :"o4-mini-deep-research-2025-06-26"
|
|
25
25
|
COMPUTER_USE_PREVIEW = :"computer-use-preview"
|
|
26
26
|
COMPUTER_USE_PREVIEW_2025_03_11 = :"computer-use-preview-2025-03-11"
|
|
27
|
+
GPT_5_5_PRO = :"gpt-5.5-pro"
|
|
28
|
+
GPT_5_5_PRO_2026_04_23 = :"gpt-5.5-pro-2026-04-23"
|
|
27
29
|
GPT_5_CODEX = :"gpt-5-codex"
|
|
28
30
|
GPT_5_PRO = :"gpt-5-pro"
|
|
29
31
|
GPT_5_PRO_2025_10_06 = :"gpt-5-pro-2025-10-06"
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module OpenAI
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module BetaMcpToolCallError
|
|
7
|
+
extend OpenAI::Internal::Type::Union
|
|
8
|
+
|
|
9
|
+
discriminator :type
|
|
10
|
+
|
|
11
|
+
variant :mcp_protocol_error, -> { OpenAI::Beta::BetaMcpToolCallError::McpProtocolError }
|
|
12
|
+
|
|
13
|
+
variant :mcp_tool_execution_error, -> { OpenAI::Beta::BetaMcpToolCallError::McpToolExecutionError }
|
|
14
|
+
|
|
15
|
+
variant :http_error, -> { OpenAI::Beta::BetaMcpToolCallError::HTTPError }
|
|
16
|
+
|
|
17
|
+
class McpProtocolError < OpenAI::Internal::Type::BaseModel
|
|
18
|
+
# @!attribute code
|
|
19
|
+
#
|
|
20
|
+
# @return [Integer]
|
|
21
|
+
required :code, Integer
|
|
22
|
+
|
|
23
|
+
# @!attribute message
|
|
24
|
+
#
|
|
25
|
+
# @return [String]
|
|
26
|
+
required :message, String
|
|
27
|
+
|
|
28
|
+
# @!attribute type
|
|
29
|
+
#
|
|
30
|
+
# @return [Symbol, :mcp_protocol_error]
|
|
31
|
+
required :type, const: :mcp_protocol_error
|
|
32
|
+
|
|
33
|
+
# @!method initialize(code:, message:, type: :mcp_protocol_error)
|
|
34
|
+
# @param code [Integer]
|
|
35
|
+
# @param message [String]
|
|
36
|
+
# @param type [Symbol, :mcp_protocol_error]
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
class McpToolExecutionError < OpenAI::Internal::Type::BaseModel
|
|
40
|
+
# @!attribute content
|
|
41
|
+
#
|
|
42
|
+
# @return [Object]
|
|
43
|
+
required :content, OpenAI::Internal::Type::Unknown
|
|
44
|
+
|
|
45
|
+
# @!attribute type
|
|
46
|
+
#
|
|
47
|
+
# @return [Symbol, :mcp_tool_execution_error]
|
|
48
|
+
required :type, const: :mcp_tool_execution_error
|
|
49
|
+
|
|
50
|
+
# @!method initialize(content:, type: :mcp_tool_execution_error)
|
|
51
|
+
# @param content [Object]
|
|
52
|
+
# @param type [Symbol, :mcp_tool_execution_error]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
class HTTPError < OpenAI::Internal::Type::BaseModel
|
|
56
|
+
# @!attribute code
|
|
57
|
+
#
|
|
58
|
+
# @return [Integer]
|
|
59
|
+
required :code, Integer
|
|
60
|
+
|
|
61
|
+
# @!attribute message
|
|
62
|
+
#
|
|
63
|
+
# @return [String]
|
|
64
|
+
required :message, String
|
|
65
|
+
|
|
66
|
+
# @!attribute type
|
|
67
|
+
#
|
|
68
|
+
# @return [Symbol, :http_error]
|
|
69
|
+
required :type, const: :http_error
|
|
70
|
+
|
|
71
|
+
# @!method initialize(code:, message:, type: :http_error)
|
|
72
|
+
# @param code [Integer]
|
|
73
|
+
# @param message [String]
|
|
74
|
+
# @param type [Symbol, :http_error]
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# @!method self.variants
|
|
78
|
+
# @return [Array(OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError)]
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
BetaMcpToolCallError = Beta::BetaMcpToolCallError
|
|
83
|
+
end
|
|
84
|
+
end
|
|
@@ -274,6 +274,10 @@ module OpenAI
|
|
|
274
274
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
275
275
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
276
276
|
# request.
|
|
277
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
278
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
279
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
280
|
+
# `service_tier=ultrafast`.
|
|
277
281
|
# - When not set, the default behavior is 'auto'.
|
|
278
282
|
#
|
|
279
283
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -483,6 +487,8 @@ module OpenAI
|
|
|
483
487
|
|
|
484
488
|
variant const: -> { OpenAI::Models::Beta::BetaResponse::Model::GPT_5_5 }
|
|
485
489
|
|
|
490
|
+
variant const: -> { OpenAI::Models::Beta::BetaResponse::Model::GPT_5_5_2026_04_23 }
|
|
491
|
+
|
|
486
492
|
variant const: -> { OpenAI::Models::Beta::BetaResponse::Model::GPT_5_4 }
|
|
487
493
|
|
|
488
494
|
variant const: -> { OpenAI::Models::Beta::BetaResponse::Model::GPT_5_4_MINI }
|
|
@@ -659,6 +665,10 @@ module OpenAI
|
|
|
659
665
|
|
|
660
666
|
variant const: -> { OpenAI::Models::Beta::BetaResponse::Model::COMPUTER_USE_PREVIEW_2025_03_11 }
|
|
661
667
|
|
|
668
|
+
variant const: -> { OpenAI::Models::Beta::BetaResponse::Model::GPT_5_5_PRO }
|
|
669
|
+
|
|
670
|
+
variant const: -> { OpenAI::Models::Beta::BetaResponse::Model::GPT_5_5_PRO_2026_04_23 }
|
|
671
|
+
|
|
662
672
|
variant const: -> { OpenAI::Models::Beta::BetaResponse::Model::GPT_5_CODEX }
|
|
663
673
|
|
|
664
674
|
variant const: -> { OpenAI::Models::Beta::BetaResponse::Model::GPT_5_PRO }
|
|
@@ -688,6 +698,7 @@ module OpenAI
|
|
|
688
698
|
GPT_5_6_TERRA = :"gpt-5.6-terra"
|
|
689
699
|
GPT_5_6_LUNA = :"gpt-5.6-luna"
|
|
690
700
|
GPT_5_5 = :"gpt-5.5"
|
|
701
|
+
GPT_5_5_2026_04_23 = :"gpt-5.5-2026-04-23"
|
|
691
702
|
GPT_5_4 = :"gpt-5.4"
|
|
692
703
|
GPT_5_4_MINI = :"gpt-5.4-mini"
|
|
693
704
|
GPT_5_4_NANO = :"gpt-5.4-nano"
|
|
@@ -776,6 +787,8 @@ module OpenAI
|
|
|
776
787
|
O4_MINI_DEEP_RESEARCH_2025_06_26 = :"o4-mini-deep-research-2025-06-26"
|
|
777
788
|
COMPUTER_USE_PREVIEW = :"computer-use-preview"
|
|
778
789
|
COMPUTER_USE_PREVIEW_2025_03_11 = :"computer-use-preview-2025-03-11"
|
|
790
|
+
GPT_5_5_PRO = :"gpt-5.5-pro"
|
|
791
|
+
GPT_5_5_PRO_2026_04_23 = :"gpt-5.5-pro-2026-04-23"
|
|
779
792
|
GPT_5_CODEX = :"gpt-5-codex"
|
|
780
793
|
GPT_5_PRO = :"gpt-5-pro"
|
|
781
794
|
GPT_5_PRO_2025_10_06 = :"gpt-5-pro-2025-10-06"
|
|
@@ -1404,6 +1417,10 @@ module OpenAI
|
|
|
1404
1417
|
# Responses or Chat Completions. The response will show `service_tier=priority`
|
|
1405
1418
|
# regardless of if you specify `service_tier=fast` or `priority` in your
|
|
1406
1419
|
# request.
|
|
1420
|
+
# - If set to 'ultrafast', then the request will be processed with the
|
|
1421
|
+
# access-controlled Ultrafast Processing service tier. This tier is currently
|
|
1422
|
+
# available for `gpt-5.6-sol`; a response served through it will show
|
|
1423
|
+
# `service_tier=ultrafast`.
|
|
1407
1424
|
# - When not set, the default behavior is 'auto'.
|
|
1408
1425
|
#
|
|
1409
1426
|
# When the `service_tier` parameter is set, the response body will include the
|
|
@@ -1421,6 +1438,7 @@ module OpenAI
|
|
|
1421
1438
|
SCALE = :scale
|
|
1422
1439
|
PRIORITY = :priority
|
|
1423
1440
|
FAST = :fast
|
|
1441
|
+
ULTRAFAST = :ultrafast
|
|
1424
1442
|
|
|
1425
1443
|
# @!method self.values
|
|
1426
1444
|
# @return [Array<Symbol>]
|
|
@@ -2502,8 +2502,8 @@ module OpenAI
|
|
|
2502
2502
|
# @!attribute error
|
|
2503
2503
|
# The error from the tool call, if any.
|
|
2504
2504
|
#
|
|
2505
|
-
# @return [
|
|
2506
|
-
optional :error,
|
|
2505
|
+
# @return [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil]
|
|
2506
|
+
optional :error, union: -> { OpenAI::Beta::BetaMcpToolCallError }, nil?: true
|
|
2507
2507
|
|
|
2508
2508
|
# @!attribute output
|
|
2509
2509
|
# The output from the tool call.
|
|
@@ -2536,7 +2536,7 @@ module OpenAI
|
|
|
2536
2536
|
#
|
|
2537
2537
|
# @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request.
|
|
2538
2538
|
#
|
|
2539
|
-
# @param error [
|
|
2539
|
+
# @param error [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil] The error from the tool call, if any.
|
|
2540
2540
|
#
|
|
2541
2541
|
# @param output [String, nil] The output from the tool call.
|
|
2542
2542
|
#
|
|
@@ -1354,8 +1354,8 @@ module OpenAI
|
|
|
1354
1354
|
# @!attribute error
|
|
1355
1355
|
# The error from the tool call, if any.
|
|
1356
1356
|
#
|
|
1357
|
-
# @return [
|
|
1358
|
-
optional :error,
|
|
1357
|
+
# @return [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil]
|
|
1358
|
+
optional :error, union: -> { OpenAI::Beta::BetaMcpToolCallError }, nil?: true
|
|
1359
1359
|
|
|
1360
1360
|
# @!attribute output
|
|
1361
1361
|
# The output from the tool call.
|
|
@@ -1388,7 +1388,7 @@ module OpenAI
|
|
|
1388
1388
|
#
|
|
1389
1389
|
# @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request.
|
|
1390
1390
|
#
|
|
1391
|
-
# @param error [
|
|
1391
|
+
# @param error [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil] The error from the tool call, if any.
|
|
1392
1392
|
#
|
|
1393
1393
|
# @param output [String, nil] The output from the tool call.
|
|
1394
1394
|
#
|
|
@@ -1106,8 +1106,8 @@ module OpenAI
|
|
|
1106
1106
|
# @!attribute error
|
|
1107
1107
|
# The error from the tool call, if any.
|
|
1108
1108
|
#
|
|
1109
|
-
# @return [
|
|
1110
|
-
optional :error,
|
|
1109
|
+
# @return [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil]
|
|
1110
|
+
optional :error, union: -> { OpenAI::Beta::BetaMcpToolCallError }, nil?: true
|
|
1111
1111
|
|
|
1112
1112
|
# @!attribute output
|
|
1113
1113
|
# The output from the tool call.
|
|
@@ -1140,7 +1140,7 @@ module OpenAI
|
|
|
1140
1140
|
#
|
|
1141
1141
|
# @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request.
|
|
1142
1142
|
#
|
|
1143
|
-
# @param error [
|
|
1143
|
+
# @param error [OpenAI::Models::Beta::BetaMcpToolCallError::McpProtocolError, OpenAI::Models::Beta::BetaMcpToolCallError::McpToolExecutionError, OpenAI::Models::Beta::BetaMcpToolCallError::HTTPError, nil] The error from the tool call, if any.
|
|
1144
1144
|
#
|
|
1145
1145
|
# @param output [String, nil] The output from the tool call.
|
|
1146
1146
|
#
|
|
@@ -5,7 +5,10 @@ module OpenAI
|
|
|
5
5
|
module Beta
|
|
6
6
|
class BetaResponseOutputItemAddedEvent < OpenAI::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute item
|
|
8
|
-
# The output item that was added.
|
|
8
|
+
# The output item that was added. For reasoning items, `encrypted_content` may be
|
|
9
|
+
# incomplete while the item is in progress. Use the reasoning item from the
|
|
10
|
+
# corresponding `response.output_item.done` event when passing it as input to a
|
|
11
|
+
# subsequent request.
|
|
9
12
|
#
|
|
10
13
|
# @return [OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseOutputItem::Program, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput, OpenAI::Models::Beta::BetaResponseToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseCompactionItem, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall, OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem]
|
|
11
14
|
required :item, union: -> { OpenAI::Beta::BetaResponseOutputItem }
|
|
@@ -40,7 +43,7 @@ module OpenAI
|
|
|
40
43
|
#
|
|
41
44
|
# Emitted when a new output item is added.
|
|
42
45
|
#
|
|
43
|
-
# @param item [OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseOutputItem::Program, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput, OpenAI::Models::Beta::BetaResponseToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseCompactionItem, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall, OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem] The output item that was added.
|
|
46
|
+
# @param item [OpenAI::Models::Beta::BetaResponseOutputMessage, OpenAI::Models::Beta::BetaResponseFileSearchToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCall, OpenAI::Models::Beta::BetaResponseFunctionToolCallOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AgentMessage, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCall, OpenAI::Models::Beta::BetaResponseOutputItem::MultiAgentCallOutput, OpenAI::Models::Beta::BetaResponseFunctionWebSearch, OpenAI::Models::Beta::BetaResponseComputerToolCall, OpenAI::Models::Beta::BetaResponseComputerToolCallOutputItem, OpenAI::Models::Beta::BetaResponseReasoningItem, OpenAI::Models::Beta::BetaResponseOutputItem::Program, OpenAI::Models::Beta::BetaResponseOutputItem::ProgramOutput, OpenAI::Models::Beta::BetaResponseToolSearchCall, OpenAI::Models::Beta::BetaResponseToolSearchOutputItem, OpenAI::Models::Beta::BetaResponseOutputItem::AdditionalTools, OpenAI::Models::Beta::BetaResponseCompactionItem, OpenAI::Models::Beta::BetaResponseOutputItem::ImageGenerationCall, OpenAI::Models::Beta::BetaResponseCodeInterpreterToolCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCall, OpenAI::Models::Beta::BetaResponseOutputItem::LocalShellCallOutput, OpenAI::Models::Beta::BetaResponseFunctionShellToolCall, OpenAI::Models::Beta::BetaResponseFunctionShellToolCallOutput, OpenAI::Models::Beta::BetaResponseApplyPatchToolCall, OpenAI::Models::Beta::BetaResponseApplyPatchToolCallOutput, OpenAI::Models::Beta::BetaResponseOutputItem::McpCall, OpenAI::Models::Beta::BetaResponseOutputItem::McpListTools, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalRequest, OpenAI::Models::Beta::BetaResponseOutputItem::McpApprovalResponse, OpenAI::Models::Beta::BetaResponseCustomToolCall, OpenAI::Models::Beta::BetaResponseCustomToolCallOutputItem] The output item that was added. For reasoning items, `encrypted_content`
|
|
44
47
|
#
|
|
45
48
|
# @param output_index [Integer] The index of the output item that was added.
|
|
46
49
|
#
|
|
@@ -5,10 +5,12 @@ module OpenAI
|
|
|
5
5
|
module Beta
|
|
6
6
|
class BetaResponseOutputTextAnnotationAddedEvent < OpenAI::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute annotation
|
|
8
|
-
#
|
|
8
|
+
# An annotation that applies to a span of output text.
|
|
9
9
|
#
|
|
10
|
-
# @return [
|
|
11
|
-
required :annotation,
|
|
10
|
+
# @return [OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil]
|
|
11
|
+
required :annotation,
|
|
12
|
+
union: -> { OpenAI::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation },
|
|
13
|
+
nil?: true
|
|
12
14
|
|
|
13
15
|
# @!attribute annotation_index
|
|
14
16
|
# The index of the annotation within the content part.
|
|
@@ -55,7 +57,7 @@ module OpenAI
|
|
|
55
57
|
# @!method initialize(annotation:, annotation_index:, content_index:, item_id:, output_index:, sequence_number:, agent: nil, type: :"response.output_text.annotation.added")
|
|
56
58
|
# Emitted when an annotation is added to output text content.
|
|
57
59
|
#
|
|
58
|
-
# @param annotation [
|
|
60
|
+
# @param annotation [OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FilePath, nil] An annotation that applies to a span of output text.
|
|
59
61
|
#
|
|
60
62
|
# @param annotation_index [Integer] The index of the annotation within the content part.
|
|
61
63
|
#
|
|
@@ -71,6 +73,201 @@ module OpenAI
|
|
|
71
73
|
#
|
|
72
74
|
# @param type [Symbol, :"response.output_text.annotation.added"] The type of the event. Always 'response.output_text.annotation.added'.
|
|
73
75
|
|
|
76
|
+
# An annotation that applies to a span of output text.
|
|
77
|
+
#
|
|
78
|
+
# @see OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent#annotation
|
|
79
|
+
module Annotation
|
|
80
|
+
extend OpenAI::Internal::Type::Union
|
|
81
|
+
|
|
82
|
+
discriminator :type
|
|
83
|
+
|
|
84
|
+
# A citation to a file.
|
|
85
|
+
variant :file_citation,
|
|
86
|
+
-> { OpenAI::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation }
|
|
87
|
+
|
|
88
|
+
# A citation for a web resource used to generate a model response.
|
|
89
|
+
variant :url_citation,
|
|
90
|
+
-> { OpenAI::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation }
|
|
91
|
+
|
|
92
|
+
# A citation for a container file used to generate a model response.
|
|
93
|
+
variant :container_file_citation,
|
|
94
|
+
-> { OpenAI::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation }
|
|
95
|
+
|
|
96
|
+
# A path to a file.
|
|
97
|
+
variant :file_path, -> { OpenAI::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FilePath }
|
|
98
|
+
|
|
99
|
+
class FileCitation < OpenAI::Internal::Type::BaseModel
|
|
100
|
+
# @!attribute file_id
|
|
101
|
+
# The ID of the file.
|
|
102
|
+
#
|
|
103
|
+
# @return [String]
|
|
104
|
+
required :file_id, String
|
|
105
|
+
|
|
106
|
+
# @!attribute filename
|
|
107
|
+
# The filename of the file cited.
|
|
108
|
+
#
|
|
109
|
+
# @return [String]
|
|
110
|
+
required :filename, String
|
|
111
|
+
|
|
112
|
+
# @!attribute index
|
|
113
|
+
# The index of the file in the list of files.
|
|
114
|
+
#
|
|
115
|
+
# @return [Integer]
|
|
116
|
+
required :index, Integer
|
|
117
|
+
|
|
118
|
+
# @!attribute type
|
|
119
|
+
# The type of the file citation. Always `file_citation`.
|
|
120
|
+
#
|
|
121
|
+
# @return [Symbol, :file_citation]
|
|
122
|
+
required :type, const: :file_citation
|
|
123
|
+
|
|
124
|
+
# @!method initialize(file_id:, filename:, index:, type: :file_citation)
|
|
125
|
+
# A citation to a file.
|
|
126
|
+
#
|
|
127
|
+
# @param file_id [String] The ID of the file.
|
|
128
|
+
#
|
|
129
|
+
# @param filename [String] The filename of the file cited.
|
|
130
|
+
#
|
|
131
|
+
# @param index [Integer] The index of the file in the list of files.
|
|
132
|
+
#
|
|
133
|
+
# @param type [Symbol, :file_citation] The type of the file citation. Always `file_citation`.
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
class URLCitation < OpenAI::Internal::Type::BaseModel
|
|
137
|
+
# @!attribute end_index
|
|
138
|
+
# The index of the last character of the URL citation in the message.
|
|
139
|
+
#
|
|
140
|
+
# @return [Integer]
|
|
141
|
+
required :end_index, Integer
|
|
142
|
+
|
|
143
|
+
# @!attribute start_index
|
|
144
|
+
# The index of the first character of the URL citation in the message.
|
|
145
|
+
#
|
|
146
|
+
# @return [Integer]
|
|
147
|
+
required :start_index, Integer
|
|
148
|
+
|
|
149
|
+
# @!attribute title
|
|
150
|
+
# The title of the web resource.
|
|
151
|
+
#
|
|
152
|
+
# @return [String]
|
|
153
|
+
required :title, String
|
|
154
|
+
|
|
155
|
+
# @!attribute type
|
|
156
|
+
# The type of the URL citation. Always `url_citation`.
|
|
157
|
+
#
|
|
158
|
+
# @return [Symbol, :url_citation]
|
|
159
|
+
required :type, const: :url_citation
|
|
160
|
+
|
|
161
|
+
# @!attribute url
|
|
162
|
+
# The URL of the web resource.
|
|
163
|
+
#
|
|
164
|
+
# @return [String]
|
|
165
|
+
required :url, String
|
|
166
|
+
|
|
167
|
+
# @!method initialize(end_index:, start_index:, title:, url:, type: :url_citation)
|
|
168
|
+
# A citation for a web resource used to generate a model response.
|
|
169
|
+
#
|
|
170
|
+
# @param end_index [Integer] The index of the last character of the URL citation in the message.
|
|
171
|
+
#
|
|
172
|
+
# @param start_index [Integer] The index of the first character of the URL citation in the message.
|
|
173
|
+
#
|
|
174
|
+
# @param title [String] The title of the web resource.
|
|
175
|
+
#
|
|
176
|
+
# @param url [String] The URL of the web resource.
|
|
177
|
+
#
|
|
178
|
+
# @param type [Symbol, :url_citation] The type of the URL citation. Always `url_citation`.
|
|
179
|
+
end
|
|
180
|
+
|
|
181
|
+
class ContainerFileCitation < OpenAI::Internal::Type::BaseModel
|
|
182
|
+
# @!attribute container_id
|
|
183
|
+
# The ID of the container file.
|
|
184
|
+
#
|
|
185
|
+
# @return [String]
|
|
186
|
+
required :container_id, String
|
|
187
|
+
|
|
188
|
+
# @!attribute end_index
|
|
189
|
+
# The index of the last character of the container file citation in the message.
|
|
190
|
+
#
|
|
191
|
+
# @return [Integer]
|
|
192
|
+
required :end_index, Integer
|
|
193
|
+
|
|
194
|
+
# @!attribute file_id
|
|
195
|
+
# The ID of the file.
|
|
196
|
+
#
|
|
197
|
+
# @return [String]
|
|
198
|
+
required :file_id, String
|
|
199
|
+
|
|
200
|
+
# @!attribute filename
|
|
201
|
+
# The filename of the container file cited.
|
|
202
|
+
#
|
|
203
|
+
# @return [String]
|
|
204
|
+
required :filename, String
|
|
205
|
+
|
|
206
|
+
# @!attribute start_index
|
|
207
|
+
# The index of the first character of the container file citation in the message.
|
|
208
|
+
#
|
|
209
|
+
# @return [Integer]
|
|
210
|
+
required :start_index, Integer
|
|
211
|
+
|
|
212
|
+
# @!attribute type
|
|
213
|
+
# The type of the container file citation. Always `container_file_citation`.
|
|
214
|
+
#
|
|
215
|
+
# @return [Symbol, :container_file_citation]
|
|
216
|
+
required :type, const: :container_file_citation
|
|
217
|
+
|
|
218
|
+
# @!method initialize(container_id:, end_index:, file_id:, filename:, start_index:, type: :container_file_citation)
|
|
219
|
+
# A citation for a container file used to generate a model response.
|
|
220
|
+
#
|
|
221
|
+
# @param container_id [String] The ID of the container file.
|
|
222
|
+
#
|
|
223
|
+
# @param end_index [Integer] The index of the last character of the container file citation in the message.
|
|
224
|
+
#
|
|
225
|
+
# @param file_id [String] The ID of the file.
|
|
226
|
+
#
|
|
227
|
+
# @param filename [String] The filename of the container file cited.
|
|
228
|
+
#
|
|
229
|
+
# @param start_index [Integer] The index of the first character of the container file citation in the message.
|
|
230
|
+
#
|
|
231
|
+
# @param type [Symbol, :container_file_citation] The type of the container file citation. Always `container_file_citation`.
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
class FilePath < OpenAI::Internal::Type::BaseModel
|
|
235
|
+
# @!attribute file_id
|
|
236
|
+
# The ID of the file.
|
|
237
|
+
#
|
|
238
|
+
# @return [String]
|
|
239
|
+
required :file_id, String
|
|
240
|
+
|
|
241
|
+
# @!attribute index
|
|
242
|
+
# The index of the file in the list of files.
|
|
243
|
+
#
|
|
244
|
+
# @return [Integer]
|
|
245
|
+
required :index, Integer
|
|
246
|
+
|
|
247
|
+
# @!attribute type
|
|
248
|
+
# The type of the file path. Always `file_path`.
|
|
249
|
+
#
|
|
250
|
+
# @return [Symbol, :file_path]
|
|
251
|
+
required :type, const: :file_path
|
|
252
|
+
|
|
253
|
+
# @!method initialize(file_id:, index:, type: :file_path)
|
|
254
|
+
# Some parameter documentations has been truncated, see
|
|
255
|
+
# {OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FilePath}
|
|
256
|
+
# for more details.
|
|
257
|
+
#
|
|
258
|
+
# A path to a file.
|
|
259
|
+
#
|
|
260
|
+
# @param file_id [String] The ID of the file.
|
|
261
|
+
#
|
|
262
|
+
# @param index [Integer] The index of the file in the list of files.
|
|
263
|
+
#
|
|
264
|
+
# @param type [Symbol, :file_path] The type of the file path. Always `file_path`.
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
# @!method self.variants
|
|
268
|
+
# @return [Array(OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::URLCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::ContainerFileCitation, OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent::Annotation::FilePath)]
|
|
269
|
+
end
|
|
270
|
+
|
|
74
271
|
# @see OpenAI::Models::Beta::BetaResponseOutputTextAnnotationAddedEvent#agent
|
|
75
272
|
class Agent < OpenAI::Internal::Type::BaseModel
|
|
76
273
|
# @!attribute agent_name
|
|
@@ -41,6 +41,11 @@ module OpenAI
|
|
|
41
41
|
# reasoning items returned by `POST /v1/responses` and WebSocket `response.create`
|
|
42
42
|
# requests.
|
|
43
43
|
#
|
|
44
|
+
# When streaming, use the completed reasoning item and its `encrypted_content`
|
|
45
|
+
# from the `response.output_item.done` event in subsequent requests. The
|
|
46
|
+
# `encrypted_content` in `response.output_item.added` may be incomplete. This is
|
|
47
|
+
# especially important when `store` is `false` or when using Zero Data Retention.
|
|
48
|
+
#
|
|
44
49
|
# @return [String, nil]
|
|
45
50
|
optional :encrypted_content, String, nil?: true
|
|
46
51
|
|