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
|
@@ -237,7 +237,7 @@ export class Responses extends APIResource {
|
|
|
237
237
|
* @example
|
|
238
238
|
* ```ts
|
|
239
239
|
* const compactedResponse = await client.responses.compact({
|
|
240
|
-
* model: 'gpt-
|
|
240
|
+
* model: 'gpt-6-astra',
|
|
241
241
|
* });
|
|
242
242
|
* ```
|
|
243
243
|
*/
|
|
@@ -671,6 +671,12 @@ export interface CustomTool {
|
|
|
671
671
|
*/
|
|
672
672
|
allowed_callers?: Array<'direct' | 'programmatic'> | null;
|
|
673
673
|
|
|
674
|
+
/**
|
|
675
|
+
* Whether the tool response can be returned asynchronously versus immediately
|
|
676
|
+
* returned on next response creation.
|
|
677
|
+
*/
|
|
678
|
+
async?: boolean;
|
|
679
|
+
|
|
674
680
|
/**
|
|
675
681
|
* Whether this tool should be deferred and discovered via tool search.
|
|
676
682
|
*/
|
|
@@ -845,6 +851,8 @@ export interface FunctionTool {
|
|
|
845
851
|
*/
|
|
846
852
|
allowed_callers?: Array<'direct' | 'programmatic'> | null;
|
|
847
853
|
|
|
854
|
+
async?: boolean;
|
|
855
|
+
|
|
848
856
|
/**
|
|
849
857
|
* Whether this function is deferred and loaded via tool search.
|
|
850
858
|
*/
|
|
@@ -1001,6 +1009,12 @@ export namespace NamespaceTool {
|
|
|
1001
1009
|
*/
|
|
1002
1010
|
allowed_callers?: Array<'direct' | 'programmatic'> | null;
|
|
1003
1011
|
|
|
1012
|
+
/**
|
|
1013
|
+
* Whether the tool response can be returned asynchronously versus immediately
|
|
1014
|
+
* returned on next response creation.
|
|
1015
|
+
*/
|
|
1016
|
+
async?: boolean;
|
|
1017
|
+
|
|
1004
1018
|
/**
|
|
1005
1019
|
* Whether this function should be deferred and discovered via tool search.
|
|
1006
1020
|
*/
|
|
@@ -1068,7 +1082,7 @@ export interface Response {
|
|
|
1068
1082
|
metadata: Shared.Metadata | null;
|
|
1069
1083
|
|
|
1070
1084
|
/**
|
|
1071
|
-
* Model ID used to generate the response, like `gpt-
|
|
1085
|
+
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
1072
1086
|
* range of models with different capabilities, performance characteristics, and
|
|
1073
1087
|
* price points. Refer to the
|
|
1074
1088
|
* [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
@@ -1198,6 +1212,15 @@ export interface Response {
|
|
|
1198
1212
|
*/
|
|
1199
1213
|
prompt?: ResponsePrompt | null;
|
|
1200
1214
|
|
|
1215
|
+
/**
|
|
1216
|
+
* Prompt cache diagnostics requested for this response.
|
|
1217
|
+
*/
|
|
1218
|
+
prompt_cache_diagnostics?:
|
|
1219
|
+
| Response.CacheMiss
|
|
1220
|
+
| Response.CacheHit
|
|
1221
|
+
| Response.ComparisonResponseNotFound
|
|
1222
|
+
| Response.Unavailable;
|
|
1223
|
+
|
|
1201
1224
|
/**
|
|
1202
1225
|
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
1203
1226
|
* hit rates. Replaces the `user` field.
|
|
@@ -1331,9 +1354,11 @@ export namespace Response {
|
|
|
1331
1354
|
*/
|
|
1332
1355
|
export interface IncompleteDetails {
|
|
1333
1356
|
/**
|
|
1334
|
-
* The reason why the response is incomplete.
|
|
1357
|
+
* The reason why the response is incomplete. `steered` means the response stopped
|
|
1358
|
+
* at a safe output boundary after a WebSocket `response.steer` event. The server
|
|
1359
|
+
* can then create a successor response automatically with the queued input.
|
|
1335
1360
|
*/
|
|
1336
|
-
reason?: 'max_output_tokens' | 'max_messages' | 'content_filter';
|
|
1361
|
+
reason?: 'max_output_tokens' | 'max_messages' | 'content_filter' | 'steered';
|
|
1337
1362
|
}
|
|
1338
1363
|
|
|
1339
1364
|
export interface SpecificProgrammaticToolCallingParam {
|
|
@@ -1486,6 +1511,47 @@ export namespace Response {
|
|
|
1486
1511
|
}
|
|
1487
1512
|
}
|
|
1488
1513
|
|
|
1514
|
+
export interface CacheMiss {
|
|
1515
|
+
/**
|
|
1516
|
+
* The estimated number of input tokens affected after the first detected
|
|
1517
|
+
* divergence.
|
|
1518
|
+
*/
|
|
1519
|
+
cache_missed_tokens: number;
|
|
1520
|
+
|
|
1521
|
+
/**
|
|
1522
|
+
* The reason prompt cache reuse did not occur.
|
|
1523
|
+
*/
|
|
1524
|
+
reason:
|
|
1525
|
+
| 'model_changed'
|
|
1526
|
+
| 'prompt_cache_key_changed'
|
|
1527
|
+
| 'tools_changed'
|
|
1528
|
+
| 'text_format_changed'
|
|
1529
|
+
| 'reasoning_effort_changed'
|
|
1530
|
+
| 'verbosity_changed'
|
|
1531
|
+
| 'context_compacted'
|
|
1532
|
+
| 'input_changed'
|
|
1533
|
+
| 'service_tier_changed';
|
|
1534
|
+
|
|
1535
|
+
type: 'cache_miss';
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* The raw token count of the reusable prefix in the compared response.
|
|
1539
|
+
*/
|
|
1540
|
+
comparison_reusable_tokens?: number;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
export interface CacheHit {
|
|
1544
|
+
type: 'cache_hit';
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
export interface ComparisonResponseNotFound {
|
|
1548
|
+
type: 'comparison_response_not_found';
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
export interface Unavailable {
|
|
1552
|
+
type: 'unavailable';
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1489
1555
|
/**
|
|
1490
1556
|
* The prompt-caching options that were applied to the response. Supported for
|
|
1491
1557
|
* `gpt-5.6` and later models.
|
|
@@ -1500,6 +1566,11 @@ export namespace Response {
|
|
|
1500
1566
|
* The minimum lifetime applied to each cache breakpoint.
|
|
1501
1567
|
*/
|
|
1502
1568
|
ttl: '30m';
|
|
1569
|
+
|
|
1570
|
+
/**
|
|
1571
|
+
* The response ID supplied as the prompt cache diagnostics comparison.
|
|
1572
|
+
*/
|
|
1573
|
+
comparison_response_id?: string | null;
|
|
1503
1574
|
}
|
|
1504
1575
|
}
|
|
1505
1576
|
|
|
@@ -2396,6 +2467,75 @@ export interface ResponseComputerToolCallOutputScreenshot {
|
|
|
2396
2467
|
image_url?: string;
|
|
2397
2468
|
}
|
|
2398
2469
|
|
|
2470
|
+
/**
|
|
2471
|
+
* A configuration update that applies to subsequent responses until it is replaced
|
|
2472
|
+
* by another configuration update.
|
|
2473
|
+
*/
|
|
2474
|
+
export interface ResponseConfigurationUpdateItem {
|
|
2475
|
+
/**
|
|
2476
|
+
* The unique ID of the configuration update item.
|
|
2477
|
+
*/
|
|
2478
|
+
id: string;
|
|
2479
|
+
|
|
2480
|
+
/**
|
|
2481
|
+
* The item type. Always `configuration_update`.
|
|
2482
|
+
*/
|
|
2483
|
+
type: 'configuration_update';
|
|
2484
|
+
|
|
2485
|
+
/**
|
|
2486
|
+
* The reasoning configuration applied by this update.
|
|
2487
|
+
*/
|
|
2488
|
+
reasoning?: ResponseConfigurationUpdateItem.Reasoning;
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
export namespace ResponseConfigurationUpdateItem {
|
|
2492
|
+
/**
|
|
2493
|
+
* The reasoning configuration applied by this update.
|
|
2494
|
+
*/
|
|
2495
|
+
export interface Reasoning {
|
|
2496
|
+
/**
|
|
2497
|
+
* The reasoning effort used for subsequent responses until another configuration
|
|
2498
|
+
* update replaces it.
|
|
2499
|
+
*/
|
|
2500
|
+
effort?: Shared.ReasoningEffort | null;
|
|
2501
|
+
}
|
|
2502
|
+
}
|
|
2503
|
+
|
|
2504
|
+
/**
|
|
2505
|
+
* An update to the conversation's response configuration. The configuration
|
|
2506
|
+
* remains in effect for subsequent responses until it is replaced by another
|
|
2507
|
+
* configuration update.
|
|
2508
|
+
*/
|
|
2509
|
+
export interface ResponseConfigurationUpdateItemParam {
|
|
2510
|
+
/**
|
|
2511
|
+
* The item type. Always `configuration_update`.
|
|
2512
|
+
*/
|
|
2513
|
+
type: 'configuration_update';
|
|
2514
|
+
|
|
2515
|
+
/**
|
|
2516
|
+
* The unique ID of the configuration update item.
|
|
2517
|
+
*/
|
|
2518
|
+
id?: string | null;
|
|
2519
|
+
|
|
2520
|
+
/**
|
|
2521
|
+
* Updates to reasoning configuration. Only effort is supported.
|
|
2522
|
+
*/
|
|
2523
|
+
reasoning?: ResponseConfigurationUpdateItemParam.Reasoning;
|
|
2524
|
+
}
|
|
2525
|
+
|
|
2526
|
+
export namespace ResponseConfigurationUpdateItemParam {
|
|
2527
|
+
/**
|
|
2528
|
+
* Updates to reasoning configuration. Only effort is supported.
|
|
2529
|
+
*/
|
|
2530
|
+
export interface Reasoning {
|
|
2531
|
+
/**
|
|
2532
|
+
* The reasoning effort to use for subsequent responses until another configuration
|
|
2533
|
+
* update replaces it.
|
|
2534
|
+
*/
|
|
2535
|
+
effort?: Shared.ReasoningEffort | null;
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
|
|
2399
2539
|
/**
|
|
2400
2540
|
* Represents a container created with /v1/containers.
|
|
2401
2541
|
*/
|
|
@@ -2599,6 +2739,11 @@ export interface ResponseCustomToolCall {
|
|
|
2599
2739
|
*/
|
|
2600
2740
|
id?: string;
|
|
2601
2741
|
|
|
2742
|
+
/**
|
|
2743
|
+
* Whether the custom tool call runs asynchronously.
|
|
2744
|
+
*/
|
|
2745
|
+
async?: boolean;
|
|
2746
|
+
|
|
2602
2747
|
/**
|
|
2603
2748
|
* The execution context that produced this tool call.
|
|
2604
2749
|
*/
|
|
@@ -2792,6 +2937,7 @@ export interface ResponseError {
|
|
|
2792
2937
|
| 'invalid_prompt'
|
|
2793
2938
|
| 'data_residency_mismatch'
|
|
2794
2939
|
| 'bio_policy'
|
|
2940
|
+
| 'misalignment_policy_violation'
|
|
2795
2941
|
| 'vector_store_timeout'
|
|
2796
2942
|
| 'invalid_image'
|
|
2797
2943
|
| 'invalid_image_format'
|
|
@@ -2812,6 +2958,44 @@ export interface ResponseError {
|
|
|
2812
2958
|
* A human-readable description of the error.
|
|
2813
2959
|
*/
|
|
2814
2960
|
message: string;
|
|
2961
|
+
|
|
2962
|
+
misalignment?: ResponseError.Misalignment;
|
|
2963
|
+
}
|
|
2964
|
+
|
|
2965
|
+
export namespace ResponseError {
|
|
2966
|
+
export interface Misalignment {
|
|
2967
|
+
/**
|
|
2968
|
+
* The public explanation for this block.
|
|
2969
|
+
*/
|
|
2970
|
+
detailed_explanation?: string;
|
|
2971
|
+
|
|
2972
|
+
/**
|
|
2973
|
+
* An optional classification; clients must accept additional values.
|
|
2974
|
+
*/
|
|
2975
|
+
error_type?:
|
|
2976
|
+
| (string & {})
|
|
2977
|
+
| 'potentially_unintended_data_transfer'
|
|
2978
|
+
| 'potentially_unintended_data_access'
|
|
2979
|
+
| 'potentially_unintended_destructive_activity'
|
|
2980
|
+
| 'other';
|
|
2981
|
+
|
|
2982
|
+
/**
|
|
2983
|
+
* An optional public continuation instruction.
|
|
2984
|
+
*/
|
|
2985
|
+
steer?: Misalignment.Steer;
|
|
2986
|
+
}
|
|
2987
|
+
|
|
2988
|
+
export namespace Misalignment {
|
|
2989
|
+
/**
|
|
2990
|
+
* An optional public continuation instruction.
|
|
2991
|
+
*/
|
|
2992
|
+
export interface Steer {
|
|
2993
|
+
/**
|
|
2994
|
+
* The public continuation instruction.
|
|
2995
|
+
*/
|
|
2996
|
+
message: string;
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2815
2999
|
}
|
|
2816
3000
|
|
|
2817
3001
|
/**
|
|
@@ -3108,11 +3292,6 @@ export interface ResponseFunctionCallArgumentsDoneEvent {
|
|
|
3108
3292
|
*/
|
|
3109
3293
|
item_id: string;
|
|
3110
3294
|
|
|
3111
|
-
/**
|
|
3112
|
-
* The name of the function that was called.
|
|
3113
|
-
*/
|
|
3114
|
-
name: string;
|
|
3115
|
-
|
|
3116
3295
|
/**
|
|
3117
3296
|
* The index of the output item.
|
|
3118
3297
|
*/
|
|
@@ -3412,6 +3591,11 @@ export interface ResponseFunctionToolCall {
|
|
|
3412
3591
|
*/
|
|
3413
3592
|
id?: string;
|
|
3414
3593
|
|
|
3594
|
+
/**
|
|
3595
|
+
* Whether the function tool call runs asynchronously.
|
|
3596
|
+
*/
|
|
3597
|
+
async?: boolean;
|
|
3598
|
+
|
|
3415
3599
|
/**
|
|
3416
3600
|
* The execution context that produced this tool call.
|
|
3417
3601
|
*/
|
|
@@ -3560,7 +3744,7 @@ export interface ResponseFunctionWebSearch {
|
|
|
3560
3744
|
/**
|
|
3561
3745
|
* The status of the web search tool call.
|
|
3562
3746
|
*/
|
|
3563
|
-
status: 'in_progress' | 'searching' | 'completed' | 'failed';
|
|
3747
|
+
status: 'in_progress' | 'searching' | 'completed' | 'failed' | 'incomplete';
|
|
3564
3748
|
|
|
3565
3749
|
/**
|
|
3566
3750
|
* The type of the web search tool call. Always `web_search_call`.
|
|
@@ -3837,6 +4021,10 @@ export type ResponseIncludable =
|
|
|
3837
4021
|
|
|
3838
4022
|
/**
|
|
3839
4023
|
* An event that is emitted when a response finishes as incomplete.
|
|
4024
|
+
*
|
|
4025
|
+
* Over WebSocket, steering can finish a response with
|
|
4026
|
+
* `response.incomplete_details.reason` set to `steered`, followed automatically by
|
|
4027
|
+
* a successor `response.created` that commits the queued steering input.
|
|
3840
4028
|
*/
|
|
3841
4029
|
export interface ResponseIncompleteEvent {
|
|
3842
4030
|
/**
|
|
@@ -4130,6 +4318,7 @@ export type ResponseInputItem =
|
|
|
4130
4318
|
| ResponseInputItem.ToolSearchCall
|
|
4131
4319
|
| ResponseToolSearchOutputItemParam
|
|
4132
4320
|
| ResponseInputItem.AdditionalTools
|
|
4321
|
+
| ResponseConfigurationUpdateItemParam
|
|
4133
4322
|
| ResponseReasoningItem
|
|
4134
4323
|
| ResponseCompactionItemParam
|
|
4135
4324
|
| ResponseInputItem.ImageGenerationCall
|
|
@@ -4385,6 +4574,17 @@ export namespace ResponseInputItem {
|
|
|
4385
4574
|
* The type of the image generation call. Always `image_generation_call`.
|
|
4386
4575
|
*/
|
|
4387
4576
|
type: 'image_generation_call';
|
|
4577
|
+
|
|
4578
|
+
/**
|
|
4579
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
4580
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
4581
|
+
*/
|
|
4582
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
4583
|
+
|
|
4584
|
+
/**
|
|
4585
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
4586
|
+
*/
|
|
4587
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
4388
4588
|
}
|
|
4389
4589
|
|
|
4390
4590
|
/**
|
|
@@ -5171,6 +5371,7 @@ export type ResponseItem =
|
|
|
5171
5371
|
| ResponseToolSearchCall
|
|
5172
5372
|
| ResponseToolSearchOutputItem
|
|
5173
5373
|
| ResponseItem.AdditionalTools
|
|
5374
|
+
| ResponseConfigurationUpdateItem
|
|
5174
5375
|
| ResponseReasoningItem
|
|
5175
5376
|
| ResponseItem.Program
|
|
5176
5377
|
| ResponseItem.ProgramOutput
|
|
@@ -5290,6 +5491,17 @@ export namespace ResponseItem {
|
|
|
5290
5491
|
* The type of the image generation call. Always `image_generation_call`.
|
|
5291
5492
|
*/
|
|
5292
5493
|
type: 'image_generation_call';
|
|
5494
|
+
|
|
5495
|
+
/**
|
|
5496
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
5497
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
5498
|
+
*/
|
|
5499
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
5500
|
+
|
|
5501
|
+
/**
|
|
5502
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
5503
|
+
*/
|
|
5504
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
5293
5505
|
}
|
|
5294
5506
|
|
|
5295
5507
|
/**
|
|
@@ -5931,6 +6143,17 @@ export namespace ResponseOutputItem {
|
|
|
5931
6143
|
* The type of the image generation call. Always `image_generation_call`.
|
|
5932
6144
|
*/
|
|
5933
6145
|
type: 'image_generation_call';
|
|
6146
|
+
|
|
6147
|
+
/**
|
|
6148
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
6149
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
6150
|
+
*/
|
|
6151
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
6152
|
+
|
|
6153
|
+
/**
|
|
6154
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
6155
|
+
*/
|
|
6156
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
5934
6157
|
}
|
|
5935
6158
|
|
|
5936
6159
|
/**
|
|
@@ -7310,130 +7533,151 @@ export namespace ResponseShellCallOutputContentDoneEvent {
|
|
|
7310
7533
|
export type ResponseStatus = 'completed' | 'failed' | 'in_progress' | 'cancelled' | 'queued' | 'incomplete';
|
|
7311
7534
|
|
|
7312
7535
|
/**
|
|
7313
|
-
*
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
|
|
7317
|
-
| ResponseAudioDoneEvent
|
|
7318
|
-
| ResponseAudioTranscriptDeltaEvent
|
|
7319
|
-
| ResponseAudioTranscriptDoneEvent
|
|
7320
|
-
| ResponseCodeInterpreterCallCodeDeltaEvent
|
|
7321
|
-
| ResponseCodeInterpreterCallCodeDoneEvent
|
|
7322
|
-
| ResponseCodeInterpreterCallCompletedEvent
|
|
7323
|
-
| ResponseCodeInterpreterCallInProgressEvent
|
|
7324
|
-
| ResponseCodeInterpreterCallInterpretingEvent
|
|
7325
|
-
| ResponseCompletedEvent
|
|
7326
|
-
| ResponseContentPartAddedEvent
|
|
7327
|
-
| ResponseContentPartDoneEvent
|
|
7328
|
-
| ResponseCreatedEvent
|
|
7329
|
-
| ResponseErrorEvent
|
|
7330
|
-
| ResponseFileSearchCallCompletedEvent
|
|
7331
|
-
| ResponseFileSearchCallInProgressEvent
|
|
7332
|
-
| ResponseFileSearchCallSearchingEvent
|
|
7333
|
-
| ResponseFunctionCallArgumentsDeltaEvent
|
|
7334
|
-
| ResponseFunctionCallArgumentsDoneEvent
|
|
7335
|
-
| ResponseShellCallCommandAddedEvent
|
|
7336
|
-
| ResponseShellCallCommandDeltaEvent
|
|
7337
|
-
| ResponseShellCallCommandDoneEvent
|
|
7338
|
-
| ResponseShellCallOutputContentDeltaEvent
|
|
7339
|
-
| ResponseShellCallOutputContentDoneEvent
|
|
7340
|
-
| ResponseInProgressEvent
|
|
7341
|
-
| ResponseFailedEvent
|
|
7342
|
-
| ResponseIncompleteEvent
|
|
7343
|
-
| ResponseOutputItemAddedEvent
|
|
7344
|
-
| ResponseOutputItemDoneEvent
|
|
7345
|
-
| ResponseReasoningSummaryPartAddedEvent
|
|
7346
|
-
| ResponseReasoningSummaryPartDoneEvent
|
|
7347
|
-
| ResponseReasoningSummaryTextDeltaEvent
|
|
7348
|
-
| ResponseReasoningSummaryTextDoneEvent
|
|
7349
|
-
| ResponseReasoningTextDeltaEvent
|
|
7350
|
-
| ResponseReasoningTextDoneEvent
|
|
7351
|
-
| ResponseRefusalDeltaEvent
|
|
7352
|
-
| ResponseRefusalDoneEvent
|
|
7353
|
-
| ResponseTextDeltaEvent
|
|
7354
|
-
| ResponseTextDoneEvent
|
|
7355
|
-
| ResponseWebSearchCallCompletedEvent
|
|
7356
|
-
| ResponseWebSearchCallInProgressEvent
|
|
7357
|
-
| ResponseWebSearchCallSearchingEvent
|
|
7358
|
-
| ResponseImageGenCallCompletedEvent
|
|
7359
|
-
| ResponseImageGenCallGeneratingEvent
|
|
7360
|
-
| ResponseImageGenCallInProgressEvent
|
|
7361
|
-
| ResponseImageGenCallPartialImageEvent
|
|
7362
|
-
| ResponseMcpCallArgumentsDeltaEvent
|
|
7363
|
-
| ResponseMcpCallArgumentsDoneEvent
|
|
7364
|
-
| ResponseMcpCallCompletedEvent
|
|
7365
|
-
| ResponseMcpCallFailedEvent
|
|
7366
|
-
| ResponseMcpCallInProgressEvent
|
|
7367
|
-
| ResponseMcpListToolsCompletedEvent
|
|
7368
|
-
| ResponseMcpListToolsFailedEvent
|
|
7369
|
-
| ResponseMcpListToolsInProgressEvent
|
|
7370
|
-
| ResponseOutputTextAnnotationAddedEvent
|
|
7371
|
-
| ResponseQueuedEvent
|
|
7372
|
-
| ResponseCustomToolCallInputDeltaEvent
|
|
7373
|
-
| ResponseCustomToolCallInputDoneEvent;
|
|
7374
|
-
|
|
7375
|
-
/**
|
|
7376
|
-
* Configuration options for a text response from the model. Can be plain text or
|
|
7377
|
-
* structured JSON data. Learn more:
|
|
7536
|
+
* Emitted when steering input has been validated and queued. Acceptance means the
|
|
7537
|
+
* server owns the input, not that it has been applied. The successor's
|
|
7538
|
+
* `response.created` event is the commit point. If accepted input cannot be
|
|
7539
|
+
* committed, `response.steer.failed` returns it with the same steering ID.
|
|
7378
7540
|
*
|
|
7379
|
-
* -
|
|
7380
|
-
*
|
|
7541
|
+
* When the response stops for client-owned tool output or approval, the input
|
|
7542
|
+
* remains queued and `response.steer.pending` is emitted after
|
|
7543
|
+
* `response.completed`. Fill the pending event's `required_input` stubs with saved
|
|
7544
|
+
* results and send one matching explicit `response.create` per parent. Do not
|
|
7545
|
+
* resend accepted input while it is still queued.
|
|
7381
7546
|
*/
|
|
7382
|
-
export interface
|
|
7547
|
+
export interface ResponseSteerAcceptedEvent {
|
|
7383
7548
|
/**
|
|
7384
|
-
*
|
|
7385
|
-
*
|
|
7386
|
-
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
7387
|
-
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
7388
|
-
* [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
|
|
7389
|
-
*
|
|
7390
|
-
* The default format is `{ "type": "text" }` with no additional options.
|
|
7391
|
-
*
|
|
7392
|
-
* **Not recommended for gpt-4o and newer models:**
|
|
7393
|
-
*
|
|
7394
|
-
* Setting to `{ "type": "json_object" }` enables the older JSON mode, which
|
|
7395
|
-
* ensures the message the model generates is valid JSON. Using `json_schema` is
|
|
7396
|
-
* preferred for models that support it.
|
|
7549
|
+
* The sequence number for this event.
|
|
7397
7550
|
*/
|
|
7398
|
-
|
|
7551
|
+
sequence_number: number;
|
|
7399
7552
|
|
|
7400
7553
|
/**
|
|
7401
|
-
*
|
|
7402
|
-
* more concise responses, while higher values will result in more verbose
|
|
7403
|
-
* responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
7404
|
-
* default is `medium`.
|
|
7554
|
+
* The accepted steering submission.
|
|
7405
7555
|
*/
|
|
7406
|
-
|
|
7556
|
+
steer: ResponseSteerAcceptedEvent.Steer;
|
|
7557
|
+
|
|
7558
|
+
/**
|
|
7559
|
+
* The event discriminator. Always `response.steer.accepted`.
|
|
7560
|
+
*/
|
|
7561
|
+
type: 'response.steer.accepted';
|
|
7562
|
+
|
|
7563
|
+
/**
|
|
7564
|
+
* The WebSocket lane that emitted this event. This field is present when the
|
|
7565
|
+
* target response's `response.create` event supplied a `stream_id`.
|
|
7566
|
+
*/
|
|
7567
|
+
stream_id?: string;
|
|
7407
7568
|
}
|
|
7408
7569
|
|
|
7409
|
-
|
|
7410
|
-
* Emitted when there is an additional text delta.
|
|
7411
|
-
*/
|
|
7412
|
-
export interface ResponseTextDeltaEvent {
|
|
7570
|
+
export namespace ResponseSteerAcceptedEvent {
|
|
7413
7571
|
/**
|
|
7414
|
-
* The
|
|
7572
|
+
* The accepted steering submission.
|
|
7415
7573
|
*/
|
|
7416
|
-
|
|
7574
|
+
export interface Steer {
|
|
7575
|
+
/**
|
|
7576
|
+
* The ID assigned to the steering submission.
|
|
7577
|
+
*/
|
|
7578
|
+
id: string;
|
|
7579
|
+
|
|
7580
|
+
/**
|
|
7581
|
+
* The ID of the response being steered.
|
|
7582
|
+
*/
|
|
7583
|
+
previous_response_id: string;
|
|
7584
|
+
}
|
|
7585
|
+
}
|
|
7417
7586
|
|
|
7587
|
+
/**
|
|
7588
|
+
* A machine-readable steering error code. Clients should handle unknown values
|
|
7589
|
+
* because additional codes may be introduced. Known values include:
|
|
7590
|
+
*
|
|
7591
|
+
* - `response_not_found`: The target response is not available on this connection.
|
|
7592
|
+
* - `invalid_input`: The event or input failed validation.
|
|
7593
|
+
* - `steering_not_supported`: The model or response execution mode does not
|
|
7594
|
+
* support steering.
|
|
7595
|
+
* - `too_many_pending_steers`: Too much steering input is pending for the
|
|
7596
|
+
* response.
|
|
7597
|
+
* - `response_already_completed`: The response completed and is no longer
|
|
7598
|
+
* accepting steering input.
|
|
7599
|
+
* - `response_not_active`: The response is no longer accepting steering input.
|
|
7600
|
+
* - `successor_creation_failed`: The successor response could not be created.
|
|
7601
|
+
*/
|
|
7602
|
+
export type ResponseSteerErrorCode =
|
|
7603
|
+
| 'response_not_found'
|
|
7604
|
+
| 'invalid_input'
|
|
7605
|
+
| 'steering_not_supported'
|
|
7606
|
+
| 'too_many_pending_steers'
|
|
7607
|
+
| 'response_already_completed'
|
|
7608
|
+
| 'response_not_active'
|
|
7609
|
+
| 'successor_creation_failed'
|
|
7610
|
+
| (string & {});
|
|
7611
|
+
|
|
7612
|
+
/**
|
|
7613
|
+
* Queues user input to steer a response on this WebSocket connection. Input can
|
|
7614
|
+
* contain text, images, and files. Steering is supported only for single-agent
|
|
7615
|
+
* responses on models and execution modes that support steering. Responses bound
|
|
7616
|
+
* to a conversation or using automatic compaction do not support steering.
|
|
7617
|
+
*
|
|
7618
|
+
* A `response.steer.accepted` event acknowledges that the server owns the queued
|
|
7619
|
+
* input, not that it has been applied. The successor's `response.created` event is
|
|
7620
|
+
* the commit point. Input that cannot be committed is returned in
|
|
7621
|
+
* `response.steer.failed`.
|
|
7622
|
+
*
|
|
7623
|
+
* Steering may cause the active response to finish at a safe output boundary with
|
|
7624
|
+
* `response.incomplete` and `incomplete_details.reason` set to `steered`, followed
|
|
7625
|
+
* automatically by a successor `response.created`. Normal completion can also be
|
|
7626
|
+
* followed by an automatic successor. Automatic successors inherit the previous
|
|
7627
|
+
* response's settings and continue from it with the queued input.
|
|
7628
|
+
*
|
|
7629
|
+
* If the response stops for client-owned tool output or approval, accepted
|
|
7630
|
+
* steering input remains queued and `response.steer.pending` is emitted after
|
|
7631
|
+
* `response.completed`. Fill the `required_input` stubs from that event with saved
|
|
7632
|
+
* tool results or approval decisions, and send one explicit `response.create` per
|
|
7633
|
+
* parent with the same `previous_response_id` and WebSocket lane. Do not rerun
|
|
7634
|
+
* tools or resend accepted steering input. The queued input is prepended in
|
|
7635
|
+
* submission order to that request's input, and the explicit request retains its
|
|
7636
|
+
* own settings.
|
|
7637
|
+
*
|
|
7638
|
+
* This event accepts only `type`, `previous_response_id`, and `input`. Do not send
|
|
7639
|
+
* `stream_id`; the target response determines the WebSocket lane.
|
|
7640
|
+
*/
|
|
7641
|
+
export interface ResponseSteerEvent {
|
|
7418
7642
|
/**
|
|
7419
|
-
*
|
|
7643
|
+
* Input to queue for a continuation of the response. Uses the same string or
|
|
7644
|
+
* input-item shape as `response.create.input`, with a non-empty array when
|
|
7645
|
+
* supplying input items.
|
|
7646
|
+
*
|
|
7647
|
+
* Steering accepts only messages with the `user` role. Each message may contain
|
|
7648
|
+
* only `type`, `role`, and `content`, with `content` as a string or an array of
|
|
7649
|
+
* `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
|
|
7650
|
+
* `message`. Other roles, tool outputs, and item types are not supported for
|
|
7651
|
+
* steering.
|
|
7420
7652
|
*/
|
|
7421
|
-
|
|
7653
|
+
input: ResponseSteerInput;
|
|
7422
7654
|
|
|
7423
7655
|
/**
|
|
7424
|
-
* The ID of the
|
|
7656
|
+
* The ID of the response to steer on this WebSocket connection.
|
|
7425
7657
|
*/
|
|
7426
|
-
|
|
7658
|
+
previous_response_id: string;
|
|
7427
7659
|
|
|
7428
7660
|
/**
|
|
7429
|
-
* The
|
|
7661
|
+
* The event discriminator. Always `response.steer`.
|
|
7430
7662
|
*/
|
|
7431
|
-
|
|
7663
|
+
type: 'response.steer';
|
|
7664
|
+
}
|
|
7432
7665
|
|
|
7666
|
+
/**
|
|
7667
|
+
* Emitted when steering input is rejected or cannot be committed to a successor
|
|
7668
|
+
* response. Returns the original, uncommitted input so the client can carry it
|
|
7669
|
+
* into `response.create` when appropriate. Invalid input must be corrected before
|
|
7670
|
+
* retrying.
|
|
7671
|
+
*
|
|
7672
|
+
* Failures after acceptance include the same steering ID. Failures before an ID is
|
|
7673
|
+
* allocated omit `steer.id`. A lost connection or missing acknowledgement leaves
|
|
7674
|
+
* the outcome unknown; it is not proof that the input was rejected.
|
|
7675
|
+
*/
|
|
7676
|
+
export interface ResponseSteerFailedEvent {
|
|
7433
7677
|
/**
|
|
7434
|
-
*
|
|
7678
|
+
* Information about why the input could not be committed.
|
|
7435
7679
|
*/
|
|
7436
|
-
|
|
7680
|
+
error: ResponseSteerFailedEvent.Error;
|
|
7437
7681
|
|
|
7438
7682
|
/**
|
|
7439
7683
|
* The sequence number for this event.
|
|
@@ -7441,15 +7685,522 @@ export interface ResponseTextDeltaEvent {
|
|
|
7441
7685
|
sequence_number: number;
|
|
7442
7686
|
|
|
7443
7687
|
/**
|
|
7444
|
-
* The
|
|
7688
|
+
* The steering submission that could not be committed.
|
|
7445
7689
|
*/
|
|
7446
|
-
|
|
7447
|
-
}
|
|
7690
|
+
steer: ResponseSteerFailedEvent.Steer;
|
|
7448
7691
|
|
|
7449
|
-
export namespace ResponseTextDeltaEvent {
|
|
7450
7692
|
/**
|
|
7451
|
-
*
|
|
7452
|
-
|
|
7693
|
+
* The event discriminator. Always `response.steer.failed`.
|
|
7694
|
+
*/
|
|
7695
|
+
type: 'response.steer.failed';
|
|
7696
|
+
|
|
7697
|
+
/**
|
|
7698
|
+
* The WebSocket lane that emitted this event, when the target response is
|
|
7699
|
+
* available and its `response.create` event supplied a `stream_id`.
|
|
7700
|
+
*/
|
|
7701
|
+
stream_id?: string;
|
|
7702
|
+
}
|
|
7703
|
+
|
|
7704
|
+
export namespace ResponseSteerFailedEvent {
|
|
7705
|
+
/**
|
|
7706
|
+
* Information about why the input could not be committed.
|
|
7707
|
+
*/
|
|
7708
|
+
export interface Error {
|
|
7709
|
+
/**
|
|
7710
|
+
* A machine-readable steering error code. Clients should handle unknown values
|
|
7711
|
+
* because additional codes may be introduced. Known values include:
|
|
7712
|
+
*
|
|
7713
|
+
* - `response_not_found`: The target response is not available on this connection.
|
|
7714
|
+
* - `invalid_input`: The event or input failed validation.
|
|
7715
|
+
* - `steering_not_supported`: The model or response execution mode does not
|
|
7716
|
+
* support steering.
|
|
7717
|
+
* - `too_many_pending_steers`: Too much steering input is pending for the
|
|
7718
|
+
* response.
|
|
7719
|
+
* - `response_already_completed`: The response completed and is no longer
|
|
7720
|
+
* accepting steering input.
|
|
7721
|
+
* - `response_not_active`: The response is no longer accepting steering input.
|
|
7722
|
+
* - `successor_creation_failed`: The successor response could not be created.
|
|
7723
|
+
*/
|
|
7724
|
+
code: ResponsesAPI.ResponseSteerErrorCode;
|
|
7725
|
+
|
|
7726
|
+
/**
|
|
7727
|
+
* A human-readable description of the error.
|
|
7728
|
+
*/
|
|
7729
|
+
message: string;
|
|
7730
|
+
|
|
7731
|
+
/**
|
|
7732
|
+
* The error type. Always `invalid_request_error`.
|
|
7733
|
+
*/
|
|
7734
|
+
type: 'invalid_request_error';
|
|
7735
|
+
}
|
|
7736
|
+
|
|
7737
|
+
/**
|
|
7738
|
+
* The steering submission that could not be committed.
|
|
7739
|
+
*/
|
|
7740
|
+
export interface Steer {
|
|
7741
|
+
/**
|
|
7742
|
+
* Input to queue for a continuation of the response. Uses the same string or
|
|
7743
|
+
* input-item shape as `response.create.input`, with a non-empty array when
|
|
7744
|
+
* supplying input items.
|
|
7745
|
+
*
|
|
7746
|
+
* Steering accepts only messages with the `user` role. Each message may contain
|
|
7747
|
+
* only `type`, `role`, and `content`, with `content` as a string or an array of
|
|
7748
|
+
* `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
|
|
7749
|
+
* `message`. Other roles, tool outputs, and item types are not supported for
|
|
7750
|
+
* steering.
|
|
7751
|
+
*/
|
|
7752
|
+
input: ResponsesAPI.ResponseSteerInput;
|
|
7753
|
+
|
|
7754
|
+
/**
|
|
7755
|
+
* The ID of the response that was targeted for steering.
|
|
7756
|
+
*/
|
|
7757
|
+
previous_response_id: string;
|
|
7758
|
+
|
|
7759
|
+
/**
|
|
7760
|
+
* The ID assigned to the steering submission, if one was allocated.
|
|
7761
|
+
*/
|
|
7762
|
+
id?: string;
|
|
7763
|
+
}
|
|
7764
|
+
}
|
|
7765
|
+
|
|
7766
|
+
/**
|
|
7767
|
+
* Input to queue for a continuation of the response. Uses the same string or
|
|
7768
|
+
* input-item shape as `response.create.input`, with a non-empty array when
|
|
7769
|
+
* supplying input items.
|
|
7770
|
+
*
|
|
7771
|
+
* Steering accepts only messages with the `user` role. Each message may contain
|
|
7772
|
+
* only `type`, `role`, and `content`, with `content` as a string or an array of
|
|
7773
|
+
* `input_text`, `input_image`, and `input_file` parts. The optional `type` must be
|
|
7774
|
+
* `message`. Other roles, tool outputs, and item types are not supported for
|
|
7775
|
+
* steering.
|
|
7776
|
+
*/
|
|
7777
|
+
export type ResponseSteerInput =
|
|
7778
|
+
| string
|
|
7779
|
+
| Array<ResponseSteerInputItemList.Message | ResponseSteerInputItemList.FunctionCallOutput>;
|
|
7780
|
+
|
|
7781
|
+
export namespace ResponseSteerInputItemList {
|
|
7782
|
+
export interface Message {
|
|
7783
|
+
/**
|
|
7784
|
+
* The message content, as an array of content parts.
|
|
7785
|
+
*/
|
|
7786
|
+
content: Array<ResponsesAPI.ResponseSteerInputContent> | string;
|
|
7787
|
+
|
|
7788
|
+
/**
|
|
7789
|
+
* The message role. Always `user`.
|
|
7790
|
+
*/
|
|
7791
|
+
role: 'user';
|
|
7792
|
+
|
|
7793
|
+
/**
|
|
7794
|
+
* The item type. Always `message`.
|
|
7795
|
+
*/
|
|
7796
|
+
type: 'message';
|
|
7797
|
+
|
|
7798
|
+
/**
|
|
7799
|
+
* The unique ID of this message item.
|
|
7800
|
+
*/
|
|
7801
|
+
id?: string | null;
|
|
7802
|
+
|
|
7803
|
+
/**
|
|
7804
|
+
* The status of the message item.
|
|
7805
|
+
*/
|
|
7806
|
+
status?: string | null;
|
|
7807
|
+
}
|
|
7808
|
+
|
|
7809
|
+
/**
|
|
7810
|
+
* The output of a function tool call.
|
|
7811
|
+
*/
|
|
7812
|
+
export interface FunctionCallOutput {
|
|
7813
|
+
/**
|
|
7814
|
+
* Text, image, or file output of the function tool call.
|
|
7815
|
+
*/
|
|
7816
|
+
output: string | ResponsesAPI.ResponseFunctionCallOutputItemList;
|
|
7817
|
+
|
|
7818
|
+
/**
|
|
7819
|
+
* The type of the function tool call output. Always `function_call_output`.
|
|
7820
|
+
*/
|
|
7821
|
+
type: 'function_call_output';
|
|
7822
|
+
|
|
7823
|
+
/**
|
|
7824
|
+
* The unique ID of the function tool call output. Populated when this item is
|
|
7825
|
+
* returned via API.
|
|
7826
|
+
*/
|
|
7827
|
+
id?: string | null;
|
|
7828
|
+
|
|
7829
|
+
/**
|
|
7830
|
+
* The unique ID of the function tool call generated by the model.
|
|
7831
|
+
*/
|
|
7832
|
+
call_id?: string | null;
|
|
7833
|
+
|
|
7834
|
+
/**
|
|
7835
|
+
* The execution context that produced this tool call.
|
|
7836
|
+
*/
|
|
7837
|
+
caller?: FunctionCallOutput.Direct | FunctionCallOutput.Program | null;
|
|
7838
|
+
|
|
7839
|
+
/**
|
|
7840
|
+
* The name of the tool that produced the output.
|
|
7841
|
+
*/
|
|
7842
|
+
name?: string | null;
|
|
7843
|
+
|
|
7844
|
+
/**
|
|
7845
|
+
* The namespace of the tool that produced the output.
|
|
7846
|
+
*/
|
|
7847
|
+
namespace?: string | null;
|
|
7848
|
+
|
|
7849
|
+
/**
|
|
7850
|
+
* The status of the item. One of `in_progress`, `completed`, or `incomplete`.
|
|
7851
|
+
* Populated when items are returned via API.
|
|
7852
|
+
*/
|
|
7853
|
+
status?: 'in_progress' | 'completed' | 'incomplete' | null;
|
|
7854
|
+
}
|
|
7855
|
+
|
|
7856
|
+
export namespace FunctionCallOutput {
|
|
7857
|
+
export interface Direct {
|
|
7858
|
+
/**
|
|
7859
|
+
* The caller type. Always `direct`.
|
|
7860
|
+
*/
|
|
7861
|
+
type: 'direct';
|
|
7862
|
+
}
|
|
7863
|
+
|
|
7864
|
+
export interface Program {
|
|
7865
|
+
/**
|
|
7866
|
+
* The call ID of the program item that produced this tool call.
|
|
7867
|
+
*/
|
|
7868
|
+
caller_id: string;
|
|
7869
|
+
|
|
7870
|
+
/**
|
|
7871
|
+
* The caller type. Always `program`.
|
|
7872
|
+
*/
|
|
7873
|
+
type: 'program';
|
|
7874
|
+
}
|
|
7875
|
+
}
|
|
7876
|
+
}
|
|
7877
|
+
|
|
7878
|
+
/**
|
|
7879
|
+
* A piece of message content, such as text, an image, or a file.
|
|
7880
|
+
*/
|
|
7881
|
+
export type ResponseSteerInputContent =
|
|
7882
|
+
| ResponseInputTextContent
|
|
7883
|
+
| ResponseInputImageContent
|
|
7884
|
+
| ResponseInputFileContent;
|
|
7885
|
+
|
|
7886
|
+
/**
|
|
7887
|
+
* Emitted when accepted steering input remains queued after the target response
|
|
7888
|
+
* completes. The server still owns the input. Do not resend it. The successor's
|
|
7889
|
+
* `response.created` event is the commit point.
|
|
7890
|
+
*
|
|
7891
|
+
* When `reason` is `waiting_for_required_input`, this event follows
|
|
7892
|
+
* `response.completed` while the response waits for the tool results or approval
|
|
7893
|
+
* decisions identified by `required_input`. Copy those stubs, fill their result
|
|
7894
|
+
* fields using the ordinary `response.create` input schemas, and submit one
|
|
7895
|
+
* continuation per parent with the same `previous_response_id` and WebSocket lane.
|
|
7896
|
+
* Use saved results without rerunning tools. The queued steering input is
|
|
7897
|
+
* prepended in submission order to the continuation's input. That explicit request
|
|
7898
|
+
* retains its own settings.
|
|
7899
|
+
*
|
|
7900
|
+
* This notification is emitted at most once per steering submission. Multiple
|
|
7901
|
+
* submissions for the same parent can report the same required inputs; they do not
|
|
7902
|
+
* each require a separate continuation.
|
|
7903
|
+
*/
|
|
7904
|
+
export interface ResponseSteerPendingEvent {
|
|
7905
|
+
/**
|
|
7906
|
+
* An extensible enum describing why accepted steering input is still queued.
|
|
7907
|
+
* Clients should handle unknown values because additional reasons may be
|
|
7908
|
+
* introduced. Known values include:
|
|
7909
|
+
*
|
|
7910
|
+
* - `waiting_for_required_input`: The response is waiting for the tool results or
|
|
7911
|
+
* approval decisions identified by `required_input`.
|
|
7912
|
+
*/
|
|
7913
|
+
reason: ResponseSteerPendingReason;
|
|
7914
|
+
|
|
7915
|
+
/**
|
|
7916
|
+
* Input stubs identifying outstanding client-owned tool results or approval
|
|
7917
|
+
* decisions. Each stub contains identifying fields only; the client supplies the
|
|
7918
|
+
* result before including it in `response.create`.
|
|
7919
|
+
*/
|
|
7920
|
+
required_input: Array<ResponseSteerRequiredInput>;
|
|
7921
|
+
|
|
7922
|
+
/**
|
|
7923
|
+
* The sequence number for this event.
|
|
7924
|
+
*/
|
|
7925
|
+
sequence_number: number;
|
|
7926
|
+
|
|
7927
|
+
/**
|
|
7928
|
+
* The steering submission that remains queued.
|
|
7929
|
+
*/
|
|
7930
|
+
steer: ResponseSteerPendingEvent.Steer;
|
|
7931
|
+
|
|
7932
|
+
/**
|
|
7933
|
+
* The event discriminator. Always `response.steer.pending`.
|
|
7934
|
+
*/
|
|
7935
|
+
type: 'response.steer.pending';
|
|
7936
|
+
|
|
7937
|
+
/**
|
|
7938
|
+
* The WebSocket lane that emitted this event. This field is present when the
|
|
7939
|
+
* target response's `response.create` event supplied a `stream_id`.
|
|
7940
|
+
*/
|
|
7941
|
+
stream_id?: string;
|
|
7942
|
+
}
|
|
7943
|
+
|
|
7944
|
+
export namespace ResponseSteerPendingEvent {
|
|
7945
|
+
/**
|
|
7946
|
+
* The steering submission that remains queued.
|
|
7947
|
+
*/
|
|
7948
|
+
export interface Steer {
|
|
7949
|
+
/**
|
|
7950
|
+
* The ID assigned to the steering submission.
|
|
7951
|
+
*/
|
|
7952
|
+
id: string;
|
|
7953
|
+
|
|
7954
|
+
/**
|
|
7955
|
+
* The ID of the response being steered.
|
|
7956
|
+
*/
|
|
7957
|
+
previous_response_id: string;
|
|
7958
|
+
}
|
|
7959
|
+
}
|
|
7960
|
+
|
|
7961
|
+
/**
|
|
7962
|
+
* An extensible enum describing why accepted steering input is still queued.
|
|
7963
|
+
* Clients should handle unknown values because additional reasons may be
|
|
7964
|
+
* introduced. Known values include:
|
|
7965
|
+
*
|
|
7966
|
+
* - `waiting_for_required_input`: The response is waiting for the tool results or
|
|
7967
|
+
* approval decisions identified by `required_input`.
|
|
7968
|
+
*/
|
|
7969
|
+
export type ResponseSteerPendingReason = 'waiting_for_required_input' | (string & {});
|
|
7970
|
+
|
|
7971
|
+
/**
|
|
7972
|
+
* An input stub identifying an outstanding client-owned tool result or approval
|
|
7973
|
+
* decision. Copy the stub and fill the result fields using the corresponding
|
|
7974
|
+
* `response.create` input schema. Use saved results without rerunning the tool.
|
|
7975
|
+
* The server does not supply results, approval decisions, or safety
|
|
7976
|
+
* acknowledgements in these stubs.
|
|
7977
|
+
*/
|
|
7978
|
+
export type ResponseSteerRequiredInput =
|
|
7979
|
+
| ResponseSteerRequiredInput.FunctionCallOutput
|
|
7980
|
+
| ResponseSteerRequiredInput.CustomToolCallOutput
|
|
7981
|
+
| ResponseSteerRequiredInput.ComputerCallOutput
|
|
7982
|
+
| ResponseSteerRequiredInput.ShellCallOutput
|
|
7983
|
+
| ResponseSteerRequiredInput.ApplyPatchCallOutput
|
|
7984
|
+
| ResponseSteerRequiredInput.ToolSearchOutput
|
|
7985
|
+
| ResponseSteerRequiredInput.McpApprovalResponse;
|
|
7986
|
+
|
|
7987
|
+
export namespace ResponseSteerRequiredInput {
|
|
7988
|
+
/**
|
|
7989
|
+
* Supply `output` using the function tool call output input schema.
|
|
7990
|
+
*/
|
|
7991
|
+
export interface FunctionCallOutput {
|
|
7992
|
+
call_id: string;
|
|
7993
|
+
|
|
7994
|
+
name: string;
|
|
7995
|
+
|
|
7996
|
+
type: 'function_call_output';
|
|
7997
|
+
}
|
|
7998
|
+
|
|
7999
|
+
/**
|
|
8000
|
+
* Supply `output` using the custom tool call output input schema. The original
|
|
8001
|
+
* custom tool call supplies the tool's name.
|
|
8002
|
+
*/
|
|
8003
|
+
export interface CustomToolCallOutput {
|
|
8004
|
+
call_id: string;
|
|
8005
|
+
|
|
8006
|
+
type: 'custom_tool_call_output';
|
|
8007
|
+
}
|
|
8008
|
+
|
|
8009
|
+
/**
|
|
8010
|
+
* Supply `output` using the computer tool call output input schema, including any
|
|
8011
|
+
* required `acknowledged_safety_checks`.
|
|
8012
|
+
*/
|
|
8013
|
+
export interface ComputerCallOutput {
|
|
8014
|
+
call_id: string;
|
|
8015
|
+
|
|
8016
|
+
type: 'computer_call_output';
|
|
8017
|
+
}
|
|
8018
|
+
|
|
8019
|
+
/**
|
|
8020
|
+
* Supply `output` using the shell tool call output input schema. Each output entry
|
|
8021
|
+
* includes `stdout`, `stderr`, and `outcome`.
|
|
8022
|
+
*/
|
|
8023
|
+
export interface ShellCallOutput {
|
|
8024
|
+
call_id: string;
|
|
8025
|
+
|
|
8026
|
+
type: 'shell_call_output';
|
|
8027
|
+
}
|
|
8028
|
+
|
|
8029
|
+
/**
|
|
8030
|
+
* Supply `status` and optional `output` using the apply patch tool call output
|
|
8031
|
+
* input schema.
|
|
8032
|
+
*/
|
|
8033
|
+
export interface ApplyPatchCallOutput {
|
|
8034
|
+
call_id: string;
|
|
8035
|
+
|
|
8036
|
+
type: 'apply_patch_call_output';
|
|
8037
|
+
}
|
|
8038
|
+
|
|
8039
|
+
/**
|
|
8040
|
+
* Supply `tools` using the tool search output input schema, retaining
|
|
8041
|
+
* `execution: "client"`.
|
|
8042
|
+
*/
|
|
8043
|
+
export interface ToolSearchOutput {
|
|
8044
|
+
call_id: string;
|
|
8045
|
+
|
|
8046
|
+
execution: 'client';
|
|
8047
|
+
|
|
8048
|
+
type: 'tool_search_output';
|
|
8049
|
+
}
|
|
8050
|
+
|
|
8051
|
+
/**
|
|
8052
|
+
* Supply `approve` using the MCP approval response input schema. An optional
|
|
8053
|
+
* `reason` can be supplied when denying the request. The original approval request
|
|
8054
|
+
* identifies the tool and server.
|
|
8055
|
+
*/
|
|
8056
|
+
export interface McpApprovalResponse {
|
|
8057
|
+
approval_request_id: string;
|
|
8058
|
+
|
|
8059
|
+
type: 'mcp_approval_response';
|
|
8060
|
+
}
|
|
8061
|
+
}
|
|
8062
|
+
|
|
8063
|
+
/**
|
|
8064
|
+
* Event emitted while a response is streamed.
|
|
8065
|
+
*/
|
|
8066
|
+
export type ResponseStreamEvent =
|
|
8067
|
+
| ResponseAudioDeltaEvent
|
|
8068
|
+
| ResponseAudioDoneEvent
|
|
8069
|
+
| ResponseAudioTranscriptDeltaEvent
|
|
8070
|
+
| ResponseAudioTranscriptDoneEvent
|
|
8071
|
+
| ResponseCodeInterpreterCallCodeDeltaEvent
|
|
8072
|
+
| ResponseCodeInterpreterCallCodeDoneEvent
|
|
8073
|
+
| ResponseCodeInterpreterCallCompletedEvent
|
|
8074
|
+
| ResponseCodeInterpreterCallInProgressEvent
|
|
8075
|
+
| ResponseCodeInterpreterCallInterpretingEvent
|
|
8076
|
+
| ResponseCompletedEvent
|
|
8077
|
+
| ResponseContentPartAddedEvent
|
|
8078
|
+
| ResponseContentPartDoneEvent
|
|
8079
|
+
| ResponseCreatedEvent
|
|
8080
|
+
| ResponseErrorEvent
|
|
8081
|
+
| ResponseFileSearchCallCompletedEvent
|
|
8082
|
+
| ResponseFileSearchCallInProgressEvent
|
|
8083
|
+
| ResponseFileSearchCallSearchingEvent
|
|
8084
|
+
| ResponseFunctionCallArgumentsDeltaEvent
|
|
8085
|
+
| ResponseFunctionCallArgumentsDoneEvent
|
|
8086
|
+
| ResponseShellCallCommandAddedEvent
|
|
8087
|
+
| ResponseShellCallCommandDeltaEvent
|
|
8088
|
+
| ResponseShellCallCommandDoneEvent
|
|
8089
|
+
| ResponseShellCallOutputContentDeltaEvent
|
|
8090
|
+
| ResponseShellCallOutputContentDoneEvent
|
|
8091
|
+
| ResponseInProgressEvent
|
|
8092
|
+
| ResponseFailedEvent
|
|
8093
|
+
| ResponseIncompleteEvent
|
|
8094
|
+
| ResponseOutputItemAddedEvent
|
|
8095
|
+
| ResponseOutputItemDoneEvent
|
|
8096
|
+
| ResponseReasoningSummaryPartAddedEvent
|
|
8097
|
+
| ResponseReasoningSummaryPartDoneEvent
|
|
8098
|
+
| ResponseReasoningSummaryTextDeltaEvent
|
|
8099
|
+
| ResponseReasoningSummaryTextDoneEvent
|
|
8100
|
+
| ResponseReasoningTextDeltaEvent
|
|
8101
|
+
| ResponseReasoningTextDoneEvent
|
|
8102
|
+
| ResponseRefusalDeltaEvent
|
|
8103
|
+
| ResponseRefusalDoneEvent
|
|
8104
|
+
| ResponseTextDeltaEvent
|
|
8105
|
+
| ResponseTextDoneEvent
|
|
8106
|
+
| ResponseWebSearchCallCompletedEvent
|
|
8107
|
+
| ResponseWebSearchCallInProgressEvent
|
|
8108
|
+
| ResponseWebSearchCallSearchingEvent
|
|
8109
|
+
| ResponseImageGenCallCompletedEvent
|
|
8110
|
+
| ResponseImageGenCallGeneratingEvent
|
|
8111
|
+
| ResponseImageGenCallInProgressEvent
|
|
8112
|
+
| ResponseImageGenCallPartialImageEvent
|
|
8113
|
+
| ResponseMcpCallArgumentsDeltaEvent
|
|
8114
|
+
| ResponseMcpCallArgumentsDoneEvent
|
|
8115
|
+
| ResponseMcpCallCompletedEvent
|
|
8116
|
+
| ResponseMcpCallFailedEvent
|
|
8117
|
+
| ResponseMcpCallInProgressEvent
|
|
8118
|
+
| ResponseMcpListToolsCompletedEvent
|
|
8119
|
+
| ResponseMcpListToolsFailedEvent
|
|
8120
|
+
| ResponseMcpListToolsInProgressEvent
|
|
8121
|
+
| ResponseOutputTextAnnotationAddedEvent
|
|
8122
|
+
| ResponseQueuedEvent
|
|
8123
|
+
| ResponseCustomToolCallInputDeltaEvent
|
|
8124
|
+
| ResponseCustomToolCallInputDoneEvent;
|
|
8125
|
+
|
|
8126
|
+
/**
|
|
8127
|
+
* Configuration options for a text response from the model. Can be plain text or
|
|
8128
|
+
* structured JSON data. Learn more:
|
|
8129
|
+
*
|
|
8130
|
+
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
8131
|
+
* - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
8132
|
+
*/
|
|
8133
|
+
export interface ResponseTextConfig {
|
|
8134
|
+
/**
|
|
8135
|
+
* An object specifying the format that the model must output.
|
|
8136
|
+
*
|
|
8137
|
+
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
8138
|
+
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
8139
|
+
* [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
|
|
8140
|
+
*
|
|
8141
|
+
* The default format is `{ "type": "text" }` with no additional options.
|
|
8142
|
+
*
|
|
8143
|
+
* **Not recommended for gpt-4o and newer models:**
|
|
8144
|
+
*
|
|
8145
|
+
* Setting to `{ "type": "json_object" }` enables the older JSON mode, which
|
|
8146
|
+
* ensures the message the model generates is valid JSON. Using `json_schema` is
|
|
8147
|
+
* preferred for models that support it.
|
|
8148
|
+
*/
|
|
8149
|
+
format?: ResponseFormatTextConfig;
|
|
8150
|
+
|
|
8151
|
+
/**
|
|
8152
|
+
* Constrains the verbosity of the model's response. Lower values will result in
|
|
8153
|
+
* more concise responses, while higher values will result in more verbose
|
|
8154
|
+
* responses. Currently supported values are `low`, `medium`, and `high`. The
|
|
8155
|
+
* default is `medium`.
|
|
8156
|
+
*/
|
|
8157
|
+
verbosity?: 'low' | 'medium' | 'high' | null;
|
|
8158
|
+
}
|
|
8159
|
+
|
|
8160
|
+
/**
|
|
8161
|
+
* Emitted when there is an additional text delta.
|
|
8162
|
+
*/
|
|
8163
|
+
export interface ResponseTextDeltaEvent {
|
|
8164
|
+
/**
|
|
8165
|
+
* The index of the content part that the text delta was added to.
|
|
8166
|
+
*/
|
|
8167
|
+
content_index: number;
|
|
8168
|
+
|
|
8169
|
+
/**
|
|
8170
|
+
* The text delta that was added.
|
|
8171
|
+
*/
|
|
8172
|
+
delta: string;
|
|
8173
|
+
|
|
8174
|
+
/**
|
|
8175
|
+
* The ID of the output item that the text delta was added to.
|
|
8176
|
+
*/
|
|
8177
|
+
item_id: string;
|
|
8178
|
+
|
|
8179
|
+
/**
|
|
8180
|
+
* The log probabilities of the tokens in the delta.
|
|
8181
|
+
*/
|
|
8182
|
+
logprobs: Array<ResponseTextDeltaEvent.Logprob>;
|
|
8183
|
+
|
|
8184
|
+
/**
|
|
8185
|
+
* The index of the output item that the text delta was added to.
|
|
8186
|
+
*/
|
|
8187
|
+
output_index: number;
|
|
8188
|
+
|
|
8189
|
+
/**
|
|
8190
|
+
* The sequence number for this event.
|
|
8191
|
+
*/
|
|
8192
|
+
sequence_number: number;
|
|
8193
|
+
|
|
8194
|
+
/**
|
|
8195
|
+
* The type of the event. Always `response.output_text.delta`.
|
|
8196
|
+
*/
|
|
8197
|
+
type: 'response.output_text.delta';
|
|
8198
|
+
}
|
|
8199
|
+
|
|
8200
|
+
export namespace ResponseTextDeltaEvent {
|
|
8201
|
+
/**
|
|
8202
|
+
* A logprob is the logarithmic probability that the model assigns to producing a
|
|
8203
|
+
* particular token at a given position in the sequence. Less-negative (higher)
|
|
7453
8204
|
* logprob values indicate greater model confidence in that token choice.
|
|
7454
8205
|
*/
|
|
7455
8206
|
export interface Logprob {
|
|
@@ -7802,453 +8553,499 @@ export interface ResponseWebSearchCallSearchingEvent {
|
|
|
7802
8553
|
type: 'response.web_search_call.searching';
|
|
7803
8554
|
}
|
|
7804
8555
|
|
|
7805
|
-
|
|
7806
|
-
|
|
7807
|
-
|
|
7808
|
-
|
|
7809
|
-
type: 'response.create';
|
|
8556
|
+
/**
|
|
8557
|
+
* Client events accepted by the Responses WebSocket server.
|
|
8558
|
+
*/
|
|
8559
|
+
export type ResponsesClientEvent = ResponsesClientEvent.ResponseCreate | ResponseSteerEvent;
|
|
7810
8560
|
|
|
7811
|
-
|
|
7812
|
-
|
|
7813
|
-
|
|
7814
|
-
|
|
7815
|
-
|
|
8561
|
+
export namespace ResponsesClientEvent {
|
|
8562
|
+
// custom code for back compat aliases
|
|
8563
|
+
// Preserve the names exposed before ResponsesClientEvent became a union.
|
|
8564
|
+
export type ContextManagement = ResponseCreate.ContextManagement;
|
|
8565
|
+
export type Moderation = ResponseCreate.Moderation;
|
|
7816
8566
|
|
|
7817
|
-
|
|
7818
|
-
|
|
7819
|
-
*/
|
|
7820
|
-
context_management?: Array<ResponsesClientEvent.ContextManagement> | null;
|
|
8567
|
+
export namespace Moderation {
|
|
8568
|
+
export type Policy = ResponseCreate.Moderation.Policy;
|
|
7821
8569
|
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
*/
|
|
7828
|
-
conversation?: string | ResponseConversationParam | null;
|
|
8570
|
+
export namespace Policy {
|
|
8571
|
+
export type Input = ResponseCreate.Moderation.Policy.Input;
|
|
8572
|
+
export type Output = ResponseCreate.Moderation.Policy.Output;
|
|
8573
|
+
}
|
|
8574
|
+
}
|
|
7829
8575
|
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
* - `web_search_call.action.sources`: Include the sources of the web search tool
|
|
7835
|
-
* call.
|
|
7836
|
-
* - `code_interpreter_call.outputs`: Includes the outputs of python code execution
|
|
7837
|
-
* in code interpreter tool call items.
|
|
7838
|
-
* - `computer_call_output.output.image_url`: Include image urls from the computer
|
|
7839
|
-
* call output.
|
|
7840
|
-
* - `file_search_call.results`: Include the search results of the file search tool
|
|
7841
|
-
* call.
|
|
7842
|
-
* - `message.input_image.image_url`: Include image urls from the input message.
|
|
7843
|
-
* - `message.output_text.logprobs`: Include logprobs with assistant messages.
|
|
7844
|
-
* - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
|
|
7845
|
-
* tokens in reasoning item outputs. This enables reasoning items to be used in
|
|
7846
|
-
* multi-turn conversations when using the Responses API statelessly (like when
|
|
7847
|
-
* the `store` parameter is set to `false`, or when an organization is enrolled
|
|
7848
|
-
* in the zero data retention program).
|
|
7849
|
-
*/
|
|
7850
|
-
include?: Array<ResponseIncludable> | null;
|
|
8576
|
+
export type PromptCacheOptions = ResponseCreate.PromptCacheOptions;
|
|
8577
|
+
export type StreamOptions = ResponseCreate.StreamOptions;
|
|
8578
|
+
export type SpecificProgrammaticToolCallingParam = ResponseCreate.SpecificProgrammaticToolCallingParam;
|
|
8579
|
+
// end custom code for back compat aliases
|
|
7851
8580
|
|
|
7852
8581
|
/**
|
|
7853
|
-
*
|
|
8582
|
+
* Client event for creating a response over a persistent WebSocket connection.
|
|
8583
|
+
* This payload uses the same top-level fields as `POST /v1/responses`, plus
|
|
8584
|
+
* WebSocket-only envelope metadata.
|
|
7854
8585
|
*
|
|
7855
|
-
*
|
|
7856
|
-
*
|
|
7857
|
-
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
7858
|
-
* - [Image inputs](https://platform.openai.com/docs/guides/images)
|
|
7859
|
-
* - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
|
|
7860
|
-
* - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
|
|
7861
|
-
* - [Function calling](https://platform.openai.com/docs/guides/function-calling)
|
|
7862
|
-
*/
|
|
7863
|
-
input?: string | ResponseInput;
|
|
7864
|
-
|
|
7865
|
-
/**
|
|
7866
|
-
* A system (or developer) message inserted into the model's context.
|
|
8586
|
+
* Notes:
|
|
7867
8587
|
*
|
|
7868
|
-
*
|
|
7869
|
-
*
|
|
7870
|
-
*
|
|
7871
|
-
*/
|
|
7872
|
-
instructions?: string | null;
|
|
7873
|
-
|
|
7874
|
-
/**
|
|
7875
|
-
* An upper bound for the number of tokens that can be generated for a response,
|
|
7876
|
-
* including visible output tokens and
|
|
7877
|
-
* [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
|
8588
|
+
* - `stream` is implicit over WebSocket and should not be sent.
|
|
8589
|
+
* - `background` is not supported over WebSocket.
|
|
8590
|
+
* - `stream_id` is WebSocket-only and is not part of `POST /v1/responses`.
|
|
7878
8591
|
*/
|
|
7879
|
-
|
|
8592
|
+
export interface ResponseCreate {
|
|
8593
|
+
/**
|
|
8594
|
+
* The type of the client event. Always `response.create`.
|
|
8595
|
+
*/
|
|
8596
|
+
type: 'response.create';
|
|
7880
8597
|
|
|
7881
|
-
|
|
7882
|
-
|
|
7883
|
-
|
|
7884
|
-
|
|
7885
|
-
|
|
7886
|
-
*/
|
|
7887
|
-
max_tool_calls?: number | null;
|
|
8598
|
+
/**
|
|
8599
|
+
* Whether to run the model response in the background.
|
|
8600
|
+
* [Learn more](https://platform.openai.com/docs/guides/background).
|
|
8601
|
+
*/
|
|
8602
|
+
background?: boolean | null;
|
|
7888
8603
|
|
|
7889
|
-
|
|
7890
|
-
|
|
7891
|
-
|
|
7892
|
-
|
|
7893
|
-
*
|
|
7894
|
-
* Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
7895
|
-
* a maximum length of 512 characters.
|
|
7896
|
-
*/
|
|
7897
|
-
metadata?: Shared.Metadata | null;
|
|
8604
|
+
/**
|
|
8605
|
+
* Context management configuration for this request.
|
|
8606
|
+
*/
|
|
8607
|
+
context_management?: Array<ResponseCreate.ContextManagement> | null;
|
|
7898
8608
|
|
|
7899
|
-
|
|
7900
|
-
|
|
7901
|
-
|
|
7902
|
-
|
|
7903
|
-
|
|
7904
|
-
|
|
7905
|
-
|
|
7906
|
-
model?: Shared.ResponsesModel;
|
|
8609
|
+
/**
|
|
8610
|
+
* The conversation that this response belongs to. Items from this conversation are
|
|
8611
|
+
* prepended to `input_items` for this response request. Input items and output
|
|
8612
|
+
* items from this response are automatically added to this conversation after this
|
|
8613
|
+
* response completes.
|
|
8614
|
+
*/
|
|
8615
|
+
conversation?: string | ResponsesAPI.ResponseConversationParam | null;
|
|
7907
8616
|
|
|
7908
|
-
|
|
7909
|
-
|
|
7910
|
-
|
|
7911
|
-
|
|
8617
|
+
/**
|
|
8618
|
+
* Specify additional output data to include in the model response. Currently
|
|
8619
|
+
* supported values are:
|
|
8620
|
+
*
|
|
8621
|
+
* - `web_search_call.action.sources`: Include the sources of the web search tool
|
|
8622
|
+
* call.
|
|
8623
|
+
* - `code_interpreter_call.outputs`: Includes the outputs of python code execution
|
|
8624
|
+
* in code interpreter tool call items.
|
|
8625
|
+
* - `computer_call_output.output.image_url`: Include image urls from the computer
|
|
8626
|
+
* call output.
|
|
8627
|
+
* - `file_search_call.results`: Include the search results of the file search tool
|
|
8628
|
+
* call.
|
|
8629
|
+
* - `message.input_image.image_url`: Include image urls from the input message.
|
|
8630
|
+
* - `message.output_text.logprobs`: Include logprobs with assistant messages.
|
|
8631
|
+
* - `reasoning.encrypted_content`: Includes an encrypted version of reasoning
|
|
8632
|
+
* tokens in reasoning item outputs. This enables reasoning items to be used in
|
|
8633
|
+
* multi-turn conversations when using the Responses API statelessly (like when
|
|
8634
|
+
* the `store` parameter is set to `false`, or when an organization is enrolled
|
|
8635
|
+
* in the zero data retention program).
|
|
8636
|
+
*/
|
|
8637
|
+
include?: Array<ResponsesAPI.ResponseIncludable> | null;
|
|
8638
|
+
|
|
8639
|
+
/**
|
|
8640
|
+
* Text, image, or file inputs to the model, used to generate a response.
|
|
8641
|
+
*
|
|
8642
|
+
* Learn more:
|
|
8643
|
+
*
|
|
8644
|
+
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
8645
|
+
* - [Image inputs](https://platform.openai.com/docs/guides/images)
|
|
8646
|
+
* - [File inputs](https://platform.openai.com/docs/guides/pdf-files)
|
|
8647
|
+
* - [Conversation state](https://platform.openai.com/docs/guides/conversation-state)
|
|
8648
|
+
* - [Function calling](https://platform.openai.com/docs/guides/function-calling)
|
|
8649
|
+
*/
|
|
8650
|
+
input?: string | ResponsesAPI.ResponseInput;
|
|
7912
8651
|
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
8652
|
+
/**
|
|
8653
|
+
* A system (or developer) message inserted into the model's context.
|
|
8654
|
+
*
|
|
8655
|
+
* When using along with `previous_response_id`, the instructions from a previous
|
|
8656
|
+
* response will not be carried over to the next response. This makes it simple to
|
|
8657
|
+
* swap out system (or developer) messages in new responses.
|
|
8658
|
+
*/
|
|
8659
|
+
instructions?: string | null;
|
|
7917
8660
|
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
previous_response_id?: string | null;
|
|
8661
|
+
/**
|
|
8662
|
+
* An upper bound for the number of tokens that can be generated for a response,
|
|
8663
|
+
* including visible output tokens and
|
|
8664
|
+
* [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
|
8665
|
+
*/
|
|
8666
|
+
max_output_tokens?: number | null;
|
|
7925
8667
|
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
8668
|
+
/**
|
|
8669
|
+
* The maximum number of total calls to built-in tools that can be processed in a
|
|
8670
|
+
* response. This maximum number applies across all built-in tool calls, not per
|
|
8671
|
+
* individual tool. Any further attempts to call a tool by the model will be
|
|
8672
|
+
* ignored.
|
|
8673
|
+
*/
|
|
8674
|
+
max_tool_calls?: number | null;
|
|
7931
8675
|
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
|
|
8676
|
+
/**
|
|
8677
|
+
* Set of 16 key-value pairs that can be attached to an object. This can be useful
|
|
8678
|
+
* for storing additional information about the object in a structured format, and
|
|
8679
|
+
* querying for objects via API or the dashboard.
|
|
8680
|
+
*
|
|
8681
|
+
* Keys are strings with a maximum length of 64 characters. Values are strings with
|
|
8682
|
+
* a maximum length of 512 characters.
|
|
8683
|
+
*/
|
|
8684
|
+
metadata?: Shared.Metadata | null;
|
|
7938
8685
|
|
|
7939
|
-
|
|
7940
|
-
|
|
7941
|
-
|
|
7942
|
-
|
|
7943
|
-
|
|
7944
|
-
|
|
7945
|
-
|
|
7946
|
-
|
|
7947
|
-
* [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
|
|
7948
|
-
* for current details.
|
|
7949
|
-
*/
|
|
7950
|
-
prompt_cache_options?: ResponsesClientEvent.PromptCacheOptions;
|
|
8686
|
+
/**
|
|
8687
|
+
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
8688
|
+
* range of models with different capabilities, performance characteristics, and
|
|
8689
|
+
* price points. Refer to the
|
|
8690
|
+
* [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
8691
|
+
* available models.
|
|
8692
|
+
*/
|
|
8693
|
+
model?: Shared.ResponsesModel;
|
|
7951
8694
|
|
|
7952
|
-
|
|
7953
|
-
|
|
7954
|
-
|
|
7955
|
-
|
|
7956
|
-
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
7957
|
-
* of 24 hours.
|
|
7958
|
-
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
7959
|
-
* This field expresses a maximum retention policy, while
|
|
7960
|
-
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
7961
|
-
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
7962
|
-
* models, only `24h` is supported.
|
|
7963
|
-
*
|
|
7964
|
-
* For older models that support both `in_memory` and `24h`, the default depends on
|
|
7965
|
-
* your organization's data retention policy:
|
|
7966
|
-
*
|
|
7967
|
-
* - Organizations without ZDR enabled default to `24h`.
|
|
7968
|
-
* - Organizations with ZDR enabled default to `in_memory` when
|
|
7969
|
-
* `prompt_cache_retention` is not specified.
|
|
7970
|
-
*/
|
|
7971
|
-
prompt_cache_retention?: 'in_memory' | '24h' | null;
|
|
8695
|
+
/**
|
|
8696
|
+
* Configuration for running moderation on the input and output of this response.
|
|
8697
|
+
*/
|
|
8698
|
+
moderation?: ResponseCreate.Moderation | null;
|
|
7972
8699
|
|
|
7973
|
-
|
|
7974
|
-
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
reasoning?: Shared.Reasoning | null;
|
|
8700
|
+
/**
|
|
8701
|
+
* Whether to allow the model to run tool calls in parallel.
|
|
8702
|
+
*/
|
|
8703
|
+
parallel_tool_calls?: boolean | null;
|
|
7978
8704
|
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7986
|
-
*/
|
|
7987
|
-
safety_identifier?: string | null;
|
|
8705
|
+
/**
|
|
8706
|
+
* The unique ID of the previous response to the model. Use this to create
|
|
8707
|
+
* multi-turn conversations. Learn more about
|
|
8708
|
+
* [conversation state](https://platform.openai.com/docs/guides/conversation-state).
|
|
8709
|
+
* Cannot be used in conjunction with `conversation`.
|
|
8710
|
+
*/
|
|
8711
|
+
previous_response_id?: string | null;
|
|
7988
8712
|
|
|
7989
|
-
|
|
7990
|
-
|
|
7991
|
-
|
|
7992
|
-
|
|
7993
|
-
|
|
7994
|
-
* will use 'default'.
|
|
7995
|
-
* - If set to 'default', then the request will be processed with the standard
|
|
7996
|
-
* pricing and performance for the selected model.
|
|
7997
|
-
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
7998
|
-
* then the request will be processed with the Flex Processing service tier.
|
|
7999
|
-
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
8000
|
-
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
8001
|
-
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
8002
|
-
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
8003
|
-
* request.
|
|
8004
|
-
* - If set to 'ultrafast', then the request will be processed with the
|
|
8005
|
-
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
8006
|
-
* available for `gpt-5.6-sol`; a response served through it will show
|
|
8007
|
-
* `service_tier=ultrafast`.
|
|
8008
|
-
* - When not set, the default behavior is 'auto'.
|
|
8009
|
-
*
|
|
8010
|
-
* When the `service_tier` parameter is set, the response body will include the
|
|
8011
|
-
* `service_tier` value based on the processing mode actually used to serve the
|
|
8012
|
-
* request. This response value may be different from the value set in the
|
|
8013
|
-
* parameter.
|
|
8014
|
-
*/
|
|
8015
|
-
service_tier?: ServiceTier | null;
|
|
8713
|
+
/**
|
|
8714
|
+
* Reference to a prompt template and its variables.
|
|
8715
|
+
* [Learn more](https://platform.openai.com/docs/guides/text?api-mode=responses#reusable-prompts).
|
|
8716
|
+
*/
|
|
8717
|
+
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
8016
8718
|
|
|
8017
|
-
|
|
8018
|
-
|
|
8019
|
-
|
|
8020
|
-
|
|
8719
|
+
/**
|
|
8720
|
+
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
8721
|
+
* hit rates. Replaces the `user` field.
|
|
8722
|
+
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
|
|
8723
|
+
*/
|
|
8724
|
+
prompt_cache_key?: string | null;
|
|
8021
8725
|
|
|
8022
|
-
|
|
8023
|
-
|
|
8024
|
-
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
|
|
8028
|
-
|
|
8029
|
-
|
|
8030
|
-
|
|
8726
|
+
/**
|
|
8727
|
+
* Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
8728
|
+
* default, OpenAI automatically chooses one implicit cache breakpoint. You can add
|
|
8729
|
+
* explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
|
|
8730
|
+
* request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
8731
|
+
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
8732
|
+
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
8733
|
+
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
8734
|
+
* [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
|
|
8735
|
+
* for current details.
|
|
8736
|
+
*/
|
|
8737
|
+
prompt_cache_options?: ResponseCreate.PromptCacheOptions;
|
|
8031
8738
|
|
|
8032
|
-
|
|
8033
|
-
|
|
8034
|
-
|
|
8035
|
-
|
|
8036
|
-
|
|
8037
|
-
|
|
8038
|
-
|
|
8039
|
-
|
|
8739
|
+
/**
|
|
8740
|
+
* @deprecated Deprecated. Use `prompt_cache_options.ttl` instead.
|
|
8741
|
+
*
|
|
8742
|
+
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
8743
|
+
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
8744
|
+
* of 24 hours.
|
|
8745
|
+
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching#prompt-cache-retention).
|
|
8746
|
+
* This field expresses a maximum retention policy, while
|
|
8747
|
+
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
8748
|
+
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
8749
|
+
* models, only `24h` is supported.
|
|
8750
|
+
*
|
|
8751
|
+
* For older models that support both `in_memory` and `24h`, the default depends on
|
|
8752
|
+
* your organization's data retention policy:
|
|
8753
|
+
*
|
|
8754
|
+
* - Organizations without ZDR enabled default to `24h`.
|
|
8755
|
+
* - Organizations with ZDR enabled default to `in_memory` when
|
|
8756
|
+
* `prompt_cache_retention` is not specified.
|
|
8757
|
+
*/
|
|
8758
|
+
prompt_cache_retention?: 'in_memory' | '24h' | null;
|
|
8040
8759
|
|
|
8041
|
-
|
|
8042
|
-
|
|
8043
|
-
|
|
8044
|
-
|
|
8760
|
+
/**
|
|
8761
|
+
* Configuration options for
|
|
8762
|
+
* [reasoning models](https://platform.openai.com/docs/guides/reasoning).
|
|
8763
|
+
*/
|
|
8764
|
+
reasoning?: Shared.Reasoning | null;
|
|
8045
8765
|
|
|
8046
|
-
|
|
8047
|
-
|
|
8048
|
-
|
|
8049
|
-
|
|
8050
|
-
|
|
8051
|
-
|
|
8052
|
-
|
|
8766
|
+
/**
|
|
8767
|
+
* A stable identifier used to help detect users of your application that may be
|
|
8768
|
+
* violating OpenAI's usage policies. The IDs should be a string that uniquely
|
|
8769
|
+
* identifies each user, with a maximum length of 64 characters. We recommend
|
|
8770
|
+
* hashing their username or email address, in order to avoid sending us any
|
|
8771
|
+
* identifying information.
|
|
8772
|
+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
8773
|
+
*/
|
|
8774
|
+
safety_identifier?: string | null;
|
|
8053
8775
|
|
|
8054
|
-
|
|
8055
|
-
|
|
8056
|
-
|
|
8057
|
-
|
|
8058
|
-
|
|
8059
|
-
|
|
8060
|
-
|
|
8061
|
-
|
|
8776
|
+
/**
|
|
8777
|
+
* Specifies the processing type used for serving the request.
|
|
8778
|
+
*
|
|
8779
|
+
* - If set to 'auto', then the request will be processed with the service tier
|
|
8780
|
+
* configured in the Project settings. Unless otherwise configured, the Project
|
|
8781
|
+
* will use 'default'.
|
|
8782
|
+
* - If set to 'default', then the request will be processed with the standard
|
|
8783
|
+
* pricing and performance for the selected model.
|
|
8784
|
+
* - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
|
|
8785
|
+
* then the request will be processed with the Flex Processing service tier.
|
|
8786
|
+
* - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
|
|
8787
|
+
* include the `service_tier=fast` or `service_tier=priority` parameter for
|
|
8788
|
+
* Responses or Chat Completions. The response will show `service_tier=priority`
|
|
8789
|
+
* regardless of if you specify `service_tier=fast` or `priority` in your
|
|
8790
|
+
* request.
|
|
8791
|
+
* - If set to 'ultrafast', then the request will be processed with the
|
|
8792
|
+
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
8793
|
+
* available for `gpt-5.6-sol`; a response served through it will show
|
|
8794
|
+
* `service_tier=ultrafast`.
|
|
8795
|
+
* - When not set, the default behavior is 'auto'.
|
|
8796
|
+
*
|
|
8797
|
+
* When the `service_tier` parameter is set, the response body will include the
|
|
8798
|
+
* `service_tier` value based on the processing mode actually used to serve the
|
|
8799
|
+
* request. This response value may be different from the value set in the
|
|
8800
|
+
* parameter.
|
|
8801
|
+
*/
|
|
8802
|
+
service_tier?: ResponsesAPI.ServiceTier | null;
|
|
8062
8803
|
|
|
8063
|
-
|
|
8064
|
-
|
|
8065
|
-
|
|
8066
|
-
|
|
8067
|
-
|
|
8068
|
-
|
|
8069
|
-
|
|
|
8070
|
-
| ToolChoiceAllowed
|
|
8071
|
-
| ToolChoiceTypes
|
|
8072
|
-
| ToolChoiceFunction
|
|
8073
|
-
| ToolChoiceMcp
|
|
8074
|
-
| ToolChoiceCustom
|
|
8075
|
-
| ResponsesClientEvent.SpecificProgrammaticToolCallingParam
|
|
8076
|
-
| ToolChoiceApplyPatch
|
|
8077
|
-
| ToolChoiceShell;
|
|
8804
|
+
/**
|
|
8805
|
+
* Whether to store the generated model response for later retrieval via API.
|
|
8806
|
+
* Defaults to true when omitted. If set to true, response data will be stored for
|
|
8807
|
+
* at least 30 days, subject to the
|
|
8808
|
+
* [data retention exceptions](/api/docs/guides/your-data#v1responses).
|
|
8809
|
+
*/
|
|
8810
|
+
store?: boolean | null;
|
|
8078
8811
|
|
|
8079
|
-
|
|
8080
|
-
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
|
|
8084
|
-
|
|
8085
|
-
|
|
8086
|
-
|
|
8087
|
-
|
|
8088
|
-
* [file search](https://platform.openai.com/docs/guides/tools-file-search).
|
|
8089
|
-
* Learn more about
|
|
8090
|
-
* [built-in tools](https://platform.openai.com/docs/guides/tools).
|
|
8091
|
-
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
8092
|
-
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
8093
|
-
* [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
|
|
8094
|
-
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
8095
|
-
* the model to call your own code with strongly typed arguments and outputs.
|
|
8096
|
-
* Learn more about
|
|
8097
|
-
* [function calling](https://platform.openai.com/docs/guides/function-calling).
|
|
8098
|
-
* You can also use custom tools to call your own code.
|
|
8099
|
-
*/
|
|
8100
|
-
tools?: Array<Tool>;
|
|
8812
|
+
/**
|
|
8813
|
+
* If set to true, the model response data will be streamed to the client as it is
|
|
8814
|
+
* generated using
|
|
8815
|
+
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
8816
|
+
* See the
|
|
8817
|
+
* [Streaming section below](https://platform.openai.com/docs/api-reference/responses-streaming)
|
|
8818
|
+
* for more information.
|
|
8819
|
+
*/
|
|
8820
|
+
stream?: boolean | null;
|
|
8101
8821
|
|
|
8102
|
-
|
|
8103
|
-
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
8822
|
+
/**
|
|
8823
|
+
* The WebSocket lane for this response. Requests with the same `stream_id` are
|
|
8824
|
+
* processed FIFO, and events for the response echo the same `stream_id`.
|
|
8825
|
+
*
|
|
8826
|
+
* `stream_id` controls routing; `previous_response_id` controls conversation
|
|
8827
|
+
* lineage, so a new lane can fork from a response created on another lane.
|
|
8828
|
+
*/
|
|
8829
|
+
stream_id?: string;
|
|
8108
8830
|
|
|
8109
|
-
|
|
8110
|
-
|
|
8111
|
-
|
|
8112
|
-
|
|
8113
|
-
*
|
|
8114
|
-
* We generally recommend altering this or `temperature` but not both.
|
|
8115
|
-
*/
|
|
8116
|
-
top_p?: number | null;
|
|
8831
|
+
/**
|
|
8832
|
+
* Options for streaming responses. Only set this when you set `stream: true`.
|
|
8833
|
+
*/
|
|
8834
|
+
stream_options?: ResponseCreate.StreamOptions | null;
|
|
8117
8835
|
|
|
8118
|
-
|
|
8119
|
-
|
|
8120
|
-
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
|
|
8125
|
-
* for a model, the request will fail with a 400 error.
|
|
8126
|
-
*/
|
|
8127
|
-
truncation?: 'auto' | 'disabled' | null;
|
|
8836
|
+
/**
|
|
8837
|
+
* What sampling temperature to use, between 0 and 2. Higher values like 0.8 will
|
|
8838
|
+
* make the output more random, while lower values like 0.2 will make it more
|
|
8839
|
+
* focused and deterministic. We generally recommend altering this or `top_p` but
|
|
8840
|
+
* not both.
|
|
8841
|
+
*/
|
|
8842
|
+
temperature?: number | null;
|
|
8128
8843
|
|
|
8129
|
-
|
|
8130
|
-
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
user?: string;
|
|
8138
|
-
}
|
|
8844
|
+
/**
|
|
8845
|
+
* Configuration options for a text response from the model. Can be plain text or
|
|
8846
|
+
* structured JSON data. Learn more:
|
|
8847
|
+
*
|
|
8848
|
+
* - [Text inputs and outputs](https://platform.openai.com/docs/guides/text)
|
|
8849
|
+
* - [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs)
|
|
8850
|
+
*/
|
|
8851
|
+
text?: ResponsesAPI.ResponseTextConfig;
|
|
8139
8852
|
|
|
8140
|
-
export namespace ResponsesClientEvent {
|
|
8141
|
-
export interface ContextManagement {
|
|
8142
8853
|
/**
|
|
8143
|
-
*
|
|
8854
|
+
* How the model should select which tool (or tools) to use when generating a
|
|
8855
|
+
* response. See the `tools` parameter to see how to specify which tools the model
|
|
8856
|
+
* can call.
|
|
8144
8857
|
*/
|
|
8145
|
-
|
|
8858
|
+
tool_choice?:
|
|
8859
|
+
| ResponsesAPI.ToolChoiceOptions
|
|
8860
|
+
| ResponsesAPI.ToolChoiceAllowed
|
|
8861
|
+
| ResponsesAPI.ToolChoiceTypes
|
|
8862
|
+
| ResponsesAPI.ToolChoiceFunction
|
|
8863
|
+
| ResponsesAPI.ToolChoiceMcp
|
|
8864
|
+
| ResponsesAPI.ToolChoiceCustom
|
|
8865
|
+
| ResponseCreate.SpecificProgrammaticToolCallingParam
|
|
8866
|
+
| ResponsesAPI.ToolChoiceApplyPatch
|
|
8867
|
+
| ResponsesAPI.ToolChoiceShell;
|
|
8146
8868
|
|
|
8147
8869
|
/**
|
|
8148
|
-
*
|
|
8870
|
+
* An array of tools the model may call while generating a response. You can
|
|
8871
|
+
* specify which tool to use by setting the `tool_choice` parameter.
|
|
8872
|
+
*
|
|
8873
|
+
* We support the following categories of tools:
|
|
8874
|
+
*
|
|
8875
|
+
* - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
8876
|
+
* capabilities, like
|
|
8877
|
+
* [web search](https://platform.openai.com/docs/guides/tools-web-search) or
|
|
8878
|
+
* [file search](https://platform.openai.com/docs/guides/tools-file-search).
|
|
8879
|
+
* Learn more about
|
|
8880
|
+
* [built-in tools](https://platform.openai.com/docs/guides/tools).
|
|
8881
|
+
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
8882
|
+
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
8883
|
+
* [MCP Tools](https://platform.openai.com/docs/guides/tools-connectors-mcp).
|
|
8884
|
+
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
8885
|
+
* the model to call your own code with strongly typed arguments and outputs.
|
|
8886
|
+
* Learn more about
|
|
8887
|
+
* [function calling](https://platform.openai.com/docs/guides/function-calling).
|
|
8888
|
+
* You can also use custom tools to call your own code.
|
|
8889
|
+
*/
|
|
8890
|
+
tools?: Array<ResponsesAPI.Tool>;
|
|
8891
|
+
|
|
8892
|
+
/**
|
|
8893
|
+
* An integer between 0 and 20 specifying the maximum number of most likely tokens
|
|
8894
|
+
* to return at each token position, each with an associated log probability. In
|
|
8895
|
+
* some cases, the number of returned tokens may be fewer than requested.
|
|
8896
|
+
*/
|
|
8897
|
+
top_logprobs?: number | null;
|
|
8898
|
+
|
|
8899
|
+
/**
|
|
8900
|
+
* An alternative to sampling with temperature, called nucleus sampling, where the
|
|
8901
|
+
* model considers the results of the tokens with top_p probability mass. So 0.1
|
|
8902
|
+
* means only the tokens comprising the top 10% probability mass are considered.
|
|
8903
|
+
*
|
|
8904
|
+
* We generally recommend altering this or `temperature` but not both.
|
|
8149
8905
|
*/
|
|
8150
|
-
|
|
8151
|
-
}
|
|
8906
|
+
top_p?: number | null;
|
|
8152
8907
|
|
|
8153
|
-
/**
|
|
8154
|
-
* Configuration for running moderation on the input and output of this response.
|
|
8155
|
-
*/
|
|
8156
|
-
export interface Moderation {
|
|
8157
8908
|
/**
|
|
8158
|
-
* The
|
|
8159
|
-
*
|
|
8909
|
+
* @deprecated The truncation strategy to use for the model response.
|
|
8910
|
+
*
|
|
8911
|
+
* - `auto`: If the input to this Response exceeds the model's context window size,
|
|
8912
|
+
* the model will truncate the response to fit the context window by dropping
|
|
8913
|
+
* items from the beginning of the conversation.
|
|
8914
|
+
* - `disabled` (default): If the input size will exceed the context window size
|
|
8915
|
+
* for a model, the request will fail with a 400 error.
|
|
8160
8916
|
*/
|
|
8161
|
-
|
|
8917
|
+
truncation?: 'auto' | 'disabled' | null;
|
|
8162
8918
|
|
|
8163
8919
|
/**
|
|
8164
|
-
*
|
|
8920
|
+
* @deprecated This field is being replaced by `safety_identifier` and
|
|
8921
|
+
* `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
|
|
8922
|
+
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
8923
|
+
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
8924
|
+
* abuse.
|
|
8925
|
+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
|
|
8165
8926
|
*/
|
|
8166
|
-
|
|
8927
|
+
user?: string;
|
|
8167
8928
|
}
|
|
8168
8929
|
|
|
8169
|
-
export namespace
|
|
8930
|
+
export namespace ResponseCreate {
|
|
8931
|
+
export interface ContextManagement {
|
|
8932
|
+
/**
|
|
8933
|
+
* The context management entry type. Currently only 'compaction' is supported.
|
|
8934
|
+
*/
|
|
8935
|
+
type: string;
|
|
8936
|
+
|
|
8937
|
+
/**
|
|
8938
|
+
* Token threshold at which compaction should be triggered for this entry.
|
|
8939
|
+
*/
|
|
8940
|
+
compact_threshold?: number | null;
|
|
8941
|
+
}
|
|
8942
|
+
|
|
8170
8943
|
/**
|
|
8171
|
-
*
|
|
8944
|
+
* Configuration for running moderation on the input and output of this response.
|
|
8172
8945
|
*/
|
|
8173
|
-
export interface
|
|
8946
|
+
export interface Moderation {
|
|
8174
8947
|
/**
|
|
8175
|
-
* The moderation
|
|
8948
|
+
* The moderation model to use for moderated completions, e.g.
|
|
8949
|
+
* 'omni-moderation-latest'.
|
|
8176
8950
|
*/
|
|
8177
|
-
|
|
8951
|
+
model: string;
|
|
8178
8952
|
|
|
8179
8953
|
/**
|
|
8180
|
-
* The
|
|
8954
|
+
* The policy to apply to moderated response input and output.
|
|
8181
8955
|
*/
|
|
8182
|
-
|
|
8956
|
+
policy?: Moderation.Policy | null;
|
|
8183
8957
|
}
|
|
8184
8958
|
|
|
8185
|
-
export namespace
|
|
8959
|
+
export namespace Moderation {
|
|
8186
8960
|
/**
|
|
8187
|
-
* The
|
|
8961
|
+
* The policy to apply to moderated response input and output.
|
|
8188
8962
|
*/
|
|
8189
|
-
export interface
|
|
8190
|
-
|
|
8963
|
+
export interface Policy {
|
|
8964
|
+
/**
|
|
8965
|
+
* The moderation policy for the response input.
|
|
8966
|
+
*/
|
|
8967
|
+
input?: Policy.Input | null;
|
|
8968
|
+
|
|
8969
|
+
/**
|
|
8970
|
+
* The moderation policy for the response output.
|
|
8971
|
+
*/
|
|
8972
|
+
output?: Policy.Output | null;
|
|
8191
8973
|
}
|
|
8192
8974
|
|
|
8193
|
-
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
|
|
8975
|
+
export namespace Policy {
|
|
8976
|
+
/**
|
|
8977
|
+
* The moderation policy for the response input.
|
|
8978
|
+
*/
|
|
8979
|
+
export interface Input {
|
|
8980
|
+
mode: 'score' | 'block';
|
|
8981
|
+
}
|
|
8982
|
+
|
|
8983
|
+
/**
|
|
8984
|
+
* The moderation policy for the response output.
|
|
8985
|
+
*/
|
|
8986
|
+
export interface Output {
|
|
8987
|
+
mode: 'score' | 'block';
|
|
8988
|
+
}
|
|
8198
8989
|
}
|
|
8199
8990
|
}
|
|
8200
|
-
}
|
|
8201
8991
|
|
|
8202
|
-
/**
|
|
8203
|
-
* Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
8204
|
-
* default, OpenAI automatically chooses one implicit cache breakpoint. You can add
|
|
8205
|
-
* explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
|
|
8206
|
-
* request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
8207
|
-
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
8208
|
-
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
8209
|
-
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
8210
|
-
* [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
|
|
8211
|
-
* for current details.
|
|
8212
|
-
*/
|
|
8213
|
-
export interface PromptCacheOptions {
|
|
8214
8992
|
/**
|
|
8215
|
-
*
|
|
8216
|
-
*
|
|
8217
|
-
*
|
|
8218
|
-
*
|
|
8219
|
-
* latest
|
|
8220
|
-
*
|
|
8993
|
+
* Options for prompt caching. Supported for `gpt-5.6` and later models. By
|
|
8994
|
+
* default, OpenAI automatically chooses one implicit cache breakpoint. You can add
|
|
8995
|
+
* explicit breakpoints to content blocks with `prompt_cache_breakpoint`. Each
|
|
8996
|
+
* request can write up to four breakpoints. For cache matching, OpenAI considers
|
|
8997
|
+
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
8998
|
+
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
8999
|
+
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
9000
|
+
* [prompt caching guide](https://platform.openai.com/docs/guides/prompt-caching)
|
|
9001
|
+
* for current details.
|
|
8221
9002
|
*/
|
|
8222
|
-
|
|
9003
|
+
export interface PromptCacheOptions {
|
|
9004
|
+
/**
|
|
9005
|
+
* The ID of a response to compare when diagnosing prompt cache reuse. Supplying
|
|
9006
|
+
* this field requests prompt cache diagnostics when the feature is enabled.
|
|
9007
|
+
*/
|
|
9008
|
+
comparison_response_id?: string | null;
|
|
8223
9009
|
|
|
8224
|
-
|
|
8225
|
-
|
|
8226
|
-
|
|
8227
|
-
|
|
8228
|
-
|
|
8229
|
-
|
|
8230
|
-
|
|
9010
|
+
/**
|
|
9011
|
+
* Controls whether OpenAI automatically creates an implicit cache breakpoint.
|
|
9012
|
+
* Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
|
|
9013
|
+
* and writes up to the latest three explicit breakpoints in the request. With
|
|
9014
|
+
* `explicit`, OpenAI does not create an implicit breakpoint and writes up to the
|
|
9015
|
+
* latest four explicit breakpoints. If there are no explicit breakpoints, the
|
|
9016
|
+
* request does not use prompt caching.
|
|
9017
|
+
*/
|
|
9018
|
+
mode?: 'implicit' | 'explicit';
|
|
8231
9019
|
|
|
8232
|
-
|
|
8233
|
-
|
|
8234
|
-
|
|
8235
|
-
|
|
8236
|
-
|
|
8237
|
-
|
|
8238
|
-
|
|
8239
|
-
* payload sizes as a mitigation to certain side-channel attacks. These obfuscation
|
|
8240
|
-
* fields are included by default, but add a small amount of overhead to the data
|
|
8241
|
-
* stream. You can set `include_obfuscation` to false to optimize for bandwidth if
|
|
8242
|
-
* you trust the network links between your application and the OpenAI API.
|
|
8243
|
-
*/
|
|
8244
|
-
include_obfuscation?: boolean;
|
|
8245
|
-
}
|
|
9020
|
+
/**
|
|
9021
|
+
* The minimum lifetime applied to every implicit and explicit cache breakpoint
|
|
9022
|
+
* written by the request. Defaults to `30m`, which is currently the only supported
|
|
9023
|
+
* value. The backend may retain cache entries for longer.
|
|
9024
|
+
*/
|
|
9025
|
+
ttl?: '30m';
|
|
9026
|
+
}
|
|
8246
9027
|
|
|
8247
|
-
export interface SpecificProgrammaticToolCallingParam {
|
|
8248
9028
|
/**
|
|
8249
|
-
*
|
|
9029
|
+
* Options for streaming responses. Only set this when you set `stream: true`.
|
|
8250
9030
|
*/
|
|
8251
|
-
|
|
9031
|
+
export interface StreamOptions {
|
|
9032
|
+
/**
|
|
9033
|
+
* When true, stream obfuscation will be enabled. Stream obfuscation adds random
|
|
9034
|
+
* characters to an `obfuscation` field on streaming delta events to normalize
|
|
9035
|
+
* payload sizes as a mitigation to certain side-channel attacks. These obfuscation
|
|
9036
|
+
* fields are included by default, but add a small amount of overhead to the data
|
|
9037
|
+
* stream. You can set `include_obfuscation` to false to optimize for bandwidth if
|
|
9038
|
+
* you trust the network links between your application and the OpenAI API.
|
|
9039
|
+
*/
|
|
9040
|
+
include_obfuscation?: boolean;
|
|
9041
|
+
}
|
|
9042
|
+
|
|
9043
|
+
export interface SpecificProgrammaticToolCallingParam {
|
|
9044
|
+
/**
|
|
9045
|
+
* The tool to call. Always `programmatic_tool_calling`.
|
|
9046
|
+
*/
|
|
9047
|
+
type: 'programmatic_tool_calling';
|
|
9048
|
+
}
|
|
8252
9049
|
}
|
|
8253
9050
|
}
|
|
8254
9051
|
|
|
@@ -8314,7 +9111,10 @@ export type ResponsesServerEvent =
|
|
|
8314
9111
|
| ResponsesServerEvent.ResponseCustomToolCallInputWsDelta
|
|
8315
9112
|
| ResponsesServerEvent.ResponseCustomToolCallInputWsDone
|
|
8316
9113
|
| ResponsesServerEvent.ResponseWsStreamingError
|
|
8317
|
-
| ResponsesServerEvent.ResponseWsError
|
|
9114
|
+
| ResponsesServerEvent.ResponseWsError
|
|
9115
|
+
| ResponseSteerAcceptedEvent
|
|
9116
|
+
| ResponseSteerPendingEvent
|
|
9117
|
+
| ResponseSteerFailedEvent;
|
|
8318
9118
|
|
|
8319
9119
|
export namespace ResponsesServerEvent {
|
|
8320
9120
|
/**
|
|
@@ -8594,6 +9394,10 @@ export namespace ResponsesServerEvent {
|
|
|
8594
9394
|
|
|
8595
9395
|
/**
|
|
8596
9396
|
* An event that is emitted when a response finishes as incomplete.
|
|
9397
|
+
*
|
|
9398
|
+
* Over WebSocket, steering can finish a response with
|
|
9399
|
+
* `response.incomplete_details.reason` set to `steered`, followed automatically by
|
|
9400
|
+
* a successor `response.created` that commits the queued steering input.
|
|
8597
9401
|
*/
|
|
8598
9402
|
export interface ResponseWsIncomplete extends ResponseIncompleteEvent {
|
|
8599
9403
|
/**
|
|
@@ -9019,6 +9823,44 @@ export namespace ResponsesServerEvent {
|
|
|
9019
9823
|
* The response headers that were emitted with the error, if any.
|
|
9020
9824
|
*/
|
|
9021
9825
|
headers?: { [key: string]: string };
|
|
9826
|
+
|
|
9827
|
+
misalignment?: Error.Misalignment;
|
|
9828
|
+
}
|
|
9829
|
+
|
|
9830
|
+
export namespace Error {
|
|
9831
|
+
export interface Misalignment {
|
|
9832
|
+
/**
|
|
9833
|
+
* The public explanation for this block.
|
|
9834
|
+
*/
|
|
9835
|
+
detailed_explanation?: string;
|
|
9836
|
+
|
|
9837
|
+
/**
|
|
9838
|
+
* An optional classification; clients must accept additional values.
|
|
9839
|
+
*/
|
|
9840
|
+
error_type?:
|
|
9841
|
+
| (string & {})
|
|
9842
|
+
| 'potentially_unintended_data_transfer'
|
|
9843
|
+
| 'potentially_unintended_data_access'
|
|
9844
|
+
| 'potentially_unintended_destructive_activity'
|
|
9845
|
+
| 'other';
|
|
9846
|
+
|
|
9847
|
+
/**
|
|
9848
|
+
* An optional public continuation instruction.
|
|
9849
|
+
*/
|
|
9850
|
+
steer?: Misalignment.Steer;
|
|
9851
|
+
}
|
|
9852
|
+
|
|
9853
|
+
export namespace Misalignment {
|
|
9854
|
+
/**
|
|
9855
|
+
* An optional public continuation instruction.
|
|
9856
|
+
*/
|
|
9857
|
+
export interface Steer {
|
|
9858
|
+
/**
|
|
9859
|
+
* The public continuation instruction.
|
|
9860
|
+
*/
|
|
9861
|
+
message: string;
|
|
9862
|
+
}
|
|
9863
|
+
}
|
|
9022
9864
|
}
|
|
9023
9865
|
}
|
|
9024
9866
|
}
|
|
@@ -9336,9 +10178,11 @@ export namespace Tool {
|
|
|
9336
10178
|
* one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
9337
10179
|
* the model will automatically determine the best background for the image.
|
|
9338
10180
|
*
|
|
9339
|
-
*
|
|
9340
|
-
* `
|
|
9341
|
-
*
|
|
10181
|
+
* `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
|
|
10182
|
+
* snapshots, support `opaque` and `transparent` backgrounds. Transparent
|
|
10183
|
+
* backgrounds are available for supported GPT Image models. For `gpt-image-2` and
|
|
10184
|
+
* `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
10185
|
+
* set the output format to `png` or `webp`.
|
|
9342
10186
|
*/
|
|
9343
10187
|
background?: 'transparent' | 'opaque' | 'auto';
|
|
9344
10188
|
|
|
@@ -9358,7 +10202,9 @@ export namespace Tool {
|
|
|
9358
10202
|
|
|
9359
10203
|
/**
|
|
9360
10204
|
* The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`,
|
|
9361
|
-
* `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
10205
|
+
* `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
10206
|
+
* `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
10207
|
+
* `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
9362
10208
|
* `chatgpt-image-latest`. Default: `gpt-image-1`.
|
|
9363
10209
|
*/
|
|
9364
10210
|
model?:
|
|
@@ -9367,6 +10213,10 @@ export namespace Tool {
|
|
|
9367
10213
|
| 'gpt-image-1-mini'
|
|
9368
10214
|
| 'gpt-image-2'
|
|
9369
10215
|
| 'gpt-image-2-2026-04-21'
|
|
10216
|
+
| 'gpt-image-2.5-sunburst'
|
|
10217
|
+
| 'gpt-image-2.5-sunburst-2026-09-08'
|
|
10218
|
+
| 'gpt-image-2.5-flare'
|
|
10219
|
+
| 'gpt-image-2.5-flare-2026-09-08'
|
|
9370
10220
|
| 'gpt-image-1.5'
|
|
9371
10221
|
| 'chatgpt-image-latest';
|
|
9372
10222
|
|
|
@@ -9393,23 +10243,26 @@ export namespace Tool {
|
|
|
9393
10243
|
partial_images?: number;
|
|
9394
10244
|
|
|
9395
10245
|
/**
|
|
9396
|
-
* The quality of the generated image.
|
|
9397
|
-
*
|
|
10246
|
+
* The quality of the generated image. The GPT image models support `low`,
|
|
10247
|
+
* `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
|
|
10248
|
+
* including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default:
|
|
10249
|
+
* `auto`.
|
|
9398
10250
|
*/
|
|
9399
|
-
quality?: 'low' | 'medium' | 'high' | 'auto';
|
|
10251
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto';
|
|
9400
10252
|
|
|
9401
10253
|
/**
|
|
9402
|
-
* The size of the generated images. For `gpt-image-2`
|
|
9403
|
-
* `gpt-image-2-2026-
|
|
9404
|
-
*
|
|
9405
|
-
*
|
|
9406
|
-
*
|
|
9407
|
-
*
|
|
9408
|
-
*
|
|
9409
|
-
*
|
|
9410
|
-
*
|
|
9411
|
-
* `
|
|
9412
|
-
* `
|
|
10254
|
+
* The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
10255
|
+
* `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
10256
|
+
* `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
10257
|
+
* resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
|
|
10258
|
+
* Width and height must both be divisible by 16 and the requested aspect ratio
|
|
10259
|
+
* must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
|
|
10260
|
+
* the maximum supported resolution is `3840x2160`. The requested size must also
|
|
10261
|
+
* satisfy the model's current pixel and edge limits. The standard sizes
|
|
10262
|
+
* `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
10263
|
+
* `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
|
|
10264
|
+
* one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
10265
|
+
* `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
9413
10266
|
*/
|
|
9414
10267
|
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
9415
10268
|
}
|
|
@@ -9846,7 +10699,7 @@ export interface ResponseCreateParamsBase {
|
|
|
9846
10699
|
metadata?: Shared.Metadata | null;
|
|
9847
10700
|
|
|
9848
10701
|
/**
|
|
9849
|
-
* Model ID used to generate the response, like `gpt-
|
|
10702
|
+
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
9850
10703
|
* range of models with different capabilities, performance characteristics, and
|
|
9851
10704
|
* price points. Refer to the
|
|
9852
10705
|
* [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
@@ -9964,6 +10817,9 @@ export interface ResponseCreateParamsBase {
|
|
|
9964
10817
|
|
|
9965
10818
|
/**
|
|
9966
10819
|
* Whether to store the generated model response for later retrieval via API.
|
|
10820
|
+
* Defaults to true when omitted. If set to true, response data will be stored for
|
|
10821
|
+
* at least 30 days, subject to the
|
|
10822
|
+
* [data retention exceptions](/api/docs/guides/your-data#v1responses).
|
|
9967
10823
|
*/
|
|
9968
10824
|
store?: boolean | null;
|
|
9969
10825
|
|
|
@@ -10150,6 +11006,12 @@ export namespace ResponseCreateParams {
|
|
|
10150
11006
|
* for current details.
|
|
10151
11007
|
*/
|
|
10152
11008
|
export interface PromptCacheOptions {
|
|
11009
|
+
/**
|
|
11010
|
+
* The ID of a response to compare when diagnosing prompt cache reuse. Supplying
|
|
11011
|
+
* this field requests prompt cache diagnostics when the feature is enabled.
|
|
11012
|
+
*/
|
|
11013
|
+
comparison_response_id?: string | null;
|
|
11014
|
+
|
|
10153
11015
|
/**
|
|
10154
11016
|
* Controls whether OpenAI automatically creates an implicit cache breakpoint.
|
|
10155
11017
|
* Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
|
|
@@ -10284,13 +11146,14 @@ export interface ResponseRetrieveParamsStreaming extends ResponseRetrieveParamsB
|
|
|
10284
11146
|
|
|
10285
11147
|
export interface ResponseCompactParams {
|
|
10286
11148
|
/**
|
|
10287
|
-
* Model ID used to generate the response, like `gpt-
|
|
11149
|
+
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
10288
11150
|
* range of models with different capabilities, performance characteristics, and
|
|
10289
11151
|
* price points. Refer to the
|
|
10290
11152
|
* [model guide](https://platform.openai.com/docs/models) to browse and compare
|
|
10291
11153
|
* available models.
|
|
10292
11154
|
*/
|
|
10293
11155
|
model:
|
|
11156
|
+
| 'gpt-6-astra'
|
|
10294
11157
|
| 'gpt-5.6-sol'
|
|
10295
11158
|
| 'gpt-5.6-terra'
|
|
10296
11159
|
| 'gpt-5.6-luna'
|
|
@@ -10450,12 +11313,13 @@ export interface ResponseCompactParams {
|
|
|
10450
11313
|
* request will be processed with the Flex Processing service tier. - To opt-in to
|
|
10451
11314
|
* [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
|
|
10452
11315
|
* `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
|
|
10453
|
-
* Completions.
|
|
10454
|
-
*
|
|
10455
|
-
* default behavior is 'auto'. When
|
|
10456
|
-
*
|
|
10457
|
-
*
|
|
10458
|
-
* the value set in the
|
|
11316
|
+
* Completions. For models with a dedicated Fast tier, either value resolves to
|
|
11317
|
+
* `service_tier=fast`; for other models, either value resolves to
|
|
11318
|
+
* `service_tier=priority`. - When not set, the default behavior is 'auto'. When
|
|
11319
|
+
* the `service_tier` parameter is set, the response body will include the
|
|
11320
|
+
* `service_tier` value based on the processing mode actually used to serve the
|
|
11321
|
+
* request. This response value may be different from the value set in the
|
|
11322
|
+
* parameter.
|
|
10459
11323
|
*/
|
|
10460
11324
|
service_tier?: 'auto' | 'default' | 'fast' | 'flex' | 'priority' | null;
|
|
10461
11325
|
}
|
|
@@ -10539,6 +11403,8 @@ export declare namespace Responses {
|
|
|
10539
11403
|
type ResponseComputerToolCall as ResponseComputerToolCall,
|
|
10540
11404
|
type ResponseComputerToolCallOutputItem as ResponseComputerToolCallOutputItem,
|
|
10541
11405
|
type ResponseComputerToolCallOutputScreenshot as ResponseComputerToolCallOutputScreenshot,
|
|
11406
|
+
type ResponseConfigurationUpdateItem as ResponseConfigurationUpdateItem,
|
|
11407
|
+
type ResponseConfigurationUpdateItemParam as ResponseConfigurationUpdateItemParam,
|
|
10542
11408
|
type ResponseContainerReference as ResponseContainerReference,
|
|
10543
11409
|
type ResponseContent as ResponseContent,
|
|
10544
11410
|
type ResponseContentPartAddedEvent as ResponseContentPartAddedEvent,
|
|
@@ -10625,6 +11491,15 @@ export declare namespace Responses {
|
|
|
10625
11491
|
type ResponseShellCallOutputContentDeltaEvent as ResponseShellCallOutputContentDeltaEvent,
|
|
10626
11492
|
type ResponseShellCallOutputContentDoneEvent as ResponseShellCallOutputContentDoneEvent,
|
|
10627
11493
|
type ResponseStatus as ResponseStatus,
|
|
11494
|
+
type ResponseSteerAcceptedEvent as ResponseSteerAcceptedEvent,
|
|
11495
|
+
type ResponseSteerErrorCode as ResponseSteerErrorCode,
|
|
11496
|
+
type ResponseSteerEvent as ResponseSteerEvent,
|
|
11497
|
+
type ResponseSteerFailedEvent as ResponseSteerFailedEvent,
|
|
11498
|
+
type ResponseSteerInput as ResponseSteerInput,
|
|
11499
|
+
type ResponseSteerInputContent as ResponseSteerInputContent,
|
|
11500
|
+
type ResponseSteerPendingEvent as ResponseSteerPendingEvent,
|
|
11501
|
+
type ResponseSteerPendingReason as ResponseSteerPendingReason,
|
|
11502
|
+
type ResponseSteerRequiredInput as ResponseSteerRequiredInput,
|
|
10628
11503
|
type ResponseStreamEvent as ResponseStreamEvent,
|
|
10629
11504
|
type ResponseTextConfig as ResponseTextConfig,
|
|
10630
11505
|
type ResponseTextDeltaEvent as ResponseTextDeltaEvent,
|