openai 7.10.0 → 7.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +203 -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 +9 -1
- package/client.d.mts.map +1 -1
- package/client.d.ts +9 -1
- package/client.d.ts.map +1 -1
- package/client.js +17 -4
- package/client.js.map +1 -1
- package/client.mjs +17 -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 +27 -4
- package/lib/responses/ResponseInputItems.js.map +1 -1
- package/lib/responses/ResponseInputItems.mjs +27 -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/audit-logs.d.mts +1 -1
- package/resources/admin/organization/audit-logs.d.ts +1 -1
- package/resources/admin/organization/projects/api-keys.d.mts +5 -0
- package/resources/admin/organization/projects/api-keys.d.mts.map +1 -1
- package/resources/admin/organization/projects/api-keys.d.ts +5 -0
- package/resources/admin/organization/projects/api-keys.d.ts.map +1 -1
- package/resources/admin/organization/projects/projects.d.mts +2 -2
- package/resources/admin/organization/projects/projects.d.ts +2 -2
- 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/projects/service-accounts/service-accounts.d.mts +13 -0
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.mts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts +13 -0
- package/resources/admin/organization/projects/service-accounts/service-accounts.d.ts.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.js.map +1 -1
- package/resources/admin/organization/projects/service-accounts/service-accounts.mjs.map +1 -1
- package/resources/audio/speech.d.mts +3 -2
- package/resources/audio/speech.d.mts.map +1 -1
- package/resources/audio/speech.d.ts +3 -2
- package/resources/audio/speech.d.ts.map +1 -1
- package/resources/audio/transcriptions.d.mts +10 -10
- package/resources/audio/transcriptions.d.ts +10 -10
- package/resources/audio/translations.d.mts +1 -1
- package/resources/audio/translations.d.ts +1 -1
- package/resources/batches.d.mts +6 -5
- package/resources/batches.d.mts.map +1 -1
- package/resources/batches.d.ts +6 -5
- package/resources/batches.d.ts.map +1 -1
- package/resources/beta/assistants.d.mts +143 -147
- package/resources/beta/assistants.d.mts.map +1 -1
- package/resources/beta/assistants.d.ts +143 -147
- package/resources/beta/assistants.d.ts.map +1 -1
- package/resources/beta/responses/input-tokens.d.mts +11 -11
- package/resources/beta/responses/input-tokens.d.ts +11 -11
- package/resources/beta/responses/responses.d.mts +284 -194
- package/resources/beta/responses/responses.d.mts.map +1 -1
- package/resources/beta/responses/responses.d.ts +284 -194
- package/resources/beta/responses/responses.d.ts.map +1 -1
- package/resources/beta/responses/responses.js +3 -3
- package/resources/beta/responses/responses.js.map +1 -1
- package/resources/beta/responses/responses.mjs +3 -3
- package/resources/beta/responses/responses.mjs.map +1 -1
- package/resources/beta/threads/messages.d.mts +29 -23
- package/resources/beta/threads/messages.d.mts.map +1 -1
- package/resources/beta/threads/messages.d.ts +29 -23
- package/resources/beta/threads/messages.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.d.mts +39 -35
- package/resources/beta/threads/runs/runs.d.mts.map +1 -1
- package/resources/beta/threads/runs/runs.d.ts +39 -35
- package/resources/beta/threads/runs/runs.d.ts.map +1 -1
- package/resources/beta/threads/runs/runs.js.map +1 -1
- package/resources/beta/threads/runs/runs.mjs.map +1 -1
- package/resources/beta/threads/runs/steps.d.mts +14 -15
- package/resources/beta/threads/runs/steps.d.mts.map +1 -1
- package/resources/beta/threads/runs/steps.d.ts +14 -15
- package/resources/beta/threads/runs/steps.d.ts.map +1 -1
- package/resources/beta/threads/threads.d.mts +53 -50
- package/resources/beta/threads/threads.d.mts.map +1 -1
- package/resources/beta/threads/threads.d.ts +53 -50
- package/resources/beta/threads/threads.d.ts.map +1 -1
- package/resources/beta/threads/threads.js.map +1 -1
- package/resources/beta/threads/threads.mjs.map +1 -1
- package/resources/chat/completions/completions.d.mts +89 -81
- package/resources/chat/completions/completions.d.mts.map +1 -1
- package/resources/chat/completions/completions.d.ts +89 -81
- package/resources/chat/completions/completions.d.ts.map +1 -1
- package/resources/chat/completions/completions.js.map +1 -1
- package/resources/chat/completions/completions.mjs.map +1 -1
- package/resources/completions.d.mts +15 -14
- package/resources/completions.d.mts.map +1 -1
- package/resources/completions.d.ts +15 -14
- package/resources/completions.d.ts.map +1 -1
- package/resources/content-provenance-checks.d.mts +1 -1
- package/resources/content-provenance-checks.d.ts +1 -1
- package/resources/content-provenance-checks.js +1 -1
- package/resources/content-provenance-checks.mjs +1 -1
- package/resources/conversations/items.d.mts +12 -3
- package/resources/conversations/items.d.mts.map +1 -1
- package/resources/conversations/items.d.ts +12 -3
- package/resources/conversations/items.d.ts.map +1 -1
- package/resources/embeddings.d.mts +6 -6
- package/resources/embeddings.d.ts +6 -6
- package/resources/evals/evals.d.mts +1 -1
- package/resources/evals/evals.d.ts +1 -1
- package/resources/evals/evals.js +1 -1
- package/resources/evals/evals.mjs +1 -1
- package/resources/evals/runs/runs.d.mts +62 -57
- package/resources/evals/runs/runs.d.mts.map +1 -1
- package/resources/evals/runs/runs.d.ts +62 -57
- package/resources/evals/runs/runs.d.ts.map +1 -1
- package/resources/evals/runs/runs.js.map +1 -1
- package/resources/evals/runs/runs.mjs.map +1 -1
- package/resources/files.d.mts +5 -5
- package/resources/files.d.ts +5 -5
- package/resources/files.js +5 -5
- package/resources/files.mjs +5 -5
- package/resources/fine-tuning/alpha/graders.d.mts +5 -4
- package/resources/fine-tuning/alpha/graders.d.mts.map +1 -1
- package/resources/fine-tuning/alpha/graders.d.ts +5 -4
- package/resources/fine-tuning/alpha/graders.d.ts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.mts +8 -4
- package/resources/fine-tuning/checkpoints/permissions.d.mts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.d.ts +8 -4
- package/resources/fine-tuning/checkpoints/permissions.d.ts.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.js +8 -4
- package/resources/fine-tuning/checkpoints/permissions.js.map +1 -1
- package/resources/fine-tuning/checkpoints/permissions.mjs +8 -4
- package/resources/fine-tuning/checkpoints/permissions.mjs.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.mts +13 -12
- package/resources/fine-tuning/jobs/jobs.d.mts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.d.ts +13 -12
- package/resources/fine-tuning/jobs/jobs.d.ts.map +1 -1
- package/resources/fine-tuning/jobs/jobs.js +2 -2
- package/resources/fine-tuning/jobs/jobs.js.map +1 -1
- package/resources/fine-tuning/jobs/jobs.mjs +2 -2
- package/resources/fine-tuning/jobs/jobs.mjs.map +1 -1
- package/resources/graders/grader-models.d.mts +1 -1
- package/resources/graders/grader-models.d.ts +1 -1
- package/resources/images.d.mts +83 -68
- package/resources/images.d.mts.map +1 -1
- package/resources/images.d.ts +83 -68
- package/resources/images.d.ts.map +1 -1
- package/resources/images.js.map +1 -1
- package/resources/images.mjs.map +1 -1
- package/resources/moderations.d.mts +5 -4
- package/resources/moderations.d.mts.map +1 -1
- package/resources/moderations.d.ts +5 -4
- package/resources/moderations.d.ts.map +1 -1
- package/resources/moderations.js +2 -1
- package/resources/moderations.js.map +1 -1
- package/resources/moderations.mjs +2 -1
- package/resources/moderations.mjs.map +1 -1
- package/resources/realtime/calls.d.mts +1 -1
- package/resources/realtime/calls.d.ts +1 -1
- package/resources/realtime/client-secrets.d.mts +4 -4
- package/resources/realtime/client-secrets.d.ts +4 -4
- package/resources/realtime/client-secrets.js +1 -1
- package/resources/realtime/client-secrets.mjs +1 -1
- package/resources/realtime/realtime.d.mts +16 -16
- package/resources/realtime/realtime.d.ts +16 -16
- package/resources/responses/input-tokens.d.mts +9 -9
- package/resources/responses/input-tokens.d.ts +9 -9
- package/resources/responses/responses.d.mts +278 -187
- package/resources/responses/responses.d.mts.map +1 -1
- package/resources/responses/responses.d.ts +278 -187
- package/resources/responses/responses.d.ts.map +1 -1
- package/resources/responses/responses.js +3 -3
- package/resources/responses/responses.js.map +1 -1
- package/resources/responses/responses.mjs +3 -3
- package/resources/responses/responses.mjs.map +1 -1
- package/resources/shared.d.mts +12 -12
- package/resources/shared.d.ts +12 -12
- package/resources/uploads/parts.d.mts +5 -4
- package/resources/uploads/parts.d.mts.map +1 -1
- package/resources/uploads/parts.d.ts +5 -4
- package/resources/uploads/parts.d.ts.map +1 -1
- package/resources/uploads/parts.js +5 -4
- package/resources/uploads/parts.js.map +1 -1
- package/resources/uploads/parts.mjs +5 -4
- package/resources/uploads/parts.mjs.map +1 -1
- package/resources/uploads/uploads.d.mts +11 -11
- package/resources/uploads/uploads.d.ts +11 -11
- package/resources/uploads/uploads.js +9 -9
- package/resources/uploads/uploads.mjs +9 -9
- package/resources/vector-stores/file-batches.d.mts +11 -11
- package/resources/vector-stores/file-batches.d.ts +11 -11
- package/resources/vector-stores/files.d.mts +8 -8
- package/resources/vector-stores/files.d.ts +8 -8
- package/resources/vector-stores/files.js +3 -3
- package/resources/vector-stores/files.mjs +3 -3
- package/resources/vector-stores/vector-stores.d.mts +3 -3
- package/resources/vector-stores/vector-stores.d.ts +3 -3
- package/resources/webhooks/webhooks.d.mts +12 -6
- package/resources/webhooks/webhooks.d.mts.map +1 -1
- package/resources/webhooks/webhooks.d.ts +12 -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 +19 -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 +29 -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/audit-logs.ts +1 -1
- package/src/resources/admin/organization/projects/api-keys.ts +6 -0
- package/src/resources/admin/organization/projects/projects.ts +2 -2
- package/src/resources/admin/organization/projects/service-accounts/api-keys.ts +11 -0
- package/src/resources/admin/organization/projects/service-accounts/service-accounts.ts +15 -0
- package/src/resources/audio/speech.ts +3 -2
- package/src/resources/audio/transcriptions.ts +10 -10
- package/src/resources/audio/translations.ts +1 -1
- package/src/resources/batches.ts +6 -5
- package/src/resources/beta/assistants.ts +143 -147
- package/src/resources/beta/responses/input-tokens.ts +11 -11
- package/src/resources/beta/responses/responses.ts +315 -192
- package/src/resources/beta/threads/messages.ts +29 -23
- package/src/resources/beta/threads/runs/runs.ts +39 -35
- package/src/resources/beta/threads/runs/steps.ts +14 -15
- package/src/resources/beta/threads/threads.ts +53 -50
- package/src/resources/chat/completions/completions.ts +89 -81
- package/src/resources/completions.ts +15 -14
- package/src/resources/content-provenance-checks.ts +1 -1
- package/src/resources/conversations/items.ts +14 -3
- package/src/resources/embeddings.ts +6 -6
- package/src/resources/evals/evals.ts +1 -1
- package/src/resources/evals/runs/runs.ts +62 -57
- package/src/resources/files.ts +5 -5
- package/src/resources/fine-tuning/alpha/graders.ts +5 -4
- package/src/resources/fine-tuning/checkpoints/permissions.ts +8 -4
- package/src/resources/fine-tuning/jobs/jobs.ts +13 -12
- package/src/resources/graders/grader-models.ts +1 -1
- package/src/resources/images.ts +86 -67
- package/src/resources/moderations.ts +5 -4
- package/src/resources/realtime/calls.ts +1 -1
- package/src/resources/realtime/client-secrets.ts +4 -4
- package/src/resources/realtime/realtime.ts +16 -16
- package/src/resources/responses/input-tokens.ts +9 -9
- package/src/resources/responses/responses.ts +309 -185
- package/src/resources/shared.ts +12 -12
- package/src/resources/uploads/parts.ts +5 -4
- package/src/resources/uploads/uploads.ts +11 -11
- package/src/resources/vector-stores/file-batches.ts +11 -11
- package/src/resources/vector-stores/files.ts +8 -8
- package/src/resources/vector-stores/vector-stores.ts +3 -3
- package/src/resources/webhooks/webhooks.ts +12 -6
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -79,16 +79,16 @@ export class Responses extends APIResource {
|
|
|
79
79
|
|
|
80
80
|
/**
|
|
81
81
|
* Creates a model response. Provide
|
|
82
|
-
* [text](https://
|
|
83
|
-
* [image](https://
|
|
84
|
-
* [text](https://
|
|
85
|
-
* [JSON](https://
|
|
86
|
-
* the model call your own
|
|
87
|
-
* [custom code](https://
|
|
88
|
-
* built-in [tools](https://
|
|
89
|
-
* [web search](https://
|
|
90
|
-
* [file search](https://
|
|
91
|
-
* your own data as input for the model's response.
|
|
82
|
+
* [text](https://developers.openai.com/api/docs/guides/text) or
|
|
83
|
+
* [image](https://developers.openai.com/api/docs/guides/images-vision) inputs to
|
|
84
|
+
* generate [text](https://developers.openai.com/api/docs/guides/text) or
|
|
85
|
+
* [JSON](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
86
|
+
* outputs. Have the model call your own
|
|
87
|
+
* [custom code](https://developers.openai.com/api/docs/guides/function-calling) or
|
|
88
|
+
* use built-in [tools](https://developers.openai.com/api/docs/guides/tools) like
|
|
89
|
+
* [web search](https://developers.openai.com/api/docs/guides/tools-web-search) or
|
|
90
|
+
* [file search](https://developers.openai.com/api/docs/guides/tools-file-search)
|
|
91
|
+
* to use your own data as input for the model's response.
|
|
92
92
|
*
|
|
93
93
|
* @example
|
|
94
94
|
* ```ts
|
|
@@ -210,7 +210,7 @@ export class Responses extends APIResource {
|
|
|
210
210
|
/**
|
|
211
211
|
* Cancels a model response with the given ID. Only responses created with the
|
|
212
212
|
* `background` parameter set to `true` can be cancelled.
|
|
213
|
-
* [Learn more](https://
|
|
213
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
214
214
|
*
|
|
215
215
|
* @example
|
|
216
216
|
* ```ts
|
|
@@ -230,9 +230,9 @@ export class Responses extends APIResource {
|
|
|
230
230
|
* Compact a conversation. Returns a compacted response object.
|
|
231
231
|
*
|
|
232
232
|
* Learn when and how to compact long-running conversations in the
|
|
233
|
-
* [conversation state guide](https://
|
|
233
|
+
* [conversation state guide](https://developers.openai.com/api/docs/guides/conversation-state#managing-the-context-window).
|
|
234
234
|
* For ZDR-compatible compaction details, see
|
|
235
|
-
* [Compaction (advanced)](https://
|
|
235
|
+
* [Compaction (advanced)](https://developers.openai.com/api/docs/guides/conversation-state#compaction-advanced).
|
|
236
236
|
*
|
|
237
237
|
* @example
|
|
238
238
|
* ```ts
|
|
@@ -536,7 +536,7 @@ export type ComputerActionList = Array<ComputerAction>;
|
|
|
536
536
|
|
|
537
537
|
/**
|
|
538
538
|
* A tool that controls a virtual computer. Learn more about the
|
|
539
|
-
* [computer tool](https://
|
|
539
|
+
* [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).
|
|
540
540
|
*/
|
|
541
541
|
export interface ComputerTool {
|
|
542
542
|
/**
|
|
@@ -547,7 +547,7 @@ export interface ComputerTool {
|
|
|
547
547
|
|
|
548
548
|
/**
|
|
549
549
|
* A tool that controls a virtual computer. Learn more about the
|
|
550
|
-
* [computer tool](https://
|
|
550
|
+
* [computer tool](https://developers.openai.com/api/docs/guides/tools-computer-use).
|
|
551
551
|
*/
|
|
552
552
|
export interface ComputerUsePreviewTool {
|
|
553
553
|
/**
|
|
@@ -653,7 +653,7 @@ export interface ContainerReference {
|
|
|
653
653
|
|
|
654
654
|
/**
|
|
655
655
|
* A custom tool that processes input using a specified format. Learn more about
|
|
656
|
-
* [custom tools](https://
|
|
656
|
+
* [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools)
|
|
657
657
|
*/
|
|
658
658
|
export interface CustomTool {
|
|
659
659
|
/**
|
|
@@ -730,7 +730,7 @@ export interface EasyInputMessage {
|
|
|
730
730
|
/**
|
|
731
731
|
* A tool that searches for relevant content from uploaded files. Learn more about
|
|
732
732
|
* the
|
|
733
|
-
* [file search tool](https://
|
|
733
|
+
* [file search tool](https://developers.openai.com/api/docs/guides/tools-file-search).
|
|
734
734
|
*/
|
|
735
735
|
export interface FileSearchTool {
|
|
736
736
|
/**
|
|
@@ -823,7 +823,7 @@ export interface FunctionShellTool {
|
|
|
823
823
|
/**
|
|
824
824
|
* Defines a function in your own code the model can choose to call. Learn more
|
|
825
825
|
* about
|
|
826
|
-
* [function calling](https://
|
|
826
|
+
* [function calling](https://developers.openai.com/api/docs/guides/function-calling).
|
|
827
827
|
*/
|
|
828
828
|
export interface FunctionTool {
|
|
829
829
|
/**
|
|
@@ -1085,8 +1085,8 @@ export interface Response {
|
|
|
1085
1085
|
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
1086
1086
|
* range of models with different capabilities, performance characteristics, and
|
|
1087
1087
|
* price points. Refer to the
|
|
1088
|
-
* [model guide](https://
|
|
1089
|
-
* available models.
|
|
1088
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
1089
|
+
* compare available models.
|
|
1090
1090
|
*/
|
|
1091
1091
|
model: Shared.ResponsesModel;
|
|
1092
1092
|
|
|
@@ -1143,17 +1143,18 @@ export interface Response {
|
|
|
1143
1143
|
*
|
|
1144
1144
|
* - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
1145
1145
|
* capabilities, like
|
|
1146
|
-
* [web search](https://
|
|
1147
|
-
*
|
|
1146
|
+
* [web search](https://developers.openai.com/api/docs/guides/tools-web-search)
|
|
1147
|
+
* or
|
|
1148
|
+
* [file search](https://developers.openai.com/api/docs/guides/tools-file-search).
|
|
1148
1149
|
* Learn more about
|
|
1149
|
-
* [built-in tools](https://
|
|
1150
|
+
* [built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
1150
1151
|
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
1151
1152
|
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
1152
|
-
* [MCP Tools](https://
|
|
1153
|
+
* [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
1153
1154
|
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
1154
1155
|
* the model to call your own code with strongly typed arguments and outputs.
|
|
1155
1156
|
* Learn more about
|
|
1156
|
-
* [function calling](https://
|
|
1157
|
+
* [function calling](https://developers.openai.com/api/docs/guides/function-calling).
|
|
1157
1158
|
* You can also use custom tools to call your own code.
|
|
1158
1159
|
*/
|
|
1159
1160
|
tools: Array<Tool>;
|
|
@@ -1169,7 +1170,7 @@ export interface Response {
|
|
|
1169
1170
|
|
|
1170
1171
|
/**
|
|
1171
1172
|
* Whether to run the model response in the background.
|
|
1172
|
-
* [Learn more](https://
|
|
1173
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
1173
1174
|
*/
|
|
1174
1175
|
background?: boolean | null;
|
|
1175
1176
|
|
|
@@ -1188,7 +1189,7 @@ export interface Response {
|
|
|
1188
1189
|
/**
|
|
1189
1190
|
* An upper bound for the number of tokens that can be generated for a response,
|
|
1190
1191
|
* including visible output tokens and
|
|
1191
|
-
* [reasoning tokens](https://
|
|
1192
|
+
* [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
1192
1193
|
*/
|
|
1193
1194
|
max_output_tokens?: number | null;
|
|
1194
1195
|
|
|
@@ -1201,21 +1202,30 @@ export interface Response {
|
|
|
1201
1202
|
/**
|
|
1202
1203
|
* The unique ID of the previous response to the model. Use this to create
|
|
1203
1204
|
* multi-turn conversations. Learn more about
|
|
1204
|
-
* [conversation state](https://
|
|
1205
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
1205
1206
|
* Cannot be used in conjunction with `conversation`.
|
|
1206
1207
|
*/
|
|
1207
1208
|
previous_response_id?: string | null;
|
|
1208
1209
|
|
|
1209
1210
|
/**
|
|
1210
1211
|
* Reference to a prompt template and its variables.
|
|
1211
|
-
* [Learn more](https://
|
|
1212
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
1212
1213
|
*/
|
|
1213
1214
|
prompt?: ResponsePrompt | null;
|
|
1214
1215
|
|
|
1216
|
+
/**
|
|
1217
|
+
* Prompt cache diagnostics requested for this response.
|
|
1218
|
+
*/
|
|
1219
|
+
prompt_cache_diagnostics?:
|
|
1220
|
+
| Response.CacheMiss
|
|
1221
|
+
| Response.CacheHit
|
|
1222
|
+
| Response.ComparisonResponseNotFound
|
|
1223
|
+
| Response.Unavailable;
|
|
1224
|
+
|
|
1215
1225
|
/**
|
|
1216
1226
|
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
1217
1227
|
* hit rates. Replaces the `user` field.
|
|
1218
|
-
* [Learn more](https://
|
|
1228
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
1219
1229
|
*/
|
|
1220
1230
|
prompt_cache_key?: string | null;
|
|
1221
1231
|
|
|
@@ -1231,7 +1241,7 @@ export interface Response {
|
|
|
1231
1241
|
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
1232
1242
|
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
1233
1243
|
* of 24 hours.
|
|
1234
|
-
* [Learn more](https://
|
|
1244
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).
|
|
1235
1245
|
* This field expresses a maximum retention policy, while
|
|
1236
1246
|
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
1237
1247
|
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
@@ -1248,7 +1258,7 @@ export interface Response {
|
|
|
1248
1258
|
|
|
1249
1259
|
/**
|
|
1250
1260
|
* Configuration options for
|
|
1251
|
-
* [reasoning models](https://
|
|
1261
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
1252
1262
|
*/
|
|
1253
1263
|
reasoning?: Shared.Reasoning | null;
|
|
1254
1264
|
|
|
@@ -1258,7 +1268,7 @@ export interface Response {
|
|
|
1258
1268
|
* identifies each user, with a maximum length of 64 characters. We recommend
|
|
1259
1269
|
* hashing their username or email address, in order to avoid sending us any
|
|
1260
1270
|
* identifying information.
|
|
1261
|
-
* [Learn more](https://
|
|
1271
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
1262
1272
|
*/
|
|
1263
1273
|
safety_identifier?: string | null;
|
|
1264
1274
|
|
|
@@ -1271,13 +1281,15 @@ export interface Response {
|
|
|
1271
1281
|
* will use 'default'.
|
|
1272
1282
|
* - If set to 'default', then the request will be processed with the standard
|
|
1273
1283
|
* pricing and performance for the selected model.
|
|
1274
|
-
* - If set to
|
|
1275
|
-
* then
|
|
1276
|
-
*
|
|
1277
|
-
*
|
|
1278
|
-
*
|
|
1279
|
-
*
|
|
1280
|
-
*
|
|
1284
|
+
* - If set to
|
|
1285
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
1286
|
+
* the request will be processed with the Flex Processing service tier.
|
|
1287
|
+
* - To opt-in to
|
|
1288
|
+
* [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
1289
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
1290
|
+
* parameter for Responses or Chat Completions. The response will show
|
|
1291
|
+
* `service_tier=priority` regardless of if you specify `service_tier=fast` or
|
|
1292
|
+
* `priority` in your request.
|
|
1281
1293
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
1282
1294
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
1283
1295
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -1299,8 +1311,8 @@ export interface Response {
|
|
|
1299
1311
|
* Configuration options for a text response from the model. Can be plain text or
|
|
1300
1312
|
* structured JSON data. Learn more:
|
|
1301
1313
|
*
|
|
1302
|
-
* - [Text inputs and outputs](https://
|
|
1303
|
-
* - [Structured Outputs](https://
|
|
1314
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
1315
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
1304
1316
|
*/
|
|
1305
1317
|
text?: ResponseTextConfig;
|
|
1306
1318
|
|
|
@@ -1334,7 +1346,7 @@ export interface Response {
|
|
|
1334
1346
|
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
1335
1347
|
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
1336
1348
|
* abuse.
|
|
1337
|
-
* [Learn more](https://
|
|
1349
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
1338
1350
|
*/
|
|
1339
1351
|
user?: string;
|
|
1340
1352
|
}
|
|
@@ -1502,6 +1514,47 @@ export namespace Response {
|
|
|
1502
1514
|
}
|
|
1503
1515
|
}
|
|
1504
1516
|
|
|
1517
|
+
export interface CacheMiss {
|
|
1518
|
+
/**
|
|
1519
|
+
* The estimated number of input tokens affected after the first detected
|
|
1520
|
+
* divergence.
|
|
1521
|
+
*/
|
|
1522
|
+
cache_missed_tokens: number;
|
|
1523
|
+
|
|
1524
|
+
/**
|
|
1525
|
+
* The reason prompt cache reuse did not occur.
|
|
1526
|
+
*/
|
|
1527
|
+
reason:
|
|
1528
|
+
| 'model_changed'
|
|
1529
|
+
| 'prompt_cache_key_changed'
|
|
1530
|
+
| 'tools_changed'
|
|
1531
|
+
| 'text_format_changed'
|
|
1532
|
+
| 'reasoning_effort_changed'
|
|
1533
|
+
| 'verbosity_changed'
|
|
1534
|
+
| 'context_compacted'
|
|
1535
|
+
| 'input_changed'
|
|
1536
|
+
| 'service_tier_changed';
|
|
1537
|
+
|
|
1538
|
+
type: 'cache_miss';
|
|
1539
|
+
|
|
1540
|
+
/**
|
|
1541
|
+
* The raw token count of the reusable prefix in the compared response.
|
|
1542
|
+
*/
|
|
1543
|
+
comparison_reusable_tokens?: number;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
export interface CacheHit {
|
|
1547
|
+
type: 'cache_hit';
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
export interface ComparisonResponseNotFound {
|
|
1551
|
+
type: 'comparison_response_not_found';
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
export interface Unavailable {
|
|
1555
|
+
type: 'unavailable';
|
|
1556
|
+
}
|
|
1557
|
+
|
|
1505
1558
|
/**
|
|
1506
1559
|
* The prompt-caching options that were applied to the response. Supported for
|
|
1507
1560
|
* `gpt-5.6` and later models.
|
|
@@ -1516,6 +1569,11 @@ export namespace Response {
|
|
|
1516
1569
|
* The minimum lifetime applied to each cache breakpoint.
|
|
1517
1570
|
*/
|
|
1518
1571
|
ttl: '30m';
|
|
1572
|
+
|
|
1573
|
+
/**
|
|
1574
|
+
* The response ID supplied as the prompt cache diagnostics comparison.
|
|
1575
|
+
*/
|
|
1576
|
+
comparison_response_id?: string | null;
|
|
1519
1577
|
}
|
|
1520
1578
|
}
|
|
1521
1579
|
|
|
@@ -1970,7 +2028,7 @@ export namespace ResponseCodeInterpreterToolCall {
|
|
|
1970
2028
|
|
|
1971
2029
|
/**
|
|
1972
2030
|
* A compaction item generated by the
|
|
1973
|
-
* [`v1/responses/compact` API](https://
|
|
2031
|
+
* [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact).
|
|
1974
2032
|
*/
|
|
1975
2033
|
export interface ResponseCompactionItem {
|
|
1976
2034
|
/**
|
|
@@ -1996,7 +2054,7 @@ export interface ResponseCompactionItem {
|
|
|
1996
2054
|
|
|
1997
2055
|
/**
|
|
1998
2056
|
* A compaction item generated by the
|
|
1999
|
-
* [`v1/responses/compact` API](https://
|
|
2057
|
+
* [`v1/responses/compact` API](https://developers.openai.com/api/reference/resources/responses/methods/compact).
|
|
2000
2058
|
*/
|
|
2001
2059
|
export interface ResponseCompactionItemParam {
|
|
2002
2060
|
/**
|
|
@@ -2037,7 +2095,7 @@ export interface ResponseCompletedEvent {
|
|
|
2037
2095
|
|
|
2038
2096
|
/**
|
|
2039
2097
|
* A tool call to a computer use tool. See the
|
|
2040
|
-
* [computer use guide](https://
|
|
2098
|
+
* [computer use guide](https://developers.openai.com/api/docs/guides/tools-computer-use)
|
|
2041
2099
|
* for more information.
|
|
2042
2100
|
*/
|
|
2043
2101
|
export interface ResponseComputerToolCall {
|
|
@@ -3070,7 +3128,7 @@ export interface ResponseFileSearchCallSearchingEvent {
|
|
|
3070
3128
|
|
|
3071
3129
|
/**
|
|
3072
3130
|
* The results of a file search tool call. See the
|
|
3073
|
-
* [file search guide](https://
|
|
3131
|
+
* [file search guide](https://developers.openai.com/api/docs/guides/tools-file-search)
|
|
3074
3132
|
* for more information.
|
|
3075
3133
|
*/
|
|
3076
3134
|
export interface ResponseFileSearchToolCall {
|
|
@@ -3139,7 +3197,7 @@ export namespace ResponseFileSearchToolCall {
|
|
|
3139
3197
|
*
|
|
3140
3198
|
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
3141
3199
|
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
3142
|
-
* [Structured Outputs guide](https://
|
|
3200
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
3143
3201
|
*
|
|
3144
3202
|
* The default format is `{ "type": "text" }` with no additional options.
|
|
3145
3203
|
*
|
|
@@ -3157,7 +3215,7 @@ export type ResponseFormatTextConfig =
|
|
|
3157
3215
|
/**
|
|
3158
3216
|
* JSON Schema response format. Used to generate structured JSON responses. Learn
|
|
3159
3217
|
* more about
|
|
3160
|
-
* [Structured Outputs](https://
|
|
3218
|
+
* [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
3161
3219
|
*/
|
|
3162
3220
|
export interface ResponseFormatTextJSONSchemaConfig {
|
|
3163
3221
|
/**
|
|
@@ -3188,7 +3246,7 @@ export interface ResponseFormatTextJSONSchemaConfig {
|
|
|
3188
3246
|
* true, the model will always follow the exact schema defined in the `schema`
|
|
3189
3247
|
* field. Only a subset of JSON Schema is supported when `strict` is `true`. To
|
|
3190
3248
|
* learn more, read the
|
|
3191
|
-
* [Structured Outputs guide](https://
|
|
3249
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
3192
3250
|
*/
|
|
3193
3251
|
strict?: boolean | null;
|
|
3194
3252
|
}
|
|
@@ -3237,11 +3295,6 @@ export interface ResponseFunctionCallArgumentsDoneEvent {
|
|
|
3237
3295
|
*/
|
|
3238
3296
|
item_id: string;
|
|
3239
3297
|
|
|
3240
|
-
/**
|
|
3241
|
-
* The name of the function that was called.
|
|
3242
|
-
*/
|
|
3243
|
-
name: string;
|
|
3244
|
-
|
|
3245
3298
|
/**
|
|
3246
3299
|
* The index of the output item.
|
|
3247
3300
|
*/
|
|
@@ -3512,7 +3565,7 @@ export namespace ResponseFunctionShellToolCallOutput {
|
|
|
3512
3565
|
|
|
3513
3566
|
/**
|
|
3514
3567
|
* A tool call to run a function. See the
|
|
3515
|
-
* [function calling guide](https://
|
|
3568
|
+
* [function calling guide](https://developers.openai.com/api/docs/guides/function-calling)
|
|
3516
3569
|
* for more information.
|
|
3517
3570
|
*/
|
|
3518
3571
|
export interface ResponseFunctionToolCall {
|
|
@@ -3580,7 +3633,7 @@ export namespace ResponseFunctionToolCall {
|
|
|
3580
3633
|
|
|
3581
3634
|
/**
|
|
3582
3635
|
* A tool call to run a function. See the
|
|
3583
|
-
* [function calling guide](https://
|
|
3636
|
+
* [function calling guide](https://developers.openai.com/api/docs/guides/function-calling)
|
|
3584
3637
|
* for more information.
|
|
3585
3638
|
*/
|
|
3586
3639
|
export interface ResponseFunctionToolCallItem extends ResponseFunctionToolCall {
|
|
@@ -3673,8 +3726,8 @@ export namespace ResponseFunctionToolCallOutputItem {
|
|
|
3673
3726
|
|
|
3674
3727
|
/**
|
|
3675
3728
|
* The results of a web search tool call. See the
|
|
3676
|
-
* [web search guide](https://
|
|
3677
|
-
* more information.
|
|
3729
|
+
* [web search guide](https://developers.openai.com/api/docs/guides/tools-web-search)
|
|
3730
|
+
* for more information.
|
|
3678
3731
|
*/
|
|
3679
3732
|
export interface ResponseFunctionWebSearch {
|
|
3680
3733
|
/**
|
|
@@ -3694,7 +3747,7 @@ export interface ResponseFunctionWebSearch {
|
|
|
3694
3747
|
/**
|
|
3695
3748
|
* The status of the web search tool call.
|
|
3696
3749
|
*/
|
|
3697
|
-
status: 'in_progress' | 'searching' | 'completed' | 'failed';
|
|
3750
|
+
status: 'in_progress' | 'searching' | 'completed' | 'failed' | 'incomplete';
|
|
3698
3751
|
|
|
3699
3752
|
/**
|
|
3700
3753
|
* The type of the web search tool call. Always `web_search_call`.
|
|
@@ -4152,7 +4205,7 @@ export namespace ResponseInputFileContent {
|
|
|
4152
4205
|
|
|
4153
4206
|
/**
|
|
4154
4207
|
* An image input to the model. Learn about
|
|
4155
|
-
* [image inputs](https://
|
|
4208
|
+
* [image inputs](https://developers.openai.com/api/docs/guides/images-vision).
|
|
4156
4209
|
*/
|
|
4157
4210
|
export interface ResponseInputImage {
|
|
4158
4211
|
/**
|
|
@@ -4201,7 +4254,7 @@ export namespace ResponseInputImage {
|
|
|
4201
4254
|
|
|
4202
4255
|
/**
|
|
4203
4256
|
* An image input to the model. Learn about
|
|
4204
|
-
* [image inputs](https://
|
|
4257
|
+
* [image inputs](https://developers.openai.com/api/docs/guides/images-vision)
|
|
4205
4258
|
*/
|
|
4206
4259
|
export interface ResponseInputImageContent {
|
|
4207
4260
|
/**
|
|
@@ -4524,6 +4577,17 @@ export namespace ResponseInputItem {
|
|
|
4524
4577
|
* The type of the image generation call. Always `image_generation_call`.
|
|
4525
4578
|
*/
|
|
4526
4579
|
type: 'image_generation_call';
|
|
4580
|
+
|
|
4581
|
+
/**
|
|
4582
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
4583
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
4584
|
+
*/
|
|
4585
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
4586
|
+
|
|
4587
|
+
/**
|
|
4588
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
4589
|
+
*/
|
|
4590
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
4527
4591
|
}
|
|
4528
4592
|
|
|
4529
4593
|
/**
|
|
@@ -5430,6 +5494,17 @@ export namespace ResponseItem {
|
|
|
5430
5494
|
* The type of the image generation call. Always `image_generation_call`.
|
|
5431
5495
|
*/
|
|
5432
5496
|
type: 'image_generation_call';
|
|
5497
|
+
|
|
5498
|
+
/**
|
|
5499
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
5500
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
5501
|
+
*/
|
|
5502
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
5503
|
+
|
|
5504
|
+
/**
|
|
5505
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
5506
|
+
*/
|
|
5507
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
5433
5508
|
}
|
|
5434
5509
|
|
|
5435
5510
|
/**
|
|
@@ -6071,6 +6146,17 @@ export namespace ResponseOutputItem {
|
|
|
6071
6146
|
* The type of the image generation call. Always `image_generation_call`.
|
|
6072
6147
|
*/
|
|
6073
6148
|
type: 'image_generation_call';
|
|
6149
|
+
|
|
6150
|
+
/**
|
|
6151
|
+
* The quality of the image generated by the image generation tool call. One of
|
|
6152
|
+
* `low`, `medium`, `high`, `xhigh`, `max`, or `auto`.
|
|
6153
|
+
*/
|
|
6154
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto' | null;
|
|
6155
|
+
|
|
6156
|
+
/**
|
|
6157
|
+
* The image dimensions as a `WIDTHxHEIGHT` string, for example `1536x864`.
|
|
6158
|
+
*/
|
|
6159
|
+
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | null;
|
|
6074
6160
|
}
|
|
6075
6161
|
|
|
6076
6162
|
/**
|
|
@@ -6767,7 +6853,7 @@ export namespace ResponseOutputTextAnnotationAddedEvent {
|
|
|
6767
6853
|
|
|
6768
6854
|
/**
|
|
6769
6855
|
* Reference to a prompt template and its variables.
|
|
6770
|
-
* [Learn more](https://
|
|
6856
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
6771
6857
|
*/
|
|
6772
6858
|
export interface ResponsePrompt {
|
|
6773
6859
|
/**
|
|
@@ -6812,7 +6898,7 @@ export interface ResponseQueuedEvent {
|
|
|
6812
6898
|
* A description of the chain of thought used by a reasoning model while generating
|
|
6813
6899
|
* a response. Be sure to include these items in your `input` to the Responses API
|
|
6814
6900
|
* for subsequent turns of a conversation if you are manually
|
|
6815
|
-
* [managing context](https://
|
|
6901
|
+
* [managing context](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
6816
6902
|
*/
|
|
6817
6903
|
export interface ResponseReasoningItem {
|
|
6818
6904
|
/**
|
|
@@ -8044,8 +8130,8 @@ export type ResponseStreamEvent =
|
|
|
8044
8130
|
* Configuration options for a text response from the model. Can be plain text or
|
|
8045
8131
|
* structured JSON data. Learn more:
|
|
8046
8132
|
*
|
|
8047
|
-
* - [Text inputs and outputs](https://
|
|
8048
|
-
* - [Structured Outputs](https://
|
|
8133
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
8134
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
8049
8135
|
*/
|
|
8050
8136
|
export interface ResponseTextConfig {
|
|
8051
8137
|
/**
|
|
@@ -8053,7 +8139,7 @@ export interface ResponseTextConfig {
|
|
|
8053
8139
|
*
|
|
8054
8140
|
* Configuring `{ "type": "json_schema" }` enables Structured Outputs, which
|
|
8055
8141
|
* ensures the model will match your supplied JSON schema. Learn more in the
|
|
8056
|
-
* [Structured Outputs guide](https://
|
|
8142
|
+
* [Structured Outputs guide](https://developers.openai.com/api/docs/guides/structured-outputs).
|
|
8057
8143
|
*
|
|
8058
8144
|
* The default format is `{ "type": "text" }` with no additional options.
|
|
8059
8145
|
*
|
|
@@ -8379,7 +8465,7 @@ export namespace ResponseUsage {
|
|
|
8379
8465
|
|
|
8380
8466
|
/**
|
|
8381
8467
|
* The number of tokens that were retrieved from the cache.
|
|
8382
|
-
* [More on prompt caching](https://
|
|
8468
|
+
* [More on prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
8383
8469
|
*/
|
|
8384
8470
|
cached_tokens: number;
|
|
8385
8471
|
}
|
|
@@ -8514,7 +8600,7 @@ export namespace ResponsesClientEvent {
|
|
|
8514
8600
|
|
|
8515
8601
|
/**
|
|
8516
8602
|
* Whether to run the model response in the background.
|
|
8517
|
-
* [Learn more](https://
|
|
8603
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
8518
8604
|
*/
|
|
8519
8605
|
background?: boolean | null;
|
|
8520
8606
|
|
|
@@ -8558,11 +8644,11 @@ export namespace ResponsesClientEvent {
|
|
|
8558
8644
|
*
|
|
8559
8645
|
* Learn more:
|
|
8560
8646
|
*
|
|
8561
|
-
* - [Text inputs and outputs](https://
|
|
8562
|
-
* - [Image inputs](https://
|
|
8563
|
-
* - [File inputs](https://
|
|
8564
|
-
* - [Conversation state](https://
|
|
8565
|
-
* - [Function calling](https://
|
|
8647
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
8648
|
+
* - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision)
|
|
8649
|
+
* - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs)
|
|
8650
|
+
* - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state)
|
|
8651
|
+
* - [Function calling](https://developers.openai.com/api/docs/guides/function-calling)
|
|
8566
8652
|
*/
|
|
8567
8653
|
input?: string | ResponsesAPI.ResponseInput;
|
|
8568
8654
|
|
|
@@ -8578,7 +8664,7 @@ export namespace ResponsesClientEvent {
|
|
|
8578
8664
|
/**
|
|
8579
8665
|
* An upper bound for the number of tokens that can be generated for a response,
|
|
8580
8666
|
* including visible output tokens and
|
|
8581
|
-
* [reasoning tokens](https://
|
|
8667
|
+
* [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
8582
8668
|
*/
|
|
8583
8669
|
max_output_tokens?: number | null;
|
|
8584
8670
|
|
|
@@ -8604,8 +8690,8 @@ export namespace ResponsesClientEvent {
|
|
|
8604
8690
|
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
8605
8691
|
* range of models with different capabilities, performance characteristics, and
|
|
8606
8692
|
* price points. Refer to the
|
|
8607
|
-
* [model guide](https://
|
|
8608
|
-
* available models.
|
|
8693
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
8694
|
+
* compare available models.
|
|
8609
8695
|
*/
|
|
8610
8696
|
model?: Shared.ResponsesModel;
|
|
8611
8697
|
|
|
@@ -8622,21 +8708,21 @@ export namespace ResponsesClientEvent {
|
|
|
8622
8708
|
/**
|
|
8623
8709
|
* The unique ID of the previous response to the model. Use this to create
|
|
8624
8710
|
* multi-turn conversations. Learn more about
|
|
8625
|
-
* [conversation state](https://
|
|
8711
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
8626
8712
|
* Cannot be used in conjunction with `conversation`.
|
|
8627
8713
|
*/
|
|
8628
8714
|
previous_response_id?: string | null;
|
|
8629
8715
|
|
|
8630
8716
|
/**
|
|
8631
8717
|
* Reference to a prompt template and its variables.
|
|
8632
|
-
* [Learn more](https://
|
|
8718
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
8633
8719
|
*/
|
|
8634
8720
|
prompt?: ResponsesAPI.ResponsePrompt | null;
|
|
8635
8721
|
|
|
8636
8722
|
/**
|
|
8637
8723
|
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
8638
8724
|
* hit rates. Replaces the `user` field.
|
|
8639
|
-
* [Learn more](https://
|
|
8725
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
8640
8726
|
*/
|
|
8641
8727
|
prompt_cache_key?: string | null;
|
|
8642
8728
|
|
|
@@ -8648,7 +8734,7 @@ export namespace ResponsesClientEvent {
|
|
|
8648
8734
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
8649
8735
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
8650
8736
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
8651
|
-
* [prompt caching guide](https://
|
|
8737
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
8652
8738
|
* for current details.
|
|
8653
8739
|
*/
|
|
8654
8740
|
prompt_cache_options?: ResponseCreate.PromptCacheOptions;
|
|
@@ -8659,7 +8745,7 @@ export namespace ResponsesClientEvent {
|
|
|
8659
8745
|
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
8660
8746
|
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
8661
8747
|
* of 24 hours.
|
|
8662
|
-
* [Learn more](https://
|
|
8748
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).
|
|
8663
8749
|
* This field expresses a maximum retention policy, while
|
|
8664
8750
|
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
8665
8751
|
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
@@ -8676,7 +8762,7 @@ export namespace ResponsesClientEvent {
|
|
|
8676
8762
|
|
|
8677
8763
|
/**
|
|
8678
8764
|
* Configuration options for
|
|
8679
|
-
* [reasoning models](https://
|
|
8765
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
8680
8766
|
*/
|
|
8681
8767
|
reasoning?: Shared.Reasoning | null;
|
|
8682
8768
|
|
|
@@ -8686,7 +8772,7 @@ export namespace ResponsesClientEvent {
|
|
|
8686
8772
|
* identifies each user, with a maximum length of 64 characters. We recommend
|
|
8687
8773
|
* hashing their username or email address, in order to avoid sending us any
|
|
8688
8774
|
* identifying information.
|
|
8689
|
-
* [Learn more](https://
|
|
8775
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
8690
8776
|
*/
|
|
8691
8777
|
safety_identifier?: string | null;
|
|
8692
8778
|
|
|
@@ -8698,13 +8784,15 @@ export namespace ResponsesClientEvent {
|
|
|
8698
8784
|
* will use 'default'.
|
|
8699
8785
|
* - If set to 'default', then the request will be processed with the standard
|
|
8700
8786
|
* pricing and performance for the selected model.
|
|
8701
|
-
* - If set to
|
|
8702
|
-
* then
|
|
8703
|
-
*
|
|
8704
|
-
*
|
|
8705
|
-
*
|
|
8706
|
-
*
|
|
8707
|
-
*
|
|
8787
|
+
* - If set to
|
|
8788
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
8789
|
+
* the request will be processed with the Flex Processing service tier.
|
|
8790
|
+
* - To opt-in to
|
|
8791
|
+
* [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
8792
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
8793
|
+
* parameter for Responses or Chat Completions. The response will show
|
|
8794
|
+
* `service_tier=priority` regardless of if you specify `service_tier=fast` or
|
|
8795
|
+
* `priority` in your request.
|
|
8708
8796
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
8709
8797
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
8710
8798
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -8720,6 +8808,9 @@ export namespace ResponsesClientEvent {
|
|
|
8720
8808
|
|
|
8721
8809
|
/**
|
|
8722
8810
|
* Whether to store the generated model response for later retrieval via API.
|
|
8811
|
+
* Defaults to true when omitted. If set to true, response data will be stored for
|
|
8812
|
+
* at least 30 days, subject to the
|
|
8813
|
+
* [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses).
|
|
8723
8814
|
*/
|
|
8724
8815
|
store?: boolean | null;
|
|
8725
8816
|
|
|
@@ -8728,7 +8819,7 @@ export namespace ResponsesClientEvent {
|
|
|
8728
8819
|
* generated using
|
|
8729
8820
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
8730
8821
|
* See the
|
|
8731
|
-
* [Streaming section below](https://
|
|
8822
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
8732
8823
|
* for more information.
|
|
8733
8824
|
*/
|
|
8734
8825
|
stream?: boolean | null;
|
|
@@ -8759,8 +8850,8 @@ export namespace ResponsesClientEvent {
|
|
|
8759
8850
|
* Configuration options for a text response from the model. Can be plain text or
|
|
8760
8851
|
* structured JSON data. Learn more:
|
|
8761
8852
|
*
|
|
8762
|
-
* - [Text inputs and outputs](https://
|
|
8763
|
-
* - [Structured Outputs](https://
|
|
8853
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
8854
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
8764
8855
|
*/
|
|
8765
8856
|
text?: ResponsesAPI.ResponseTextConfig;
|
|
8766
8857
|
|
|
@@ -8788,17 +8879,18 @@ export namespace ResponsesClientEvent {
|
|
|
8788
8879
|
*
|
|
8789
8880
|
* - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
8790
8881
|
* capabilities, like
|
|
8791
|
-
* [web search](https://
|
|
8792
|
-
*
|
|
8882
|
+
* [web search](https://developers.openai.com/api/docs/guides/tools-web-search)
|
|
8883
|
+
* or
|
|
8884
|
+
* [file search](https://developers.openai.com/api/docs/guides/tools-file-search).
|
|
8793
8885
|
* Learn more about
|
|
8794
|
-
* [built-in tools](https://
|
|
8886
|
+
* [built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
8795
8887
|
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
8796
8888
|
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
8797
|
-
* [MCP Tools](https://
|
|
8889
|
+
* [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
8798
8890
|
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
8799
8891
|
* the model to call your own code with strongly typed arguments and outputs.
|
|
8800
8892
|
* Learn more about
|
|
8801
|
-
* [function calling](https://
|
|
8893
|
+
* [function calling](https://developers.openai.com/api/docs/guides/function-calling).
|
|
8802
8894
|
* You can also use custom tools to call your own code.
|
|
8803
8895
|
*/
|
|
8804
8896
|
tools?: Array<ResponsesAPI.Tool>;
|
|
@@ -8836,7 +8928,7 @@ export namespace ResponsesClientEvent {
|
|
|
8836
8928
|
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
8837
8929
|
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
8838
8930
|
* abuse.
|
|
8839
|
-
* [Learn more](https://
|
|
8931
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
8840
8932
|
*/
|
|
8841
8933
|
user?: string;
|
|
8842
8934
|
}
|
|
@@ -8911,10 +9003,16 @@ export namespace ResponsesClientEvent {
|
|
|
8911
9003
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
8912
9004
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
8913
9005
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
8914
|
-
* [prompt caching guide](https://
|
|
9006
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
8915
9007
|
* for current details.
|
|
8916
9008
|
*/
|
|
8917
9009
|
export interface PromptCacheOptions {
|
|
9010
|
+
/**
|
|
9011
|
+
* The ID of a response to compare when diagnosing prompt cache reuse. Supplying
|
|
9012
|
+
* this field requests prompt cache diagnostics when the feature is enabled.
|
|
9013
|
+
*/
|
|
9014
|
+
comparison_response_id?: string | null;
|
|
9015
|
+
|
|
8918
9016
|
/**
|
|
8919
9017
|
* Controls whether OpenAI automatically creates an implicit cache breakpoint.
|
|
8920
9018
|
* Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
|
|
@@ -9781,13 +9879,15 @@ export namespace ResponsesServerEvent {
|
|
|
9781
9879
|
* will use 'default'.
|
|
9782
9880
|
* - If set to 'default', then the request will be processed with the standard
|
|
9783
9881
|
* pricing and performance for the selected model.
|
|
9784
|
-
* - If set to
|
|
9785
|
-
* then
|
|
9786
|
-
*
|
|
9787
|
-
*
|
|
9788
|
-
*
|
|
9789
|
-
*
|
|
9790
|
-
*
|
|
9882
|
+
* - If set to
|
|
9883
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
9884
|
+
* the request will be processed with the Flex Processing service tier.
|
|
9885
|
+
* - To opt-in to
|
|
9886
|
+
* [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
9887
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
9888
|
+
* parameter for Responses or Chat Completions. The response will show
|
|
9889
|
+
* `service_tier=priority` regardless of if you specify `service_tier=fast` or
|
|
9890
|
+
* `priority` in your request.
|
|
9791
9891
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
9792
9892
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
9793
9893
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -9843,7 +9943,7 @@ export namespace Tool {
|
|
|
9843
9943
|
/**
|
|
9844
9944
|
* Give the model access to additional tools via remote Model Context Protocol
|
|
9845
9945
|
* (MCP) servers.
|
|
9846
|
-
* [Learn more about MCP](https://
|
|
9946
|
+
* [Learn more about MCP](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
9847
9947
|
*/
|
|
9848
9948
|
export interface Mcp {
|
|
9849
9949
|
/**
|
|
@@ -9877,7 +9977,7 @@ export namespace Tool {
|
|
|
9877
9977
|
* Identifier for service connectors, like those available in ChatGPT. One of
|
|
9878
9978
|
* `server_url`, `connector_id`, or `tunnel_id` must be provided. Learn more about
|
|
9879
9979
|
* service connectors
|
|
9880
|
-
* [here](https://
|
|
9980
|
+
* [here](https://developers.openai.com/api/docs/guides/tools-connectors-mcp#connectors).
|
|
9881
9981
|
*
|
|
9882
9982
|
* Currently supported `connector_id` values are:
|
|
9883
9983
|
*
|
|
@@ -10086,9 +10186,11 @@ export namespace Tool {
|
|
|
10086
10186
|
* one of `transparent`, `opaque`, or `auto` (default value). When `auto` is used,
|
|
10087
10187
|
* the model will automatically determine the best background for the image.
|
|
10088
10188
|
*
|
|
10089
|
-
*
|
|
10090
|
-
* `
|
|
10091
|
-
*
|
|
10189
|
+
* `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`, including their `2026-09-08`
|
|
10190
|
+
* snapshots, support `opaque` and `transparent` backgrounds. Transparent
|
|
10191
|
+
* backgrounds are available for supported GPT Image models. For `gpt-image-2` and
|
|
10192
|
+
* `gpt-image-2-2026-04-21`, this support is in preview. When using `transparent`,
|
|
10193
|
+
* set the output format to `png` or `webp`.
|
|
10092
10194
|
*/
|
|
10093
10195
|
background?: 'transparent' | 'opaque' | 'auto';
|
|
10094
10196
|
|
|
@@ -10108,7 +10210,9 @@ export namespace Tool {
|
|
|
10108
10210
|
|
|
10109
10211
|
/**
|
|
10110
10212
|
* The image generation model to use. One of `gpt-image-1`, `gpt-image-1-mini`,
|
|
10111
|
-
* `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
10213
|
+
* `gpt-image-1.5`, `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
10214
|
+
* `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
10215
|
+
* `gpt-image-2.5-flare`, `gpt-image-2.5-flare-2026-09-08`, or
|
|
10112
10216
|
* `chatgpt-image-latest`. Default: `gpt-image-1`.
|
|
10113
10217
|
*/
|
|
10114
10218
|
model?:
|
|
@@ -10117,6 +10221,10 @@ export namespace Tool {
|
|
|
10117
10221
|
| 'gpt-image-1-mini'
|
|
10118
10222
|
| 'gpt-image-2'
|
|
10119
10223
|
| 'gpt-image-2-2026-04-21'
|
|
10224
|
+
| 'gpt-image-2.5-sunburst'
|
|
10225
|
+
| 'gpt-image-2.5-sunburst-2026-09-08'
|
|
10226
|
+
| 'gpt-image-2.5-flare'
|
|
10227
|
+
| 'gpt-image-2.5-flare-2026-09-08'
|
|
10120
10228
|
| 'gpt-image-1.5'
|
|
10121
10229
|
| 'chatgpt-image-latest';
|
|
10122
10230
|
|
|
@@ -10143,23 +10251,26 @@ export namespace Tool {
|
|
|
10143
10251
|
partial_images?: number;
|
|
10144
10252
|
|
|
10145
10253
|
/**
|
|
10146
|
-
* The quality of the generated image.
|
|
10147
|
-
*
|
|
10254
|
+
* The quality of the generated image. The GPT image models support `low`,
|
|
10255
|
+
* `medium`, and `high`. `gpt-image-2.5-sunburst` and `gpt-image-2.5-flare`,
|
|
10256
|
+
* including their `2026-09-08` snapshots, also support `xhigh` and `max`. Default:
|
|
10257
|
+
* `auto`.
|
|
10148
10258
|
*/
|
|
10149
|
-
quality?: 'low' | 'medium' | 'high' | 'auto';
|
|
10259
|
+
quality?: 'low' | 'medium' | 'high' | 'xhigh' | 'max' | 'auto';
|
|
10150
10260
|
|
|
10151
10261
|
/**
|
|
10152
|
-
* The size of the generated images. For `gpt-image-2`
|
|
10153
|
-
* `gpt-image-2-2026-
|
|
10154
|
-
*
|
|
10155
|
-
*
|
|
10156
|
-
*
|
|
10157
|
-
*
|
|
10158
|
-
*
|
|
10159
|
-
*
|
|
10160
|
-
*
|
|
10161
|
-
* `
|
|
10162
|
-
* `
|
|
10262
|
+
* The size of the generated images. For `gpt-image-2`, `gpt-image-2-2026-04-21`,
|
|
10263
|
+
* `gpt-image-2.5-sunburst`, `gpt-image-2.5-sunburst-2026-09-08`,
|
|
10264
|
+
* `gpt-image-2.5-flare`, and `gpt-image-2.5-flare-2026-09-08`, arbitrary
|
|
10265
|
+
* resolutions are supported as `WIDTHxHEIGHT` strings, for example `1536x864`.
|
|
10266
|
+
* Width and height must both be divisible by 16 and the requested aspect ratio
|
|
10267
|
+
* must be between 1:3 and 3:1. Resolutions above `2560x1440` are experimental, and
|
|
10268
|
+
* the maximum supported resolution is `3840x2160`. The requested size must also
|
|
10269
|
+
* satisfy the model's current pixel and edge limits. The standard sizes
|
|
10270
|
+
* `1024x1024`, `1536x1024`, and `1024x1536` are supported by the GPT image models;
|
|
10271
|
+
* `auto` is supported for models that allow automatic sizing. For `dall-e-2`, use
|
|
10272
|
+
* one of `256x256`, `512x512`, or `1024x1024`. For `dall-e-3`, use one of
|
|
10273
|
+
* `1024x1024`, `1792x1024`, or `1024x1792`.
|
|
10163
10274
|
*/
|
|
10164
10275
|
size?: (string & {}) | '1024x1024' | '1024x1536' | '1536x1024' | 'auto';
|
|
10165
10276
|
}
|
|
@@ -10313,12 +10424,12 @@ export interface ToolChoiceShell {
|
|
|
10313
10424
|
|
|
10314
10425
|
/**
|
|
10315
10426
|
* Indicates that the model should use a built-in tool to generate a response.
|
|
10316
|
-
* [Learn more about built-in tools](https://
|
|
10427
|
+
* [Learn more about built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
10317
10428
|
*/
|
|
10318
10429
|
export interface ToolChoiceTypes {
|
|
10319
10430
|
/**
|
|
10320
10431
|
* The type of hosted tool the model should to use. Learn more about
|
|
10321
|
-
* [built-in tools](https://
|
|
10432
|
+
* [built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
10322
10433
|
*
|
|
10323
10434
|
* Allowed values are:
|
|
10324
10435
|
*
|
|
@@ -10371,7 +10482,7 @@ export interface ToolSearchTool {
|
|
|
10371
10482
|
/**
|
|
10372
10483
|
* This tool searches the web for relevant results to use in a response. Learn more
|
|
10373
10484
|
* about the
|
|
10374
|
-
* [web search tool](https://
|
|
10485
|
+
* [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).
|
|
10375
10486
|
*/
|
|
10376
10487
|
export interface WebSearchPreviewTool {
|
|
10377
10488
|
/**
|
|
@@ -10430,7 +10541,7 @@ export namespace WebSearchPreviewTool {
|
|
|
10430
10541
|
|
|
10431
10542
|
/**
|
|
10432
10543
|
* Search the Internet for sources related to the prompt. Learn more about the
|
|
10433
|
-
* [web search tool](https://
|
|
10544
|
+
* [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search).
|
|
10434
10545
|
*/
|
|
10435
10546
|
export interface WebSearchTool {
|
|
10436
10547
|
/**
|
|
@@ -10514,7 +10625,7 @@ export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCr
|
|
|
10514
10625
|
export interface ResponseCreateParamsBase {
|
|
10515
10626
|
/**
|
|
10516
10627
|
* Whether to run the model response in the background.
|
|
10517
|
-
* [Learn more](https://
|
|
10628
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/background).
|
|
10518
10629
|
*/
|
|
10519
10630
|
background?: boolean | null;
|
|
10520
10631
|
|
|
@@ -10561,11 +10672,11 @@ export interface ResponseCreateParamsBase {
|
|
|
10561
10672
|
*
|
|
10562
10673
|
* Learn more:
|
|
10563
10674
|
*
|
|
10564
|
-
* - [Text inputs and outputs](https://
|
|
10565
|
-
* - [Image inputs](https://
|
|
10566
|
-
* - [File inputs](https://
|
|
10567
|
-
* - [Conversation state](https://
|
|
10568
|
-
* - [Function calling](https://
|
|
10675
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
10676
|
+
* - [Image inputs](https://developers.openai.com/api/docs/guides/images-vision)
|
|
10677
|
+
* - [File inputs](https://developers.openai.com/api/docs/guides/file-inputs)
|
|
10678
|
+
* - [Conversation state](https://developers.openai.com/api/docs/guides/conversation-state)
|
|
10679
|
+
* - [Function calling](https://developers.openai.com/api/docs/guides/function-calling)
|
|
10569
10680
|
*/
|
|
10570
10681
|
input?: string | ResponseInput;
|
|
10571
10682
|
|
|
@@ -10581,7 +10692,7 @@ export interface ResponseCreateParamsBase {
|
|
|
10581
10692
|
/**
|
|
10582
10693
|
* An upper bound for the number of tokens that can be generated for a response,
|
|
10583
10694
|
* including visible output tokens and
|
|
10584
|
-
* [reasoning tokens](https://
|
|
10695
|
+
* [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
|
|
10585
10696
|
*/
|
|
10586
10697
|
max_output_tokens?: number | null;
|
|
10587
10698
|
|
|
@@ -10599,8 +10710,8 @@ export interface ResponseCreateParamsBase {
|
|
|
10599
10710
|
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
10600
10711
|
* range of models with different capabilities, performance characteristics, and
|
|
10601
10712
|
* price points. Refer to the
|
|
10602
|
-
* [model guide](https://
|
|
10603
|
-
* available models.
|
|
10713
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
10714
|
+
* compare available models.
|
|
10604
10715
|
*/
|
|
10605
10716
|
model?: Shared.ResponsesModel;
|
|
10606
10717
|
|
|
@@ -10617,21 +10728,21 @@ export interface ResponseCreateParamsBase {
|
|
|
10617
10728
|
/**
|
|
10618
10729
|
* The unique ID of the previous response to the model. Use this to create
|
|
10619
10730
|
* multi-turn conversations. Learn more about
|
|
10620
|
-
* [conversation state](https://
|
|
10731
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
10621
10732
|
* Cannot be used in conjunction with `conversation`.
|
|
10622
10733
|
*/
|
|
10623
10734
|
previous_response_id?: string | null;
|
|
10624
10735
|
|
|
10625
10736
|
/**
|
|
10626
10737
|
* Reference to a prompt template and its variables.
|
|
10627
|
-
* [Learn more](https://
|
|
10738
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/text?api-mode=responses#version-prompts-in-code).
|
|
10628
10739
|
*/
|
|
10629
10740
|
prompt?: ResponsePrompt | null;
|
|
10630
10741
|
|
|
10631
10742
|
/**
|
|
10632
10743
|
* Used by OpenAI to cache responses for similar requests to optimize your cache
|
|
10633
10744
|
* hit rates. Replaces the `user` field.
|
|
10634
|
-
* [Learn more](https://
|
|
10745
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
10635
10746
|
*/
|
|
10636
10747
|
prompt_cache_key?: string | null;
|
|
10637
10748
|
|
|
@@ -10643,7 +10754,7 @@ export interface ResponseCreateParamsBase {
|
|
|
10643
10754
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
10644
10755
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
10645
10756
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
10646
|
-
* [prompt caching guide](https://
|
|
10757
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
10647
10758
|
* for current details.
|
|
10648
10759
|
*/
|
|
10649
10760
|
prompt_cache_options?: ResponseCreateParams.PromptCacheOptions;
|
|
@@ -10654,7 +10765,7 @@ export interface ResponseCreateParamsBase {
|
|
|
10654
10765
|
* The retention policy for the prompt cache. Set to `24h` to enable extended
|
|
10655
10766
|
* prompt caching, which keeps cached prefixes active for longer, up to a maximum
|
|
10656
10767
|
* of 24 hours.
|
|
10657
|
-
* [Learn more](https://
|
|
10768
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching#prompt-cache-retention).
|
|
10658
10769
|
* This field expresses a maximum retention policy, while
|
|
10659
10770
|
* `prompt_cache_options.ttl` expresses a minimum cache lifetime. The two fields
|
|
10660
10771
|
* are independent and do not interact. For `gpt-5.5`, `gpt-5.5-pro`, and future
|
|
@@ -10671,7 +10782,7 @@ export interface ResponseCreateParamsBase {
|
|
|
10671
10782
|
|
|
10672
10783
|
/**
|
|
10673
10784
|
* Configuration options for
|
|
10674
|
-
* [reasoning models](https://
|
|
10785
|
+
* [reasoning models](https://developers.openai.com/api/docs/guides/reasoning).
|
|
10675
10786
|
*/
|
|
10676
10787
|
reasoning?: Shared.Reasoning | null;
|
|
10677
10788
|
|
|
@@ -10681,7 +10792,7 @@ export interface ResponseCreateParamsBase {
|
|
|
10681
10792
|
* identifies each user, with a maximum length of 64 characters. We recommend
|
|
10682
10793
|
* hashing their username or email address, in order to avoid sending us any
|
|
10683
10794
|
* identifying information.
|
|
10684
|
-
* [Learn more](https://
|
|
10795
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
10685
10796
|
*/
|
|
10686
10797
|
safety_identifier?: string | null;
|
|
10687
10798
|
|
|
@@ -10694,13 +10805,15 @@ export interface ResponseCreateParamsBase {
|
|
|
10694
10805
|
* will use 'default'.
|
|
10695
10806
|
* - If set to 'default', then the request will be processed with the standard
|
|
10696
10807
|
* pricing and performance for the selected model.
|
|
10697
|
-
* - If set to
|
|
10698
|
-
* then
|
|
10699
|
-
*
|
|
10700
|
-
*
|
|
10701
|
-
*
|
|
10702
|
-
*
|
|
10703
|
-
*
|
|
10808
|
+
* - If set to
|
|
10809
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
10810
|
+
* the request will be processed with the Flex Processing service tier.
|
|
10811
|
+
* - To opt-in to
|
|
10812
|
+
* [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
10813
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
10814
|
+
* parameter for Responses or Chat Completions. The response will show
|
|
10815
|
+
* `service_tier=priority` regardless of if you specify `service_tier=fast` or
|
|
10816
|
+
* `priority` in your request.
|
|
10704
10817
|
* - If set to 'ultrafast', then the request will be processed with the
|
|
10705
10818
|
* access-controlled Ultrafast Processing service tier. This tier is currently
|
|
10706
10819
|
* available for `gpt-5.6-sol`; a response served through it will show
|
|
@@ -10714,6 +10827,9 @@ export interface ResponseCreateParamsBase {
|
|
|
10714
10827
|
|
|
10715
10828
|
/**
|
|
10716
10829
|
* Whether to store the generated model response for later retrieval via API.
|
|
10830
|
+
* Defaults to true when omitted. If set to true, response data will be stored for
|
|
10831
|
+
* at least 30 days, subject to the
|
|
10832
|
+
* [data retention exceptions](https://developers.openai.com/api/docs/guides/your-data#v1responses).
|
|
10717
10833
|
*/
|
|
10718
10834
|
store?: boolean | null;
|
|
10719
10835
|
|
|
@@ -10722,7 +10838,7 @@ export interface ResponseCreateParamsBase {
|
|
|
10722
10838
|
* generated using
|
|
10723
10839
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
10724
10840
|
* See the
|
|
10725
|
-
* [Streaming section below](https://
|
|
10841
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
10726
10842
|
* for more information.
|
|
10727
10843
|
*/
|
|
10728
10844
|
stream?: boolean | null;
|
|
@@ -10744,8 +10860,8 @@ export interface ResponseCreateParamsBase {
|
|
|
10744
10860
|
* Configuration options for a text response from the model. Can be plain text or
|
|
10745
10861
|
* structured JSON data. Learn more:
|
|
10746
10862
|
*
|
|
10747
|
-
* - [Text inputs and outputs](https://
|
|
10748
|
-
* - [Structured Outputs](https://
|
|
10863
|
+
* - [Text inputs and outputs](https://developers.openai.com/api/docs/guides/text)
|
|
10864
|
+
* - [Structured Outputs](https://developers.openai.com/api/docs/guides/structured-outputs)
|
|
10749
10865
|
*/
|
|
10750
10866
|
text?: ResponseTextConfig;
|
|
10751
10867
|
|
|
@@ -10773,17 +10889,18 @@ export interface ResponseCreateParamsBase {
|
|
|
10773
10889
|
*
|
|
10774
10890
|
* - **Built-in tools**: Tools that are provided by OpenAI that extend the model's
|
|
10775
10891
|
* capabilities, like
|
|
10776
|
-
* [web search](https://
|
|
10777
|
-
*
|
|
10892
|
+
* [web search](https://developers.openai.com/api/docs/guides/tools-web-search)
|
|
10893
|
+
* or
|
|
10894
|
+
* [file search](https://developers.openai.com/api/docs/guides/tools-file-search).
|
|
10778
10895
|
* Learn more about
|
|
10779
|
-
* [built-in tools](https://
|
|
10896
|
+
* [built-in tools](https://developers.openai.com/api/docs/guides/tools).
|
|
10780
10897
|
* - **MCP Tools**: Integrations with third-party systems via custom MCP servers or
|
|
10781
10898
|
* predefined connectors such as Google Drive and SharePoint. Learn more about
|
|
10782
|
-
* [MCP Tools](https://
|
|
10899
|
+
* [MCP Tools](https://developers.openai.com/api/docs/guides/tools-connectors-mcp).
|
|
10783
10900
|
* - **Function calls (custom tools)**: Functions that are defined by you, enabling
|
|
10784
10901
|
* the model to call your own code with strongly typed arguments and outputs.
|
|
10785
10902
|
* Learn more about
|
|
10786
|
-
* [function calling](https://
|
|
10903
|
+
* [function calling](https://developers.openai.com/api/docs/guides/function-calling).
|
|
10787
10904
|
* You can also use custom tools to call your own code.
|
|
10788
10905
|
*/
|
|
10789
10906
|
tools?: Array<Tool>;
|
|
@@ -10821,7 +10938,7 @@ export interface ResponseCreateParamsBase {
|
|
|
10821
10938
|
* optimizations. A stable identifier for your end-users. Used to boost cache hit
|
|
10822
10939
|
* rates by better bucketing similar requests and to help OpenAI detect and prevent
|
|
10823
10940
|
* abuse.
|
|
10824
|
-
* [Learn more](https://
|
|
10941
|
+
* [Learn more](https://developers.openai.com/api/docs/guides/safety-best-practices#implement-safety-identifiers).
|
|
10825
10942
|
*/
|
|
10826
10943
|
user?: string;
|
|
10827
10944
|
}
|
|
@@ -10896,10 +11013,16 @@ export namespace ResponseCreateParams {
|
|
|
10896
11013
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
10897
11014
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
10898
11015
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
10899
|
-
* [prompt caching guide](https://
|
|
11016
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
10900
11017
|
* for current details.
|
|
10901
11018
|
*/
|
|
10902
11019
|
export interface PromptCacheOptions {
|
|
11020
|
+
/**
|
|
11021
|
+
* The ID of a response to compare when diagnosing prompt cache reuse. Supplying
|
|
11022
|
+
* this field requests prompt cache diagnostics when the feature is enabled.
|
|
11023
|
+
*/
|
|
11024
|
+
comparison_response_id?: string | null;
|
|
11025
|
+
|
|
10903
11026
|
/**
|
|
10904
11027
|
* Controls whether OpenAI automatically creates an implicit cache breakpoint.
|
|
10905
11028
|
* Defaults to `implicit`. With `implicit`, OpenAI creates one implicit breakpoint
|
|
@@ -10950,7 +11073,7 @@ export interface ResponseCreateParamsNonStreaming extends ResponseCreateParamsBa
|
|
|
10950
11073
|
* generated using
|
|
10951
11074
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
10952
11075
|
* See the
|
|
10953
|
-
* [Streaming section below](https://
|
|
11076
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
10954
11077
|
* for more information.
|
|
10955
11078
|
*/
|
|
10956
11079
|
stream?: false | null;
|
|
@@ -10962,7 +11085,7 @@ export interface ResponseCreateParamsStreaming extends ResponseCreateParamsBase
|
|
|
10962
11085
|
* generated using
|
|
10963
11086
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
10964
11087
|
* See the
|
|
10965
|
-
* [Streaming section below](https://
|
|
11088
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
10966
11089
|
* for more information.
|
|
10967
11090
|
*/
|
|
10968
11091
|
stream: true;
|
|
@@ -10997,7 +11120,7 @@ export interface ResponseRetrieveParamsBase {
|
|
|
10997
11120
|
* generated using
|
|
10998
11121
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
10999
11122
|
* See the
|
|
11000
|
-
* [Streaming section below](https://
|
|
11123
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
11001
11124
|
* for more information.
|
|
11002
11125
|
*/
|
|
11003
11126
|
stream?: boolean;
|
|
@@ -11014,7 +11137,7 @@ export interface ResponseRetrieveParamsNonStreaming extends ResponseRetrievePara
|
|
|
11014
11137
|
* generated using
|
|
11015
11138
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
11016
11139
|
* See the
|
|
11017
|
-
* [Streaming section below](https://
|
|
11140
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
11018
11141
|
* for more information.
|
|
11019
11142
|
*/
|
|
11020
11143
|
stream?: false;
|
|
@@ -11026,7 +11149,7 @@ export interface ResponseRetrieveParamsStreaming extends ResponseRetrieveParamsB
|
|
|
11026
11149
|
* generated using
|
|
11027
11150
|
* [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).
|
|
11028
11151
|
* See the
|
|
11029
|
-
* [Streaming section below](https://
|
|
11152
|
+
* [Streaming section below](https://developers.openai.com/api/reference/resources/responses/streaming-events)
|
|
11030
11153
|
* for more information.
|
|
11031
11154
|
*/
|
|
11032
11155
|
stream: true;
|
|
@@ -11037,8 +11160,8 @@ export interface ResponseCompactParams {
|
|
|
11037
11160
|
* Model ID used to generate the response, like `gpt-6-astra`. OpenAI offers a wide
|
|
11038
11161
|
* range of models with different capabilities, performance characteristics, and
|
|
11039
11162
|
* price points. Refer to the
|
|
11040
|
-
* [model guide](https://
|
|
11041
|
-
* available models.
|
|
11163
|
+
* [model guide](https://developers.openai.com/api/docs/models) to browse and
|
|
11164
|
+
* compare available models.
|
|
11042
11165
|
*/
|
|
11043
11166
|
model:
|
|
11044
11167
|
| 'gpt-6-astra'
|
|
@@ -11163,7 +11286,7 @@ export interface ResponseCompactParams {
|
|
|
11163
11286
|
/**
|
|
11164
11287
|
* The unique ID of the previous response to the model. Use this to create
|
|
11165
11288
|
* multi-turn conversations. Learn more about
|
|
11166
|
-
* [conversation state](https://
|
|
11289
|
+
* [conversation state](https://developers.openai.com/api/docs/guides/conversation-state).
|
|
11167
11290
|
* Cannot be used in conjunction with `conversation`.
|
|
11168
11291
|
*/
|
|
11169
11292
|
previous_response_id?: string | null;
|
|
@@ -11181,7 +11304,7 @@ export interface ResponseCompactParams {
|
|
|
11181
11304
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
11182
11305
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
11183
11306
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
11184
|
-
* [prompt caching guide](https://
|
|
11307
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
11185
11308
|
* for current details.
|
|
11186
11309
|
*/
|
|
11187
11310
|
prompt_cache_options?: ResponseCompactParams.PromptCacheOptions | null;
|
|
@@ -11197,16 +11320,17 @@ export interface ResponseCompactParams {
|
|
|
11197
11320
|
* Project settings. Unless otherwise configured, the Project will use 'default'. -
|
|
11198
11321
|
* If set to 'default', then the request will be processed with the standard
|
|
11199
11322
|
* pricing and performance for the selected model. - If set to
|
|
11200
|
-
* '[flex](https://
|
|
11201
|
-
* request will be processed with the Flex Processing service tier. - To opt-in
|
|
11202
|
-
* [Fast mode](/api/docs/guides/fast-mode) at the
|
|
11203
|
-
* `service_tier=fast` or `service_tier=priority`
|
|
11204
|
-
*
|
|
11205
|
-
*
|
|
11206
|
-
*
|
|
11207
|
-
*
|
|
11208
|
-
*
|
|
11209
|
-
* the value
|
|
11323
|
+
* '[flex](https://developers.openai.com/api/docs/guides/flex-processing)', then
|
|
11324
|
+
* the request will be processed with the Flex Processing service tier. - To opt-in
|
|
11325
|
+
* to [Fast mode](https://developers.openai.com/api/docs/guides/fast-mode) at the
|
|
11326
|
+
* request level, include the `service_tier=fast` or `service_tier=priority`
|
|
11327
|
+
* parameter for Responses or Chat Completions. For models with a dedicated Fast
|
|
11328
|
+
* tier, either value resolves to `service_tier=fast`; for other models, either
|
|
11329
|
+
* value resolves to `service_tier=priority`. - When not set, the default behavior
|
|
11330
|
+
* is 'auto'. When the `service_tier` parameter is set, the response body will
|
|
11331
|
+
* include the `service_tier` value based on the processing mode actually used to
|
|
11332
|
+
* serve the request. This response value may be different from the value set in
|
|
11333
|
+
* the parameter.
|
|
11210
11334
|
*/
|
|
11211
11335
|
service_tier?: 'auto' | 'default' | 'fast' | 'flex' | 'priority' | null;
|
|
11212
11336
|
}
|
|
@@ -11220,7 +11344,7 @@ export namespace ResponseCompactParams {
|
|
|
11220
11344
|
* up to the latest 80 breakpoints in the conversation, without a content-block
|
|
11221
11345
|
* lookback limit. Set `mode` to `explicit` to disable the implicit breakpoint. The
|
|
11222
11346
|
* `ttl` defaults to `30m`, which is currently the only supported value. See the
|
|
11223
|
-
* [prompt caching guide](https://
|
|
11347
|
+
* [prompt caching guide](https://developers.openai.com/api/docs/guides/prompt-caching)
|
|
11224
11348
|
* for current details.
|
|
11225
11349
|
*/
|
|
11226
11350
|
export interface PromptCacheOptions {
|