openai 7.9.0 → 7.12.1
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.
- package/CHANGELOG.md +208 -0
- package/README.md +7 -5
- package/_vendor/partial-json-parser/parser.d.mts.map +1 -1
- package/_vendor/partial-json-parser/parser.d.ts.map +1 -1
- package/_vendor/partial-json-parser/parser.js +4 -3
- package/_vendor/partial-json-parser/parser.js.map +1 -1
- package/_vendor/partial-json-parser/parser.mjs +4 -3
- package/_vendor/partial-json-parser/parser.mjs.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.js +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.js.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.mjs +1 -1
- package/_vendor/zod-to-json-schema/parsers/string.mjs.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.d.mts.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.d.ts.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.js +19 -12
- package/_vendor/zod-to-json-schema/parsers/tuple.js.map +1 -1
- package/_vendor/zod-to-json-schema/parsers/tuple.mjs +19 -12
- package/_vendor/zod-to-json-schema/parsers/tuple.mjs.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.d.mts.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.d.ts.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.js +6 -2
- package/_vendor/zod-to-json-schema/zodToJsonSchema.js.map +1 -1
- package/_vendor/zod-to-json-schema/zodToJsonSchema.mjs +6 -2
- package/_vendor/zod-to-json-schema/zodToJsonSchema.mjs.map +1 -1
- package/auth/subject-token-providers.d.mts.map +1 -1
- package/auth/subject-token-providers.d.ts.map +1 -1
- package/auth/subject-token-providers.js +10 -5
- package/auth/subject-token-providers.js.map +1 -1
- package/auth/subject-token-providers.mjs +10 -5
- package/auth/subject-token-providers.mjs.map +1 -1
- package/auth/workload-identity-auth.d.mts.map +1 -1
- package/auth/workload-identity-auth.d.ts.map +1 -1
- package/auth/workload-identity-auth.js +21 -11
- package/auth/workload-identity-auth.js.map +1 -1
- package/auth/workload-identity-auth.mjs +21 -11
- package/auth/workload-identity-auth.mjs.map +1 -1
- package/azure.d.mts.map +1 -1
- package/azure.d.ts.map +1 -1
- package/azure.js +31 -2
- package/azure.js.map +1 -1
- package/azure.mjs +32 -3
- package/azure.mjs.map +1 -1
- package/beta/realtime/internal-base.d.mts.map +1 -1
- package/beta/realtime/internal-base.d.ts.map +1 -1
- package/beta/realtime/internal-base.js +3 -2
- package/beta/realtime/internal-base.js.map +1 -1
- package/beta/realtime/internal-base.mjs +3 -2
- package/beta/realtime/internal-base.mjs.map +1 -1
- package/beta/realtime/websocket.d.mts +2 -0
- package/beta/realtime/websocket.d.mts.map +1 -1
- package/beta/realtime/websocket.d.ts +2 -0
- package/beta/realtime/websocket.d.ts.map +1 -1
- package/beta/realtime/websocket.js +12 -7
- package/beta/realtime/websocket.js.map +1 -1
- package/beta/realtime/websocket.mjs +12 -7
- package/beta/realtime/websocket.mjs.map +1 -1
- package/beta/realtime/ws.d.mts +2 -0
- package/beta/realtime/ws.d.mts.map +1 -1
- package/beta/realtime/ws.d.ts +2 -0
- package/beta/realtime/ws.d.ts.map +1 -1
- package/beta/realtime/ws.js +7 -5
- package/beta/realtime/ws.js.map +1 -1
- package/beta/realtime/ws.mjs +7 -5
- package/beta/realtime/ws.mjs.map +1 -1
- package/client.d.mts +12 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +12 -1
- package/client.d.ts.map +1 -1
- package/client.js +20 -4
- package/client.js.map +1 -1
- package/client.mjs +20 -4
- package/client.mjs.map +1 -1
- package/core/EventEmitter.d.mts +2 -1
- package/core/EventEmitter.d.mts.map +1 -1
- package/core/EventEmitter.d.ts +2 -1
- package/core/EventEmitter.d.ts.map +1 -1
- package/core/EventEmitter.js +2 -1
- package/core/EventEmitter.js.map +1 -1
- package/core/EventEmitter.mjs +2 -1
- package/core/EventEmitter.mjs.map +1 -1
- package/core/pagination.js +1 -1
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +1 -1
- package/core/pagination.mjs.map +1 -1
- package/core/streaming.d.mts +8 -0
- package/core/streaming.d.mts.map +1 -1
- package/core/streaming.d.ts +8 -0
- package/core/streaming.d.ts.map +1 -1
- package/core/streaming.js +68 -15
- package/core/streaming.js.map +1 -1
- package/core/streaming.mjs +68 -15
- package/core/streaming.mjs.map +1 -1
- package/helpers/audio.d.mts +1 -1
- package/helpers/audio.d.mts.map +1 -1
- package/helpers/audio.d.ts +1 -1
- package/helpers/audio.d.ts.map +1 -1
- package/helpers/audio.js +25 -5
- package/helpers/audio.js.map +1 -1
- package/helpers/audio.mjs +25 -5
- package/helpers/audio.mjs.map +1 -1
- package/helpers/zod.d.mts +28 -15
- package/helpers/zod.d.mts.map +1 -1
- package/helpers/zod.d.ts +28 -15
- package/helpers/zod.d.ts.map +1 -1
- package/helpers/zod.js +30 -23
- package/helpers/zod.js.map +1 -1
- package/helpers/zod.mjs +30 -23
- package/helpers/zod.mjs.map +1 -1
- package/index.js +4 -5
- package/internal/bedrock.d.mts +11 -0
- package/internal/bedrock.d.mts.map +1 -1
- package/internal/bedrock.d.ts +11 -0
- package/internal/bedrock.d.ts.map +1 -1
- package/internal/bedrock.js +71 -55
- package/internal/bedrock.js.map +1 -1
- package/internal/bedrock.mjs +70 -55
- package/internal/bedrock.mjs.map +1 -1
- package/internal/detect-platform.js +2 -2
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +2 -2
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/errors.d.mts.map +1 -1
- package/internal/errors.d.ts.map +1 -1
- package/internal/errors.js +3 -2
- package/internal/errors.js.map +1 -1
- package/internal/errors.mjs +3 -2
- package/internal/errors.mjs.map +1 -1
- package/internal/headers.d.mts.map +1 -1
- package/internal/headers.d.ts.map +1 -1
- package/internal/headers.js +4 -5
- package/internal/headers.js.map +1 -1
- package/internal/headers.mjs +4 -5
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.js +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/realtime-credentials.d.mts +15 -0
- package/internal/realtime-credentials.d.mts.map +1 -0
- package/internal/realtime-credentials.d.ts +15 -0
- package/internal/realtime-credentials.d.ts.map +1 -0
- package/internal/realtime-credentials.js +23 -0
- package/internal/realtime-credentials.js.map +1 -0
- package/internal/realtime-credentials.mjs +19 -0
- package/internal/realtime-credentials.mjs.map +1 -0
- package/internal/responses/response-accumulator.d.mts.map +1 -1
- package/internal/responses/response-accumulator.d.ts.map +1 -1
- package/internal/responses/response-accumulator.js +2 -1
- package/internal/responses/response-accumulator.js.map +1 -1
- package/internal/responses/response-accumulator.mjs +2 -1
- package/internal/responses/response-accumulator.mjs.map +1 -1
- package/internal/to-file.d.mts +2 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts +2 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.js +5 -4
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +6 -5
- package/internal/to-file.mjs.map +1 -1
- package/internal/types.d.mts +3 -3
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +3 -3
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts +2 -0
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +2 -0
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js +12 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs +11 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.d.mts.map +1 -1
- package/internal/utils/base64.d.ts.map +1 -1
- package/internal/utils/base64.js +3 -0
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -0
- package/internal/utils/base64.mjs.map +1 -1
- package/lib/AbstractChatCompletionRunner.d.mts +1 -1
- package/lib/AbstractChatCompletionRunner.d.mts.map +1 -1
- package/lib/AbstractChatCompletionRunner.d.ts +1 -1
- package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
- package/lib/AbstractChatCompletionRunner.js +31 -9
- package/lib/AbstractChatCompletionRunner.js.map +1 -1
- package/lib/AbstractChatCompletionRunner.mjs +31 -9
- package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
- package/lib/AssistantStream.d.mts +4 -1
- package/lib/AssistantStream.d.mts.map +1 -1
- package/lib/AssistantStream.d.ts +4 -1
- package/lib/AssistantStream.d.ts.map +1 -1
- package/lib/AssistantStream.js +23 -8
- package/lib/AssistantStream.js.map +1 -1
- package/lib/AssistantStream.mjs +24 -9
- package/lib/AssistantStream.mjs.map +1 -1
- package/lib/ChatCompletionRunner.d.mts +6 -3
- package/lib/ChatCompletionRunner.d.mts.map +1 -1
- package/lib/ChatCompletionRunner.d.ts +6 -3
- package/lib/ChatCompletionRunner.d.ts.map +1 -1
- package/lib/ChatCompletionRunner.js +7 -4
- package/lib/ChatCompletionRunner.js.map +1 -1
- package/lib/ChatCompletionRunner.mjs +7 -4
- package/lib/ChatCompletionRunner.mjs.map +1 -1
- package/lib/ChatCompletionStream.d.mts.map +1 -1
- package/lib/ChatCompletionStream.d.ts.map +1 -1
- package/lib/ChatCompletionStream.js +6 -0
- package/lib/ChatCompletionStream.js.map +1 -1
- package/lib/ChatCompletionStream.mjs +7 -1
- package/lib/ChatCompletionStream.mjs.map +1 -1
- package/lib/ChatCompletionStreamingRunner.d.mts.map +1 -1
- package/lib/ChatCompletionStreamingRunner.d.ts.map +1 -1
- package/lib/ChatCompletionStreamingRunner.js +1 -0
- package/lib/ChatCompletionStreamingRunner.js.map +1 -1
- package/lib/ChatCompletionStreamingRunner.mjs +1 -0
- package/lib/ChatCompletionStreamingRunner.mjs.map +1 -1
- package/lib/EventEmitter.d.mts +3 -1
- package/lib/EventEmitter.d.mts.map +1 -1
- package/lib/EventEmitter.d.ts +3 -1
- package/lib/EventEmitter.d.ts.map +1 -1
- package/lib/EventEmitter.js +2 -1
- package/lib/EventEmitter.js.map +1 -1
- package/lib/EventEmitter.mjs +2 -1
- package/lib/EventEmitter.mjs.map +1 -1
- package/lib/EventStream.d.mts +2 -1
- package/lib/EventStream.d.mts.map +1 -1
- package/lib/EventStream.d.ts +2 -1
- package/lib/EventStream.d.ts.map +1 -1
- package/lib/EventStream.js +99 -46
- package/lib/EventStream.js.map +1 -1
- package/lib/EventStream.mjs +99 -46
- package/lib/EventStream.mjs.map +1 -1
- package/lib/ResponsesParser.d.mts +5 -4
- package/lib/ResponsesParser.d.mts.map +1 -1
- package/lib/ResponsesParser.d.ts +5 -4
- package/lib/ResponsesParser.d.ts.map +1 -1
- package/lib/ResponsesParser.js +21 -7
- package/lib/ResponsesParser.js.map +1 -1
- package/lib/ResponsesParser.mjs +21 -7
- package/lib/ResponsesParser.mjs.map +1 -1
- package/lib/RunnableFunction.d.mts +2 -2
- package/lib/RunnableFunction.d.mts.map +1 -1
- package/lib/RunnableFunction.d.ts +2 -2
- package/lib/RunnableFunction.d.ts.map +1 -1
- package/lib/embeddings.d.mts.map +1 -1
- package/lib/embeddings.d.ts.map +1 -1
- package/lib/embeddings.js +18 -12
- package/lib/embeddings.js.map +1 -1
- package/lib/embeddings.mjs +18 -12
- package/lib/embeddings.mjs.map +1 -1
- package/lib/file-processing.d.mts +3 -2
- package/lib/file-processing.d.mts.map +1 -1
- package/lib/file-processing.d.ts +3 -2
- package/lib/file-processing.d.ts.map +1 -1
- package/lib/file-processing.js +5 -4
- package/lib/file-processing.js.map +1 -1
- package/lib/file-processing.mjs +5 -4
- package/lib/file-processing.mjs.map +1 -1
- package/lib/parser.d.mts +16 -4
- package/lib/parser.d.mts.map +1 -1
- package/lib/parser.d.ts +16 -4
- package/lib/parser.d.ts.map +1 -1
- package/lib/parser.js +1 -1
- package/lib/parser.js.map +1 -1
- package/lib/parser.mjs +1 -1
- package/lib/parser.mjs.map +1 -1
- package/lib/polling.d.mts +2 -2
- package/lib/polling.d.mts.map +1 -1
- package/lib/polling.d.ts +2 -2
- package/lib/polling.d.ts.map +1 -1
- package/lib/polling.js +5 -4
- package/lib/polling.js.map +1 -1
- package/lib/polling.mjs +5 -4
- package/lib/polling.mjs.map +1 -1
- package/lib/responses/EventTypes.d.mts +2 -2
- package/lib/responses/EventTypes.d.mts.map +1 -1
- package/lib/responses/EventTypes.d.ts +2 -2
- package/lib/responses/EventTypes.d.ts.map +1 -1
- package/lib/responses/ResponseInputItems.d.mts +3 -2
- package/lib/responses/ResponseInputItems.d.mts.map +1 -1
- package/lib/responses/ResponseInputItems.d.ts +3 -2
- package/lib/responses/ResponseInputItems.d.ts.map +1 -1
- package/lib/responses/ResponseInputItems.js +28 -4
- package/lib/responses/ResponseInputItems.js.map +1 -1
- package/lib/responses/ResponseInputItems.mjs +28 -4
- package/lib/responses/ResponseInputItems.mjs.map +1 -1
- package/lib/transform.d.mts.map +1 -1
- package/lib/transform.d.ts.map +1 -1
- package/lib/transform.js +1 -0
- package/lib/transform.js.map +1 -1
- package/lib/transform.mjs +1 -0
- package/lib/transform.mjs.map +1 -1
- package/lib/vector-store-polling.d.mts +2 -2
- package/lib/vector-store-polling.d.ts +2 -2
- package/lib/vector-store-polling.js +3 -3
- package/lib/vector-store-polling.js.map +1 -1
- package/lib/vector-store-polling.mjs +3 -3
- package/lib/vector-store-polling.mjs.map +1 -1
- package/lib/vector-store-upload.d.mts +2 -1
- package/lib/vector-store-upload.d.mts.map +1 -1
- package/lib/vector-store-upload.d.ts +2 -1
- package/lib/vector-store-upload.d.ts.map +1 -1
- package/lib/vector-store-upload.js +5 -1
- package/lib/vector-store-upload.js.map +1 -1
- package/lib/vector-store-upload.mjs +5 -1
- package/lib/vector-store-upload.mjs.map +1 -1
- package/package.json +1 -1
- package/providers/bedrock/aws.d.mts.map +1 -1
- package/providers/bedrock/aws.d.ts.map +1 -1
- package/providers/bedrock/aws.js +14 -16
- package/providers/bedrock/aws.js.map +1 -1
- package/providers/bedrock/aws.mjs +15 -17
- package/providers/bedrock/aws.mjs.map +1 -1
- package/realtime/internal-base.d.mts.map +1 -1
- package/realtime/internal-base.d.ts.map +1 -1
- package/realtime/internal-base.js +3 -5
- package/realtime/internal-base.js.map +1 -1
- package/realtime/internal-base.mjs +3 -5
- package/realtime/internal-base.mjs.map +1 -1
- package/realtime/websocket.d.mts +2 -0
- package/realtime/websocket.d.mts.map +1 -1
- package/realtime/websocket.d.ts +2 -0
- package/realtime/websocket.d.ts.map +1 -1
- package/realtime/websocket.js +12 -6
- package/realtime/websocket.js.map +1 -1
- package/realtime/websocket.mjs +12 -6
- package/realtime/websocket.mjs.map +1 -1
- package/realtime/ws.d.mts +2 -0
- package/realtime/ws.d.mts.map +1 -1
- package/realtime/ws.d.ts +2 -0
- package/realtime/ws.d.ts.map +1 -1
- package/realtime/ws.js +7 -4
- package/realtime/ws.js.map +1 -1
- package/realtime/ws.mjs +7 -4
- package/realtime/ws.mjs.map +1 -1
- package/resources/admin/organization/projects/service-accounts/api-keys.d.mts +9 -0
- package/resources/admin/organization/projects/service-accounts/api-keys.d.mts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/api-keys.d.ts +9 -0
- package/resources/admin/organization/projects/service-accounts/api-keys.d.ts.map +1 -1
- package/resources/admin/organization/usage.d.mts +1 -1
- package/resources/admin/organization/usage.d.ts +1 -1
- package/resources/batches.d.mts +1 -1
- package/resources/batches.d.ts +1 -1
- package/resources/beta/beta.d.mts +2 -2
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +2 -2
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/index.d.mts +1 -1
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -1
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/responses/index.d.mts +1 -1
- package/resources/beta/responses/index.d.mts.map +1 -1
- package/resources/beta/responses/index.d.ts +1 -1
- package/resources/beta/responses/index.d.ts.map +1 -1
- package/resources/beta/responses/index.js.map +1 -1
- package/resources/beta/responses/index.mjs.map +1 -1
- package/resources/beta/responses/responses.d.mts +772 -50
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +772 -50
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js +1 -1
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs +1 -1
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/chat/completions/completions.d.mts +2 -2
- package/resources/chat/completions/completions.d.ts +2 -2
- package/resources/conversations/items.d.mts +10 -1
- package/resources/conversations/items.d.mts.map +1 -1
- package/resources/conversations/items.d.ts +10 -1
- package/resources/conversations/items.d.ts.map +1 -1
- package/resources/evals/evals.d.mts +4 -4
- package/resources/evals/evals.d.ts +4 -4
- package/resources/evals/runs/runs.d.mts +1 -1
- package/resources/evals/runs/runs.d.ts +1 -1
- package/resources/images.d.mts +73 -58
- package/resources/images.d.mts.map +1 -1
- package/resources/images.d.ts +73 -58
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js.map +1 -1
- package/resources/images.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/responses/responses.d.mts +1279 -581
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +1279 -581
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +1 -1
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +1 -1
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/safety/alerts.d.mts +32 -0
- package/resources/safety/alerts.d.mts.map +1 -0
- package/resources/safety/alerts.d.ts +32 -0
- package/resources/safety/alerts.d.ts.map +1 -0
- package/resources/safety/alerts.js +16 -0
- package/resources/safety/alerts.js.map +1 -0
- package/resources/safety/alerts.mjs +12 -0
- package/resources/safety/alerts.mjs.map +1 -0
- package/resources/safety/index.d.mts +3 -0
- package/resources/safety/index.d.mts.map +1 -0
- package/resources/safety/index.d.ts +3 -0
- package/resources/safety/index.d.ts.map +1 -0
- package/resources/safety/index.js +9 -0
- package/resources/safety/index.js.map +1 -0
- package/resources/safety/index.mjs +4 -0
- package/resources/safety/index.mjs.map +1 -0
- package/resources/safety/safety.d.mts +10 -0
- package/resources/safety/safety.d.mts.map +1 -0
- package/resources/safety/safety.d.ts +10 -0
- package/resources/safety/safety.d.ts.map +1 -0
- package/resources/safety/safety.js +17 -0
- package/resources/safety/safety.js.map +1 -0
- package/resources/safety/safety.mjs +12 -0
- package/resources/safety/safety.mjs.map +1 -0
- package/resources/safety.d.mts +2 -0
- package/resources/safety.d.mts.map +1 -0
- package/resources/safety.d.ts +2 -0
- package/resources/safety.d.ts.map +1 -0
- package/resources/safety.js +6 -0
- package/resources/safety.js.map +1 -0
- package/resources/safety.mjs +3 -0
- package/resources/safety.mjs.map +1 -0
- package/resources/shared.d.mts +29 -1
- package/resources/shared.d.mts.map +1 -1
- package/resources/shared.d.ts +29 -1
- package/resources/shared.d.ts.map +1 -1
- package/resources/videos.d.mts +28 -0
- package/resources/videos.d.mts.map +1 -1
- package/resources/videos.d.ts +28 -0
- package/resources/videos.d.ts.map +1 -1
- package/resources/webhooks/webhooks.d.mts +68 -6
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +68 -6
- package/resources/webhooks/webhooks.d.ts.map +1 -1
- package/src/_vendor/partial-json-parser/parser.ts +4 -3
- package/src/_vendor/zod-to-json-schema/parsers/string.ts +1 -1
- package/src/_vendor/zod-to-json-schema/parsers/tuple.ts +23 -16
- package/src/_vendor/zod-to-json-schema/zodToJsonSchema.ts +11 -6
- package/src/auth/subject-token-providers.ts +12 -7
- package/src/auth/workload-identity-auth.ts +27 -12
- package/src/azure.ts +34 -3
- package/src/beta/realtime/internal-base.ts +3 -2
- package/src/beta/realtime/websocket.ts +17 -7
- package/src/beta/realtime/ws.ts +9 -5
- package/src/client.ts +24 -4
- package/src/core/EventEmitter.ts +5 -8
- package/src/core/pagination.ts +1 -1
- package/src/core/streaming.ts +69 -13
- package/src/helpers/audio.ts +27 -6
- package/src/helpers/zod.ts +78 -29
- package/src/internal/bedrock.ts +84 -58
- package/src/internal/detect-platform.ts +2 -2
- package/src/internal/errors.ts +3 -2
- package/src/internal/headers.ts +7 -5
- package/src/internal/parse.ts +1 -1
- package/src/internal/realtime-credentials.ts +27 -0
- package/src/internal/responses/response-accumulator.ts +1 -0
- package/src/internal/to-file.ts +6 -5
- package/src/internal/uploads.ts +12 -1
- package/src/internal/utils/base64.ts +3 -0
- package/src/lib/AbstractChatCompletionRunner.ts +31 -6
- package/src/lib/AssistantStream.ts +25 -11
- package/src/lib/ChatCompletionRunner.ts +8 -4
- package/src/lib/ChatCompletionStream.ts +8 -0
- package/src/lib/ChatCompletionStreamingRunner.ts +1 -0
- package/src/lib/EventEmitter.ts +17 -8
- package/src/lib/EventStream.ts +105 -52
- package/src/lib/ResponsesParser.ts +33 -12
- package/src/lib/RunnableFunction.ts +2 -2
- package/src/lib/embeddings.ts +18 -12
- package/src/lib/file-processing.ts +5 -4
- package/src/lib/parser.ts +35 -11
- package/src/lib/polling.ts +5 -4
- package/src/lib/responses/EventTypes.ts +3 -69
- package/src/lib/responses/ResponseInputItems.ts +30 -4
- package/src/lib/transform.ts +1 -0
- package/src/lib/vector-store-polling.ts +3 -3
- package/src/lib/vector-store-upload.ts +5 -1
- package/src/providers/bedrock/aws.ts +23 -24
- package/src/realtime/internal-base.ts +3 -5
- package/src/realtime/websocket.ts +14 -6
- package/src/realtime/ws.ts +9 -4
- package/src/resources/admin/organization/projects/service-accounts/api-keys.ts +11 -0
- package/src/resources/admin/organization/usage.ts +1 -1
- package/src/resources/batches.ts +1 -1
- package/src/resources/beta/beta.ts +22 -0
- package/src/resources/beta/index.ts +11 -0
- package/src/resources/beta/responses/index.ts +11 -0
- package/src/resources/beta/responses/responses.ts +944 -39
- package/src/resources/chat/completions/completions.ts +2 -2
- package/src/resources/conversations/items.ts +12 -0
- package/src/resources/evals/evals.ts +4 -4
- package/src/resources/evals/runs/runs.ts +1 -1
- package/src/resources/images.ts +76 -57
- package/src/resources/index.ts +1 -0
- package/src/resources/responses/api.md +11 -0
- package/src/resources/responses/responses.ts +1395 -520
- package/src/resources/safety/alerts.ts +51 -0
- package/src/resources/safety/index.ts +4 -0
- package/src/resources/safety/safety.ts +15 -0
- package/src/resources/safety.ts +3 -0
- package/src/resources/shared.ts +39 -0
- package/src/resources/videos.ts +38 -0
- package/src/resources/webhooks/api.md +2 -0
- package/src/resources/webhooks/webhooks.ts +83 -5
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
|
@@ -104,7 +104,7 @@ export declare class Responses extends APIResource {
|
|
|
104
104
|
* @example
|
|
105
105
|
* ```ts
|
|
106
106
|
* const compactedResponse = await client.responses.compact({
|
|
107
|
-
* model: 'gpt-
|
|
107
|
+
* model: 'gpt-6-astra',
|
|
108
108
|
* });
|
|
109
109
|
* ```
|
|
110
110
|
*/
|
|
@@ -464,6 +464,11 @@ export interface CustomTool {
|
|
|
464
464
|
* The tool invocation context(s).
|
|
465
465
|
*/
|
|
466
466
|
allowed_callers?: Array<'direct' | 'programmatic'> | null;
|
|
467
|
+
/**
|
|
468
|
+
* Whether the tool response can be returned asynchronously versus immediately
|
|
469
|
+
* returned on next response creation.
|
|
470
|
+
*/
|
|
471
|
+
async?: boolean;
|
|
467
472
|
/**
|
|
468
473
|
* Whether this tool should be deferred and discovered via tool search.
|
|
469
474
|
*/
|
|
@@ -615,6 +620,7 @@ export interface FunctionTool {
|
|
|
615
620
|
* The tool invocation context(s).
|
|
616
621
|
*/
|
|
617
622
|
allowed_callers?: Array<'direct' | 'programmatic'> | null;
|
|
623
|
+
async?: boolean;
|
|
618
624
|
/**
|
|
619
625
|
* Whether this function is deferred and loaded via tool search.
|
|
620
626
|
*/
|
|
@@ -738,6 +744,11 @@ export declare namespace NamespaceTool {
|
|
|
738
744
|
* The tool invocation context(s).
|
|
739
745
|
*/
|
|
740
746
|
allowed_callers?: Array<'direct' | 'programmatic'> | null;
|
|
747
|
+
/**
|
|
748
|
+
* Whether the tool response can be returned asynchronously versus immediately
|
|
749
|
+
* returned on next response creation.
|
|
750
|
+
*/
|
|
751
|
+
async?: boolean;
|
|
741
752
|
/**
|
|
742
753
|
* Whether this function should be deferred and discovered via tool search.
|
|
743
754
|
*/
|
|
@@ -795,7 +806,7 @@ export interface Response {
|
|
|
795
806
|
*/
|
|
796
807
|
metadata: Shared.Metadata | null;
|
|
797
808
|
/**
|
|
798
|
-
* Model ID used to generate the response, like `gpt-
|
|
809
|
+
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
799
810
|
* range of models with different capabilities, performance characteristics, and
|
|
800
811
|
* price points. Refer to the
|
|
801
812
|
* [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
@@ -901,6 +912,10 @@ export interface Response {
|
|
|
901
912
|
* [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
|
902
913
|
*/
|
|
903
914
|
prompt?: ResponsePrompt | null;
|
|
915
|
+
/**
|
|
916
|
+
* Prompt cache diagnostics requested for this response.
|
|
917
|
+
*/
|
|
918
|
+
prompt_cache_diagnostics?: Response.CacheMiss | Response.CacheHit | Response.ComparisonResponseNotFound | Response.Unavailable;
|
|
904
919
|
/**
|
|
905
920
|
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
906
921
|
* hit rates. Replaces the `user` field.
|
|
@@ -1022,9 +1037,11 @@ export declare namespace Response {
|
|
|
1022
1037
|
*/
|
|
1023
1038
|
interface IncompleteDetails {
|
|
1024
1039
|
/**
|
|
1025
|
-
* The reason why the response is incomplete.
|
|
1040
|
+
* The reason why the response is incomplete. `steered` means the response stopped
|
|
1041
|
+
* at a safe output boundary after a WebSocket `response.steer` event. The server
|
|
1042
|
+
* can then create a successor response automatically with the queued input.
|
|
1026
1043
|
*/
|
|
1027
|
-
reason?: 'max_output_tokens' | 'max_messages' | 'content_filter';
|
|
1044
|
+
reason?: 'max_output_tokens' | 'max_messages' | 'content_filter' | 'steered';
|
|
1028
1045
|
}
|
|
1029
1046
|
interface SpecificProgrammaticToolCallingParam {
|
|
1030
1047
|
/**
|
|
@@ -1166,6 +1183,31 @@ export declare namespace Response {
|
|
|
1166
1183
|
type: 'error';
|
|
1167
1184
|
}
|
|
1168
1185
|
}
|
|
1186
|
+
interface CacheMiss {
|
|
1187
|
+
/**
|
|
1188
|
+
* The estimated number of input tokens affected after the first detected
|
|
1189
|
+
* divergence.
|
|
1190
|
+
*/
|
|
1191
|
+
cache_missed_tokens: number;
|
|
1192
|
+
/**
|
|
1193
|
+
* The reason prompt cache reuse did not occur.
|
|
1194
|
+
*/
|
|
1195
|
+
reason: 'model_changed' | 'prompt_cache_key_changed' | 'tools_changed' | 'text_format_changed' | 'reasoning_effort_changed' | 'verbosity_changed' | 'context_compacted' | 'input_changed' | 'service_tier_changed';
|
|
1196
|
+
type: 'cache_miss';
|
|
1197
|
+
/**
|
|
1198
|
+
* The raw token count of the reusable prefix in the compared response.
|
|
1199
|
+
*/
|
|
1200
|
+
comparison_reusable_tokens?: number;
|
|
1201
|
+
}
|
|
1202
|
+
interface CacheHit {
|
|
1203
|
+
type: 'cache_hit';
|
|
1204
|
+
}
|
|
1205
|
+
interface ComparisonResponseNotFound {
|
|
1206
|
+
type: 'comparison_response_not_found';
|
|
1207
|
+
}
|
|
1208
|
+
interface Unavailable {
|
|
1209
|
+
type: 'unavailable';
|
|
1210
|
+
}
|
|
1169
1211
|
/**
|
|
1170
1212
|
* The prompt-caching options that were applied to the response. Supported for
|
|
1171
1213
|
* `gpt-5.6` and later models.
|
|
@@ -1179,6 +1221,10 @@ export declare namespace Response {
|
|
|
1179
1221
|
* The minimum lifetime applied to each cache breakpoint.
|
|
1180
1222
|
*/
|
|
1181
1223
|
ttl: '30m';
|
|
1224
|
+
/**
|
|
1225
|
+
* The response ID supplied as the prompt cache diagnostics comparison.
|
|
1226
|
+
*/
|
|
1227
|
+
comparison_response_id?: string | null;
|
|
1182
1228
|
}
|
|
1183
1229
|
}
|
|
1184
1230
|
/**
|
|
@@ -1929,6 +1975,67 @@ export interface ResponseComputerToolCallOutputScreenshot {
|
|
|
1929
1975
|
*/
|
|
1930
1976
|
image_url?: string;
|
|
1931
1977
|
}
|
|
1978
|
+
/**
|
|
1979
|
+
* A configuration update that applies to subsequent responses until it is replaced
|
|
1980
|
+
* by another configuration update.
|
|
1981
|
+
*/
|
|
1982
|
+
export interface ResponseConfigurationUpdateItem {
|
|
1983
|
+
/**
|
|
1984
|
+
* The unique ID of the configuration update item.
|
|
1985
|
+
*/
|
|
1986
|
+
id: string;
|
|
1987
|
+
/**
|
|
1988
|
+
* The item type. Always `configuration_update`.
|
|
1989
|
+
*/
|
|
1990
|
+
type: 'configuration_update';
|
|
1991
|
+
/**
|
|
1992
|
+
* The reasoning configuration applied by this update.
|
|
1993
|
+
*/
|
|
1994
|
+
reasoning?: ResponseConfigurationUpdateItem.Reasoning;
|
|
1995
|
+
}
|
|
1996
|
+
export declare namespace ResponseConfigurationUpdateItem {
|
|
1997
|
+
/**
|
|
1998
|
+
* The reasoning configuration applied by this update.
|
|
1999
|
+
*/
|
|
2000
|
+
interface Reasoning {
|
|
2001
|
+
/**
|
|
2002
|
+
* The reasoning effort used for subsequent responses until another configuration
|
|
2003
|
+
* update replaces it.
|
|
2004
|
+
*/
|
|
2005
|
+
effort?: Shared.ReasoningEffort | null;
|
|
2006
|
+
}
|
|
2007
|
+
}
|
|
2008
|
+
/**
|
|
2009
|
+
* An update to the conversation's response configuration. The configuration
|
|
2010
|
+
* remains in effect for subsequent responses until it is replaced by another
|
|
2011
|
+
* configuration update.
|
|
2012
|
+
*/
|
|
2013
|
+
export interface ResponseConfigurationUpdateItemParam {
|
|
2014
|
+
/**
|
|
2015
|
+
* The item type. Always `configuration_update`.
|
|
2016
|
+
*/
|
|
2017
|
+
type: 'configuration_update';
|
|
2018
|
+
/**
|
|
2019
|
+
* The unique ID of the configuration update item.
|
|
2020
|
+
*/
|
|
2021
|
+
id?: string | null;
|
|
2022
|
+
/**
|
|
2023
|
+
* Updates to reasoning configuration. Only effort is supported.
|
|
2024
|
+
*/
|
|
2025
|
+
reasoning?: ResponseConfigurationUpdateItemParam.Reasoning;
|
|
2026
|
+
}
|
|
2027
|
+
export declare namespace ResponseConfigurationUpdateItemParam {
|
|
2028
|
+
/**
|
|
2029
|
+
* Updates to reasoning configuration. Only effort is supported.
|
|
2030
|
+
*/
|
|
2031
|
+
interface Reasoning {
|
|
2032
|
+
/**
|
|
2033
|
+
* The reasoning effort to use for subsequent responses until another configuration
|
|
2034
|
+
* update replaces it.
|
|
2035
|
+
*/
|
|
2036
|
+
effort?: Shared.ReasoningEffort | null;
|
|
2037
|
+
}
|
|
2038
|
+
}
|
|
1932
2039
|
/**
|
|
1933
2040
|
* Represents a container created with /v1/containers.
|
|
1934
2041
|
*/
|
|
@@ -2096,6 +2203,10 @@ export interface ResponseCustomToolCall {
|
|
|
2096
2203
|
* The unique ID of the custom tool call in the OpenAI platform.
|
|
2097
2204
|
*/
|
|
2098
2205
|
id?: string;
|
|
2206
|
+
/**
|
|
2207
|
+
* Whether the custom tool call runs asynchronously.
|
|
2208
|
+
*/
|
|
2209
|
+
async?: boolean;
|
|
2099
2210
|
/**
|
|
2100
2211
|
* The execution context that produced this tool call.
|
|
2101
2212
|
*/
|
|
@@ -2254,11 +2365,39 @@ export interface ResponseError {
|
|
|
2254
2365
|
/**
|
|
2255
2366
|
* The error code for the response.
|
|
2256
2367
|
*/
|
|
2257
|
-
code: 'server_error' | 'rate_limit_exceeded' | 'invalid_prompt' | 'data_residency_mismatch' | 'bio_policy' | 'vector_store_timeout' | 'invalid_image' | 'invalid_image_format' | 'invalid_base64_image' | 'invalid_image_url' | 'image_too_large' | 'image_too_small' | 'image_parse_error' | 'image_content_policy_violation' | 'invalid_image_mode' | 'image_file_too_large' | 'unsupported_image_media_type' | 'empty_image_file' | 'failed_to_download_image' | 'image_file_not_found';
|
|
2368
|
+
code: 'server_error' | 'rate_limit_exceeded' | 'invalid_prompt' | 'data_residency_mismatch' | 'bio_policy' | 'misalignment_policy_violation' | 'vector_store_timeout' | 'invalid_image' | 'invalid_image_format' | 'invalid_base64_image' | 'invalid_image_url' | 'image_too_large' | 'image_too_small' | 'image_parse_error' | 'image_content_policy_violation' | 'invalid_image_mode' | 'image_file_too_large' | 'unsupported_image_media_type' | 'empty_image_file' | 'failed_to_download_image' | 'image_file_not_found';
|
|
2258
2369
|
/**
|
|
2259
2370
|
* A human-readable description of the error.
|
|
2260
2371
|
*/
|
|
2261
2372
|
message: string;
|
|
2373
|
+
misalignment?: ResponseError.Misalignment;
|
|
2374
|
+
}
|
|
2375
|
+
export declare namespace ResponseError {
|
|
2376
|
+
interface Misalignment {
|
|
2377
|
+
/**
|
|
2378
|
+
* The public explanation for this block.
|
|
2379
|
+
*/
|
|
2380
|
+
detailed_explanation?: string;
|
|
2381
|
+
/**
|
|
2382
|
+
* An optional classification; clients must accept additional values.
|
|
2383
|
+
*/
|
|
2384
|
+
error_type?: (string & {}) | 'potentially_unintended_data_transfer' | 'potentially_unintended_data_access' | 'potentially_unintended_destructive_activity' | 'other';
|
|
2385
|
+
/**
|
|
2386
|
+
* An optional public continuation instruction.
|
|
2387
|
+
*/
|
|
2388
|
+
steer?: Misalignment.Steer;
|
|
2389
|
+
}
|
|
2390
|
+
namespace Misalignment {
|
|
2391
|
+
/**
|
|
2392
|
+
* An optional public continuation instruction.
|
|
2393
|
+
*/
|
|
2394
|
+
interface Steer {
|
|
2395
|
+
/**
|
|
2396
|
+
* The public continuation instruction.
|
|
2397
|
+
*/
|
|
2398
|
+
message: string;
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2262
2401
|
}
|
|
2263
2402
|
/**
|
|
2264
2403
|
* Emitted when an error occurs.
|
|
@@ -2512,10 +2651,6 @@ export interface ResponseFunctionCallArgumentsDoneEvent {
|
|
|
2512
2651
|
* The ID of the item.
|
|
2513
2652
|
*/
|
|
2514
2653
|
item_id: string;
|
|
2515
|
-
/**
|
|
2516
|
-
* The name of the function that was called.
|
|
2517
|
-
*/
|
|
2518
|
-
name: string;
|
|
2519
2654
|
/**
|
|
2520
2655
|
* The index of the output item.
|
|
2521
2656
|
*/
|
|
@@ -2764,6 +2899,10 @@ export interface ResponseFunctionToolCall {
|
|
|
2764
2899
|
* The unique ID of the function tool call.
|
|
2765
2900
|
*/
|
|
2766
2901
|
id?: string;
|
|
2902
|
+
/**
|
|
2903
|
+
* Whether the function tool call runs asynchronously.
|
|
2904
|
+
*/
|
|
2905
|
+
async?: boolean;
|
|
2767
2906
|
/**
|
|
2768
2907
|
* The execution context that produced this tool call.
|
|
2769
2908
|
*/
|
|
@@ -2886,7 +3025,7 @@ export interface ResponseFunctionWebSearch {
|
|
|
2886
3025
|
/**
|
|
2887
3026
|
* The status of the web search tool call.
|
|
2888
3027
|
*/
|
|
2889
|
-
status: 'in_progress' | 'searching' | 'completed' | 'failed';
|
|
3028
|
+
status: 'in_progress' | 'searching' | 'completed' | 'failed' | 'incomplete';
|
|
2890
3029
|
/**
|
|
2891
3030
|
* The type of the web search tool call. Always `web_search_call`.
|
|
2892
3031
|
*/
|
|
@@ -3116,6 +3255,10 @@ export interface ResponseInProgressEvent {
|
|
|
3116
3255
|
export type ResponseIncludable = 'file_search_call.results' | 'web_search_call.results' | 'web_search_call.action.sources' | 'message.input_image.image_url' | 'computer_call_output.output.image_url' | 'code_interpreter_call.outputs' | 'reasoning.encrypted_content' | 'message.output_text.logprobs';
|
|
3117
3256
|
/**
|
|
3118
3257
|
* An event that is emitted when a response finishes as incomplete.
|
|
3258
|
+
*
|
|
3259
|
+
* Over WebSocket, steering can finish a response with
|
|
3260
|
+
* `response.incomplete_details.reason` set to `steered`, followed automatically by
|
|
3261
|
+
* a successor `response.created` that commits the queued steering input.
|
|
3119
3262
|
*/
|
|
3120
3263
|
export interface ResponseIncompleteEvent {
|
|
3121
3264
|
/**
|
|
@@ -3359,7 +3502,7 @@ export declare namespace ResponseInputImageContent {
|
|
|
3359
3502
|
* `assistant` role are presumed to have been generated by the model in previous
|
|
3360
3503
|
* interactions.
|
|
3361
3504
|
*/
|
|
3362
|
-
export type ResponseInputItem = EasyInputMessage | ResponseInputItem.Message | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseInputItem.ComputerCallOutput | ResponseFunctionWebSearch | ResponseFunctionToolCall | ResponseInputItem.FunctionCallOutput | ResponseInputItem.ToolSearchCall | ResponseToolSearchOutputItemParam | ResponseInputItem.AdditionalTools | ResponseReasoningItem | ResponseCompactionItemParam | ResponseInputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseInputItem.LocalShellCall | ResponseInputItem.LocalShellCallOutput | ResponseInputItem.ShellCall | ResponseInputItem.ShellCallOutput | ResponseInputItem.ApplyPatchCall | ResponseInputItem.ApplyPatchCallOutput | ResponseInputItem.McpListTools | ResponseInputItem.McpApprovalRequest | ResponseInputItem.McpApprovalResponse | ResponseInputItem.McpCall | ResponseCustomToolCallOutput | ResponseCustomToolCall | ResponseInputItem.CompactionTrigger | ResponseInputItem.ItemReference | ResponseInputItem.Program | ResponseInputItem.ProgramOutput;
|
|
3505
|
+
export type ResponseInputItem = EasyInputMessage | ResponseInputItem.Message | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseInputItem.ComputerCallOutput | ResponseFunctionWebSearch | ResponseFunctionToolCall | ResponseInputItem.FunctionCallOutput | ResponseInputItem.ToolSearchCall | ResponseToolSearchOutputItemParam | ResponseInputItem.AdditionalTools | ResponseConfigurationUpdateItemParam | ResponseReasoningItem | ResponseCompactionItemParam | ResponseInputItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseInputItem.LocalShellCall | ResponseInputItem.LocalShellCallOutput | ResponseInputItem.ShellCall | ResponseInputItem.ShellCallOutput | ResponseInputItem.ApplyPatchCall | ResponseInputItem.ApplyPatchCallOutput | ResponseInputItem.McpListTools | ResponseInputItem.McpApprovalRequest | ResponseInputItem.McpApprovalResponse | ResponseInputItem.McpCall | ResponseCustomToolCallOutput | ResponseCustomToolCall | ResponseInputItem.CompactionTrigger | ResponseInputItem.ItemReference | ResponseInputItem.Program | ResponseInputItem.ProgramOutput;
|
|
3363
3506
|
export declare namespace ResponseInputItem {
|
|
3364
3507
|
/**
|
|
3365
3508
|
* A message input to the model with a role indicating instruction following
|
|
@@ -3557,6 +3700,15 @@ export declare namespace ResponseInputItem {
|
|
|
3557
3700
|
* The type of the image generation call. Always `image_generation_call`.
|
|
3558
3701
|
*/
|
|
3559
3702
|
type: 'image_generation_call';
|
|
3703
|
+
/**
|
|
3704
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
3705
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
3706
|
+
*/
|
|
3707
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
3708
|
+
/**
|
|
3709
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
3710
|
+
*/
|
|
3711
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
3560
3712
|
}
|
|
3561
3713
|
/**
|
|
3562
3714
|
* A tool call to run a command on the local shell.
|
|
@@ -4213,7 +4365,7 @@ export declare namespace ResponseInputTextContent {
|
|
|
4213
4365
|
/**
|
|
4214
4366
|
* Content item used to generate a response.
|
|
4215
4367
|
*/
|
|
4216
|
-
export type ResponseItem = ResponseInputMessageItem | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseFunctionWebSearch | ResponseFunctionToolCallItem | ResponseFunctionToolCallOutputItem | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseItem.AdditionalTools | ResponseReasoningItem | ResponseItem.Program | ResponseItem.ProgramOutput | ResponseCompactionItem | ResponseItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseItem.LocalShellCall | ResponseItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseItem.McpListTools | ResponseItem.McpApprovalRequest | ResponseItem.McpApprovalResponse | ResponseItem.McpCall | ResponseCustomToolCallItem | ResponseCustomToolCallOutputItem;
|
|
4368
|
+
export type ResponseItem = ResponseInputMessageItem | ResponseOutputMessage | ResponseFileSearchToolCall | ResponseComputerToolCall | ResponseComputerToolCallOutputItem | ResponseFunctionWebSearch | ResponseFunctionToolCallItem | ResponseFunctionToolCallOutputItem | ResponseToolSearchCall | ResponseToolSearchOutputItem | ResponseItem.AdditionalTools | ResponseConfigurationUpdateItem | ResponseReasoningItem | ResponseItem.Program | ResponseItem.ProgramOutput | ResponseCompactionItem | ResponseItem.ImageGenerationCall | ResponseCodeInterpreterToolCall | ResponseItem.LocalShellCall | ResponseItem.LocalShellCallOutput | ResponseFunctionShellToolCall | ResponseFunctionShellToolCallOutput | ResponseApplyPatchToolCall | ResponseApplyPatchToolCallOutput | ResponseItem.McpListTools | ResponseItem.McpApprovalRequest | ResponseItem.McpApprovalResponse | ResponseItem.McpCall | ResponseCustomToolCallItem | ResponseCustomToolCallOutputItem;
|
|
4217
4369
|
export declare namespace ResponseItem {
|
|
4218
4370
|
interface AdditionalTools {
|
|
4219
4371
|
/**
|
|
@@ -4297,6 +4449,15 @@ export declare namespace ResponseItem {
|
|
|
4297
4449
|
* The type of the image generation call. Always `image_generation_call`.
|
|
4298
4450
|
*/
|
|
4299
4451
|
type: 'image_generation_call';
|
|
4452
|
+
/**
|
|
4453
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
4454
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
4455
|
+
*/
|
|
4456
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
4457
|
+
/**
|
|
4458
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
4459
|
+
*/
|
|
4460
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
4300
4461
|
}
|
|
4301
4462
|
/**
|
|
4302
4463
|
* A tool call to run a command on the local shell.
|
|
@@ -4812,6 +4973,15 @@ export declare namespace ResponseOutputItem {
|
|
|
4812
4973
|
* The type of the image generation call. Always `image_generation_call`.
|
|
4813
4974
|
*/
|
|
4814
4975
|
type: 'image_generation_call';
|
|
4976
|
+
/**
|
|
4977
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
4978
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
4979
|
+
*/
|
|
4980
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
4981
|
+
/**
|
|
4982
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
4983
|
+
*/
|
|
4984
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
4815
4985
|
}
|
|
4816
4986
|
/**
|
|
4817
4987
|
* A tool call to run a command on the local shell.
|
|
@@ -5964,773 +6134,1253 @@ export declare namespace ResponseShellCallOutputContentDoneEvent {
|
|
|
5964
6134
|
*/
|
|
5965
6135
|
export type ResponseStatus = 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete';
|
|
5966
6136
|
/**
|
|
5967
|
-
*
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
* Configuration options for a text response from the model. Can be plain text or
|
|
5972
|
-
* structured JSON data. Learn more:
|
|
6137
|
+
* Emitted when steering input has been validated and queued. Acceptance means the
|
|
6138
|
+
* server owns the input, not that it has been applied. The successor's
|
|
6139
|
+
* `response.created` event is the commit point. If accepted input cannot be
|
|
6140
|
+
* committed, `response.steer.failed` returns it with the same steering ID.
|
|
5973
6141
|
*
|
|
5974
|
-
* -
|
|
5975
|
-
*
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
* An object specifying the format that the model must output.
|
|
5980
|
-
*
|
|
5981
|
-
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
5982
|
-
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
5983
|
-
* [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
|
|
5984
|
-
*
|
|
5985
|
-
* The default format is `{ "type": "text" }` with no additional options.
|
|
5986
|
-
*
|
|
5987
|
-
* **Not recommended for gpt-4o and newer models:**
|
|
5988
|
-
*
|
|
5989
|
-
* Setting to `{ "type": "json_object" }` enables the older JSON mode, which
|
|
5990
|
-
* ensures the message the model generates is valid JSON. Using `json_schema` is
|
|
5991
|
-
* preferred for models that support it.
|
|
5992
|
-
*/
|
|
5993
|
-
format?: ResponseFormatTextConfig;
|
|
5994
|
-
/**
|
|
5995
|
-
* Constrains the verbosity of the model's response. Lower values will result in
|
|
5996
|
-
* more concise responses, while higher values will result in more verbose
|
|
5997
|
-
* responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
5998
|
-
* default is `medium`.
|
|
5999
|
-
*/
|
|
6000
|
-
verbosity?: 'low' | 'medium' | 'high' | null;
|
|
6001
|
-
}
|
|
6002
|
-
/**
|
|
6003
|
-
* Emitted when there is an additional text delta.
|
|
6142
|
+
* When the response stops for client-owned tool output or approval, the input
|
|
6143
|
+
* remains queued and `response.steer.pending` is emitted after
|
|
6144
|
+
* `response.completed`. Fill the pending event's `required_input` stubs with saved
|
|
6145
|
+
* results and send one matching explicit `response.create` per parent. Do not
|
|
6146
|
+
* resend accepted input while it is still queued.
|
|
6004
6147
|
*/
|
|
6005
|
-
export interface
|
|
6006
|
-
/**
|
|
6007
|
-
* The index of the content part that the text delta was added to.
|
|
6008
|
-
*/
|
|
6009
|
-
content_index: number;
|
|
6010
|
-
/**
|
|
6011
|
-
* The text delta that was added.
|
|
6012
|
-
*/
|
|
6013
|
-
delta: string;
|
|
6014
|
-
/**
|
|
6015
|
-
* The ID of the output item that the text delta was added to.
|
|
6016
|
-
*/
|
|
6017
|
-
item_id: string;
|
|
6148
|
+
export interface ResponseSteerAcceptedEvent {
|
|
6018
6149
|
/**
|
|
6019
|
-
* The
|
|
6150
|
+
* The sequence number for this event.
|
|
6020
6151
|
*/
|
|
6021
|
-
|
|
6152
|
+
sequence_number: number;
|
|
6022
6153
|
/**
|
|
6023
|
-
* The
|
|
6154
|
+
* The accepted steering submission.
|
|
6024
6155
|
*/
|
|
6025
|
-
|
|
6156
|
+
steer: ResponseSteerAcceptedEvent.Steer;
|
|
6026
6157
|
/**
|
|
6027
|
-
* The
|
|
6158
|
+
* The event discriminator. Always `response.steer.accepted`.
|
|
6028
6159
|
*/
|
|
6029
|
-
|
|
6160
|
+
type: 'response.steer.accepted';
|
|
6030
6161
|
/**
|
|
6031
|
-
* The
|
|
6162
|
+
* The WebSocket lane that emitted this event. This field is present when the
|
|
6163
|
+
* target response's `response.create` event supplied a `stream_id`.
|
|
6032
6164
|
*/
|
|
6033
|
-
|
|
6165
|
+
stream_id?: string;
|
|
6034
6166
|
}
|
|
6035
|
-
export declare namespace
|
|
6167
|
+
export declare namespace ResponseSteerAcceptedEvent {
|
|
6036
6168
|
/**
|
|
6037
|
-
*
|
|
6038
|
-
* particular token at a given position in the sequence. Less-negative (higher)
|
|
6039
|
-
* logprob values indicate greater model confidence in that token choice.
|
|
6169
|
+
* The accepted steering submission.
|
|
6040
6170
|
*/
|
|
6041
|
-
interface
|
|
6042
|
-
/**
|
|
6043
|
-
* A possible text token.
|
|
6044
|
-
*/
|
|
6045
|
-
token: string;
|
|
6171
|
+
interface Steer {
|
|
6046
6172
|
/**
|
|
6047
|
-
* The
|
|
6173
|
+
* The ID assigned to the steering submission.
|
|
6048
6174
|
*/
|
|
6049
|
-
|
|
6175
|
+
id: string;
|
|
6050
6176
|
/**
|
|
6051
|
-
* The
|
|
6177
|
+
* The ID of the response being steered.
|
|
6052
6178
|
*/
|
|
6053
|
-
|
|
6054
|
-
}
|
|
6055
|
-
namespace Logprob {
|
|
6056
|
-
interface TopLogprob {
|
|
6057
|
-
/**
|
|
6058
|
-
* A possible text token.
|
|
6059
|
-
*/
|
|
6060
|
-
token?: string;
|
|
6061
|
-
/**
|
|
6062
|
-
* The log probability of this token.
|
|
6063
|
-
*/
|
|
6064
|
-
logprob?: number;
|
|
6065
|
-
}
|
|
6179
|
+
previous_response_id: string;
|
|
6066
6180
|
}
|
|
6067
6181
|
}
|
|
6068
6182
|
/**
|
|
6069
|
-
*
|
|
6183
|
+
* A machine-readable steering error code. Clients should handle unknown values
|
|
6184
|
+
* because additional codes may be introduced. Known values include:
|
|
6185
|
+
*
|
|
6186
|
+
* - `response_not_found`: The target response is not available on this connection.
|
|
6187
|
+
* - `invalid_input`: The event or input failed validation.
|
|
6188
|
+
* - `steering_not_supported`: The model or response execution mode does not
|
|
6189
|
+
* support steering.
|
|
6190
|
+
* - `too_many_pending_steers`: Too much steering input is pending for the
|
|
6191
|
+
* response.
|
|
6192
|
+
* - `response_already_completed`: The response completed and is no longer
|
|
6193
|
+
* accepting steering input.
|
|
6194
|
+
* - `response_not_active`: The response is no longer accepting steering input.
|
|
6195
|
+
* - `successor_creation_failed`: The successor response could not be created.
|
|
6196
|
+
*/
|
|
6197
|
+
export type ResponseSteerErrorCode = 'response_not_found' | 'invalid_input' | 'steering_not_supported' | 'too_many_pending_steers' | 'response_already_completed' | 'response_not_active' | 'successor_creation_failed' | (string & {});
|
|
6198
|
+
/**
|
|
6199
|
+
* Queues user input to steer a response on this WebSocket connection. Input can
|
|
6200
|
+
* contain text, images, and files. Steering is supported only for single-agent
|
|
6201
|
+
* responses on models and execution modes that support steering. Responses bound
|
|
6202
|
+
* to a conversation or using automatic compaction do not support steering.
|
|
6203
|
+
*
|
|
6204
|
+
* A `response.steer.accepted` event acknowledges that the server owns the queued
|
|
6205
|
+
* input, not that it has been applied. The successor's `response.created` event is
|
|
6206
|
+
* the commit point. Input that cannot be committed is returned in
|
|
6207
|
+
* `response.steer.failed`.
|
|
6208
|
+
*
|
|
6209
|
+
* Steering may cause the active response to finish at a safe output boundary with
|
|
6210
|
+
* `response.incomplete` and `incomplete_details.reason` set to `steered`, followed
|
|
6211
|
+
* automatically by a successor `response.created`. Normal completion can also be
|
|
6212
|
+
* followed by an automatic successor. Automatic successors inherit the previous
|
|
6213
|
+
* response's settings and continue from it with the queued input.
|
|
6214
|
+
*
|
|
6215
|
+
* If the response stops for client-owned tool output or approval, accepted
|
|
6216
|
+
* steering input remains queued and `response.steer.pending` is emitted after
|
|
6217
|
+
* `response.completed`. Fill the `required_input` stubs from that event with saved
|
|
6218
|
+
* tool results or approval decisions, and send one explicit `response.create` per
|
|
6219
|
+
* parent with the same `previous_response_id` and WebSocket lane. Do not rerun
|
|
6220
|
+
* tools or resend accepted steering input. The queued input is prepended in
|
|
6221
|
+
* submission order to that request's input, and the explicit request retains its
|
|
6222
|
+
* own settings.
|
|
6223
|
+
*
|
|
6224
|
+
* This event accepts only `type`, `previous_response_id`, and `input`. Do not send
|
|
6225
|
+
* `stream_id`; the target response determines the WebSocket lane.
|
|
6070
6226
|
*/
|
|
6071
|
-
export interface
|
|
6227
|
+
export interface ResponseSteerEvent {
|
|
6072
6228
|
/**
|
|
6073
|
-
*
|
|
6229
|
+
* Input to queue for a continuation of the response. Uses the same string or
|
|
6230
|
+
* input-item shape as `response.create.input`, with a non-empty array when
|
|
6231
|
+
* supplying input items.
|
|
6232
|
+
*
|
|
6233
|
+
* Steering accepts only messages with the `user` role. Each message may contain
|
|
6234
|
+
* only `type`, `role`, and `content`, with `content` as a string or an array of
|
|
6235
|
+
* `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
|
|
6236
|
+
* `message`. Other roles, tool outputs, and item types are not supported for
|
|
6237
|
+
* steering.
|
|
6074
6238
|
*/
|
|
6075
|
-
|
|
6239
|
+
input: ResponseSteerInput;
|
|
6076
6240
|
/**
|
|
6077
|
-
* The ID of the
|
|
6241
|
+
* The ID of the response to steer on this WebSocket connection.
|
|
6078
6242
|
*/
|
|
6079
|
-
|
|
6243
|
+
previous_response_id: string;
|
|
6080
6244
|
/**
|
|
6081
|
-
* The
|
|
6245
|
+
* The event discriminator. Always `response.steer`.
|
|
6082
6246
|
*/
|
|
6083
|
-
|
|
6247
|
+
type: 'response.steer';
|
|
6248
|
+
}
|
|
6249
|
+
/**
|
|
6250
|
+
* Emitted when steering input is rejected or cannot be committed to a successor
|
|
6251
|
+
* response. Returns the original, uncommitted input so the client can carry it
|
|
6252
|
+
* into `response.create` when appropriate. Invalid input must be corrected before
|
|
6253
|
+
* retrying.
|
|
6254
|
+
*
|
|
6255
|
+
* Failures after acceptance include the same steering ID. Failures before an ID is
|
|
6256
|
+
* allocated omit `steer.id`. A lost connection or missing acknowledgement leaves
|
|
6257
|
+
* the outcome unknown; it is not proof that the input was rejected.
|
|
6258
|
+
*/
|
|
6259
|
+
export interface ResponseSteerFailedEvent {
|
|
6084
6260
|
/**
|
|
6085
|
-
*
|
|
6261
|
+
* Information about why the input could not be committed.
|
|
6086
6262
|
*/
|
|
6087
|
-
|
|
6263
|
+
error: ResponseSteerFailedEvent.Error;
|
|
6088
6264
|
/**
|
|
6089
6265
|
* The sequence number for this event.
|
|
6090
6266
|
*/
|
|
6091
6267
|
sequence_number: number;
|
|
6092
6268
|
/**
|
|
6093
|
-
* The
|
|
6269
|
+
* The steering submission that could not be committed.
|
|
6094
6270
|
*/
|
|
6095
|
-
|
|
6271
|
+
steer: ResponseSteerFailedEvent.Steer;
|
|
6096
6272
|
/**
|
|
6097
|
-
* The
|
|
6273
|
+
* The event discriminator. Always `response.steer.failed`.
|
|
6098
6274
|
*/
|
|
6099
|
-
type: 'response.
|
|
6275
|
+
type: 'response.steer.failed';
|
|
6276
|
+
/**
|
|
6277
|
+
* The WebSocket lane that emitted this event, when the target response is
|
|
6278
|
+
* available and its `response.create` event supplied a `stream_id`.
|
|
6279
|
+
*/
|
|
6280
|
+
stream_id?: string;
|
|
6100
6281
|
}
|
|
6101
|
-
export declare namespace
|
|
6282
|
+
export declare namespace ResponseSteerFailedEvent {
|
|
6102
6283
|
/**
|
|
6103
|
-
*
|
|
6104
|
-
* particular token at a given position in the sequence. Less-negative (higher)
|
|
6105
|
-
* logprob values indicate greater model confidence in that token choice.
|
|
6284
|
+
* Information about why the input could not be committed.
|
|
6106
6285
|
*/
|
|
6107
|
-
interface
|
|
6286
|
+
interface Error {
|
|
6108
6287
|
/**
|
|
6109
|
-
* A
|
|
6288
|
+
* A machine-readable steering error code. Clients should handle unknown values
|
|
6289
|
+
* because additional codes may be introduced. Known values include:
|
|
6290
|
+
*
|
|
6291
|
+
* - `response_not_found`: The target response is not available on this connection.
|
|
6292
|
+
* - `invalid_input`: The event or input failed validation.
|
|
6293
|
+
* - `steering_not_supported`: The model or response execution mode does not
|
|
6294
|
+
* support steering.
|
|
6295
|
+
* - `too_many_pending_steers`: Too much steering input is pending for the
|
|
6296
|
+
* response.
|
|
6297
|
+
* - `response_already_completed`: The response completed and is no longer
|
|
6298
|
+
* accepting steering input.
|
|
6299
|
+
* - `response_not_active`: The response is no longer accepting steering input.
|
|
6300
|
+
* - `successor_creation_failed`: The successor response could not be created.
|
|
6110
6301
|
*/
|
|
6111
|
-
|
|
6302
|
+
code: ResponsesAPI.ResponseSteerErrorCode;
|
|
6112
6303
|
/**
|
|
6113
|
-
*
|
|
6304
|
+
* A human-readable description of the error.
|
|
6114
6305
|
*/
|
|
6115
|
-
|
|
6306
|
+
message: string;
|
|
6116
6307
|
/**
|
|
6117
|
-
* The
|
|
6308
|
+
* The error type. Always `invalid_request_error`.
|
|
6118
6309
|
*/
|
|
6119
|
-
|
|
6120
|
-
}
|
|
6121
|
-
namespace Logprob {
|
|
6122
|
-
interface TopLogprob {
|
|
6123
|
-
/**
|
|
6124
|
-
* A possible text token.
|
|
6125
|
-
*/
|
|
6126
|
-
token?: string;
|
|
6127
|
-
/**
|
|
6128
|
-
* The log probability of this token.
|
|
6129
|
-
*/
|
|
6130
|
-
logprob?: number;
|
|
6131
|
-
}
|
|
6310
|
+
type: 'invalid_request_error';
|
|
6132
6311
|
}
|
|
6133
|
-
}
|
|
6134
|
-
export interface ResponseToolSearchCall {
|
|
6135
6312
|
/**
|
|
6136
|
-
* The
|
|
6313
|
+
* The steering submission that could not be committed.
|
|
6137
6314
|
*/
|
|
6138
|
-
|
|
6315
|
+
interface Steer {
|
|
6316
|
+
/**
|
|
6317
|
+
* Input to queue for a continuation of the response. Uses the same string or
|
|
6318
|
+
* input-item shape as `response.create.input`, with a non-empty array when
|
|
6319
|
+
* supplying input items.
|
|
6320
|
+
*
|
|
6321
|
+
* Steering accepts only messages with the `user` role. Each message may contain
|
|
6322
|
+
* only `type`, `role`, and `content`, with `content` as a string or an array of
|
|
6323
|
+
* `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
|
|
6324
|
+
* `message`. Other roles, tool outputs, and item types are not supported for
|
|
6325
|
+
* steering.
|
|
6326
|
+
*/
|
|
6327
|
+
input: ResponsesAPI.ResponseSteerInput;
|
|
6328
|
+
/**
|
|
6329
|
+
* The ID of the response that was targeted for steering.
|
|
6330
|
+
*/
|
|
6331
|
+
previous_response_id: string;
|
|
6332
|
+
/**
|
|
6333
|
+
* The ID assigned to the steering submission, if one was allocated.
|
|
6334
|
+
*/
|
|
6335
|
+
id?: string;
|
|
6336
|
+
}
|
|
6337
|
+
}
|
|
6338
|
+
/**
|
|
6339
|
+
* Input to queue for a continuation of the response. Uses the same string or
|
|
6340
|
+
* input-item shape as `response.create.input`, with a non-empty array when
|
|
6341
|
+
* supplying input items.
|
|
6342
|
+
*
|
|
6343
|
+
* Steering accepts only messages with the `user` role. Each message may contain
|
|
6344
|
+
* only `type`, `role`, and `content`, with `content` as a string or an array of
|
|
6345
|
+
* `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
|
|
6346
|
+
* `message`. Other roles, tool outputs, and item types are not supported for
|
|
6347
|
+
* steering.
|
|
6348
|
+
*/
|
|
6349
|
+
export type ResponseSteerInput = string | Array<ResponseSteerInputItemList.Message | ResponseSteerInputItemList.FunctionCallOutput>;
|
|
6350
|
+
export declare namespace ResponseSteerInputItemList {
|
|
6351
|
+
interface Message {
|
|
6352
|
+
/**
|
|
6353
|
+
* The message content, as an array of content parts.
|
|
6354
|
+
*/
|
|
6355
|
+
content: Array<ResponsesAPI.ResponseSteerInputContent> | string;
|
|
6356
|
+
/**
|
|
6357
|
+
* The message role. Always `user`.
|
|
6358
|
+
*/
|
|
6359
|
+
role: 'user';
|
|
6360
|
+
/**
|
|
6361
|
+
* The item type. Always `message`.
|
|
6362
|
+
*/
|
|
6363
|
+
type: 'message';
|
|
6364
|
+
/**
|
|
6365
|
+
* The unique ID of this message item.
|
|
6366
|
+
*/
|
|
6367
|
+
id?: string | null;
|
|
6368
|
+
/**
|
|
6369
|
+
* The status of the message item.
|
|
6370
|
+
*/
|
|
6371
|
+
status?: string | null;
|
|
6372
|
+
}
|
|
6139
6373
|
/**
|
|
6140
|
-
*
|
|
6374
|
+
* The output of a function tool call.
|
|
6141
6375
|
*/
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6376
|
+
interface FunctionCallOutput {
|
|
6377
|
+
/**
|
|
6378
|
+
* Text, image, or file output of the function tool call.
|
|
6379
|
+
*/
|
|
6380
|
+
output: string | ResponsesAPI.ResponseFunctionCallOutputItemList;
|
|
6381
|
+
/**
|
|
6382
|
+
* The type of the function tool call output. Always `function_call_output`.
|
|
6383
|
+
*/
|
|
6384
|
+
type: 'function_call_output';
|
|
6385
|
+
/**
|
|
6386
|
+
* The unique ID of the function tool call output. Populated when this item is
|
|
6387
|
+
* returned via API.
|
|
6388
|
+
*/
|
|
6389
|
+
id?: string | null;
|
|
6390
|
+
/**
|
|
6391
|
+
* The unique ID of the function tool call generated by the model.
|
|
6392
|
+
*/
|
|
6393
|
+
call_id?: string | null;
|
|
6394
|
+
/**
|
|
6395
|
+
* The execution context that produced this tool call.
|
|
6396
|
+
*/
|
|
6397
|
+
caller?: FunctionCallOutput.Direct | FunctionCallOutput.Program | null;
|
|
6398
|
+
/**
|
|
6399
|
+
* The name of the tool that produced the output.
|
|
6400
|
+
*/
|
|
6401
|
+
name?: string | null;
|
|
6402
|
+
/**
|
|
6403
|
+
* The namespace of the tool that produced the output.
|
|
6404
|
+
*/
|
|
6405
|
+
namespace?: string | null;
|
|
6406
|
+
/**
|
|
6407
|
+
* The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
6408
|
+
* Populated when items are returned via API.
|
|
6409
|
+
*/
|
|
6410
|
+
status?: 'in_progress' | 'completed' | 'incomplete' | null;
|
|
6411
|
+
}
|
|
6412
|
+
namespace FunctionCallOutput {
|
|
6413
|
+
interface Direct {
|
|
6414
|
+
/**
|
|
6415
|
+
* The caller type. Always `direct`.
|
|
6416
|
+
*/
|
|
6417
|
+
type: 'direct';
|
|
6418
|
+
}
|
|
6419
|
+
interface Program {
|
|
6420
|
+
/**
|
|
6421
|
+
* The call ID of the program item that produced this tool call.
|
|
6422
|
+
*/
|
|
6423
|
+
caller_id: string;
|
|
6424
|
+
/**
|
|
6425
|
+
* The caller type. Always `program`.
|
|
6426
|
+
*/
|
|
6427
|
+
type: 'program';
|
|
6428
|
+
}
|
|
6429
|
+
}
|
|
6430
|
+
}
|
|
6431
|
+
/**
|
|
6432
|
+
* A piece of message content, such as text, an image, or a file.
|
|
6433
|
+
*/
|
|
6434
|
+
export type ResponseSteerInputContent = ResponseInputTextContent | ResponseInputImageContent | ResponseInputFileContent;
|
|
6435
|
+
/**
|
|
6436
|
+
* Emitted when accepted steering input remains queued after the target response
|
|
6437
|
+
* completes. The server still owns the input. Do not resend it. The successor's
|
|
6438
|
+
* `response.created` event is the commit point.
|
|
6439
|
+
*
|
|
6440
|
+
* When `reason` is `waiting_for_required_input`, this event follows
|
|
6441
|
+
* `response.completed` while the response waits for the tool results or approval
|
|
6442
|
+
* decisions identified by `required_input`. Copy those stubs, fill their result
|
|
6443
|
+
* fields using the ordinary `response.create` input schemas, and submit one
|
|
6444
|
+
* continuation per parent with the same `previous_response_id` and WebSocket lane.
|
|
6445
|
+
* Use saved results without rerunning tools. The queued steering input is
|
|
6446
|
+
* prepended in submission order to the continuation's input. That explicit request
|
|
6447
|
+
* retains its own settings.
|
|
6448
|
+
*
|
|
6449
|
+
* This notification is emitted at most once per steering submission. Multiple
|
|
6450
|
+
* submissions for the same parent can report the same required inputs; they do not
|
|
6451
|
+
* each require a separate continuation.
|
|
6452
|
+
*/
|
|
6453
|
+
export interface ResponseSteerPendingEvent {
|
|
6151
6454
|
/**
|
|
6152
|
-
*
|
|
6455
|
+
* An extensible enum describing why accepted steering input is still queued.
|
|
6456
|
+
* Clients should handle unknown values because additional reasons may be
|
|
6457
|
+
* introduced. Known values include:
|
|
6458
|
+
*
|
|
6459
|
+
* - `waiting_for_required_input`: The response is waiting for the tool results or
|
|
6460
|
+
* approval decisions identified by `required_input`.
|
|
6153
6461
|
*/
|
|
6154
|
-
|
|
6462
|
+
reason: ResponseSteerPendingReason;
|
|
6155
6463
|
/**
|
|
6156
|
-
*
|
|
6464
|
+
* Input stubs identifying outstanding client-owned tool results or approval
|
|
6465
|
+
* decisions. Each stub contains identifying fields only; the client supplies the
|
|
6466
|
+
* result before including it in `response.create`.
|
|
6157
6467
|
*/
|
|
6158
|
-
|
|
6468
|
+
required_input: Array<ResponseSteerRequiredInput>;
|
|
6159
6469
|
/**
|
|
6160
|
-
* The
|
|
6470
|
+
* The sequence number for this event.
|
|
6161
6471
|
*/
|
|
6162
|
-
|
|
6163
|
-
}
|
|
6164
|
-
export interface ResponseToolSearchOutputItem {
|
|
6472
|
+
sequence_number: number;
|
|
6165
6473
|
/**
|
|
6166
|
-
* The
|
|
6474
|
+
* The steering submission that remains queued.
|
|
6167
6475
|
*/
|
|
6168
|
-
|
|
6476
|
+
steer: ResponseSteerPendingEvent.Steer;
|
|
6169
6477
|
/**
|
|
6170
|
-
* The
|
|
6478
|
+
* The event discriminator. Always `response.steer.pending`.
|
|
6171
6479
|
*/
|
|
6172
|
-
|
|
6480
|
+
type: 'response.steer.pending';
|
|
6173
6481
|
/**
|
|
6174
|
-
*
|
|
6482
|
+
* The WebSocket lane that emitted this event. This field is present when the
|
|
6483
|
+
* target response's `response.create` event supplied a `stream_id`.
|
|
6175
6484
|
*/
|
|
6176
|
-
|
|
6485
|
+
stream_id?: string;
|
|
6486
|
+
}
|
|
6487
|
+
export declare namespace ResponseSteerPendingEvent {
|
|
6177
6488
|
/**
|
|
6178
|
-
* The
|
|
6489
|
+
* The steering submission that remains queued.
|
|
6179
6490
|
*/
|
|
6180
|
-
|
|
6491
|
+
interface Steer {
|
|
6492
|
+
/**
|
|
6493
|
+
* The ID assigned to the steering submission.
|
|
6494
|
+
*/
|
|
6495
|
+
id: string;
|
|
6496
|
+
/**
|
|
6497
|
+
* The ID of the response being steered.
|
|
6498
|
+
*/
|
|
6499
|
+
previous_response_id: string;
|
|
6500
|
+
}
|
|
6501
|
+
}
|
|
6502
|
+
/**
|
|
6503
|
+
* An extensible enum describing why accepted steering input is still queued.
|
|
6504
|
+
* Clients should handle unknown values because additional reasons may be
|
|
6505
|
+
* introduced. Known values include:
|
|
6506
|
+
*
|
|
6507
|
+
* - `waiting_for_required_input`: The response is waiting for the tool results or
|
|
6508
|
+
* approval decisions identified by `required_input`.
|
|
6509
|
+
*/
|
|
6510
|
+
export type ResponseSteerPendingReason = 'waiting_for_required_input' | (string & {});
|
|
6511
|
+
/**
|
|
6512
|
+
* An input stub identifying an outstanding client-owned tool result or approval
|
|
6513
|
+
* decision. Copy the stub and fill the result fields using the corresponding
|
|
6514
|
+
* `response.create` input schema. Use saved results without rerunning the tool.
|
|
6515
|
+
* The server does not supply results, approval decisions, or safety
|
|
6516
|
+
* acknowledgements in these stubs.
|
|
6517
|
+
*/
|
|
6518
|
+
export type ResponseSteerRequiredInput = ResponseSteerRequiredInput.FunctionCallOutput | ResponseSteerRequiredInput.CustomToolCallOutput | ResponseSteerRequiredInput.ComputerCallOutput | ResponseSteerRequiredInput.ShellCallOutput | ResponseSteerRequiredInput.ApplyPatchCallOutput | ResponseSteerRequiredInput.ToolSearchOutput | ResponseSteerRequiredInput.McpApprovalResponse;
|
|
6519
|
+
export declare namespace ResponseSteerRequiredInput {
|
|
6181
6520
|
/**
|
|
6182
|
-
*
|
|
6521
|
+
* Supply `output` using the function tool call output input schema.
|
|
6183
6522
|
*/
|
|
6184
|
-
|
|
6523
|
+
interface FunctionCallOutput {
|
|
6524
|
+
call_id: string;
|
|
6525
|
+
name: string;
|
|
6526
|
+
type: 'function_call_output';
|
|
6527
|
+
}
|
|
6185
6528
|
/**
|
|
6186
|
-
*
|
|
6529
|
+
* Supply `output` using the custom tool call output input schema. The original
|
|
6530
|
+
* custom tool call supplies the tool's name.
|
|
6187
6531
|
*/
|
|
6188
|
-
|
|
6532
|
+
interface CustomToolCallOutput {
|
|
6533
|
+
call_id: string;
|
|
6534
|
+
type: 'custom_tool_call_output';
|
|
6535
|
+
}
|
|
6189
6536
|
/**
|
|
6190
|
-
*
|
|
6537
|
+
* Supply `output` using the computer tool call output input schema, including any
|
|
6538
|
+
* required `acknowledged_safety_checks`.
|
|
6191
6539
|
*/
|
|
6192
|
-
|
|
6193
|
-
|
|
6194
|
-
|
|
6540
|
+
interface ComputerCallOutput {
|
|
6541
|
+
call_id: string;
|
|
6542
|
+
type: 'computer_call_output';
|
|
6543
|
+
}
|
|
6195
6544
|
/**
|
|
6196
|
-
*
|
|
6545
|
+
* Supply `output` using the shell tool call output input schema. Each output entry
|
|
6546
|
+
* includes `stdout`, `stderr`, and `outcome`.
|
|
6197
6547
|
*/
|
|
6198
|
-
|
|
6548
|
+
interface ShellCallOutput {
|
|
6549
|
+
call_id: string;
|
|
6550
|
+
type: 'shell_call_output';
|
|
6551
|
+
}
|
|
6199
6552
|
/**
|
|
6200
|
-
*
|
|
6553
|
+
* Supply `status` and optional `output` using the apply patch tool call output
|
|
6554
|
+
* input schema.
|
|
6201
6555
|
*/
|
|
6202
|
-
|
|
6556
|
+
interface ApplyPatchCallOutput {
|
|
6557
|
+
call_id: string;
|
|
6558
|
+
type: 'apply_patch_call_output';
|
|
6559
|
+
}
|
|
6203
6560
|
/**
|
|
6204
|
-
*
|
|
6561
|
+
* Supply `tools` using the tool search output input schema, retaining
|
|
6562
|
+
* `execution: "client"`.
|
|
6205
6563
|
*/
|
|
6206
|
-
|
|
6564
|
+
interface ToolSearchOutput {
|
|
6565
|
+
call_id: string;
|
|
6566
|
+
execution: 'client';
|
|
6567
|
+
type: 'tool_search_output';
|
|
6568
|
+
}
|
|
6207
6569
|
/**
|
|
6208
|
-
*
|
|
6570
|
+
* Supply `approve` using the MCP approval response input schema. An optional
|
|
6571
|
+
* `reason` can be supplied when denying the request. The original approval request
|
|
6572
|
+
* identifies the tool and server.
|
|
6209
6573
|
*/
|
|
6210
|
-
|
|
6574
|
+
interface McpApprovalResponse {
|
|
6575
|
+
approval_request_id: string;
|
|
6576
|
+
type: 'mcp_approval_response';
|
|
6577
|
+
}
|
|
6578
|
+
}
|
|
6579
|
+
/**
|
|
6580
|
+
* Event emitted while a response is streamed.
|
|
6581
|
+
*/
|
|
6582
|
+
export type ResponseStreamEvent = ResponseAudioDeltaEvent | ResponseAudioDoneEvent | ResponseAudioTranscriptDeltaEvent | ResponseAudioTranscriptDoneEvent | ResponseCodeInterpreterCallCodeDeltaEvent | ResponseCodeInterpreterCallCodeDoneEvent | ResponseCodeInterpreterCallCompletedEvent | ResponseCodeInterpreterCallInProgressEvent | ResponseCodeInterpreterCallInterpretingEvent | ResponseCompletedEvent | ResponseContentPartAddedEvent | ResponseContentPartDoneEvent | ResponseCreatedEvent | ResponseErrorEvent | ResponseFileSearchCallCompletedEvent | ResponseFileSearchCallInProgressEvent | ResponseFileSearchCallSearchingEvent | ResponseFunctionCallArgumentsDeltaEvent | ResponseFunctionCallArgumentsDoneEvent | ResponseShellCallCommandAddedEvent | ResponseShellCallCommandDeltaEvent | ResponseShellCallCommandDoneEvent | ResponseShellCallOutputContentDeltaEvent | ResponseShellCallOutputContentDoneEvent | ResponseInProgressEvent | ResponseFailedEvent | ResponseIncompleteEvent | ResponseOutputItemAddedEvent | ResponseOutputItemDoneEvent | ResponseReasoningSummaryPartAddedEvent | ResponseReasoningSummaryPartDoneEvent | ResponseReasoningSummaryTextDeltaEvent | ResponseReasoningSummaryTextDoneEvent | ResponseReasoningTextDeltaEvent | ResponseReasoningTextDoneEvent | ResponseRefusalDeltaEvent | ResponseRefusalDoneEvent | ResponseTextDeltaEvent | ResponseTextDoneEvent | ResponseWebSearchCallCompletedEvent | ResponseWebSearchCallInProgressEvent | ResponseWebSearchCallSearchingEvent | ResponseImageGenCallCompletedEvent | ResponseImageGenCallGeneratingEvent | ResponseImageGenCallInProgressEvent | ResponseImageGenCallPartialImageEvent | ResponseMcpCallArgumentsDeltaEvent | ResponseMcpCallArgumentsDoneEvent | ResponseMcpCallCompletedEvent | ResponseMcpCallFailedEvent | ResponseMcpCallInProgressEvent | ResponseMcpListToolsCompletedEvent | ResponseMcpListToolsFailedEvent | ResponseMcpListToolsInProgressEvent | ResponseOutputTextAnnotationAddedEvent | ResponseQueuedEvent | ResponseCustomToolCallInputDeltaEvent | ResponseCustomToolCallInputDoneEvent;
|
|
6583
|
+
/**
|
|
6584
|
+
* Configuration options for a text response from the model. Can be plain text or
|
|
6585
|
+
* structured JSON data. Learn more:
|
|
6586
|
+
*
|
|
6587
|
+
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
6588
|
+
* - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
6589
|
+
*/
|
|
6590
|
+
export interface ResponseTextConfig {
|
|
6211
6591
|
/**
|
|
6212
|
-
*
|
|
6592
|
+
* An object specifying the format that the model must output.
|
|
6593
|
+
*
|
|
6594
|
+
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
6595
|
+
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
6596
|
+
* [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
|
|
6597
|
+
*
|
|
6598
|
+
* The default format is `{ "type": "text" }` with no additional options.
|
|
6599
|
+
*
|
|
6600
|
+
* **Not recommended for gpt-4o and newer models:**
|
|
6601
|
+
*
|
|
6602
|
+
* Setting to `{ "type": "json_object" }` enables the older JSON mode, which
|
|
6603
|
+
* ensures the message the model generates is valid JSON. Using `json_schema` is
|
|
6604
|
+
* preferred for models that support it.
|
|
6213
6605
|
*/
|
|
6214
|
-
|
|
6606
|
+
format?: ResponseFormatTextConfig;
|
|
6215
6607
|
/**
|
|
6216
|
-
*
|
|
6608
|
+
* Constrains the verbosity of the model's response. Lower values will result in
|
|
6609
|
+
* more concise responses, while higher values will result in more verbose
|
|
6610
|
+
* responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
6611
|
+
* default is `medium`.
|
|
6217
6612
|
*/
|
|
6218
|
-
|
|
6613
|
+
verbosity?: 'low' | 'medium' | 'high' | null;
|
|
6219
6614
|
}
|
|
6220
6615
|
/**
|
|
6221
|
-
*
|
|
6222
|
-
* breakdown of output tokens, and the total tokens used.
|
|
6616
|
+
* Emitted when there is an additional text delta.
|
|
6223
6617
|
*/
|
|
6224
|
-
export interface
|
|
6618
|
+
export interface ResponseTextDeltaEvent {
|
|
6225
6619
|
/**
|
|
6226
|
-
* The
|
|
6620
|
+
* The index of the content part that the text delta was added to.
|
|
6227
6621
|
*/
|
|
6228
|
-
|
|
6622
|
+
content_index: number;
|
|
6229
6623
|
/**
|
|
6230
|
-
*
|
|
6624
|
+
* The text delta that was added.
|
|
6231
6625
|
*/
|
|
6232
|
-
|
|
6626
|
+
delta: string;
|
|
6233
6627
|
/**
|
|
6234
|
-
* The
|
|
6628
|
+
* The ID of the output item that the text delta was added to.
|
|
6235
6629
|
*/
|
|
6236
|
-
|
|
6630
|
+
item_id: string;
|
|
6237
6631
|
/**
|
|
6238
|
-
*
|
|
6632
|
+
* The log probabilities of the tokens in the delta.
|
|
6239
6633
|
*/
|
|
6240
|
-
|
|
6634
|
+
logprobs: Array<ResponseTextDeltaEvent.Logprob>;
|
|
6241
6635
|
/**
|
|
6242
|
-
* The
|
|
6636
|
+
* The index of the output item that the text delta was added to.
|
|
6243
6637
|
*/
|
|
6244
|
-
|
|
6638
|
+
output_index: number;
|
|
6639
|
+
/**
|
|
6640
|
+
* The sequence number for this event.
|
|
6641
|
+
*/
|
|
6642
|
+
sequence_number: number;
|
|
6643
|
+
/**
|
|
6644
|
+
* The type of the event. Always `response.output_text.delta`.
|
|
6645
|
+
*/
|
|
6646
|
+
type: 'response.output_text.delta';
|
|
6245
6647
|
}
|
|
6246
|
-
export declare namespace
|
|
6648
|
+
export declare namespace ResponseTextDeltaEvent {
|
|
6247
6649
|
/**
|
|
6248
|
-
* A
|
|
6650
|
+
* A logprob is the logarithmic probability that the model assigns to producing a
|
|
6651
|
+
* particular token at a given position in the sequence. Less-negative (higher)
|
|
6652
|
+
* logprob values indicate greater model confidence in that token choice.
|
|
6249
6653
|
*/
|
|
6250
|
-
interface
|
|
6654
|
+
interface Logprob {
|
|
6251
6655
|
/**
|
|
6252
|
-
*
|
|
6656
|
+
* A possible text token.
|
|
6253
6657
|
*/
|
|
6254
|
-
|
|
6658
|
+
token: string;
|
|
6255
6659
|
/**
|
|
6256
|
-
* The
|
|
6257
|
-
* [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
|
|
6660
|
+
* The log probability of this token.
|
|
6258
6661
|
*/
|
|
6259
|
-
|
|
6260
|
-
}
|
|
6261
|
-
/**
|
|
6262
|
-
* A detailed breakdown of the output tokens.
|
|
6263
|
-
*/
|
|
6264
|
-
interface OutputTokensDetails {
|
|
6662
|
+
logprob: number;
|
|
6265
6663
|
/**
|
|
6266
|
-
* The
|
|
6664
|
+
* The log probabilities of up to 20 of the most likely tokens.
|
|
6267
6665
|
*/
|
|
6268
|
-
|
|
6666
|
+
top_logprobs?: Array<Logprob.TopLogprob>;
|
|
6667
|
+
}
|
|
6668
|
+
namespace Logprob {
|
|
6669
|
+
interface TopLogprob {
|
|
6670
|
+
/**
|
|
6671
|
+
* A possible text token.
|
|
6672
|
+
*/
|
|
6673
|
+
token?: string;
|
|
6674
|
+
/**
|
|
6675
|
+
* The log probability of this token.
|
|
6676
|
+
*/
|
|
6677
|
+
logprob?: number;
|
|
6678
|
+
}
|
|
6269
6679
|
}
|
|
6270
6680
|
}
|
|
6271
6681
|
/**
|
|
6272
|
-
* Emitted when
|
|
6682
|
+
* Emitted when text content is finalized.
|
|
6273
6683
|
*/
|
|
6274
|
-
export interface
|
|
6684
|
+
export interface ResponseTextDoneEvent {
|
|
6275
6685
|
/**
|
|
6276
|
-
*
|
|
6686
|
+
* The index of the content part that the text content is finalized.
|
|
6277
6687
|
*/
|
|
6278
|
-
|
|
6279
|
-
/**
|
|
6280
|
-
* The index of the output item that the web search call is associated with.
|
|
6281
|
-
*/
|
|
6282
|
-
output_index: number;
|
|
6283
|
-
/**
|
|
6284
|
-
* The sequence number of the web search call being processed.
|
|
6285
|
-
*/
|
|
6286
|
-
sequence_number: number;
|
|
6688
|
+
content_index: number;
|
|
6287
6689
|
/**
|
|
6288
|
-
* The
|
|
6690
|
+
* The ID of the output item that the text content is finalized.
|
|
6289
6691
|
*/
|
|
6290
|
-
|
|
6291
|
-
}
|
|
6292
|
-
/**
|
|
6293
|
-
* Emitted when a web search call is initiated.
|
|
6294
|
-
*/
|
|
6295
|
-
export interface ResponseWebSearchCallInProgressEvent {
|
|
6692
|
+
item_id: string;
|
|
6296
6693
|
/**
|
|
6297
|
-
*
|
|
6694
|
+
* The log probabilities of the tokens in the delta.
|
|
6298
6695
|
*/
|
|
6299
|
-
|
|
6696
|
+
logprobs: Array<ResponseTextDoneEvent.Logprob>;
|
|
6300
6697
|
/**
|
|
6301
|
-
* The index of the output item that the
|
|
6698
|
+
* The index of the output item that the text content is finalized.
|
|
6302
6699
|
*/
|
|
6303
6700
|
output_index: number;
|
|
6304
6701
|
/**
|
|
6305
|
-
* The sequence number
|
|
6702
|
+
* The sequence number for this event.
|
|
6306
6703
|
*/
|
|
6307
6704
|
sequence_number: number;
|
|
6308
6705
|
/**
|
|
6309
|
-
* The
|
|
6706
|
+
* The text content that is finalized.
|
|
6310
6707
|
*/
|
|
6311
|
-
|
|
6708
|
+
text: string;
|
|
6709
|
+
/**
|
|
6710
|
+
* The type of the event. Always `response.output_text.done`.
|
|
6711
|
+
*/
|
|
6712
|
+
type: 'response.output_text.done';
|
|
6312
6713
|
}
|
|
6313
|
-
|
|
6314
|
-
* Emitted when a web search call is executing.
|
|
6315
|
-
*/
|
|
6316
|
-
export interface ResponseWebSearchCallSearchingEvent {
|
|
6714
|
+
export declare namespace ResponseTextDoneEvent {
|
|
6317
6715
|
/**
|
|
6318
|
-
*
|
|
6716
|
+
* A logprob is the logarithmic probability that the model assigns to producing a
|
|
6717
|
+
* particular token at a given position in the sequence. Less-negative (higher)
|
|
6718
|
+
* logprob values indicate greater model confidence in that token choice.
|
|
6319
6719
|
*/
|
|
6320
|
-
|
|
6720
|
+
interface Logprob {
|
|
6721
|
+
/**
|
|
6722
|
+
* A possible text token.
|
|
6723
|
+
*/
|
|
6724
|
+
token: string;
|
|
6725
|
+
/**
|
|
6726
|
+
* The log probability of this token.
|
|
6727
|
+
*/
|
|
6728
|
+
logprob: number;
|
|
6729
|
+
/**
|
|
6730
|
+
* The log probabilities of up to 20 of the most likely tokens.
|
|
6731
|
+
*/
|
|
6732
|
+
top_logprobs?: Array<Logprob.TopLogprob>;
|
|
6733
|
+
}
|
|
6734
|
+
namespace Logprob {
|
|
6735
|
+
interface TopLogprob {
|
|
6736
|
+
/**
|
|
6737
|
+
* A possible text token.
|
|
6738
|
+
*/
|
|
6739
|
+
token?: string;
|
|
6740
|
+
/**
|
|
6741
|
+
* The log probability of this token.
|
|
6742
|
+
*/
|
|
6743
|
+
logprob?: number;
|
|
6744
|
+
}
|
|
6745
|
+
}
|
|
6746
|
+
}
|
|
6747
|
+
export interface ResponseToolSearchCall {
|
|
6321
6748
|
/**
|
|
6322
|
-
* The
|
|
6749
|
+
* The unique ID of the tool search call item.
|
|
6323
6750
|
*/
|
|
6324
|
-
|
|
6751
|
+
id: string;
|
|
6325
6752
|
/**
|
|
6326
|
-
*
|
|
6753
|
+
* Arguments used for the tool search call.
|
|
6327
6754
|
*/
|
|
6328
|
-
|
|
6755
|
+
arguments: unknown;
|
|
6329
6756
|
/**
|
|
6330
|
-
* The
|
|
6757
|
+
* The unique ID of the tool search call generated by the model.
|
|
6331
6758
|
*/
|
|
6332
|
-
|
|
6333
|
-
}
|
|
6334
|
-
export interface ResponsesClientEvent {
|
|
6759
|
+
call_id: string | null;
|
|
6335
6760
|
/**
|
|
6336
|
-
*
|
|
6761
|
+
* Whether tool search was executed by the server or by the client.
|
|
6337
6762
|
*/
|
|
6338
|
-
|
|
6763
|
+
execution: 'server' | 'client';
|
|
6339
6764
|
/**
|
|
6340
|
-
*
|
|
6341
|
-
* [Learn more](https://platform.openai.com/docs/guides/background).
|
|
6765
|
+
* The status of the tool search call item that was recorded.
|
|
6342
6766
|
*/
|
|
6343
|
-
|
|
6767
|
+
status: 'in_progress' | 'completed' | 'incomplete';
|
|
6344
6768
|
/**
|
|
6345
|
-
*
|
|
6769
|
+
* The type of the item. Always `tool_search_call`.
|
|
6346
6770
|
*/
|
|
6347
|
-
|
|
6771
|
+
type: 'tool_search_call';
|
|
6348
6772
|
/**
|
|
6349
|
-
* The
|
|
6350
|
-
* prepended to `input_items` for this response request. Input items and output
|
|
6351
|
-
* items from this response are automatically added to this conversation after this
|
|
6352
|
-
* response completes.
|
|
6773
|
+
* The identifier of the actor that created the item.
|
|
6353
6774
|
*/
|
|
6354
|
-
|
|
6775
|
+
created_by?: string;
|
|
6776
|
+
}
|
|
6777
|
+
export interface ResponseToolSearchOutputItem {
|
|
6355
6778
|
/**
|
|
6356
|
-
*
|
|
6357
|
-
* supported values are:
|
|
6358
|
-
*
|
|
6359
|
-
* - `web_search_call.action.sources`: Include the sources of the web search tool
|
|
6360
|
-
* call.
|
|
6361
|
-
* - `code_interpreter_call.outputs`: Includes the outputs of python code execution
|
|
6362
|
-
* in code interpreter tool call items.
|
|
6363
|
-
* - `computer_call_output.output.image_url`: Include image urls from the computer
|
|
6364
|
-
* call output.
|
|
6365
|
-
* - `file_search_call.results`: Include the search results of the file search tool
|
|
6366
|
-
* call.
|
|
6367
|
-
* - `message.input_image.image_url`: Include image urls from the input message.
|
|
6368
|
-
* - `message.output_text.logprobs`: Include logprobs with assistant messages.
|
|
6369
|
-
* - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
|
|
6370
|
-
* tokens in reasoning item outputs. This enables reasoning items to be used in
|
|
6371
|
-
* multi-turn conversations when using the Responses API statelessly (like when
|
|
6372
|
-
* the `store` parameter is set to `false`, or when an organization is enrolled
|
|
6373
|
-
* in the zero data retention program).
|
|
6779
|
+
* The unique ID of the tool search output item.
|
|
6374
6780
|
*/
|
|
6375
|
-
|
|
6781
|
+
id: string;
|
|
6376
6782
|
/**
|
|
6377
|
-
*
|
|
6378
|
-
*
|
|
6379
|
-
* Learn more:
|
|
6380
|
-
*
|
|
6381
|
-
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
6382
|
-
* - [Image inputs](https://platform.openai.com/docs/guides/images)
|
|
6383
|
-
* - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
|
|
6384
|
-
* - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
|
|
6385
|
-
* - [Function calling](https://platform.openai.com/docs/guides/function-calling)
|
|
6783
|
+
* The unique ID of the tool search call generated by the model.
|
|
6386
6784
|
*/
|
|
6387
|
-
|
|
6785
|
+
call_id: string | null;
|
|
6388
6786
|
/**
|
|
6389
|
-
*
|
|
6390
|
-
*
|
|
6391
|
-
* When using along with `previous_response_id`, the instructions from a previous
|
|
6392
|
-
* response will not be carried over to the next response. This makes it simple to
|
|
6393
|
-
* swap out system (or developer) messages in new responses.
|
|
6787
|
+
* Whether tool search was executed by the server or by the client.
|
|
6394
6788
|
*/
|
|
6395
|
-
|
|
6789
|
+
execution: 'server' | 'client';
|
|
6396
6790
|
/**
|
|
6397
|
-
*
|
|
6398
|
-
* including visible output tokens and
|
|
6399
|
-
* [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
|
6791
|
+
* The status of the tool search output item that was recorded.
|
|
6400
6792
|
*/
|
|
6401
|
-
|
|
6793
|
+
status: 'in_progress' | 'completed' | 'incomplete';
|
|
6402
6794
|
/**
|
|
6403
|
-
* The
|
|
6404
|
-
* response. This maximum number applies across all built-in tool calls, not per
|
|
6405
|
-
* individual tool. Any further attempts to call a tool by the model will be
|
|
6406
|
-
* ignored.
|
|
6795
|
+
* The loaded tool definitions returned by tool search.
|
|
6407
6796
|
*/
|
|
6408
|
-
|
|
6797
|
+
tools: Array<Tool>;
|
|
6409
6798
|
/**
|
|
6410
|
-
*
|
|
6411
|
-
* for storing additional information about the object in a structured format, and
|
|
6412
|
-
* querying for objects via API or the dashboard.
|
|
6413
|
-
*
|
|
6414
|
-
* Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
6415
|
-
* a maximum length of 512 characters.
|
|
6799
|
+
* The type of the item. Always `tool_search_output`.
|
|
6416
6800
|
*/
|
|
6417
|
-
|
|
6801
|
+
type: 'tool_search_output';
|
|
6418
6802
|
/**
|
|
6419
|
-
*
|
|
6420
|
-
* range of models with different capabilities, performance characteristics, and
|
|
6421
|
-
* price points. Refer to the
|
|
6422
|
-
* [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
6423
|
-
* available models.
|
|
6803
|
+
* The identifier of the actor that created the item.
|
|
6424
6804
|
*/
|
|
6425
|
-
|
|
6805
|
+
created_by?: string;
|
|
6806
|
+
}
|
|
6807
|
+
export interface ResponseToolSearchOutputItemParam {
|
|
6426
6808
|
/**
|
|
6427
|
-
*
|
|
6809
|
+
* The loaded tool definitions returned by the tool search output.
|
|
6428
6810
|
*/
|
|
6429
|
-
|
|
6811
|
+
tools: Array<Tool>;
|
|
6430
6812
|
/**
|
|
6431
|
-
*
|
|
6813
|
+
* The item type. Always `tool_search_output`.
|
|
6432
6814
|
*/
|
|
6433
|
-
|
|
6815
|
+
type: 'tool_search_output';
|
|
6434
6816
|
/**
|
|
6435
|
-
* The unique ID of
|
|
6436
|
-
* multi-turn conversations. Learn more about
|
|
6437
|
-
* [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
6438
|
-
* Cannot be used in conjunction with `conversation`.
|
|
6817
|
+
* The unique ID of this tool search output.
|
|
6439
6818
|
*/
|
|
6440
|
-
|
|
6819
|
+
id?: string | null;
|
|
6441
6820
|
/**
|
|
6442
|
-
*
|
|
6443
|
-
* [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
|
6821
|
+
* The unique ID of the tool search call generated by the model.
|
|
6444
6822
|
*/
|
|
6445
|
-
|
|
6823
|
+
call_id?: string | null;
|
|
6446
6824
|
/**
|
|
6447
|
-
*
|
|
6448
|
-
* hit rates. Replaces the `user` field.
|
|
6449
|
-
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
6825
|
+
* Whether tool search was executed by the server or by the client.
|
|
6450
6826
|
*/
|
|
6451
|
-
|
|
6827
|
+
execution?: 'server' | 'client';
|
|
6452
6828
|
/**
|
|
6453
|
-
*
|
|
6454
|
-
* default, OpenAI automatically chooses one implicit cache breakpoint. You can add
|
|
6455
|
-
* explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
|
|
6456
|
-
* request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
6457
|
-
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
6458
|
-
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
6459
|
-
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
6460
|
-
* [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
|
|
6461
|
-
* for current details.
|
|
6829
|
+
* The status of the tool search output.
|
|
6462
6830
|
*/
|
|
6463
|
-
|
|
6831
|
+
status?: 'in_progress' | 'completed' | 'incomplete' | null;
|
|
6832
|
+
}
|
|
6833
|
+
/**
|
|
6834
|
+
* Represents token usage details including input tokens, output tokens, a
|
|
6835
|
+
* breakdown of output tokens, and the total tokens used.
|
|
6836
|
+
*/
|
|
6837
|
+
export interface ResponseUsage {
|
|
6464
6838
|
/**
|
|
6465
|
-
*
|
|
6466
|
-
*
|
|
6467
|
-
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
6468
|
-
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
6469
|
-
* of 24 hours.
|
|
6470
|
-
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
6471
|
-
* This field expresses a maximum retention policy, while
|
|
6472
|
-
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
6473
|
-
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
6474
|
-
* models, only `24h` is supported.
|
|
6475
|
-
*
|
|
6476
|
-
* For older models that support both `in_memory` and `24h`, the default depends on
|
|
6477
|
-
* your organization's data retention policy:
|
|
6478
|
-
*
|
|
6479
|
-
* - Organizations without ZDR enabled default to `24h`.
|
|
6480
|
-
* - Organizations with ZDR enabled default to `in_memory` when
|
|
6481
|
-
* `prompt_cache_retention` is not specified.
|
|
6839
|
+
* The number of input tokens.
|
|
6482
6840
|
*/
|
|
6483
|
-
|
|
6841
|
+
input_tokens: number;
|
|
6484
6842
|
/**
|
|
6485
|
-
*
|
|
6486
|
-
* [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
6843
|
+
* A detailed breakdown of the input tokens.
|
|
6487
6844
|
*/
|
|
6488
|
-
|
|
6845
|
+
input_tokens_details: ResponseUsage.InputTokensDetails;
|
|
6489
6846
|
/**
|
|
6490
|
-
*
|
|
6491
|
-
* violating OpenAI's usage policies. The IDs should be a string that uniquely
|
|
6492
|
-
* identifies each user, with a maximum length of 64 characters. We recommend
|
|
6493
|
-
* hashing their username or email address, in order to avoid sending us any
|
|
6494
|
-
* identifying information.
|
|
6495
|
-
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
6847
|
+
* The number of output tokens.
|
|
6496
6848
|
*/
|
|
6497
|
-
|
|
6849
|
+
output_tokens: number;
|
|
6498
6850
|
/**
|
|
6499
|
-
*
|
|
6500
|
-
*
|
|
6501
|
-
* - If set to 'auto', then the request will be processed with the service tier
|
|
6502
|
-
* configured in the Project settings. Unless otherwise configured, the Project
|
|
6503
|
-
* will use 'default'.
|
|
6504
|
-
* - If set to 'default', then the request will be processed with the standard
|
|
6505
|
-
* pricing and performance for the selected model.
|
|
6506
|
-
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
6507
|
-
* then the request will be processed with the Flex Processing service tier.
|
|
6508
|
-
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
6509
|
-
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
6510
|
-
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
6511
|
-
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
6512
|
-
* request.
|
|
6513
|
-
* - If set to 'ultrafast', then the request will be processed with the
|
|
6514
|
-
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
6515
|
-
* available for `gpt-5.6-sol`; a response served through it will show
|
|
6516
|
-
* `service_tier=ultrafast`.
|
|
6517
|
-
* - When not set, the default behavior is 'auto'.
|
|
6518
|
-
*
|
|
6519
|
-
* When the `service_tier` parameter is set, the response body will include the
|
|
6520
|
-
* `service_tier` value based on the processing mode actually used to serve the
|
|
6521
|
-
* request. This response value may be different from the value set in the
|
|
6522
|
-
* parameter.
|
|
6851
|
+
* A detailed breakdown of the output tokens.
|
|
6523
6852
|
*/
|
|
6524
|
-
|
|
6853
|
+
output_tokens_details: ResponseUsage.OutputTokensDetails;
|
|
6525
6854
|
/**
|
|
6526
|
-
*
|
|
6855
|
+
* The total number of tokens used.
|
|
6527
6856
|
*/
|
|
6528
|
-
|
|
6857
|
+
total_tokens: number;
|
|
6858
|
+
}
|
|
6859
|
+
export declare namespace ResponseUsage {
|
|
6529
6860
|
/**
|
|
6530
|
-
*
|
|
6531
|
-
* generated using
|
|
6532
|
-
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
6533
|
-
* See the
|
|
6534
|
-
* [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
|
|
6535
|
-
* for more information.
|
|
6861
|
+
* A detailed breakdown of the input tokens.
|
|
6536
6862
|
*/
|
|
6537
|
-
|
|
6863
|
+
interface InputTokensDetails {
|
|
6864
|
+
/**
|
|
6865
|
+
* The number of input tokens that were written to the cache.
|
|
6866
|
+
*/
|
|
6867
|
+
cache_write_tokens: number;
|
|
6868
|
+
/**
|
|
6869
|
+
* The number of tokens that were retrieved from the cache.
|
|
6870
|
+
* [More on prompt caching](https://platform.openai.com/docs/guides/prompt-caching).
|
|
6871
|
+
*/
|
|
6872
|
+
cached_tokens: number;
|
|
6873
|
+
}
|
|
6538
6874
|
/**
|
|
6539
|
-
*
|
|
6540
|
-
* processed FIFO, and events for the response echo the same `stream_id`.
|
|
6541
|
-
*
|
|
6542
|
-
* `stream_id` controls routing; `previous_response_id` controls conversation
|
|
6543
|
-
* lineage, so a new lane can fork from a response created on another lane.
|
|
6875
|
+
* A detailed breakdown of the output tokens.
|
|
6544
6876
|
*/
|
|
6545
|
-
|
|
6877
|
+
interface OutputTokensDetails {
|
|
6878
|
+
/**
|
|
6879
|
+
* The number of reasoning tokens.
|
|
6880
|
+
*/
|
|
6881
|
+
reasoning_tokens: number;
|
|
6882
|
+
}
|
|
6883
|
+
}
|
|
6884
|
+
/**
|
|
6885
|
+
* Emitted when a web search call is completed.
|
|
6886
|
+
*/
|
|
6887
|
+
export interface ResponseWebSearchCallCompletedEvent {
|
|
6546
6888
|
/**
|
|
6547
|
-
*
|
|
6889
|
+
* Unique ID for the output item associated with the web search call.
|
|
6548
6890
|
*/
|
|
6549
|
-
|
|
6891
|
+
item_id: string;
|
|
6550
6892
|
/**
|
|
6551
|
-
*
|
|
6552
|
-
* make the output more random, while lower values like 0.2 will make it more
|
|
6553
|
-
* focused and deterministic. We generally recommend altering this or `top_p` but
|
|
6554
|
-
* not both.
|
|
6893
|
+
* The index of the output item that the web search call is associated with.
|
|
6555
6894
|
*/
|
|
6556
|
-
|
|
6895
|
+
output_index: number;
|
|
6557
6896
|
/**
|
|
6558
|
-
*
|
|
6559
|
-
* structured JSON data. Learn more:
|
|
6560
|
-
*
|
|
6561
|
-
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
6562
|
-
* - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
6897
|
+
* The sequence number of the web search call being processed.
|
|
6563
6898
|
*/
|
|
6564
|
-
|
|
6899
|
+
sequence_number: number;
|
|
6565
6900
|
/**
|
|
6566
|
-
*
|
|
6567
|
-
* response. See the `tools` parameter to see how to specify which tools the model
|
|
6568
|
-
* can call.
|
|
6901
|
+
* The type of the event. Always `response.web_search_call.completed`.
|
|
6569
6902
|
*/
|
|
6570
|
-
|
|
6903
|
+
type: 'response.web_search_call.completed';
|
|
6904
|
+
}
|
|
6905
|
+
/**
|
|
6906
|
+
* Emitted when a web search call is initiated.
|
|
6907
|
+
*/
|
|
6908
|
+
export interface ResponseWebSearchCallInProgressEvent {
|
|
6571
6909
|
/**
|
|
6572
|
-
*
|
|
6573
|
-
* specify which tool to use by setting the `tool_choice` parameter.
|
|
6574
|
-
*
|
|
6575
|
-
* We support the following categories of tools:
|
|
6576
|
-
*
|
|
6577
|
-
* - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
6578
|
-
* capabilities, like
|
|
6579
|
-
* [web search](https://platform.openai.com/docs/guides/tools-web-search) or
|
|
6580
|
-
* [file search](https://platform.openai.com/docs/guides/tools-file-search).
|
|
6581
|
-
* Learn more about
|
|
6582
|
-
* [built-in tools](https://platform.openai.com/docs/guides/tools).
|
|
6583
|
-
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
6584
|
-
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
6585
|
-
* [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
|
|
6586
|
-
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
6587
|
-
* the model to call your own code with strongly typed arguments and outputs.
|
|
6588
|
-
* Learn more about
|
|
6589
|
-
* [function calling](https://platform.openai.com/docs/guides/function-calling).
|
|
6590
|
-
* You can also use custom tools to call your own code.
|
|
6910
|
+
* Unique ID for the output item associated with the web search call.
|
|
6591
6911
|
*/
|
|
6592
|
-
|
|
6912
|
+
item_id: string;
|
|
6593
6913
|
/**
|
|
6594
|
-
*
|
|
6595
|
-
* to return at each token position, each with an associated log probability. In
|
|
6596
|
-
* some cases, the number of returned tokens may be fewer than requested.
|
|
6914
|
+
* The index of the output item that the web search call is associated with.
|
|
6597
6915
|
*/
|
|
6598
|
-
|
|
6916
|
+
output_index: number;
|
|
6599
6917
|
/**
|
|
6600
|
-
*
|
|
6601
|
-
* model considers the results of the tokens with top_p probability mass. So 0.1
|
|
6602
|
-
* means only the tokens comprising the top 10% probability mass are considered.
|
|
6603
|
-
*
|
|
6604
|
-
* We generally recommend altering this or `temperature` but not both.
|
|
6918
|
+
* The sequence number of the web search call being processed.
|
|
6605
6919
|
*/
|
|
6606
|
-
|
|
6920
|
+
sequence_number: number;
|
|
6607
6921
|
/**
|
|
6608
|
-
*
|
|
6609
|
-
*
|
|
6610
|
-
* - `auto`: If the input to this Response exceeds the model's context window size,
|
|
6611
|
-
* the model will truncate the response to fit the context window by dropping
|
|
6612
|
-
* items from the beginning of the conversation.
|
|
6613
|
-
* - `disabled` (default): If the input size will exceed the context window size
|
|
6614
|
-
* for a model, the request will fail with a 400 error.
|
|
6922
|
+
* The type of the event. Always `response.web_search_call.in_progress`.
|
|
6615
6923
|
*/
|
|
6616
|
-
|
|
6924
|
+
type: 'response.web_search_call.in_progress';
|
|
6925
|
+
}
|
|
6926
|
+
/**
|
|
6927
|
+
* Emitted when a web search call is executing.
|
|
6928
|
+
*/
|
|
6929
|
+
export interface ResponseWebSearchCallSearchingEvent {
|
|
6617
6930
|
/**
|
|
6618
|
-
*
|
|
6619
|
-
* `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
|
|
6620
|
-
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
6621
|
-
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
6622
|
-
* abuse.
|
|
6623
|
-
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
6931
|
+
* Unique ID for the output item associated with the web search call.
|
|
6624
6932
|
*/
|
|
6625
|
-
|
|
6933
|
+
item_id: string;
|
|
6934
|
+
/**
|
|
6935
|
+
* The index of the output item that the web search call is associated with.
|
|
6936
|
+
*/
|
|
6937
|
+
output_index: number;
|
|
6938
|
+
/**
|
|
6939
|
+
* The sequence number of the web search call being processed.
|
|
6940
|
+
*/
|
|
6941
|
+
sequence_number: number;
|
|
6942
|
+
/**
|
|
6943
|
+
* The type of the event. Always `response.web_search_call.searching`.
|
|
6944
|
+
*/
|
|
6945
|
+
type: 'response.web_search_call.searching';
|
|
6626
6946
|
}
|
|
6947
|
+
/**
|
|
6948
|
+
* Client events accepted by the Responses WebSocket server.
|
|
6949
|
+
*/
|
|
6950
|
+
export type ResponsesClientEvent = ResponsesClientEvent.ResponseCreate | ResponseSteerEvent;
|
|
6627
6951
|
export declare namespace ResponsesClientEvent {
|
|
6628
|
-
|
|
6952
|
+
type ContextManagement = ResponseCreate.ContextManagement;
|
|
6953
|
+
type Moderation = ResponseCreate.Moderation;
|
|
6954
|
+
namespace Moderation {
|
|
6955
|
+
type Policy = ResponseCreate.Moderation.Policy;
|
|
6956
|
+
namespace Policy {
|
|
6957
|
+
type Input = ResponseCreate.Moderation.Policy.Input;
|
|
6958
|
+
type Output = ResponseCreate.Moderation.Policy.Output;
|
|
6959
|
+
}
|
|
6960
|
+
}
|
|
6961
|
+
type PromptCacheOptions = ResponseCreate.PromptCacheOptions;
|
|
6962
|
+
type StreamOptions = ResponseCreate.StreamOptions;
|
|
6963
|
+
type SpecificProgrammaticToolCallingParam = ResponseCreate.SpecificProgrammaticToolCallingParam;
|
|
6964
|
+
/**
|
|
6965
|
+
* Client event for creating a response over a persistent WebSocket connection.
|
|
6966
|
+
* This payload uses the same top-level fields as `POST /v1/responses`, plus
|
|
6967
|
+
* WebSocket-only envelope metadata.
|
|
6968
|
+
*
|
|
6969
|
+
* Notes:
|
|
6970
|
+
*
|
|
6971
|
+
* - `stream` is implicit over WebSocket and should not be sent.
|
|
6972
|
+
* - `background` is not supported over WebSocket.
|
|
6973
|
+
* - `stream_id` is WebSocket-only and is not part of `POST /v1/responses`.
|
|
6974
|
+
*/
|
|
6975
|
+
interface ResponseCreate {
|
|
6629
6976
|
/**
|
|
6630
|
-
* The
|
|
6977
|
+
* The type of the client event. Always `response.create`.
|
|
6631
6978
|
*/
|
|
6632
|
-
type:
|
|
6979
|
+
type: 'response.create';
|
|
6633
6980
|
/**
|
|
6634
|
-
*
|
|
6981
|
+
* Whether to run the model response in the background.
|
|
6982
|
+
* [Learn more](https://platform.openai.com/docs/guides/background).
|
|
6635
6983
|
*/
|
|
6636
|
-
|
|
6637
|
-
}
|
|
6638
|
-
/**
|
|
6639
|
-
* Configuration for running moderation on the input and output of this response.
|
|
6640
|
-
*/
|
|
6641
|
-
interface Moderation {
|
|
6984
|
+
background?: boolean | null;
|
|
6642
6985
|
/**
|
|
6643
|
-
*
|
|
6644
|
-
* 'omni-moderation-latest'.
|
|
6986
|
+
* Context management configuration for this request.
|
|
6645
6987
|
*/
|
|
6646
|
-
|
|
6988
|
+
context_management?: Array<ResponseCreate.ContextManagement> | null;
|
|
6647
6989
|
/**
|
|
6648
|
-
* The
|
|
6990
|
+
* The conversation that this response belongs to. Items from this conversation are
|
|
6991
|
+
* prepended to `input_items` for this response request. Input items and output
|
|
6992
|
+
* items from this response are automatically added to this conversation after this
|
|
6993
|
+
* response completes.
|
|
6649
6994
|
*/
|
|
6650
|
-
|
|
6651
|
-
}
|
|
6652
|
-
namespace Moderation {
|
|
6995
|
+
conversation?: string | ResponsesAPI.ResponseConversationParam | null;
|
|
6653
6996
|
/**
|
|
6654
|
-
*
|
|
6997
|
+
* Specify additional output data to include in the model response. Currently
|
|
6998
|
+
* supported values are:
|
|
6999
|
+
*
|
|
7000
|
+
* - `web_search_call.action.sources`: Include the sources of the web search tool
|
|
7001
|
+
* call.
|
|
7002
|
+
* - `code_interpreter_call.outputs`: Includes the outputs of python code execution
|
|
7003
|
+
* in code interpreter tool call items.
|
|
7004
|
+
* - `computer_call_output.output.image_url`: Include image urls from the computer
|
|
7005
|
+
* call output.
|
|
7006
|
+
* - `file_search_call.results`: Include the search results of the file search tool
|
|
7007
|
+
* call.
|
|
7008
|
+
* - `message.input_image.image_url`: Include image urls from the input message.
|
|
7009
|
+
* - `message.output_text.logprobs`: Include logprobs with assistant messages.
|
|
7010
|
+
* - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
|
|
7011
|
+
* tokens in reasoning item outputs. This enables reasoning items to be used in
|
|
7012
|
+
* multi-turn conversations when using the Responses API statelessly (like when
|
|
7013
|
+
* the `store` parameter is set to `false`, or when an organization is enrolled
|
|
7014
|
+
* in the zero data retention program).
|
|
7015
|
+
*/
|
|
7016
|
+
include?: Array<ResponsesAPI.ResponseIncludable> | null;
|
|
7017
|
+
/**
|
|
7018
|
+
* Text, image, or file inputs to the model, used to generate a response.
|
|
7019
|
+
*
|
|
7020
|
+
* Learn more:
|
|
7021
|
+
*
|
|
7022
|
+
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
7023
|
+
* - [Image inputs](https://platform.openai.com/docs/guides/images)
|
|
7024
|
+
* - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
|
|
7025
|
+
* - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
|
|
7026
|
+
* - [Function calling](https://platform.openai.com/docs/guides/function-calling)
|
|
6655
7027
|
*/
|
|
6656
|
-
|
|
7028
|
+
input?: string | ResponsesAPI.ResponseInput;
|
|
7029
|
+
/**
|
|
7030
|
+
* A system (or developer) message inserted into the model's context.
|
|
7031
|
+
*
|
|
7032
|
+
* When using along with `previous_response_id`, the instructions from a previous
|
|
7033
|
+
* response will not be carried over to the next response. This makes it simple to
|
|
7034
|
+
* swap out system (or developer) messages in new responses.
|
|
7035
|
+
*/
|
|
7036
|
+
instructions?: string | null;
|
|
7037
|
+
/**
|
|
7038
|
+
* An upper bound for the number of tokens that can be generated for a response,
|
|
7039
|
+
* including visible output tokens and
|
|
7040
|
+
* [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
|
7041
|
+
*/
|
|
7042
|
+
max_output_tokens?: number | null;
|
|
7043
|
+
/**
|
|
7044
|
+
* The maximum number of total calls to built-in tools that can be processed in a
|
|
7045
|
+
* response. This maximum number applies across all built-in tool calls, not per
|
|
7046
|
+
* individual tool. Any further attempts to call a tool by the model will be
|
|
7047
|
+
* ignored.
|
|
7048
|
+
*/
|
|
7049
|
+
max_tool_calls?: number | null;
|
|
7050
|
+
/**
|
|
7051
|
+
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
7052
|
+
* for storing additional information about the object in a structured format, and
|
|
7053
|
+
* querying for objects via API or the dashboard.
|
|
7054
|
+
*
|
|
7055
|
+
* Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
7056
|
+
* a maximum length of 512 characters.
|
|
7057
|
+
*/
|
|
7058
|
+
metadata?: Shared.Metadata | null;
|
|
7059
|
+
/**
|
|
7060
|
+
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
7061
|
+
* range of models with different capabilities, performance characteristics, and
|
|
7062
|
+
* price points. Refer to the
|
|
7063
|
+
* [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
7064
|
+
* available models.
|
|
7065
|
+
*/
|
|
7066
|
+
model?: Shared.ResponsesModel;
|
|
7067
|
+
/**
|
|
7068
|
+
* Configuration for running moderation on the input and output of this response.
|
|
7069
|
+
*/
|
|
7070
|
+
moderation?: ResponseCreate.Moderation | null;
|
|
7071
|
+
/**
|
|
7072
|
+
* Whether to allow the model to run tool calls in parallel.
|
|
7073
|
+
*/
|
|
7074
|
+
parallel_tool_calls?: boolean | null;
|
|
7075
|
+
/**
|
|
7076
|
+
* The unique ID of the previous response to the model. Use this to create
|
|
7077
|
+
* multi-turn conversations. Learn more about
|
|
7078
|
+
* [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
7079
|
+
* Cannot be used in conjunction with `conversation`.
|
|
7080
|
+
*/
|
|
7081
|
+
previous_response_id?: string | null;
|
|
7082
|
+
/**
|
|
7083
|
+
* Reference to a prompt template and its variables.
|
|
7084
|
+
* [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
|
7085
|
+
*/
|
|
7086
|
+
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
7087
|
+
/**
|
|
7088
|
+
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
7089
|
+
* hit rates. Replaces the `user` field.
|
|
7090
|
+
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
7091
|
+
*/
|
|
7092
|
+
prompt_cache_key?: string | null;
|
|
7093
|
+
/**
|
|
7094
|
+
* Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
7095
|
+
* default, OpenAI automatically chooses one implicit cache breakpoint. You can add
|
|
7096
|
+
* explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
|
|
7097
|
+
* request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
7098
|
+
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
7099
|
+
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
7100
|
+
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
7101
|
+
* [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
|
|
7102
|
+
* for current details.
|
|
7103
|
+
*/
|
|
7104
|
+
prompt_cache_options?: ResponseCreate.PromptCacheOptions;
|
|
7105
|
+
/**
|
|
7106
|
+
* @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
|
|
7107
|
+
*
|
|
7108
|
+
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
7109
|
+
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
7110
|
+
* of 24 hours.
|
|
7111
|
+
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
7112
|
+
* This field expresses a maximum retention policy, while
|
|
7113
|
+
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
7114
|
+
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
7115
|
+
* models, only `24h` is supported.
|
|
7116
|
+
*
|
|
7117
|
+
* For older models that support both `in_memory` and `24h`, the default depends on
|
|
7118
|
+
* your organization's data retention policy:
|
|
7119
|
+
*
|
|
7120
|
+
* - Organizations without ZDR enabled default to `24h`.
|
|
7121
|
+
* - Organizations with ZDR enabled default to `in_memory` when
|
|
7122
|
+
* `prompt_cache_retention` is not specified.
|
|
7123
|
+
*/
|
|
7124
|
+
prompt_cache_retention?: 'in_memory' | '24h' | null;
|
|
7125
|
+
/**
|
|
7126
|
+
* Configuration options for
|
|
7127
|
+
* [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
7128
|
+
*/
|
|
7129
|
+
reasoning?: Shared.Reasoning | null;
|
|
7130
|
+
/**
|
|
7131
|
+
* A stable identifier used to help detect users of your application that may be
|
|
7132
|
+
* violating OpenAI's usage policies. The IDs should be a string that uniquely
|
|
7133
|
+
* identifies each user, with a maximum length of 64 characters. We recommend
|
|
7134
|
+
* hashing their username or email address, in order to avoid sending us any
|
|
7135
|
+
* identifying information.
|
|
7136
|
+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
7137
|
+
*/
|
|
7138
|
+
safety_identifier?: string | null;
|
|
7139
|
+
/**
|
|
7140
|
+
* Specifies the processing type used for serving the request.
|
|
7141
|
+
*
|
|
7142
|
+
* - If set to 'auto', then the request will be processed with the service tier
|
|
7143
|
+
* configured in the Project settings. Unless otherwise configured, the Project
|
|
7144
|
+
* will use 'default'.
|
|
7145
|
+
* - If set to 'default', then the request will be processed with the standard
|
|
7146
|
+
* pricing and performance for the selected model.
|
|
7147
|
+
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
7148
|
+
* then the request will be processed with the Flex Processing service tier.
|
|
7149
|
+
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
7150
|
+
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
7151
|
+
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
7152
|
+
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
7153
|
+
* request.
|
|
7154
|
+
* - If set to 'ultrafast', then the request will be processed with the
|
|
7155
|
+
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
7156
|
+
* available for `gpt-5.6-sol`; a response served through it will show
|
|
7157
|
+
* `service_tier=ultrafast`.
|
|
7158
|
+
* - When not set, the default behavior is 'auto'.
|
|
7159
|
+
*
|
|
7160
|
+
* When the `service_tier` parameter is set, the response body will include the
|
|
7161
|
+
* `service_tier` value based on the processing mode actually used to serve the
|
|
7162
|
+
* request. This response value may be different from the value set in the
|
|
7163
|
+
* parameter.
|
|
7164
|
+
*/
|
|
7165
|
+
service_tier?: ResponsesAPI.ServiceTier | null;
|
|
7166
|
+
/**
|
|
7167
|
+
* Whether to store the generated model response for later retrieval via API.
|
|
7168
|
+
* Defaults to true when omitted. If set to true, response data will be stored for
|
|
7169
|
+
* at least 30 days, subject to the
|
|
7170
|
+
* [data retention exceptions](/api/docs/guides/your-data#v1responses).
|
|
7171
|
+
*/
|
|
7172
|
+
store?: boolean | null;
|
|
7173
|
+
/**
|
|
7174
|
+
* If set to true, the model response data will be streamed to the client as it is
|
|
7175
|
+
* generated using
|
|
7176
|
+
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
7177
|
+
* See the
|
|
7178
|
+
* [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
|
|
7179
|
+
* for more information.
|
|
7180
|
+
*/
|
|
7181
|
+
stream?: boolean | null;
|
|
7182
|
+
/**
|
|
7183
|
+
* The WebSocket lane for this response. Requests with the same `stream_id` are
|
|
7184
|
+
* processed FIFO, and events for the response echo the same `stream_id`.
|
|
7185
|
+
*
|
|
7186
|
+
* `stream_id` controls routing; `previous_response_id` controls conversation
|
|
7187
|
+
* lineage, so a new lane can fork from a response created on another lane.
|
|
7188
|
+
*/
|
|
7189
|
+
stream_id?: string;
|
|
7190
|
+
/**
|
|
7191
|
+
* Options for streaming responses. Only set this when you set `stream: true`.
|
|
7192
|
+
*/
|
|
7193
|
+
stream_options?: ResponseCreate.StreamOptions | null;
|
|
7194
|
+
/**
|
|
7195
|
+
* What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
|
7196
|
+
* make the output more random, while lower values like 0.2 will make it more
|
|
7197
|
+
* focused and deterministic. We generally recommend altering this or `top_p` but
|
|
7198
|
+
* not both.
|
|
7199
|
+
*/
|
|
7200
|
+
temperature?: number | null;
|
|
7201
|
+
/**
|
|
7202
|
+
* Configuration options for a text response from the model. Can be plain text or
|
|
7203
|
+
* structured JSON data. Learn more:
|
|
7204
|
+
*
|
|
7205
|
+
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
7206
|
+
* - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
7207
|
+
*/
|
|
7208
|
+
text?: ResponsesAPI.ResponseTextConfig;
|
|
7209
|
+
/**
|
|
7210
|
+
* How the model should select which tool (or tools) to use when generating a
|
|
7211
|
+
* response. See the `tools` parameter to see how to specify which tools the model
|
|
7212
|
+
* can call.
|
|
7213
|
+
*/
|
|
7214
|
+
tool_choice?: ResponsesAPI.ToolChoiceOptions | ResponsesAPI.ToolChoiceAllowed | ResponsesAPI.ToolChoiceTypes | ResponsesAPI.ToolChoiceFunction | ResponsesAPI.ToolChoiceMcp | ResponsesAPI.ToolChoiceCustom | ResponseCreate.SpecificProgrammaticToolCallingParam | ResponsesAPI.ToolChoiceApplyPatch | ResponsesAPI.ToolChoiceShell;
|
|
7215
|
+
/**
|
|
7216
|
+
* An array of tools the model may call while generating a response. You can
|
|
7217
|
+
* specify which tool to use by setting the `tool_choice` parameter.
|
|
7218
|
+
*
|
|
7219
|
+
* We support the following categories of tools:
|
|
7220
|
+
*
|
|
7221
|
+
* - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
7222
|
+
* capabilities, like
|
|
7223
|
+
* [web search](https://platform.openai.com/docs/guides/tools-web-search) or
|
|
7224
|
+
* [file search](https://platform.openai.com/docs/guides/tools-file-search).
|
|
7225
|
+
* Learn more about
|
|
7226
|
+
* [built-in tools](https://platform.openai.com/docs/guides/tools).
|
|
7227
|
+
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
7228
|
+
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
7229
|
+
* [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
|
|
7230
|
+
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
7231
|
+
* the model to call your own code with strongly typed arguments and outputs.
|
|
7232
|
+
* Learn more about
|
|
7233
|
+
* [function calling](https://platform.openai.com/docs/guides/function-calling).
|
|
7234
|
+
* You can also use custom tools to call your own code.
|
|
7235
|
+
*/
|
|
7236
|
+
tools?: Array<ResponsesAPI.Tool>;
|
|
7237
|
+
/**
|
|
7238
|
+
* An integer between 0 and 20 specifying the maximum number of most likely tokens
|
|
7239
|
+
* to return at each token position, each with an associated log probability. In
|
|
7240
|
+
* some cases, the number of returned tokens may be fewer than requested.
|
|
7241
|
+
*/
|
|
7242
|
+
top_logprobs?: number | null;
|
|
7243
|
+
/**
|
|
7244
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the
|
|
7245
|
+
* model considers the results of the tokens with top_p probability mass. So 0.1
|
|
7246
|
+
* means only the tokens comprising the top 10% probability mass are considered.
|
|
7247
|
+
*
|
|
7248
|
+
* We generally recommend altering this or `temperature` but not both.
|
|
7249
|
+
*/
|
|
7250
|
+
top_p?: number | null;
|
|
7251
|
+
/**
|
|
7252
|
+
* @deprecated The truncation strategy to use for the model response.
|
|
7253
|
+
*
|
|
7254
|
+
* - `auto`: If the input to this Response exceeds the model's context window size,
|
|
7255
|
+
* the model will truncate the response to fit the context window by dropping
|
|
7256
|
+
* items from the beginning of the conversation.
|
|
7257
|
+
* - `disabled` (default): If the input size will exceed the context window size
|
|
7258
|
+
* for a model, the request will fail with a 400 error.
|
|
7259
|
+
*/
|
|
7260
|
+
truncation?: 'auto' | 'disabled' | null;
|
|
7261
|
+
/**
|
|
7262
|
+
* @deprecated This field is being replaced by `safety_identifier` and
|
|
7263
|
+
* `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
|
|
7264
|
+
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
7265
|
+
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
7266
|
+
* abuse.
|
|
7267
|
+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
7268
|
+
*/
|
|
7269
|
+
user?: string;
|
|
7270
|
+
}
|
|
7271
|
+
namespace ResponseCreate {
|
|
7272
|
+
interface ContextManagement {
|
|
6657
7273
|
/**
|
|
6658
|
-
* The
|
|
7274
|
+
* The context management entry type. Currently only 'compaction' is supported.
|
|
6659
7275
|
*/
|
|
6660
|
-
|
|
7276
|
+
type: string;
|
|
6661
7277
|
/**
|
|
6662
|
-
*
|
|
7278
|
+
* Token threshold at which compaction should be triggered for this entry.
|
|
6663
7279
|
*/
|
|
6664
|
-
|
|
7280
|
+
compact_threshold?: number | null;
|
|
6665
7281
|
}
|
|
6666
|
-
|
|
7282
|
+
/**
|
|
7283
|
+
* Configuration for running moderation on the input and output of this response.
|
|
7284
|
+
*/
|
|
7285
|
+
interface Moderation {
|
|
6667
7286
|
/**
|
|
6668
|
-
* The moderation
|
|
7287
|
+
* The moderation model to use for moderated completions, e.g.
|
|
7288
|
+
* 'omni-moderation-latest'.
|
|
6669
7289
|
*/
|
|
6670
|
-
|
|
6671
|
-
mode: 'score' | 'block';
|
|
6672
|
-
}
|
|
7290
|
+
model: string;
|
|
6673
7291
|
/**
|
|
6674
|
-
* The
|
|
7292
|
+
* The policy to apply to moderated response input and output.
|
|
6675
7293
|
*/
|
|
6676
|
-
|
|
6677
|
-
|
|
7294
|
+
policy?: Moderation.Policy | null;
|
|
7295
|
+
}
|
|
7296
|
+
namespace Moderation {
|
|
7297
|
+
/**
|
|
7298
|
+
* The policy to apply to moderated response input and output.
|
|
7299
|
+
*/
|
|
7300
|
+
interface Policy {
|
|
7301
|
+
/**
|
|
7302
|
+
* The moderation policy for the response input.
|
|
7303
|
+
*/
|
|
7304
|
+
input?: Policy.Input | null;
|
|
7305
|
+
/**
|
|
7306
|
+
* The moderation policy for the response output.
|
|
7307
|
+
*/
|
|
7308
|
+
output?: Policy.Output | null;
|
|
7309
|
+
}
|
|
7310
|
+
namespace Policy {
|
|
7311
|
+
/**
|
|
7312
|
+
* The moderation policy for the response input.
|
|
7313
|
+
*/
|
|
7314
|
+
interface Input {
|
|
7315
|
+
mode: 'score' | 'block';
|
|
7316
|
+
}
|
|
7317
|
+
/**
|
|
7318
|
+
* The moderation policy for the response output.
|
|
7319
|
+
*/
|
|
7320
|
+
interface Output {
|
|
7321
|
+
mode: 'score' | 'block';
|
|
7322
|
+
}
|
|
6678
7323
|
}
|
|
6679
7324
|
}
|
|
6680
|
-
}
|
|
6681
|
-
/**
|
|
6682
|
-
* Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
6683
|
-
* default, OpenAI automatically chooses one implicit cache breakpoint. You can add
|
|
6684
|
-
* explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
|
|
6685
|
-
* request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
6686
|
-
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
6687
|
-
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
6688
|
-
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
6689
|
-
* [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
|
|
6690
|
-
* for current details.
|
|
6691
|
-
*/
|
|
6692
|
-
interface PromptCacheOptions {
|
|
6693
7325
|
/**
|
|
6694
|
-
*
|
|
6695
|
-
*
|
|
6696
|
-
*
|
|
6697
|
-
*
|
|
6698
|
-
* latest
|
|
6699
|
-
*
|
|
6700
|
-
|
|
6701
|
-
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
|
|
6705
|
-
|
|
6706
|
-
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
7326
|
+
* Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
7327
|
+
* default, OpenAI automatically chooses one implicit cache breakpoint. You can add
|
|
7328
|
+
* explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
|
|
7329
|
+
* request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
7330
|
+
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
7331
|
+
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
7332
|
+
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
7333
|
+
* [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
|
|
7334
|
+
* for current details.
|
|
7335
|
+
*/
|
|
7336
|
+
interface PromptCacheOptions {
|
|
7337
|
+
/**
|
|
7338
|
+
* The ID of a response to compare when diagnosing prompt cache reuse. Supplying
|
|
7339
|
+
* this field requests prompt cache diagnostics when the feature is enabled.
|
|
7340
|
+
*/
|
|
7341
|
+
comparison_response_id?: string | null;
|
|
7342
|
+
/**
|
|
7343
|
+
* Controls whether OpenAI automatically creates an implicit cache breakpoint.
|
|
7344
|
+
* Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
|
|
7345
|
+
* and writes up to the latest three explicit breakpoints in the request. With
|
|
7346
|
+
* `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
|
|
7347
|
+
* latest four explicit breakpoints. If there are no explicit breakpoints, the
|
|
7348
|
+
* request does not use prompt caching.
|
|
7349
|
+
*/
|
|
7350
|
+
mode?: 'implicit' | 'explicit';
|
|
7351
|
+
/**
|
|
7352
|
+
* The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
7353
|
+
* written by the request. Defaults to `30m`, which is currently the only supported
|
|
7354
|
+
* value. The backend may retain cache entries for longer.
|
|
7355
|
+
*/
|
|
7356
|
+
ttl?: '30m';
|
|
7357
|
+
}
|
|
6724
7358
|
/**
|
|
6725
|
-
*
|
|
7359
|
+
* Options for streaming responses. Only set this when you set `stream: true`.
|
|
6726
7360
|
*/
|
|
6727
|
-
|
|
7361
|
+
interface StreamOptions {
|
|
7362
|
+
/**
|
|
7363
|
+
* When true, stream obfuscation will be enabled. Stream obfuscation adds random
|
|
7364
|
+
* characters to an `obfuscation` field on streaming delta events to normalize
|
|
7365
|
+
* payload sizes as a mitigation to certain side-channel attacks. These obfuscation
|
|
7366
|
+
* fields are included by default, but add a small amount of overhead to the data
|
|
7367
|
+
* stream. You can set `include_obfuscation` to false to optimize for bandwidth if
|
|
7368
|
+
* you trust the network links between your application and the OpenAI API.
|
|
7369
|
+
*/
|
|
7370
|
+
include_obfuscation?: boolean;
|
|
7371
|
+
}
|
|
7372
|
+
interface SpecificProgrammaticToolCallingParam {
|
|
7373
|
+
/**
|
|
7374
|
+
* The tool to call. Always `programmatic_tool_calling`.
|
|
7375
|
+
*/
|
|
7376
|
+
type: 'programmatic_tool_calling';
|
|
7377
|
+
}
|
|
6728
7378
|
}
|
|
6729
7379
|
}
|
|
6730
7380
|
/**
|
|
6731
7381
|
* Server events emitted by the Responses WebSocket server.
|
|
6732
7382
|
*/
|
|
6733
|
-
export type ResponsesServerEvent = ResponsesServerEvent.ResponseAudioWsDelta | ResponsesServerEvent.ResponseAudioWsDone | ResponsesServerEvent.ResponseAudioTranscriptWsDelta | ResponsesServerEvent.ResponseAudioTranscriptWsDone | ResponsesServerEvent.ResponseCodeInterpreterCallCodeWsDelta | ResponsesServerEvent.ResponseCodeInterpreterCallCodeWsDone | ResponsesServerEvent.ResponseCodeInterpreterCallWsCompleted | ResponsesServerEvent.ResponseCodeInterpreterCallInWsProgress | ResponsesServerEvent.ResponseCodeInterpreterCallWsInterpreting | ResponsesServerEvent.ResponseWsCompleted | ResponsesServerEvent.ResponseContentPartWsAdded | ResponsesServerEvent.ResponseContentPartWsDone | ResponsesServerEvent.ResponseWsCreated | ResponsesServerEvent.ResponseFileSearchCallWsCompleted | ResponsesServerEvent.ResponseFileSearchCallInWsProgress | ResponsesServerEvent.ResponseFileSearchCallWsSearching | ResponsesServerEvent.ResponseFunctionCallArgumentsWsDelta | ResponsesServerEvent.ResponseFunctionCallArgumentsWsDone | ResponsesServerEvent.ResponseShellCallCommandWsAdded | ResponsesServerEvent.ResponseShellCallCommandWsDelta | ResponsesServerEvent.ResponseShellCallCommandWsDone | ResponsesServerEvent.ResponseShellCallOutputContentWsDelta | ResponsesServerEvent.ResponseShellCallOutputContentWsDone | ResponsesServerEvent.ResponseInWsProgress | ResponsesServerEvent.ResponseWsFailed | ResponsesServerEvent.ResponseWsIncomplete | ResponsesServerEvent.ResponseOutputItemWsAdded | ResponsesServerEvent.ResponseOutputItemWsDone | ResponsesServerEvent.ResponseReasoningSummaryPartWsAdded | ResponsesServerEvent.ResponseReasoningSummaryPartWsDone | ResponsesServerEvent.ResponseReasoningSummaryTextWsDelta | ResponsesServerEvent.ResponseReasoningSummaryTextWsDone | ResponsesServerEvent.ResponseReasoningTextWsDelta | ResponsesServerEvent.ResponseReasoningTextWsDone | ResponsesServerEvent.ResponseRefusalWsDelta | ResponsesServerEvent.ResponseRefusalWsDone | ResponsesServerEvent.ResponseTextWsDelta | ResponsesServerEvent.ResponseTextWsDone | ResponsesServerEvent.ResponseWebSearchCallWsCompleted | ResponsesServerEvent.ResponseWebSearchCallInWsProgress | ResponsesServerEvent.ResponseWebSearchCallWsSearching | ResponsesServerEvent.ResponseImageGenCallWsCompleted | ResponsesServerEvent.ResponseImageGenCallWsGenerating | ResponsesServerEvent.ResponseImageGenCallInWsProgress | ResponsesServerEvent.ResponseImageGenCallPartialWsImage | ResponsesServerEvent.ResponseMcpCallArgumentsWsDelta | ResponsesServerEvent.ResponseMcpCallArgumentsWsDone | ResponsesServerEvent.ResponseMcpCallWsCompleted | ResponsesServerEvent.ResponseMcpCallWsFailed | ResponsesServerEvent.ResponseMcpCallInWsProgress | ResponsesServerEvent.ResponseMcpListToolsWsCompleted | ResponsesServerEvent.ResponseMcpListToolsWsFailed | ResponsesServerEvent.ResponseMcpListToolsInWsProgress | ResponsesServerEvent.ResponseOutputTextAnnotationWsAdded | ResponsesServerEvent.ResponseWsQueued | ResponsesServerEvent.ResponseCustomToolCallInputWsDelta | ResponsesServerEvent.ResponseCustomToolCallInputWsDone | ResponsesServerEvent.ResponseWsStreamingError | ResponsesServerEvent.ResponseWsError;
|
|
7383
|
+
export type ResponsesServerEvent = ResponsesServerEvent.ResponseAudioWsDelta | ResponsesServerEvent.ResponseAudioWsDone | ResponsesServerEvent.ResponseAudioTranscriptWsDelta | ResponsesServerEvent.ResponseAudioTranscriptWsDone | ResponsesServerEvent.ResponseCodeInterpreterCallCodeWsDelta | ResponsesServerEvent.ResponseCodeInterpreterCallCodeWsDone | ResponsesServerEvent.ResponseCodeInterpreterCallWsCompleted | ResponsesServerEvent.ResponseCodeInterpreterCallInWsProgress | ResponsesServerEvent.ResponseCodeInterpreterCallWsInterpreting | ResponsesServerEvent.ResponseWsCompleted | ResponsesServerEvent.ResponseContentPartWsAdded | ResponsesServerEvent.ResponseContentPartWsDone | ResponsesServerEvent.ResponseWsCreated | ResponsesServerEvent.ResponseFileSearchCallWsCompleted | ResponsesServerEvent.ResponseFileSearchCallInWsProgress | ResponsesServerEvent.ResponseFileSearchCallWsSearching | ResponsesServerEvent.ResponseFunctionCallArgumentsWsDelta | ResponsesServerEvent.ResponseFunctionCallArgumentsWsDone | ResponsesServerEvent.ResponseShellCallCommandWsAdded | ResponsesServerEvent.ResponseShellCallCommandWsDelta | ResponsesServerEvent.ResponseShellCallCommandWsDone | ResponsesServerEvent.ResponseShellCallOutputContentWsDelta | ResponsesServerEvent.ResponseShellCallOutputContentWsDone | ResponsesServerEvent.ResponseInWsProgress | ResponsesServerEvent.ResponseWsFailed | ResponsesServerEvent.ResponseWsIncomplete | ResponsesServerEvent.ResponseOutputItemWsAdded | ResponsesServerEvent.ResponseOutputItemWsDone | ResponsesServerEvent.ResponseReasoningSummaryPartWsAdded | ResponsesServerEvent.ResponseReasoningSummaryPartWsDone | ResponsesServerEvent.ResponseReasoningSummaryTextWsDelta | ResponsesServerEvent.ResponseReasoningSummaryTextWsDone | ResponsesServerEvent.ResponseReasoningTextWsDelta | ResponsesServerEvent.ResponseReasoningTextWsDone | ResponsesServerEvent.ResponseRefusalWsDelta | ResponsesServerEvent.ResponseRefusalWsDone | ResponsesServerEvent.ResponseTextWsDelta | ResponsesServerEvent.ResponseTextWsDone | ResponsesServerEvent.ResponseWebSearchCallWsCompleted | ResponsesServerEvent.ResponseWebSearchCallInWsProgress | ResponsesServerEvent.ResponseWebSearchCallWsSearching | ResponsesServerEvent.ResponseImageGenCallWsCompleted | ResponsesServerEvent.ResponseImageGenCallWsGenerating | ResponsesServerEvent.ResponseImageGenCallInWsProgress | ResponsesServerEvent.ResponseImageGenCallPartialWsImage | ResponsesServerEvent.ResponseMcpCallArgumentsWsDelta | ResponsesServerEvent.ResponseMcpCallArgumentsWsDone | ResponsesServerEvent.ResponseMcpCallWsCompleted | ResponsesServerEvent.ResponseMcpCallWsFailed | ResponsesServerEvent.ResponseMcpCallInWsProgress | ResponsesServerEvent.ResponseMcpListToolsWsCompleted | ResponsesServerEvent.ResponseMcpListToolsWsFailed | ResponsesServerEvent.ResponseMcpListToolsInWsProgress | ResponsesServerEvent.ResponseOutputTextAnnotationWsAdded | ResponsesServerEvent.ResponseWsQueued | ResponsesServerEvent.ResponseCustomToolCallInputWsDelta | ResponsesServerEvent.ResponseCustomToolCallInputWsDone | ResponsesServerEvent.ResponseWsStreamingError | ResponsesServerEvent.ResponseWsError | ResponseSteerAcceptedEvent | ResponseSteerPendingEvent | ResponseSteerFailedEvent;
|
|
6734
7384
|
export declare namespace ResponsesServerEvent {
|
|
6735
7385
|
/**
|
|
6736
7386
|
* Emitted when there is a partial audio response.
|
|
@@ -6984,6 +7634,10 @@ export declare namespace ResponsesServerEvent {
|
|
|
6984
7634
|
}
|
|
6985
7635
|
/**
|
|
6986
7636
|
* An event that is emitted when a response finishes as incomplete.
|
|
7637
|
+
*
|
|
7638
|
+
* Over WebSocket, steering can finish a response with
|
|
7639
|
+
* `response.incomplete_details.reason` set to `steered`, followed automatically by
|
|
7640
|
+
* a successor `response.created` that commits the queued steering input.
|
|
6987
7641
|
*/
|
|
6988
7642
|
interface ResponseWsIncomplete extends ResponseIncompleteEvent {
|
|
6989
7643
|
/**
|
|
@@ -7369,6 +8023,34 @@ export declare namespace ResponsesServerEvent {
|
|
|
7369
8023
|
headers?: {
|
|
7370
8024
|
[key: string]: string;
|
|
7371
8025
|
};
|
|
8026
|
+
misalignment?: Error.Misalignment;
|
|
8027
|
+
}
|
|
8028
|
+
namespace Error {
|
|
8029
|
+
interface Misalignment {
|
|
8030
|
+
/**
|
|
8031
|
+
* The public explanation for this block.
|
|
8032
|
+
*/
|
|
8033
|
+
detailed_explanation?: string;
|
|
8034
|
+
/**
|
|
8035
|
+
* An optional classification; clients must accept additional values.
|
|
8036
|
+
*/
|
|
8037
|
+
error_type?: (string & {}) | 'potentially_unintended_data_transfer' | 'potentially_unintended_data_access' | 'potentially_unintended_destructive_activity' | 'other';
|
|
8038
|
+
/**
|
|
8039
|
+
* An optional public continuation instruction.
|
|
8040
|
+
*/
|
|
8041
|
+
steer?: Misalignment.Steer;
|
|
8042
|
+
}
|
|
8043
|
+
namespace Misalignment {
|
|
8044
|
+
/**
|
|
8045
|
+
* An optional public continuation instruction.
|
|
8046
|
+
*/
|
|
8047
|
+
interface Steer {
|
|
8048
|
+
/**
|
|
8049
|
+
* The public continuation instruction.
|
|
8050
|
+
*/
|
|
8051
|
+
message: string;
|
|
8052
|
+
}
|
|
8053
|
+
}
|
|
7372
8054
|
}
|
|
7373
8055
|
}
|
|
7374
8056
|
}
|
|
@@ -7626,9 +8308,11 @@ export declare namespace Tool {
|
|
|
7626
8308
|
* one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
7627
8309
|
* the model will automatically determine the best background for the image.
|
|
7628
8310
|
*
|
|
7629
|
-
*
|
|
7630
|
-
* `
|
|
7631
|
-
*
|
|
8311
|
+
* `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
|
|
8312
|
+
* snapshots, support `opaque` and `transparent` backgrounds. Transparent
|
|
8313
|
+
* backgrounds are available for supported GPT Image models. For `gpt-image-2` and
|
|
8314
|
+
* `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
8315
|
+
* set the output format to `png` or `webp`.
|
|
7632
8316
|
*/
|
|
7633
8317
|
background?: 'transparent' | 'opaque' | 'auto';
|
|
7634
8318
|
/**
|
|
@@ -7645,10 +8329,12 @@ export declare namespace Tool {
|
|
|
7645
8329
|
input_image_mask?: ImageGeneration.InputImageMask;
|
|
7646
8330
|
/**
|
|
7647
8331
|
* The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`,
|
|
7648
|
-
* `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
8332
|
+
* `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
8333
|
+
* `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
8334
|
+
* `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
7649
8335
|
* `chatgpt-image-latest`. Default: `gpt-image-1`.
|
|
7650
8336
|
*/
|
|
7651
|
-
model?: (string & {}) | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-2' | 'gpt-image-2-2026-04-21' | 'gpt-image-1.5' | 'chatgpt-image-latest';
|
|
8337
|
+
model?: (string & {}) | 'gpt-image-1' | 'gpt-image-1-mini' | 'gpt-image-2' | 'gpt-image-2-2026-04-21' | 'gpt-image-2.5-sunburst' | 'gpt-image-2.5-sunburst-2026-09-08' | 'gpt-image-2.5-flare' | 'gpt-image-2.5-flare-2026-09-08' | 'gpt-image-1.5' | 'chatgpt-image-latest';
|
|
7652
8338
|
/**
|
|
7653
8339
|
* Moderation level for the generated image. Default: `auto`.
|
|
7654
8340
|
*/
|
|
@@ -7668,22 +8354,25 @@ export declare namespace Tool {
|
|
|
7668
8354
|
*/
|
|
7669
8355
|
partial_images?: number;
|
|
7670
8356
|
/**
|
|
7671
|
-
* The quality of the generated image.
|
|
7672
|
-
*
|
|
7673
|
-
|
|
7674
|
-
|
|
7675
|
-
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
*
|
|
7679
|
-
*
|
|
7680
|
-
* `
|
|
7681
|
-
*
|
|
7682
|
-
*
|
|
7683
|
-
*
|
|
7684
|
-
*
|
|
7685
|
-
*
|
|
7686
|
-
* `
|
|
8357
|
+
* The quality of the generated image. The GPT image models support `low`,
|
|
8358
|
+
* `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
|
|
8359
|
+
* including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default:
|
|
8360
|
+
* `auto`.
|
|
8361
|
+
*/
|
|
8362
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto';
|
|
8363
|
+
/**
|
|
8364
|
+
* The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
8365
|
+
* `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
8366
|
+
* `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
8367
|
+
* resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
|
|
8368
|
+
* Width and height must both be divisible by 16 and the requested aspect ratio
|
|
8369
|
+
* must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
|
|
8370
|
+
* the maximum supported resolution is `3840x2160`. The requested size must also
|
|
8371
|
+
* satisfy the model's current pixel and edge limits. The standard sizes
|
|
8372
|
+
* `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
8373
|
+
* `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
|
|
8374
|
+
* one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
8375
|
+
* `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
7687
8376
|
*/
|
|
7688
8377
|
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
7689
8378
|
}
|
|
@@ -8062,7 +8751,7 @@ export interface ResponseCreateParamsBase {
|
|
|
8062
8751
|
*/
|
|
8063
8752
|
metadata?: Shared.Metadata | null;
|
|
8064
8753
|
/**
|
|
8065
|
-
* Model ID used to generate the response, like `gpt-
|
|
8754
|
+
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
8066
8755
|
* range of models with different capabilities, performance characteristics, and
|
|
8067
8756
|
* price points. Refer to the
|
|
8068
8757
|
* [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
@@ -8169,6 +8858,9 @@ export interface ResponseCreateParamsBase {
|
|
|
8169
8858
|
service_tier?: ServiceTier | null;
|
|
8170
8859
|
/**
|
|
8171
8860
|
* Whether to store the generated model response for later retrieval via API.
|
|
8861
|
+
* Defaults to true when omitted. If set to true, response data will be stored for
|
|
8862
|
+
* at least 30 days, subject to the
|
|
8863
|
+
* [data retention exceptions](/api/docs/guides/your-data#v1responses).
|
|
8172
8864
|
*/
|
|
8173
8865
|
store?: boolean | null;
|
|
8174
8866
|
/**
|
|
@@ -8327,6 +9019,11 @@ export declare namespace ResponseCreateParams {
|
|
|
8327
9019
|
* for current details.
|
|
8328
9020
|
*/
|
|
8329
9021
|
interface PromptCacheOptions {
|
|
9022
|
+
/**
|
|
9023
|
+
* The ID of a response to compare when diagnosing prompt cache reuse. Supplying
|
|
9024
|
+
* this field requests prompt cache diagnostics when the feature is enabled.
|
|
9025
|
+
*/
|
|
9026
|
+
comparison_response_id?: string | null;
|
|
8330
9027
|
/**
|
|
8331
9028
|
* Controls whether OpenAI automatically creates an implicit cache breakpoint.
|
|
8332
9029
|
* Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
|
|
@@ -8446,13 +9143,13 @@ export interface ResponseRetrieveParamsStreaming extends ResponseRetrieveParamsB
|
|
|
8446
9143
|
}
|
|
8447
9144
|
export interface ResponseCompactParams {
|
|
8448
9145
|
/**
|
|
8449
|
-
* Model ID used to generate the response, like `gpt-
|
|
9146
|
+
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
8450
9147
|
* range of models with different capabilities, performance characteristics, and
|
|
8451
9148
|
* price points. Refer to the
|
|
8452
9149
|
* [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
8453
9150
|
* available models.
|
|
8454
9151
|
*/
|
|
8455
|
-
model: 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.3-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-codex' | 'gpt-5.1-mini' | 'gpt-5.1-chat-latest' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o3' | 'o3-2025-04-16' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o1' | 'o1-2024-12-17' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-mini-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview-2025-03-11' | 'chatgpt-4o-latest' | 'codex-mini-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11' | 'gpt-5.5-pro' | 'gpt-5.5-pro-2026-04-23' | 'gpt-5-codex' | 'gpt-5-pro' | 'gpt-5-pro-2025-10-06' | 'gpt-5.1-codex-max' | 'gpt-daybreak-blue-latest' | 'gpt-daybreak-red-latest' | 'gpt-5.6-cyber' | (string & {}) | null;
|
|
9152
|
+
model: 'gpt-6-astra' | 'gpt-5.6-sol' | 'gpt-5.6-terra' | 'gpt-5.6-luna' | 'gpt-5.5' | 'gpt-5.5-2026-04-23' | 'gpt-5.4' | 'gpt-5.4-mini' | 'gpt-5.4-nano' | 'gpt-5.4-mini-2026-03-17' | 'gpt-5.4-nano-2026-03-17' | 'gpt-5.3-chat-latest' | 'gpt-5.2' | 'gpt-5.2-2025-12-11' | 'gpt-5.2-chat-latest' | 'gpt-5.2-pro' | 'gpt-5.2-pro-2025-12-11' | 'gpt-5.1' | 'gpt-5.1-2025-11-13' | 'gpt-5.1-codex' | 'gpt-5.1-mini' | 'gpt-5.1-chat-latest' | 'gpt-5' | 'gpt-5-mini' | 'gpt-5-nano' | 'gpt-5-2025-08-07' | 'gpt-5-mini-2025-08-07' | 'gpt-5-nano-2025-08-07' | 'gpt-5-chat-latest' | 'gpt-4.1' | 'gpt-4.1-mini' | 'gpt-4.1-nano' | 'gpt-4.1-2025-04-14' | 'gpt-4.1-mini-2025-04-14' | 'gpt-4.1-nano-2025-04-14' | 'o4-mini' | 'o4-mini-2025-04-16' | 'o3' | 'o3-2025-04-16' | 'o3-mini' | 'o3-mini-2025-01-31' | 'o1' | 'o1-2024-12-17' | 'o1-preview' | 'o1-preview-2024-09-12' | 'o1-mini' | 'o1-mini-2024-09-12' | 'gpt-4o' | 'gpt-4o-2024-11-20' | 'gpt-4o-2024-08-06' | 'gpt-4o-2024-05-13' | 'gpt-4o-audio-preview' | 'gpt-4o-audio-preview-2024-10-01' | 'gpt-4o-audio-preview-2024-12-17' | 'gpt-4o-audio-preview-2025-06-03' | 'gpt-4o-mini-audio-preview' | 'gpt-4o-mini-audio-preview-2024-12-17' | 'gpt-4o-search-preview' | 'gpt-4o-mini-search-preview' | 'gpt-4o-search-preview-2025-03-11' | 'gpt-4o-mini-search-preview-2025-03-11' | 'chatgpt-4o-latest' | 'codex-mini-latest' | 'gpt-4o-mini' | 'gpt-4o-mini-2024-07-18' | 'gpt-4-turbo' | 'gpt-4-turbo-2024-04-09' | 'gpt-4-0125-preview' | 'gpt-4-turbo-preview' | 'gpt-4-1106-preview' | 'gpt-4-vision-preview' | 'gpt-4' | 'gpt-4-0314' | 'gpt-4-0613' | 'gpt-4-32k' | 'gpt-4-32k-0314' | 'gpt-4-32k-0613' | 'gpt-3.5-turbo' | 'gpt-3.5-turbo-16k' | 'gpt-3.5-turbo-0301' | 'gpt-3.5-turbo-0613' | 'gpt-3.5-turbo-1106' | 'gpt-3.5-turbo-0125' | 'gpt-3.5-turbo-16k-0613' | 'o1-pro' | 'o1-pro-2025-03-19' | 'o3-pro' | 'o3-pro-2025-06-10' | 'o3-deep-research' | 'o3-deep-research-2025-06-26' | 'o4-mini-deep-research' | 'o4-mini-deep-research-2025-06-26' | 'computer-use-preview' | 'computer-use-preview-2025-03-11' | 'gpt-5.5-pro' | 'gpt-5.5-pro-2026-04-23' | 'gpt-5-codex' | 'gpt-5-pro' | 'gpt-5-pro-2025-10-06' | 'gpt-5.1-codex-max' | 'gpt-daybreak-blue-latest' | 'gpt-daybreak-red-latest' | 'gpt-5.6-cyber' | (string & {}) | null;
|
|
8456
9153
|
/**
|
|
8457
9154
|
* Text, image, or file inputs to the model, used to generate a response
|
|
8458
9155
|
*/
|
|
@@ -8501,12 +9198,13 @@ export interface ResponseCompactParams {
|
|
|
8501
9198
|
* request will be processed with the Flex Processing service tier. - To opt-in to
|
|
8502
9199
|
* [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
8503
9200
|
* `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
8504
|
-
* Completions.
|
|
8505
|
-
*
|
|
8506
|
-
* default behavior is 'auto'. When
|
|
8507
|
-
*
|
|
8508
|
-
*
|
|
8509
|
-
* the value set in the
|
|
9201
|
+
* Completions. For models with a dedicated Fast tier, either value resolves to
|
|
9202
|
+
* `service_tier=fast`; for other models, either value resolves to
|
|
9203
|
+
* `service_tier=priority`. - When not set, the default behavior is 'auto'. When
|
|
9204
|
+
* the `service_tier` parameter is set, the response body will include the
|
|
9205
|
+
* `service_tier` value based on the processing mode actually used to serve the
|
|
9206
|
+
* request. This response value may be different from the value set in the
|
|
9207
|
+
* parameter.
|
|
8510
9208
|
*/
|
|
8511
9209
|
service_tier?: 'auto' | 'default' | 'fast' | 'flex' | 'priority' | null;
|
|
8512
9210
|
}
|
|
@@ -8541,7 +9239,7 @@ export declare namespace ResponseCompactParams {
|
|
|
8541
9239
|
}
|
|
8542
9240
|
}
|
|
8543
9241
|
export declare namespace Responses {
|
|
8544
|
-
export { type ApplyPatchTool as ApplyPatchTool, type CompactedResponse as CompactedResponse, type ComputerAction as ComputerAction, type ComputerActionList as ComputerActionList, type ComputerTool as ComputerTool, type ComputerUsePreviewTool as ComputerUsePreviewTool, type ContainerAuto as ContainerAuto, type ContainerNetworkPolicyAllowlist as ContainerNetworkPolicyAllowlist, type ContainerNetworkPolicyDisabled as ContainerNetworkPolicyDisabled, type ContainerNetworkPolicyDomainSecret as ContainerNetworkPolicyDomainSecret, type ContainerReference as ContainerReference, type CustomTool as CustomTool, type EasyInputMessage as EasyInputMessage, type FileSearchTool as FileSearchTool, type FunctionShellTool as FunctionShellTool, type FunctionTool as FunctionTool, type ImageDetail as ImageDetail, type InlineSkill as InlineSkill, type InlineSkillSource as InlineSkillSource, type LocalEnvironment as LocalEnvironment, type LocalSkill as LocalSkill, type McpToolCallError as McpToolCallError, type NamespaceTool as NamespaceTool, type Response as Response, type ResponseApplyPatchToolCall as ResponseApplyPatchToolCall, type ResponseApplyPatchToolCallOutput as ResponseApplyPatchToolCallOutput, type ResponseAudioDeltaEvent as ResponseAudioDeltaEvent, type ResponseAudioDoneEvent as ResponseAudioDoneEvent, type ResponseAudioTranscriptDeltaEvent as ResponseAudioTranscriptDeltaEvent, type ResponseAudioTranscriptDoneEvent as ResponseAudioTranscriptDoneEvent, type ResponseCodeInterpreterCallCodeDeltaEvent as ResponseCodeInterpreterCallCodeDeltaEvent, type ResponseCodeInterpreterCallCodeDoneEvent as ResponseCodeInterpreterCallCodeDoneEvent, type ResponseCodeInterpreterCallCompletedEvent as ResponseCodeInterpreterCallCompletedEvent, type ResponseCodeInterpreterCallInProgressEvent as ResponseCodeInterpreterCallInProgressEvent, type ResponseCodeInterpreterCallInterpretingEvent as ResponseCodeInterpreterCallInterpretingEvent, type ResponseCodeInterpreterToolCall as ResponseCodeInterpreterToolCall, type ResponseCompactionItem as ResponseCompactionItem, type ResponseCompactionItemParam as ResponseCompactionItemParam, type ResponseCompletedEvent as ResponseCompletedEvent, type ResponseComputerToolCall as ResponseComputerToolCall, type ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem, type ResponseComputerToolCallOutputScreenshot as ResponseComputerToolCallOutputScreenshot, type ResponseContainerReference as ResponseContainerReference, type ResponseContent as ResponseContent, type ResponseContentPartAddedEvent as ResponseContentPartAddedEvent, type ResponseContentPartDoneEvent as ResponseContentPartDoneEvent, type ResponseConversationParam as ResponseConversationParam, type ResponseCreatedEvent as ResponseCreatedEvent, type ResponseCustomToolCall as ResponseCustomToolCall, type ResponseCustomToolCallInputDeltaEvent as ResponseCustomToolCallInputDeltaEvent, type ResponseCustomToolCallInputDoneEvent as ResponseCustomToolCallInputDoneEvent, type ResponseCustomToolCallItem as ResponseCustomToolCallItem, type ResponseCustomToolCallOutput as ResponseCustomToolCallOutput, type ResponseCustomToolCallOutputItem as ResponseCustomToolCallOutputItem, type ResponseError as ResponseError, type ResponseErrorEvent as ResponseErrorEvent, type ResponseFailedEvent as ResponseFailedEvent, type ResponseFileSearchCallCompletedEvent as ResponseFileSearchCallCompletedEvent, type ResponseFileSearchCallInProgressEvent as ResponseFileSearchCallInProgressEvent, type ResponseFileSearchCallSearchingEvent as ResponseFileSearchCallSearchingEvent, type ResponseFileSearchToolCall as ResponseFileSearchToolCall, type ResponseFormatTextConfig as ResponseFormatTextConfig, type ResponseFormatTextJSONSchemaConfig as ResponseFormatTextJSONSchemaConfig, type ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent, type ResponseFunctionCallArgumentsDoneEvent as ResponseFunctionCallArgumentsDoneEvent, type ResponseFunctionCallOutputItem as ResponseFunctionCallOutputItem, type ResponseFunctionCallOutputItemList as ResponseFunctionCallOutputItemList, type ResponseFunctionShellCallOutputContent as ResponseFunctionShellCallOutputContent, type ResponseFunctionShellToolCall as ResponseFunctionShellToolCall, type ResponseFunctionShellToolCallOutput as ResponseFunctionShellToolCallOutput, type ResponseFunctionToolCall as ResponseFunctionToolCall, type ResponseFunctionToolCallItem as ResponseFunctionToolCallItem, type ResponseFunctionToolCallOutputItem as ResponseFunctionToolCallOutputItem, type ResponseFunctionWebSearch as ResponseFunctionWebSearch, type ResponseImageGenCallCompletedEvent as ResponseImageGenCallCompletedEvent, type ResponseImageGenCallGeneratingEvent as ResponseImageGenCallGeneratingEvent, type ResponseImageGenCallInProgressEvent as ResponseImageGenCallInProgressEvent, type ResponseImageGenCallPartialImageEvent as ResponseImageGenCallPartialImageEvent, type ResponseInProgressEvent as ResponseInProgressEvent, type ResponseIncludable as ResponseIncludable, type ResponseIncompleteEvent as ResponseIncompleteEvent, type ResponseInput as ResponseInput, type ResponseInputAudio as ResponseInputAudio, type ResponseInputContent as ResponseInputContent, type ResponseInputFile as ResponseInputFile, type ResponseInputFileContent as ResponseInputFileContent, type ResponseInputImage as ResponseInputImage, type ResponseInputImageContent as ResponseInputImageContent, type ResponseInputItem as ResponseInputItem, type ResponseInputMessageContentList as ResponseInputMessageContentList, type ResponseInputMessageItem as ResponseInputMessageItem, type ResponseInputText as ResponseInputText, type ResponseInputTextContent as ResponseInputTextContent, type ResponseItem as ResponseItem, type ResponseLocalEnvironment as ResponseLocalEnvironment, type ResponseMcpCallArgumentsDeltaEvent as ResponseMcpCallArgumentsDeltaEvent, type ResponseMcpCallArgumentsDoneEvent as ResponseMcpCallArgumentsDoneEvent, type ResponseMcpCallCompletedEvent as ResponseMcpCallCompletedEvent, type ResponseMcpCallFailedEvent as ResponseMcpCallFailedEvent, type ResponseMcpCallInProgressEvent as ResponseMcpCallInProgressEvent, type ResponseMcpListToolsCompletedEvent as ResponseMcpListToolsCompletedEvent, type ResponseMcpListToolsFailedEvent as ResponseMcpListToolsFailedEvent, type ResponseMcpListToolsInProgressEvent as ResponseMcpListToolsInProgressEvent, type ResponseOutputAudio as ResponseOutputAudio, type ResponseOutputItem as ResponseOutputItem, type ResponseOutputItemAddedEvent as ResponseOutputItemAddedEvent, type ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent, type ResponseOutputMessage as ResponseOutputMessage, type ResponseOutputRefusal as ResponseOutputRefusal, type ResponseOutputText as ResponseOutputText, type ResponseOutputTextAnnotationAddedEvent as ResponseOutputTextAnnotationAddedEvent, type ResponsePrompt as ResponsePrompt, type ResponseQueuedEvent as ResponseQueuedEvent, type ResponseReasoningItem as ResponseReasoningItem, type ResponseReasoningSummaryPartAddedEvent as ResponseReasoningSummaryPartAddedEvent, type ResponseReasoningSummaryPartDoneEvent as ResponseReasoningSummaryPartDoneEvent, type ResponseReasoningSummaryTextDeltaEvent as ResponseReasoningSummaryTextDeltaEvent, type ResponseReasoningSummaryTextDoneEvent as ResponseReasoningSummaryTextDoneEvent, type ResponseReasoningTextDeltaEvent as ResponseReasoningTextDeltaEvent, type ResponseReasoningTextDoneEvent as ResponseReasoningTextDoneEvent, type ResponseRefusalDeltaEvent as ResponseRefusalDeltaEvent, type ResponseRefusalDoneEvent as ResponseRefusalDoneEvent, type ResponseShellCallCommandAddedEvent as ResponseShellCallCommandAddedEvent, type ResponseShellCallCommandDeltaEvent as ResponseShellCallCommandDeltaEvent, type ResponseShellCallCommandDoneEvent as ResponseShellCallCommandDoneEvent, type ResponseShellCallOutputContentDeltaEvent as ResponseShellCallOutputContentDeltaEvent, type ResponseShellCallOutputContentDoneEvent as ResponseShellCallOutputContentDoneEvent, type ResponseStatus as ResponseStatus, type ResponseStreamEvent as ResponseStreamEvent, type ResponseTextConfig as ResponseTextConfig, type ResponseTextDeltaEvent as ResponseTextDeltaEvent, type ResponseTextDoneEvent as ResponseTextDoneEvent, type ResponseToolSearchCall as ResponseToolSearchCall, type ResponseToolSearchOutputItem as ResponseToolSearchOutputItem, type ResponseToolSearchOutputItemParam as ResponseToolSearchOutputItemParam, type ResponseUsage as ResponseUsage, type ResponseWebSearchCallCompletedEvent as ResponseWebSearchCallCompletedEvent, type ResponseWebSearchCallInProgressEvent as ResponseWebSearchCallInProgressEvent, type ResponseWebSearchCallSearchingEvent as ResponseWebSearchCallSearchingEvent, type ResponsesClientEvent as ResponsesClientEvent, type ResponsesServerEvent as ResponsesServerEvent, type ServiceTier as ServiceTier, type SkillReference as SkillReference, type Tool as Tool, type ToolChoiceAllowed as ToolChoiceAllowed, type ToolChoiceApplyPatch as ToolChoiceApplyPatch, type ToolChoiceCustom as ToolChoiceCustom, type ToolChoiceFunction as ToolChoiceFunction, type ToolChoiceMcp as ToolChoiceMcp, type ToolChoiceOptions as ToolChoiceOptions, type ToolChoiceShell as ToolChoiceShell, type ToolChoiceTypes as ToolChoiceTypes, type ToolSearchTool as ToolSearchTool, type WebSearchPreviewTool as WebSearchPreviewTool, type WebSearchTool as WebSearchTool, type ResponseCreateParams as ResponseCreateParams, type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming, type ResponseRetrieveParams as ResponseRetrieveParams, type ResponseRetrieveParamsNonStreaming as ResponseRetrieveParamsNonStreaming, type ResponseRetrieveParamsStreaming as ResponseRetrieveParamsStreaming, type ResponseCompactParams as ResponseCompactParams, };
|
|
9242
|
+
export { type ApplyPatchTool as ApplyPatchTool, type CompactedResponse as CompactedResponse, type ComputerAction as ComputerAction, type ComputerActionList as ComputerActionList, type ComputerTool as ComputerTool, type ComputerUsePreviewTool as ComputerUsePreviewTool, type ContainerAuto as ContainerAuto, type ContainerNetworkPolicyAllowlist as ContainerNetworkPolicyAllowlist, type ContainerNetworkPolicyDisabled as ContainerNetworkPolicyDisabled, type ContainerNetworkPolicyDomainSecret as ContainerNetworkPolicyDomainSecret, type ContainerReference as ContainerReference, type CustomTool as CustomTool, type EasyInputMessage as EasyInputMessage, type FileSearchTool as FileSearchTool, type FunctionShellTool as FunctionShellTool, type FunctionTool as FunctionTool, type ImageDetail as ImageDetail, type InlineSkill as InlineSkill, type InlineSkillSource as InlineSkillSource, type LocalEnvironment as LocalEnvironment, type LocalSkill as LocalSkill, type McpToolCallError as McpToolCallError, type NamespaceTool as NamespaceTool, type Response as Response, type ResponseApplyPatchToolCall as ResponseApplyPatchToolCall, type ResponseApplyPatchToolCallOutput as ResponseApplyPatchToolCallOutput, type ResponseAudioDeltaEvent as ResponseAudioDeltaEvent, type ResponseAudioDoneEvent as ResponseAudioDoneEvent, type ResponseAudioTranscriptDeltaEvent as ResponseAudioTranscriptDeltaEvent, type ResponseAudioTranscriptDoneEvent as ResponseAudioTranscriptDoneEvent, type ResponseCodeInterpreterCallCodeDeltaEvent as ResponseCodeInterpreterCallCodeDeltaEvent, type ResponseCodeInterpreterCallCodeDoneEvent as ResponseCodeInterpreterCallCodeDoneEvent, type ResponseCodeInterpreterCallCompletedEvent as ResponseCodeInterpreterCallCompletedEvent, type ResponseCodeInterpreterCallInProgressEvent as ResponseCodeInterpreterCallInProgressEvent, type ResponseCodeInterpreterCallInterpretingEvent as ResponseCodeInterpreterCallInterpretingEvent, type ResponseCodeInterpreterToolCall as ResponseCodeInterpreterToolCall, type ResponseCompactionItem as ResponseCompactionItem, type ResponseCompactionItemParam as ResponseCompactionItemParam, type ResponseCompletedEvent as ResponseCompletedEvent, type ResponseComputerToolCall as ResponseComputerToolCall, type ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem, type ResponseComputerToolCallOutputScreenshot as ResponseComputerToolCallOutputScreenshot, type ResponseConfigurationUpdateItem as ResponseConfigurationUpdateItem, type ResponseConfigurationUpdateItemParam as ResponseConfigurationUpdateItemParam, type ResponseContainerReference as ResponseContainerReference, type ResponseContent as ResponseContent, type ResponseContentPartAddedEvent as ResponseContentPartAddedEvent, type ResponseContentPartDoneEvent as ResponseContentPartDoneEvent, type ResponseConversationParam as ResponseConversationParam, type ResponseCreatedEvent as ResponseCreatedEvent, type ResponseCustomToolCall as ResponseCustomToolCall, type ResponseCustomToolCallInputDeltaEvent as ResponseCustomToolCallInputDeltaEvent, type ResponseCustomToolCallInputDoneEvent as ResponseCustomToolCallInputDoneEvent, type ResponseCustomToolCallItem as ResponseCustomToolCallItem, type ResponseCustomToolCallOutput as ResponseCustomToolCallOutput, type ResponseCustomToolCallOutputItem as ResponseCustomToolCallOutputItem, type ResponseError as ResponseError, type ResponseErrorEvent as ResponseErrorEvent, type ResponseFailedEvent as ResponseFailedEvent, type ResponseFileSearchCallCompletedEvent as ResponseFileSearchCallCompletedEvent, type ResponseFileSearchCallInProgressEvent as ResponseFileSearchCallInProgressEvent, type ResponseFileSearchCallSearchingEvent as ResponseFileSearchCallSearchingEvent, type ResponseFileSearchToolCall as ResponseFileSearchToolCall, type ResponseFormatTextConfig as ResponseFormatTextConfig, type ResponseFormatTextJSONSchemaConfig as ResponseFormatTextJSONSchemaConfig, type ResponseFunctionCallArgumentsDeltaEvent as ResponseFunctionCallArgumentsDeltaEvent, type ResponseFunctionCallArgumentsDoneEvent as ResponseFunctionCallArgumentsDoneEvent, type ResponseFunctionCallOutputItem as ResponseFunctionCallOutputItem, type ResponseFunctionCallOutputItemList as ResponseFunctionCallOutputItemList, type ResponseFunctionShellCallOutputContent as ResponseFunctionShellCallOutputContent, type ResponseFunctionShellToolCall as ResponseFunctionShellToolCall, type ResponseFunctionShellToolCallOutput as ResponseFunctionShellToolCallOutput, type ResponseFunctionToolCall as ResponseFunctionToolCall, type ResponseFunctionToolCallItem as ResponseFunctionToolCallItem, type ResponseFunctionToolCallOutputItem as ResponseFunctionToolCallOutputItem, type ResponseFunctionWebSearch as ResponseFunctionWebSearch, type ResponseImageGenCallCompletedEvent as ResponseImageGenCallCompletedEvent, type ResponseImageGenCallGeneratingEvent as ResponseImageGenCallGeneratingEvent, type ResponseImageGenCallInProgressEvent as ResponseImageGenCallInProgressEvent, type ResponseImageGenCallPartialImageEvent as ResponseImageGenCallPartialImageEvent, type ResponseInProgressEvent as ResponseInProgressEvent, type ResponseIncludable as ResponseIncludable, type ResponseIncompleteEvent as ResponseIncompleteEvent, type ResponseInput as ResponseInput, type ResponseInputAudio as ResponseInputAudio, type ResponseInputContent as ResponseInputContent, type ResponseInputFile as ResponseInputFile, type ResponseInputFileContent as ResponseInputFileContent, type ResponseInputImage as ResponseInputImage, type ResponseInputImageContent as ResponseInputImageContent, type ResponseInputItem as ResponseInputItem, type ResponseInputMessageContentList as ResponseInputMessageContentList, type ResponseInputMessageItem as ResponseInputMessageItem, type ResponseInputText as ResponseInputText, type ResponseInputTextContent as ResponseInputTextContent, type ResponseItem as ResponseItem, type ResponseLocalEnvironment as ResponseLocalEnvironment, type ResponseMcpCallArgumentsDeltaEvent as ResponseMcpCallArgumentsDeltaEvent, type ResponseMcpCallArgumentsDoneEvent as ResponseMcpCallArgumentsDoneEvent, type ResponseMcpCallCompletedEvent as ResponseMcpCallCompletedEvent, type ResponseMcpCallFailedEvent as ResponseMcpCallFailedEvent, type ResponseMcpCallInProgressEvent as ResponseMcpCallInProgressEvent, type ResponseMcpListToolsCompletedEvent as ResponseMcpListToolsCompletedEvent, type ResponseMcpListToolsFailedEvent as ResponseMcpListToolsFailedEvent, type ResponseMcpListToolsInProgressEvent as ResponseMcpListToolsInProgressEvent, type ResponseOutputAudio as ResponseOutputAudio, type ResponseOutputItem as ResponseOutputItem, type ResponseOutputItemAddedEvent as ResponseOutputItemAddedEvent, type ResponseOutputItemDoneEvent as ResponseOutputItemDoneEvent, type ResponseOutputMessage as ResponseOutputMessage, type ResponseOutputRefusal as ResponseOutputRefusal, type ResponseOutputText as ResponseOutputText, type ResponseOutputTextAnnotationAddedEvent as ResponseOutputTextAnnotationAddedEvent, type ResponsePrompt as ResponsePrompt, type ResponseQueuedEvent as ResponseQueuedEvent, type ResponseReasoningItem as ResponseReasoningItem, type ResponseReasoningSummaryPartAddedEvent as ResponseReasoningSummaryPartAddedEvent, type ResponseReasoningSummaryPartDoneEvent as ResponseReasoningSummaryPartDoneEvent, type ResponseReasoningSummaryTextDeltaEvent as ResponseReasoningSummaryTextDeltaEvent, type ResponseReasoningSummaryTextDoneEvent as ResponseReasoningSummaryTextDoneEvent, type ResponseReasoningTextDeltaEvent as ResponseReasoningTextDeltaEvent, type ResponseReasoningTextDoneEvent as ResponseReasoningTextDoneEvent, type ResponseRefusalDeltaEvent as ResponseRefusalDeltaEvent, type ResponseRefusalDoneEvent as ResponseRefusalDoneEvent, type ResponseShellCallCommandAddedEvent as ResponseShellCallCommandAddedEvent, type ResponseShellCallCommandDeltaEvent as ResponseShellCallCommandDeltaEvent, type ResponseShellCallCommandDoneEvent as ResponseShellCallCommandDoneEvent, type ResponseShellCallOutputContentDeltaEvent as ResponseShellCallOutputContentDeltaEvent, type ResponseShellCallOutputContentDoneEvent as ResponseShellCallOutputContentDoneEvent, type ResponseStatus as ResponseStatus, type ResponseSteerAcceptedEvent as ResponseSteerAcceptedEvent, type ResponseSteerErrorCode as ResponseSteerErrorCode, type ResponseSteerEvent as ResponseSteerEvent, type ResponseSteerFailedEvent as ResponseSteerFailedEvent, type ResponseSteerInput as ResponseSteerInput, type ResponseSteerInputContent as ResponseSteerInputContent, type ResponseSteerPendingEvent as ResponseSteerPendingEvent, type ResponseSteerPendingReason as ResponseSteerPendingReason, type ResponseSteerRequiredInput as ResponseSteerRequiredInput, type ResponseStreamEvent as ResponseStreamEvent, type ResponseTextConfig as ResponseTextConfig, type ResponseTextDeltaEvent as ResponseTextDeltaEvent, type ResponseTextDoneEvent as ResponseTextDoneEvent, type ResponseToolSearchCall as ResponseToolSearchCall, type ResponseToolSearchOutputItem as ResponseToolSearchOutputItem, type ResponseToolSearchOutputItemParam as ResponseToolSearchOutputItemParam, type ResponseUsage as ResponseUsage, type ResponseWebSearchCallCompletedEvent as ResponseWebSearchCallCompletedEvent, type ResponseWebSearchCallInProgressEvent as ResponseWebSearchCallInProgressEvent, type ResponseWebSearchCallSearchingEvent as ResponseWebSearchCallSearchingEvent, type ResponsesClientEvent as ResponsesClientEvent, type ResponsesServerEvent as ResponsesServerEvent, type ServiceTier as ServiceTier, type SkillReference as SkillReference, type Tool as Tool, type ToolChoiceAllowed as ToolChoiceAllowed, type ToolChoiceApplyPatch as ToolChoiceApplyPatch, type ToolChoiceCustom as ToolChoiceCustom, type ToolChoiceFunction as ToolChoiceFunction, type ToolChoiceMcp as ToolChoiceMcp, type ToolChoiceOptions as ToolChoiceOptions, type ToolChoiceShell as ToolChoiceShell, type ToolChoiceTypes as ToolChoiceTypes, type ToolSearchTool as ToolSearchTool, type WebSearchPreviewTool as WebSearchPreviewTool, type WebSearchTool as WebSearchTool, type ResponseCreateParams as ResponseCreateParams, type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming, type ResponseRetrieveParams as ResponseRetrieveParams, type ResponseRetrieveParamsNonStreaming as ResponseRetrieveParamsNonStreaming, type ResponseRetrieveParamsStreaming as ResponseRetrieveParamsStreaming, type ResponseCompactParams as ResponseCompactParams, };
|
|
8545
9243
|
export { InputItems as InputItems, type ResponseItemList as ResponseItemList, type InputItemListParams as InputItemListParams, };
|
|
8546
9244
|
export { InputTokens as InputTokens, type InputTokenCountResponse as InputTokenCountResponse, type InputTokenCountParams as InputTokenCountParams, };
|
|
8547
9245
|
}
|