@retab/node 1.0.94 → 1.0.95
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/README.md +1 -1
- package/dist/api/client.d.ts +2 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +2 -0
- package/dist/api/extractions/client.d.ts +11 -2
- package/dist/api/extractions/client.d.ts.map +1 -1
- package/dist/api/extractions/client.js +16 -0
- package/dist/api/files/client.d.ts +71 -0
- package/dist/api/files/client.d.ts.map +1 -0
- package/dist/api/files/client.js +70 -0
- package/dist/api/jobs/client.d.ts +12 -12
- package/dist/api/schemas/client.d.ts +1 -1
- package/dist/generated_types.d.ts +46521 -27053
- package/dist/generated_types.d.ts.map +1 -1
- package/dist/generated_types.js +426 -25
- package/dist/schema_types.d.ts +2 -2
- package/dist/types.d.ts +8 -8
- package/package.json +1 -1
package/dist/generated_types.js
CHANGED
|
@@ -74,6 +74,24 @@ export const ZTextBox = z.lazy(() => (z.object({
|
|
|
74
74
|
vertices: z.tuple([ZPoint, ZPoint, ZPoint, ZPoint]),
|
|
75
75
|
text: z.string(),
|
|
76
76
|
})));
|
|
77
|
+
export const ZFile = z.lazy(() => (z.object({
|
|
78
|
+
object: z.literal("file").default("file"),
|
|
79
|
+
id: z.string(),
|
|
80
|
+
filename: z.string(),
|
|
81
|
+
organization_id: z.string(),
|
|
82
|
+
created_at: z.string(),
|
|
83
|
+
updated_at: z.string(),
|
|
84
|
+
page_count: z.number().nullable().optional(),
|
|
85
|
+
})));
|
|
86
|
+
export const ZFileLink = z.lazy(() => (z.object({
|
|
87
|
+
download_url: z.string(),
|
|
88
|
+
expires_in: z.string(),
|
|
89
|
+
filename: z.string(),
|
|
90
|
+
})));
|
|
91
|
+
export const ZUploadFileResponse = z.lazy(() => (z.object({
|
|
92
|
+
file_id: z.string(),
|
|
93
|
+
filename: z.string(),
|
|
94
|
+
})));
|
|
77
95
|
export const ZDeleteResponse = z.lazy(() => (z.object({
|
|
78
96
|
success: z.boolean(),
|
|
79
97
|
id: z.string(),
|
|
@@ -150,7 +168,7 @@ export const ZChatCompletionMessageFunctionToolCallParam = z.lazy(() => (z.objec
|
|
|
150
168
|
})));
|
|
151
169
|
export const ZChatCompletionRetabMessage = z.lazy(() => (z.object({
|
|
152
170
|
role: z.union([z.literal("user"), z.literal("system"), z.literal("assistant"), z.literal("developer"), z.literal("tool")]),
|
|
153
|
-
content: z.union([z.string(), z.array(z.union([ZChatCompletionContentPartTextParam, ZChatCompletionContentPartImageParam, ZChatCompletionContentPartInputAudioParam,
|
|
171
|
+
content: z.union([z.string(), z.array(z.union([ZChatCompletionContentPartTextParam, ZChatCompletionContentPartImageParam, ZChatCompletionContentPartInputAudioParam, ZChatCompletionContentPartParamFile]))]).nullable().optional(),
|
|
154
172
|
tool_call_id: z.string().nullable().optional(),
|
|
155
173
|
tool_calls: z.array(ZChatCompletionMessageFunctionToolCallParam).nullable().optional(),
|
|
156
174
|
})));
|
|
@@ -479,15 +497,15 @@ export const ZResponse = z.lazy(() => (z.object({
|
|
|
479
497
|
created_at: z.number(),
|
|
480
498
|
error: ZResponseError.nullable().optional(),
|
|
481
499
|
incomplete_details: ZIncompleteDetails.nullable().optional(),
|
|
482
|
-
instructions: z.union([z.string(), z.array(z.union([ZEasyInputMessage, ZMessage, ZResponseOutputMessage, ZResponseFileSearchToolCall, ZResponseComputerToolCall, ZComputerCallOutput, ZResponseFunctionWebSearch, ZResponseFunctionToolCall, ZFunctionCallOutput, ZResponseReasoningItem, ZResponseCompactionItemParam, ZImageGenerationCall, ZResponseCodeInterpreterToolCall, ZLocalShellCall, ZLocalShellCallOutput, ZShellCall, ZShellCallOutput, ZApplyPatchCall, ZApplyPatchCallOutput, ZMcpListTools, ZMcpApprovalRequest, ZMcpApprovalResponse, ZMcpCall, ZResponseCustomToolCallOutput, ZResponseCustomToolCall, ZItemReference]))]).nullable().optional(),
|
|
500
|
+
instructions: z.union([z.string(), z.array(z.union([ZEasyInputMessage, ZMessage, ZResponseOutputMessage, ZResponseFileSearchToolCall, ZResponseComputerToolCall, ZComputerCallOutput, ZResponseFunctionWebSearch, ZResponseFunctionToolCall, ZFunctionCallOutput, ZToolSearchCall, ZResponseToolSearchOutputItemParam, ZResponseReasoningItem, ZResponseCompactionItemParam, ZImageGenerationCall, ZResponseCodeInterpreterToolCall, ZLocalShellCall, ZLocalShellCallOutput, ZShellCall, ZShellCallOutput, ZApplyPatchCall, ZApplyPatchCallOutput, ZMcpListTools, ZMcpApprovalRequest, ZMcpApprovalResponse, ZMcpCall, ZResponseCustomToolCallOutput, ZResponseCustomToolCall, ZItemReference]))]).nullable().optional(),
|
|
483
501
|
metadata: z.record(z.string(), z.string()).nullable().optional(),
|
|
484
|
-
model: z.union([z.string(), z.union([z.literal("gpt-5.2"), z.literal("gpt-5.2-2025-12-11"), z.literal("gpt-5.2-chat-latest"), z.literal("gpt-5.2-pro"), z.literal("gpt-5.2-pro-2025-12-11"), z.literal("gpt-5.1"), z.literal("gpt-5.1-2025-11-13"), z.literal("gpt-5.1-codex"), z.literal("gpt-5.1-mini"), z.literal("gpt-5.1-chat-latest"), z.literal("gpt-5"), z.literal("gpt-5-mini"), z.literal("gpt-5-nano"), z.literal("gpt-5-2025-08-07"), z.literal("gpt-5-mini-2025-08-07"), z.literal("gpt-5-nano-2025-08-07"), z.literal("gpt-5-chat-latest"), z.literal("gpt-4.1"), z.literal("gpt-4.1-mini"), z.literal("gpt-4.1-nano"), z.literal("gpt-4.1-2025-04-14"), z.literal("gpt-4.1-mini-2025-04-14"), z.literal("gpt-4.1-nano-2025-04-14"), z.literal("o4-mini"), z.literal("o4-mini-2025-04-16"), z.literal("o3"), z.literal("o3-2025-04-16"), z.literal("o3-mini"), z.literal("o3-mini-2025-01-31"), z.literal("o1"), z.literal("o1-2024-12-17"), z.literal("o1-preview"), z.literal("o1-preview-2024-09-12"), z.literal("o1-mini"), z.literal("o1-mini-2024-09-12"), z.literal("gpt-4o"), z.literal("gpt-4o-2024-11-20"), z.literal("gpt-4o-2024-08-06"), z.literal("gpt-4o-2024-05-13"), z.literal("gpt-4o-audio-preview"), z.literal("gpt-4o-audio-preview-2024-10-01"), z.literal("gpt-4o-audio-preview-2024-12-17"), z.literal("gpt-4o-audio-preview-2025-06-03"), z.literal("gpt-4o-mini-audio-preview"), z.literal("gpt-4o-mini-audio-preview-2024-12-17"), z.literal("gpt-4o-search-preview"), z.literal("gpt-4o-mini-search-preview"), z.literal("gpt-4o-search-preview-2025-03-11"), z.literal("gpt-4o-mini-search-preview-2025-03-11"), z.literal("chatgpt-4o-latest"), z.literal("codex-mini-latest"), z.literal("gpt-4o-mini"), z.literal("gpt-4o-mini-2024-07-18"), z.literal("gpt-4-turbo"), z.literal("gpt-4-turbo-2024-04-09"), z.literal("gpt-4-0125-preview"), z.literal("gpt-4-turbo-preview"), z.literal("gpt-4-1106-preview"), z.literal("gpt-4-vision-preview"), z.literal("gpt-4"), z.literal("gpt-4-0314"), z.literal("gpt-4-0613"), z.literal("gpt-4-32k"), z.literal("gpt-4-32k-0314"), z.literal("gpt-4-32k-0613"), z.literal("gpt-3.5-turbo"), z.literal("gpt-3.5-turbo-16k"), z.literal("gpt-3.5-turbo-0301"), z.literal("gpt-3.5-turbo-0613"), z.literal("gpt-3.5-turbo-1106"), z.literal("gpt-3.5-turbo-0125"), z.literal("gpt-3.5-turbo-16k-0613")]), z.union([z.literal("o1-pro"), z.literal("o1-pro-2025-03-19"), z.literal("o3-pro"), z.literal("o3-pro-2025-06-10"), z.literal("o3-deep-research"), z.literal("o3-deep-research-2025-06-26"), z.literal("o4-mini-deep-research"), z.literal("o4-mini-deep-research-2025-06-26"), z.literal("computer-use-preview"), z.literal("computer-use-preview-2025-03-11"), z.literal("gpt-5-codex"), z.literal("gpt-5-pro"), z.literal("gpt-5-pro-2025-10-06"), z.literal("gpt-5.1-codex-max")])]),
|
|
502
|
+
model: z.union([z.string(), z.union([z.literal("gpt-5.4"), z.literal("gpt-5.3-chat-latest"), z.literal("gpt-5.2"), z.literal("gpt-5.2-2025-12-11"), z.literal("gpt-5.2-chat-latest"), z.literal("gpt-5.2-pro"), z.literal("gpt-5.2-pro-2025-12-11"), z.literal("gpt-5.1"), z.literal("gpt-5.1-2025-11-13"), z.literal("gpt-5.1-codex"), z.literal("gpt-5.1-mini"), z.literal("gpt-5.1-chat-latest"), z.literal("gpt-5"), z.literal("gpt-5-mini"), z.literal("gpt-5-nano"), z.literal("gpt-5-2025-08-07"), z.literal("gpt-5-mini-2025-08-07"), z.literal("gpt-5-nano-2025-08-07"), z.literal("gpt-5-chat-latest"), z.literal("gpt-4.1"), z.literal("gpt-4.1-mini"), z.literal("gpt-4.1-nano"), z.literal("gpt-4.1-2025-04-14"), z.literal("gpt-4.1-mini-2025-04-14"), z.literal("gpt-4.1-nano-2025-04-14"), z.literal("o4-mini"), z.literal("o4-mini-2025-04-16"), z.literal("o3"), z.literal("o3-2025-04-16"), z.literal("o3-mini"), z.literal("o3-mini-2025-01-31"), z.literal("o1"), z.literal("o1-2024-12-17"), z.literal("o1-preview"), z.literal("o1-preview-2024-09-12"), z.literal("o1-mini"), z.literal("o1-mini-2024-09-12"), z.literal("gpt-4o"), z.literal("gpt-4o-2024-11-20"), z.literal("gpt-4o-2024-08-06"), z.literal("gpt-4o-2024-05-13"), z.literal("gpt-4o-audio-preview"), z.literal("gpt-4o-audio-preview-2024-10-01"), z.literal("gpt-4o-audio-preview-2024-12-17"), z.literal("gpt-4o-audio-preview-2025-06-03"), z.literal("gpt-4o-mini-audio-preview"), z.literal("gpt-4o-mini-audio-preview-2024-12-17"), z.literal("gpt-4o-search-preview"), z.literal("gpt-4o-mini-search-preview"), z.literal("gpt-4o-search-preview-2025-03-11"), z.literal("gpt-4o-mini-search-preview-2025-03-11"), z.literal("chatgpt-4o-latest"), z.literal("codex-mini-latest"), z.literal("gpt-4o-mini"), z.literal("gpt-4o-mini-2024-07-18"), z.literal("gpt-4-turbo"), z.literal("gpt-4-turbo-2024-04-09"), z.literal("gpt-4-0125-preview"), z.literal("gpt-4-turbo-preview"), z.literal("gpt-4-1106-preview"), z.literal("gpt-4-vision-preview"), z.literal("gpt-4"), z.literal("gpt-4-0314"), z.literal("gpt-4-0613"), z.literal("gpt-4-32k"), z.literal("gpt-4-32k-0314"), z.literal("gpt-4-32k-0613"), z.literal("gpt-3.5-turbo"), z.literal("gpt-3.5-turbo-16k"), z.literal("gpt-3.5-turbo-0301"), z.literal("gpt-3.5-turbo-0613"), z.literal("gpt-3.5-turbo-1106"), z.literal("gpt-3.5-turbo-0125"), z.literal("gpt-3.5-turbo-16k-0613")]), z.union([z.literal("o1-pro"), z.literal("o1-pro-2025-03-19"), z.literal("o3-pro"), z.literal("o3-pro-2025-06-10"), z.literal("o3-deep-research"), z.literal("o3-deep-research-2025-06-26"), z.literal("o4-mini-deep-research"), z.literal("o4-mini-deep-research-2025-06-26"), z.literal("computer-use-preview"), z.literal("computer-use-preview-2025-03-11"), z.literal("gpt-5-codex"), z.literal("gpt-5-pro"), z.literal("gpt-5-pro-2025-10-06"), z.literal("gpt-5.1-codex-max")])]),
|
|
485
503
|
object: z.literal("response"),
|
|
486
|
-
output: z.array(z.union([ZResponseOutputMessage, ZResponseFileSearchToolCall, ZResponseFunctionToolCall, ZResponseFunctionWebSearch, ZResponseComputerToolCall, ZResponseReasoningItem, ZResponseCompactionItem, ZResponseOutputItemImageGenerationCall, ZResponseCodeInterpreterToolCall, ZResponseOutputItemLocalShellCall, ZResponseFunctionShellToolCall, ZResponseFunctionShellToolCallOutput, ZResponseApplyPatchToolCall, ZResponseApplyPatchToolCallOutput, ZResponseOutputItemMcpCall, ZResponseOutputItemMcpListTools, ZResponseOutputItemMcpApprovalRequest, ZResponseCustomToolCall])),
|
|
504
|
+
output: z.array(z.union([ZResponseOutputMessage, ZResponseFileSearchToolCall, ZResponseFunctionToolCall, ZResponseFunctionWebSearch, ZResponseComputerToolCall, ZResponseReasoningItem, ZResponseToolSearchCall, ZResponseToolSearchOutputItem, ZResponseCompactionItem, ZResponseOutputItemImageGenerationCall, ZResponseCodeInterpreterToolCall, ZResponseOutputItemLocalShellCall, ZResponseFunctionShellToolCall, ZResponseFunctionShellToolCallOutput, ZResponseApplyPatchToolCall, ZResponseApplyPatchToolCallOutput, ZResponseOutputItemMcpCall, ZResponseOutputItemMcpListTools, ZResponseOutputItemMcpApprovalRequest, ZResponseCustomToolCall])),
|
|
487
505
|
parallel_tool_calls: z.boolean(),
|
|
488
506
|
temperature: z.number().nullable().optional(),
|
|
489
507
|
tool_choice: z.union([z.union([z.literal("none"), z.literal("auto"), z.literal("required")]), ZToolChoiceAllowed, ZToolChoiceTypes, ZToolChoiceFunction, ZToolChoiceMcp, ZToolChoiceCustom, ZToolChoiceApplyPatch, ZToolChoiceShell]),
|
|
490
|
-
tools: z.array(z.union([ZFunctionTool, ZFileSearchTool, ZComputerTool, ZWebSearchTool, ZMcp, ZCodeInterpreter, ZImageGeneration, ZLocalShell, ZFunctionShellTool, ZCustomTool, ZWebSearchPreviewTool, ZApplyPatchTool])),
|
|
508
|
+
tools: z.array(z.union([ZFunctionTool, ZFileSearchTool, ZComputerTool, ZComputerUsePreviewTool, ZWebSearchTool, ZMcp, ZCodeInterpreter, ZImageGeneration, ZLocalShell, ZFunctionShellTool, ZCustomTool, ZNamespaceTool, ZToolSearchTool, ZWebSearchPreviewTool, ZApplyPatchTool])),
|
|
491
509
|
top_p: z.number().nullable().optional(),
|
|
492
510
|
background: z.boolean().nullable().optional(),
|
|
493
511
|
completed_at: z.number().nullable().optional(),
|
|
@@ -509,7 +527,7 @@ export const ZResponse = z.lazy(() => (z.object({
|
|
|
509
527
|
user: z.string().nullable().optional(),
|
|
510
528
|
})));
|
|
511
529
|
export const ZResponseInputImageParam = z.lazy(() => (z.object({
|
|
512
|
-
detail: z.union([z.literal("low"), z.literal("high"), z.literal("auto")]),
|
|
530
|
+
detail: z.union([z.literal("low"), z.literal("high"), z.literal("auto"), z.literal("original")]),
|
|
513
531
|
type: z.literal("input_image"),
|
|
514
532
|
file_id: z.string().nullable().optional(),
|
|
515
533
|
image_url: z.string().nullable().optional(),
|
|
@@ -783,7 +801,7 @@ export const ZDocumentExtractRequest = z.lazy(() => (z.object({
|
|
|
783
801
|
export const ZLogExtractionRequest = z.lazy(() => (z.object({
|
|
784
802
|
messages: z.array(ZChatCompletionRetabMessage).nullable().optional(),
|
|
785
803
|
openai_messages: z.array(z.union([ZChatCompletionDeveloperMessageParam, ZChatCompletionSystemMessageParam, ZChatCompletionUserMessageParam, ZChatCompletionAssistantMessageParam, ZChatCompletionToolMessageParam, ZChatCompletionFunctionMessageParam])).nullable().optional(),
|
|
786
|
-
openai_responses_input: z.array(z.union([ZEasyInputMessageParam, ZResponseInputParamMessage, ZResponseOutputMessageParam, ZResponseFileSearchToolCallParam, ZResponseComputerToolCallParam, ZResponseInputParamComputerCallOutput, ZResponseFunctionWebSearchParam, ZResponseFunctionToolCallParam, ZResponseInputParamFunctionCallOutput, ZResponseReasoningItemParam, ZResponseCompactionItemParamParam, ZResponseInputParamImageGenerationCall, ZResponseCodeInterpreterToolCallParam, ZResponseInputParamLocalShellCall, ZResponseInputParamLocalShellCallOutput, ZResponseInputParamShellCall, ZResponseInputParamShellCallOutput, ZResponseInputParamApplyPatchCall, ZResponseInputParamApplyPatchCallOutput, ZResponseInputParamMcpListTools, ZResponseInputParamMcpApprovalRequest, ZResponseInputParamMcpApprovalResponse, ZResponseInputParamMcpCall, ZResponseCustomToolCallOutputParam, ZResponseCustomToolCallParam, ZResponseInputParamItemReference])).nullable().optional(),
|
|
804
|
+
openai_responses_input: z.array(z.union([ZEasyInputMessageParam, ZResponseInputParamMessage, ZResponseOutputMessageParam, ZResponseFileSearchToolCallParam, ZResponseComputerToolCallParam, ZResponseInputParamComputerCallOutput, ZResponseFunctionWebSearchParam, ZResponseFunctionToolCallParam, ZResponseInputParamFunctionCallOutput, ZResponseInputParamToolSearchCall, ZResponseToolSearchOutputItemParamParam, ZResponseReasoningItemParam, ZResponseCompactionItemParamParam, ZResponseInputParamImageGenerationCall, ZResponseCodeInterpreterToolCallParam, ZResponseInputParamLocalShellCall, ZResponseInputParamLocalShellCallOutput, ZResponseInputParamShellCall, ZResponseInputParamShellCallOutput, ZResponseInputParamApplyPatchCall, ZResponseInputParamApplyPatchCallOutput, ZResponseInputParamMcpListTools, ZResponseInputParamMcpApprovalRequest, ZResponseInputParamMcpApprovalResponse, ZResponseInputParamMcpCall, ZResponseCustomToolCallOutputParam, ZResponseCustomToolCallParam, ZResponseInputParamItemReference])).nullable().optional(),
|
|
787
805
|
document: ZMIMEData.default({ "filename": "dummy.txt", "url": "data:text/plain;base64,Tm8gZG9jdW1lbnQgcHJvdmlkZWQ=" }),
|
|
788
806
|
completion: z.union([z.record(z.any()), ZRetabParsedChatCompletion, ZParsedChatCompletion, ZChatCompletion]).nullable().optional(),
|
|
789
807
|
openai_responses_output: ZResponse.nullable().optional(),
|
|
@@ -823,7 +841,7 @@ export const ZFunction = z.lazy(() => (z.object({
|
|
|
823
841
|
arguments: z.string(),
|
|
824
842
|
name: z.string(),
|
|
825
843
|
})));
|
|
826
|
-
export const
|
|
844
|
+
export const ZChatCompletionContentPartParamFile = z.lazy(() => (z.object({
|
|
827
845
|
file: ZFileFile,
|
|
828
846
|
type: z.literal("file"),
|
|
829
847
|
})));
|
|
@@ -988,6 +1006,7 @@ export const ZInputAudio = z.lazy(() => (z.object({
|
|
|
988
1006
|
})));
|
|
989
1007
|
export const ZResponseInputFileParam = z.lazy(() => (z.object({
|
|
990
1008
|
type: z.literal("input_file"),
|
|
1009
|
+
detail: z.union([z.literal("low"), z.literal("high")]),
|
|
991
1010
|
file_data: z.string(),
|
|
992
1011
|
file_id: z.string().nullable().optional(),
|
|
993
1012
|
file_url: z.string(),
|
|
@@ -1082,11 +1101,12 @@ export const ZResponseFileSearchToolCall = z.lazy(() => (z.object({
|
|
|
1082
1101
|
})));
|
|
1083
1102
|
export const ZResponseComputerToolCall = z.lazy(() => (z.object({
|
|
1084
1103
|
id: z.string(),
|
|
1085
|
-
action: z.union([ZActionClick, ZActionDoubleClick, ZActionDrag, ZActionKeypress, ZActionMove, ZActionScreenshot, ZActionScroll, ZActionType, ZActionWait]),
|
|
1086
1104
|
call_id: z.string(),
|
|
1087
1105
|
pending_safety_checks: z.array(ZPendingSafetyCheck),
|
|
1088
1106
|
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]),
|
|
1089
1107
|
type: z.literal("computer_call"),
|
|
1108
|
+
action: z.union([ZActionClick, ZActionDoubleClick, ZActionDrag, ZActionKeypress, ZActionMove, ZActionScreenshot, ZActionScroll, ZActionType, ZActionWait]).nullable().optional(),
|
|
1109
|
+
actions: z.array(z.union([ZClick, ZDoubleClick, ZDrag, ZKeypress, ZMove, ZScreenshot, ZScroll, ZType, ZWait])).nullable().optional(),
|
|
1090
1110
|
})));
|
|
1091
1111
|
export const ZComputerCallOutput = z.lazy(() => (z.object({
|
|
1092
1112
|
call_id: z.string(),
|
|
@@ -1108,6 +1128,7 @@ export const ZResponseFunctionToolCall = z.lazy(() => (z.object({
|
|
|
1108
1128
|
name: z.string(),
|
|
1109
1129
|
type: z.literal("function_call"),
|
|
1110
1130
|
id: z.string().nullable().optional(),
|
|
1131
|
+
namespace: z.string().nullable().optional(),
|
|
1111
1132
|
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]).nullable().optional(),
|
|
1112
1133
|
})));
|
|
1113
1134
|
export const ZFunctionCallOutput = z.lazy(() => (z.object({
|
|
@@ -1117,6 +1138,22 @@ export const ZFunctionCallOutput = z.lazy(() => (z.object({
|
|
|
1117
1138
|
id: z.string().nullable().optional(),
|
|
1118
1139
|
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]).nullable().optional(),
|
|
1119
1140
|
})));
|
|
1141
|
+
export const ZToolSearchCall = z.lazy(() => (z.object({
|
|
1142
|
+
arguments: z.object({}).passthrough(),
|
|
1143
|
+
type: z.literal("tool_search_call"),
|
|
1144
|
+
id: z.string().nullable().optional(),
|
|
1145
|
+
call_id: z.string().nullable().optional(),
|
|
1146
|
+
execution: z.union([z.literal("server"), z.literal("client")]).nullable().optional(),
|
|
1147
|
+
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]).nullable().optional(),
|
|
1148
|
+
})));
|
|
1149
|
+
export const ZResponseToolSearchOutputItemParam = z.lazy(() => (z.object({
|
|
1150
|
+
tools: z.array(z.union([ZFunctionTool, ZFileSearchTool, ZComputerTool, ZComputerUsePreviewTool, ZWebSearchTool, ZMcp, ZCodeInterpreter, ZImageGeneration, ZLocalShell, ZFunctionShellTool, ZCustomTool, ZNamespaceTool, ZToolSearchTool, ZWebSearchPreviewTool, ZApplyPatchTool])),
|
|
1151
|
+
type: z.literal("tool_search_output"),
|
|
1152
|
+
id: z.string().nullable().optional(),
|
|
1153
|
+
call_id: z.string().nullable().optional(),
|
|
1154
|
+
execution: z.union([z.literal("server"), z.literal("client")]).nullable().optional(),
|
|
1155
|
+
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]).nullable().optional(),
|
|
1156
|
+
})));
|
|
1120
1157
|
export const ZResponseReasoningItem = z.lazy(() => (z.object({
|
|
1121
1158
|
id: z.string(),
|
|
1122
1159
|
summary: z.array(ZSummary),
|
|
@@ -1231,11 +1268,30 @@ export const ZResponseCustomToolCall = z.lazy(() => (z.object({
|
|
|
1231
1268
|
name: z.string(),
|
|
1232
1269
|
type: z.literal("custom_tool_call"),
|
|
1233
1270
|
id: z.string().nullable().optional(),
|
|
1271
|
+
namespace: z.string().nullable().optional(),
|
|
1234
1272
|
})));
|
|
1235
1273
|
export const ZItemReference = z.lazy(() => (z.object({
|
|
1236
1274
|
id: z.string(),
|
|
1237
1275
|
type: z.literal("item_reference").nullable().optional(),
|
|
1238
1276
|
})));
|
|
1277
|
+
export const ZResponseToolSearchCall = z.lazy(() => (z.object({
|
|
1278
|
+
id: z.string(),
|
|
1279
|
+
arguments: z.object({}).passthrough(),
|
|
1280
|
+
call_id: z.string().nullable().optional(),
|
|
1281
|
+
execution: z.union([z.literal("server"), z.literal("client")]),
|
|
1282
|
+
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]),
|
|
1283
|
+
type: z.literal("tool_search_call"),
|
|
1284
|
+
created_by: z.string().nullable().optional(),
|
|
1285
|
+
})));
|
|
1286
|
+
export const ZResponseToolSearchOutputItem = z.lazy(() => (z.object({
|
|
1287
|
+
id: z.string(),
|
|
1288
|
+
call_id: z.string().nullable().optional(),
|
|
1289
|
+
execution: z.union([z.literal("server"), z.literal("client")]),
|
|
1290
|
+
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]),
|
|
1291
|
+
tools: z.array(z.union([ZFunctionTool, ZFileSearchTool, ZComputerTool, ZComputerUsePreviewTool, ZWebSearchTool, ZMcp, ZCodeInterpreter, ZImageGeneration, ZLocalShell, ZFunctionShellTool, ZCustomTool, ZNamespaceTool, ZToolSearchTool, ZWebSearchPreviewTool, ZApplyPatchTool])),
|
|
1292
|
+
type: z.literal("tool_search_output"),
|
|
1293
|
+
created_by: z.string().nullable().optional(),
|
|
1294
|
+
})));
|
|
1239
1295
|
export const ZResponseCompactionItem = z.lazy(() => (z.object({
|
|
1240
1296
|
id: z.string(),
|
|
1241
1297
|
encrypted_content: z.string(),
|
|
@@ -1320,7 +1376,7 @@ export const ZToolChoiceAllowed = z.lazy(() => (z.object({
|
|
|
1320
1376
|
type: z.literal("allowed_tools"),
|
|
1321
1377
|
})));
|
|
1322
1378
|
export const ZToolChoiceTypes = z.lazy(() => (z.object({
|
|
1323
|
-
type: z.union([z.literal("file_search"), z.literal("web_search_preview"), z.literal("computer_use_preview"), z.literal("web_search_preview_2025_03_11"), z.literal("image_generation"), z.literal("code_interpreter")]),
|
|
1379
|
+
type: z.union([z.literal("file_search"), z.literal("web_search_preview"), z.literal("computer"), z.literal("computer_use_preview"), z.literal("computer_use"), z.literal("web_search_preview_2025_03_11"), z.literal("image_generation"), z.literal("code_interpreter")]),
|
|
1324
1380
|
})));
|
|
1325
1381
|
export const ZToolChoiceFunction = z.lazy(() => (z.object({
|
|
1326
1382
|
name: z.string(),
|
|
@@ -1346,6 +1402,7 @@ export const ZFunctionTool = z.lazy(() => (z.object({
|
|
|
1346
1402
|
parameters: z.record(z.string(), z.object({}).passthrough()).nullable().optional(),
|
|
1347
1403
|
strict: z.boolean().nullable().optional(),
|
|
1348
1404
|
type: z.literal("function"),
|
|
1405
|
+
defer_loading: z.boolean().nullable().optional(),
|
|
1349
1406
|
description: z.string().nullable().optional(),
|
|
1350
1407
|
})));
|
|
1351
1408
|
export const ZFileSearchTool = z.lazy(() => (z.object({
|
|
@@ -1356,6 +1413,9 @@ export const ZFileSearchTool = z.lazy(() => (z.object({
|
|
|
1356
1413
|
ranking_options: ZRankingOptions.nullable().optional(),
|
|
1357
1414
|
})));
|
|
1358
1415
|
export const ZComputerTool = z.lazy(() => (z.object({
|
|
1416
|
+
type: z.literal("computer"),
|
|
1417
|
+
})));
|
|
1418
|
+
export const ZComputerUsePreviewTool = z.lazy(() => (z.object({
|
|
1359
1419
|
display_height: z.number(),
|
|
1360
1420
|
display_width: z.number(),
|
|
1361
1421
|
environment: z.union([z.literal("windows"), z.literal("mac"), z.literal("linux"), z.literal("ubuntu"), z.literal("browser")]),
|
|
@@ -1373,6 +1433,7 @@ export const ZMcp = z.lazy(() => (z.object({
|
|
|
1373
1433
|
allowed_tools: z.union([z.array(z.string()), ZMcpAllowedToolsMcpToolFilter]).nullable().optional(),
|
|
1374
1434
|
authorization: z.string().nullable().optional(),
|
|
1375
1435
|
connector_id: z.union([z.literal("connector_dropbox"), z.literal("connector_gmail"), z.literal("connector_googlecalendar"), z.literal("connector_googledrive"), z.literal("connector_microsoftteams"), z.literal("connector_outlookcalendar"), z.literal("connector_outlookemail"), z.literal("connector_sharepoint")]).nullable().optional(),
|
|
1436
|
+
defer_loading: z.boolean().nullable().optional(),
|
|
1376
1437
|
headers: z.record(z.string(), z.string()).nullable().optional(),
|
|
1377
1438
|
require_approval: z.union([ZMcpRequireApprovalMcpToolApprovalFilter, z.union([z.literal("always"), z.literal("never")])]).nullable().optional(),
|
|
1378
1439
|
server_description: z.string().nullable().optional(),
|
|
@@ -1406,11 +1467,25 @@ export const ZFunctionShellTool = z.lazy(() => (z.object({
|
|
|
1406
1467
|
export const ZCustomTool = z.lazy(() => (z.object({
|
|
1407
1468
|
name: z.string(),
|
|
1408
1469
|
type: z.literal("custom"),
|
|
1470
|
+
defer_loading: z.boolean().nullable().optional(),
|
|
1409
1471
|
description: z.string().nullable().optional(),
|
|
1410
1472
|
format: z.union([ZText, ZGrammar]).nullable().optional(),
|
|
1411
1473
|
})));
|
|
1474
|
+
export const ZNamespaceTool = z.lazy(() => (z.object({
|
|
1475
|
+
description: z.string(),
|
|
1476
|
+
name: z.string(),
|
|
1477
|
+
tools: z.array(z.union([ZToolFunction, ZCustomTool])),
|
|
1478
|
+
type: z.literal("namespace"),
|
|
1479
|
+
})));
|
|
1480
|
+
export const ZToolSearchTool = z.lazy(() => (z.object({
|
|
1481
|
+
type: z.literal("tool_search"),
|
|
1482
|
+
description: z.string().nullable().optional(),
|
|
1483
|
+
execution: z.union([z.literal("server"), z.literal("client")]).nullable().optional(),
|
|
1484
|
+
parameters: z.object({}).passthrough().nullable().optional(),
|
|
1485
|
+
})));
|
|
1412
1486
|
export const ZWebSearchPreviewTool = z.lazy(() => (z.object({
|
|
1413
1487
|
type: z.union([z.literal("web_search_preview"), z.literal("web_search_preview_2025_03_11")]),
|
|
1488
|
+
search_content_types: z.array(z.union([z.literal("text"), z.literal("image")])).nullable().optional(),
|
|
1414
1489
|
search_context_size: z.union([z.literal("low"), z.literal("medium"), z.literal("high")]).nullable().optional(),
|
|
1415
1490
|
user_location: ZWebSearchPreviewToolUserLocation.nullable().optional(),
|
|
1416
1491
|
})));
|
|
@@ -1512,7 +1587,7 @@ export const ZChatCompletionSystemMessageParam = z.lazy(() => (z.object({
|
|
|
1512
1587
|
name: z.string(),
|
|
1513
1588
|
})));
|
|
1514
1589
|
export const ZChatCompletionUserMessageParam = z.lazy(() => (z.object({
|
|
1515
|
-
content: z.union([z.string(), z.array(z.union([ZChatCompletionContentPartTextParam, ZChatCompletionContentPartImageParam, ZChatCompletionContentPartInputAudioParam,
|
|
1590
|
+
content: z.union([z.string(), z.array(z.union([ZChatCompletionContentPartTextParam, ZChatCompletionContentPartImageParam, ZChatCompletionContentPartInputAudioParam, ZChatCompletionContentPartParamFile]))]),
|
|
1516
1591
|
role: z.literal("user"),
|
|
1517
1592
|
name: z.string(),
|
|
1518
1593
|
})));
|
|
@@ -1558,11 +1633,12 @@ export const ZResponseFileSearchToolCallParam = z.lazy(() => (z.object({
|
|
|
1558
1633
|
})));
|
|
1559
1634
|
export const ZResponseComputerToolCallParam = z.lazy(() => (z.object({
|
|
1560
1635
|
id: z.string(),
|
|
1561
|
-
action: z.union([ZResponseComputerToolCallParamActionClick, ZResponseComputerToolCallParamActionDoubleClick, ZResponseComputerToolCallParamActionDrag, ZResponseComputerToolCallParamActionKeypress, ZResponseComputerToolCallParamActionMove, ZResponseComputerToolCallParamActionScreenshot, ZResponseComputerToolCallParamActionScroll, ZResponseComputerToolCallParamActionType, ZResponseComputerToolCallParamActionWait]),
|
|
1562
1636
|
call_id: z.string(),
|
|
1563
1637
|
pending_safety_checks: z.array(ZResponseComputerToolCallParamPendingSafetyCheck),
|
|
1564
1638
|
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]),
|
|
1565
1639
|
type: z.literal("computer_call"),
|
|
1640
|
+
action: z.union([ZResponseComputerToolCallParamActionClick, ZResponseComputerToolCallParamActionDoubleClick, ZResponseComputerToolCallParamActionDrag, ZResponseComputerToolCallParamActionKeypress, ZResponseComputerToolCallParamActionMove, ZResponseComputerToolCallParamActionScreenshot, ZResponseComputerToolCallParamActionScroll, ZResponseComputerToolCallParamActionType, ZResponseComputerToolCallParamActionWait]),
|
|
1641
|
+
actions: z.array(z.union([ZComputerActionListParamClick, ZComputerActionListParamDoubleClick, ZComputerActionListParamDrag, ZComputerActionListParamKeypress, ZComputerActionListParamMove, ZComputerActionListParamScreenshot, ZComputerActionListParamScroll, ZComputerActionListParamType, ZComputerActionListParamWait])),
|
|
1566
1642
|
})));
|
|
1567
1643
|
export const ZResponseInputParamComputerCallOutput = z.lazy(() => (z.object({
|
|
1568
1644
|
call_id: z.string(),
|
|
@@ -1584,6 +1660,7 @@ export const ZResponseFunctionToolCallParam = z.lazy(() => (z.object({
|
|
|
1584
1660
|
name: z.string(),
|
|
1585
1661
|
type: z.literal("function_call"),
|
|
1586
1662
|
id: z.string(),
|
|
1663
|
+
namespace: z.string(),
|
|
1587
1664
|
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]),
|
|
1588
1665
|
})));
|
|
1589
1666
|
export const ZResponseInputParamFunctionCallOutput = z.lazy(() => (z.object({
|
|
@@ -1593,6 +1670,22 @@ export const ZResponseInputParamFunctionCallOutput = z.lazy(() => (z.object({
|
|
|
1593
1670
|
id: z.string().nullable().optional(),
|
|
1594
1671
|
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]).nullable().optional(),
|
|
1595
1672
|
})));
|
|
1673
|
+
export const ZResponseInputParamToolSearchCall = z.lazy(() => (z.object({
|
|
1674
|
+
arguments: z.object({}).passthrough(),
|
|
1675
|
+
type: z.literal("tool_search_call"),
|
|
1676
|
+
id: z.string().nullable().optional(),
|
|
1677
|
+
call_id: z.string().nullable().optional(),
|
|
1678
|
+
execution: z.union([z.literal("server"), z.literal("client")]),
|
|
1679
|
+
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]).nullable().optional(),
|
|
1680
|
+
})));
|
|
1681
|
+
export const ZResponseToolSearchOutputItemParamParam = z.lazy(() => (z.object({
|
|
1682
|
+
tools: z.array(z.union([ZFunctionToolParam, ZFileSearchToolParam, ZComputerToolParam, ZComputerUsePreviewToolParam, ZWebSearchToolParam, ZToolParamMcp, ZToolParamCodeInterpreter, ZToolParamImageGeneration, ZToolParamLocalShell, ZFunctionShellToolParam, ZCustomToolParam, ZNamespaceToolParam, ZToolSearchToolParam, ZWebSearchPreviewToolParam, ZApplyPatchToolParam])),
|
|
1683
|
+
type: z.literal("tool_search_output"),
|
|
1684
|
+
id: z.string().nullable().optional(),
|
|
1685
|
+
call_id: z.string().nullable().optional(),
|
|
1686
|
+
execution: z.union([z.literal("server"), z.literal("client")]),
|
|
1687
|
+
status: z.union([z.literal("in_progress"), z.literal("completed"), z.literal("incomplete")]).nullable().optional(),
|
|
1688
|
+
})));
|
|
1596
1689
|
export const ZResponseReasoningItemParam = z.lazy(() => (z.object({
|
|
1597
1690
|
id: z.string(),
|
|
1598
1691
|
summary: z.array(ZResponseReasoningItemParamSummary),
|
|
@@ -1707,6 +1800,7 @@ export const ZResponseCustomToolCallParam = z.lazy(() => (z.object({
|
|
|
1707
1800
|
name: z.string(),
|
|
1708
1801
|
type: z.literal("custom_tool_call"),
|
|
1709
1802
|
id: z.string(),
|
|
1803
|
+
namespace: z.string(),
|
|
1710
1804
|
})));
|
|
1711
1805
|
export const ZResponseInputParamItemReference = z.lazy(() => (z.object({
|
|
1712
1806
|
id: z.string(),
|
|
@@ -1979,11 +2073,11 @@ export const ZParsedFunction = z.lazy(() => (ZChatCompletionMessageFunctionToolC
|
|
|
1979
2073
|
parsed_arguments: z.object({}).passthrough().nullable().optional(),
|
|
1980
2074
|
})));
|
|
1981
2075
|
export const ZPartialArgDict = z.lazy(() => (z.object({
|
|
2076
|
+
bool_value: z.boolean().nullable().optional(),
|
|
2077
|
+
json_path: z.string().nullable().optional(),
|
|
1982
2078
|
null_value: z.literal("NULL_VALUE").nullable().optional(),
|
|
1983
2079
|
number_value: z.number().nullable().optional(),
|
|
1984
2080
|
string_value: z.string().nullable().optional(),
|
|
1985
|
-
bool_value: z.boolean().nullable().optional(),
|
|
1986
|
-
json_path: z.string().nullable().optional(),
|
|
1987
2081
|
will_continue: z.boolean().nullable().optional(),
|
|
1988
2082
|
})));
|
|
1989
2083
|
export const ZFunctionResponsePartDict = z.lazy(() => (z.object({
|
|
@@ -1995,13 +2089,14 @@ export const ZResponseInputText = z.lazy(() => (z.object({
|
|
|
1995
2089
|
type: z.literal("input_text"),
|
|
1996
2090
|
})));
|
|
1997
2091
|
export const ZResponseInputImage = z.lazy(() => (z.object({
|
|
1998
|
-
detail: z.union([z.literal("low"), z.literal("high"), z.literal("auto")]),
|
|
2092
|
+
detail: z.union([z.literal("low"), z.literal("high"), z.literal("auto"), z.literal("original")]),
|
|
1999
2093
|
type: z.literal("input_image"),
|
|
2000
2094
|
file_id: z.string().nullable().optional(),
|
|
2001
2095
|
image_url: z.string().nullable().optional(),
|
|
2002
2096
|
})));
|
|
2003
2097
|
export const ZResponseInputFile = z.lazy(() => (z.object({
|
|
2004
2098
|
type: z.literal("input_file"),
|
|
2099
|
+
detail: z.union([z.literal("high"), z.literal("low")]).nullable().optional(),
|
|
2005
2100
|
file_data: z.string().nullable().optional(),
|
|
2006
2101
|
file_id: z.string().nullable().optional(),
|
|
2007
2102
|
file_url: z.string().nullable().optional(),
|
|
@@ -2024,6 +2119,11 @@ export const ZResult = z.lazy(() => (z.object({
|
|
|
2024
2119
|
score: z.number().nullable().optional(),
|
|
2025
2120
|
text: z.string().nullable().optional(),
|
|
2026
2121
|
})));
|
|
2122
|
+
export const ZPendingSafetyCheck = z.lazy(() => (z.object({
|
|
2123
|
+
id: z.string(),
|
|
2124
|
+
code: z.string().nullable().optional(),
|
|
2125
|
+
message: z.string().nullable().optional(),
|
|
2126
|
+
})));
|
|
2027
2127
|
export const ZActionClick = z.lazy(() => (z.object({
|
|
2028
2128
|
button: z.union([z.literal("left"), z.literal("right"), z.literal("wheel"), z.literal("back"), z.literal("forward")]),
|
|
2029
2129
|
type: z.literal("click"),
|
|
@@ -2065,10 +2165,46 @@ export const ZActionType = z.lazy(() => (z.object({
|
|
|
2065
2165
|
export const ZActionWait = z.lazy(() => (z.object({
|
|
2066
2166
|
type: z.literal("wait"),
|
|
2067
2167
|
})));
|
|
2068
|
-
export const
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2168
|
+
export const ZClick = z.lazy(() => (z.object({
|
|
2169
|
+
button: z.union([z.literal("left"), z.literal("right"), z.literal("wheel"), z.literal("back"), z.literal("forward")]),
|
|
2170
|
+
type: z.literal("click"),
|
|
2171
|
+
x: z.number(),
|
|
2172
|
+
y: z.number(),
|
|
2173
|
+
})));
|
|
2174
|
+
export const ZDoubleClick = z.lazy(() => (z.object({
|
|
2175
|
+
type: z.literal("double_click"),
|
|
2176
|
+
x: z.number(),
|
|
2177
|
+
y: z.number(),
|
|
2178
|
+
})));
|
|
2179
|
+
export const ZDrag = z.lazy(() => (z.object({
|
|
2180
|
+
path: z.array(ZDragPath),
|
|
2181
|
+
type: z.literal("drag"),
|
|
2182
|
+
})));
|
|
2183
|
+
export const ZKeypress = z.lazy(() => (z.object({
|
|
2184
|
+
keys: z.array(z.string()),
|
|
2185
|
+
type: z.literal("keypress"),
|
|
2186
|
+
})));
|
|
2187
|
+
export const ZMove = z.lazy(() => (z.object({
|
|
2188
|
+
type: z.literal("move"),
|
|
2189
|
+
x: z.number(),
|
|
2190
|
+
y: z.number(),
|
|
2191
|
+
})));
|
|
2192
|
+
export const ZScreenshot = z.lazy(() => (z.object({
|
|
2193
|
+
type: z.literal("screenshot"),
|
|
2194
|
+
})));
|
|
2195
|
+
export const ZScroll = z.lazy(() => (z.object({
|
|
2196
|
+
scroll_x: z.number(),
|
|
2197
|
+
scroll_y: z.number(),
|
|
2198
|
+
type: z.literal("scroll"),
|
|
2199
|
+
x: z.number(),
|
|
2200
|
+
y: z.number(),
|
|
2201
|
+
})));
|
|
2202
|
+
export const ZType = z.lazy(() => (z.object({
|
|
2203
|
+
text: z.string(),
|
|
2204
|
+
type: z.literal("type"),
|
|
2205
|
+
})));
|
|
2206
|
+
export const ZWait = z.lazy(() => (z.object({
|
|
2207
|
+
type: z.literal("wait"),
|
|
2072
2208
|
})));
|
|
2073
2209
|
export const ZResponseComputerToolCallOutputScreenshot = z.lazy(() => (z.object({
|
|
2074
2210
|
type: z.literal("computer_screenshot"),
|
|
@@ -2101,12 +2237,13 @@ export const ZResponseInputTextContent = z.lazy(() => (z.object({
|
|
|
2101
2237
|
})));
|
|
2102
2238
|
export const ZResponseInputImageContent = z.lazy(() => (z.object({
|
|
2103
2239
|
type: z.literal("input_image"),
|
|
2104
|
-
detail: z.union([z.literal("low"), z.literal("high"), z.literal("auto")]).nullable().optional(),
|
|
2240
|
+
detail: z.union([z.literal("low"), z.literal("high"), z.literal("auto"), z.literal("original")]).nullable().optional(),
|
|
2105
2241
|
file_id: z.string().nullable().optional(),
|
|
2106
2242
|
image_url: z.string().nullable().optional(),
|
|
2107
2243
|
})));
|
|
2108
2244
|
export const ZResponseInputFileContent = z.lazy(() => (z.object({
|
|
2109
2245
|
type: z.literal("input_file"),
|
|
2246
|
+
detail: z.union([z.literal("high"), z.literal("low")]).nullable().optional(),
|
|
2110
2247
|
file_data: z.string().nullable().optional(),
|
|
2111
2248
|
file_id: z.string().nullable().optional(),
|
|
2112
2249
|
file_url: z.string().nullable().optional(),
|
|
@@ -2277,6 +2414,13 @@ export const ZGrammar = z.lazy(() => (z.object({
|
|
|
2277
2414
|
syntax: z.union([z.literal("lark"), z.literal("regex")]),
|
|
2278
2415
|
type: z.literal("grammar"),
|
|
2279
2416
|
})));
|
|
2417
|
+
export const ZToolFunction = z.lazy(() => (z.object({
|
|
2418
|
+
name: z.string(),
|
|
2419
|
+
type: z.literal("function"),
|
|
2420
|
+
description: z.string().nullable().optional(),
|
|
2421
|
+
parameters: z.object({}).passthrough().nullable().optional(),
|
|
2422
|
+
strict: z.boolean().nullable().optional(),
|
|
2423
|
+
})));
|
|
2280
2424
|
export const ZWebSearchPreviewToolUserLocation = z.lazy(() => (z.object({
|
|
2281
2425
|
type: z.literal("approximate"),
|
|
2282
2426
|
city: z.string().nullable().optional(),
|
|
@@ -2359,6 +2503,11 @@ export const ZResponseFileSearchToolCallParamResult = z.lazy(() => (z.object({
|
|
|
2359
2503
|
score: z.number(),
|
|
2360
2504
|
text: z.string(),
|
|
2361
2505
|
})));
|
|
2506
|
+
export const ZResponseComputerToolCallParamPendingSafetyCheck = z.lazy(() => (z.object({
|
|
2507
|
+
id: z.string(),
|
|
2508
|
+
code: z.string().nullable().optional(),
|
|
2509
|
+
message: z.string().nullable().optional(),
|
|
2510
|
+
})));
|
|
2362
2511
|
export const ZResponseComputerToolCallParamActionClick = z.lazy(() => (z.object({
|
|
2363
2512
|
button: z.union([z.literal("left"), z.literal("right"), z.literal("wheel"), z.literal("back"), z.literal("forward")]),
|
|
2364
2513
|
type: z.literal("click"),
|
|
@@ -2400,10 +2549,46 @@ export const ZResponseComputerToolCallParamActionType = z.lazy(() => (z.object({
|
|
|
2400
2549
|
export const ZResponseComputerToolCallParamActionWait = z.lazy(() => (z.object({
|
|
2401
2550
|
type: z.literal("wait"),
|
|
2402
2551
|
})));
|
|
2403
|
-
export const
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2552
|
+
export const ZComputerActionListParamClick = z.lazy(() => (z.object({
|
|
2553
|
+
button: z.union([z.literal("left"), z.literal("right"), z.literal("wheel"), z.literal("back"), z.literal("forward")]),
|
|
2554
|
+
type: z.literal("click"),
|
|
2555
|
+
x: z.number(),
|
|
2556
|
+
y: z.number(),
|
|
2557
|
+
})));
|
|
2558
|
+
export const ZComputerActionListParamDoubleClick = z.lazy(() => (z.object({
|
|
2559
|
+
type: z.literal("double_click"),
|
|
2560
|
+
x: z.number(),
|
|
2561
|
+
y: z.number(),
|
|
2562
|
+
})));
|
|
2563
|
+
export const ZComputerActionListParamDrag = z.lazy(() => (z.object({
|
|
2564
|
+
path: z.array(ZComputerActionListParamDragPath),
|
|
2565
|
+
type: z.literal("drag"),
|
|
2566
|
+
})));
|
|
2567
|
+
export const ZComputerActionListParamKeypress = z.lazy(() => (z.object({
|
|
2568
|
+
keys: z.array(z.string()),
|
|
2569
|
+
type: z.literal("keypress"),
|
|
2570
|
+
})));
|
|
2571
|
+
export const ZComputerActionListParamMove = z.lazy(() => (z.object({
|
|
2572
|
+
type: z.literal("move"),
|
|
2573
|
+
x: z.number(),
|
|
2574
|
+
y: z.number(),
|
|
2575
|
+
})));
|
|
2576
|
+
export const ZComputerActionListParamScreenshot = z.lazy(() => (z.object({
|
|
2577
|
+
type: z.literal("screenshot"),
|
|
2578
|
+
})));
|
|
2579
|
+
export const ZComputerActionListParamScroll = z.lazy(() => (z.object({
|
|
2580
|
+
scroll_x: z.number(),
|
|
2581
|
+
scroll_y: z.number(),
|
|
2582
|
+
type: z.literal("scroll"),
|
|
2583
|
+
x: z.number(),
|
|
2584
|
+
y: z.number(),
|
|
2585
|
+
})));
|
|
2586
|
+
export const ZComputerActionListParamType = z.lazy(() => (z.object({
|
|
2587
|
+
text: z.string(),
|
|
2588
|
+
type: z.literal("type"),
|
|
2589
|
+
})));
|
|
2590
|
+
export const ZComputerActionListParamWait = z.lazy(() => (z.object({
|
|
2591
|
+
type: z.literal("wait"),
|
|
2407
2592
|
})));
|
|
2408
2593
|
export const ZResponseComputerToolCallOutputScreenshotParam = z.lazy(() => (z.object({
|
|
2409
2594
|
type: z.literal("computer_screenshot"),
|
|
@@ -2436,17 +2621,113 @@ export const ZResponseInputTextContentParam = z.lazy(() => (z.object({
|
|
|
2436
2621
|
})));
|
|
2437
2622
|
export const ZResponseInputImageContentParam = z.lazy(() => (z.object({
|
|
2438
2623
|
type: z.literal("input_image"),
|
|
2439
|
-
detail: z.union([z.literal("low"), z.literal("high"), z.literal("auto")]).nullable().optional(),
|
|
2624
|
+
detail: z.union([z.literal("low"), z.literal("high"), z.literal("auto"), z.literal("original")]).nullable().optional(),
|
|
2440
2625
|
file_id: z.string().nullable().optional(),
|
|
2441
2626
|
image_url: z.string().nullable().optional(),
|
|
2442
2627
|
})));
|
|
2443
2628
|
export const ZResponseInputFileContentParam = z.lazy(() => (z.object({
|
|
2444
2629
|
type: z.literal("input_file"),
|
|
2630
|
+
detail: z.union([z.literal("high"), z.literal("low")]),
|
|
2445
2631
|
file_data: z.string().nullable().optional(),
|
|
2446
2632
|
file_id: z.string().nullable().optional(),
|
|
2447
2633
|
file_url: z.string().nullable().optional(),
|
|
2448
2634
|
filename: z.string().nullable().optional(),
|
|
2449
2635
|
})));
|
|
2636
|
+
export const ZFunctionToolParam = z.lazy(() => (z.object({
|
|
2637
|
+
name: z.string(),
|
|
2638
|
+
parameters: z.record(z.string(), z.object({}).passthrough()).nullable().optional(),
|
|
2639
|
+
strict: z.boolean().nullable().optional(),
|
|
2640
|
+
type: z.literal("function"),
|
|
2641
|
+
defer_loading: z.boolean(),
|
|
2642
|
+
description: z.string().nullable().optional(),
|
|
2643
|
+
})));
|
|
2644
|
+
export const ZFileSearchToolParam = z.lazy(() => (z.object({
|
|
2645
|
+
type: z.literal("file_search"),
|
|
2646
|
+
vector_store_ids: z.array(z.string()),
|
|
2647
|
+
filters: z.union([ZComparisonFilterComparisonFilter, ZCompoundFilterCompoundFilter]).nullable().optional(),
|
|
2648
|
+
max_num_results: z.number(),
|
|
2649
|
+
ranking_options: ZFileSearchToolParamRankingOptions,
|
|
2650
|
+
})));
|
|
2651
|
+
export const ZComputerToolParam = z.lazy(() => (z.object({
|
|
2652
|
+
type: z.literal("computer"),
|
|
2653
|
+
})));
|
|
2654
|
+
export const ZComputerUsePreviewToolParam = z.lazy(() => (z.object({
|
|
2655
|
+
display_height: z.number(),
|
|
2656
|
+
display_width: z.number(),
|
|
2657
|
+
environment: z.union([z.literal("windows"), z.literal("mac"), z.literal("linux"), z.literal("ubuntu"), z.literal("browser")]),
|
|
2658
|
+
type: z.literal("computer_use_preview"),
|
|
2659
|
+
})));
|
|
2660
|
+
export const ZWebSearchToolParam = z.lazy(() => (z.object({
|
|
2661
|
+
type: z.union([z.literal("web_search"), z.literal("web_search_2025_08_26")]),
|
|
2662
|
+
filters: ZWebSearchToolParamFilters.nullable().optional(),
|
|
2663
|
+
search_context_size: z.union([z.literal("low"), z.literal("medium"), z.literal("high")]),
|
|
2664
|
+
user_location: ZWebSearchToolParamUserLocation.nullable().optional(),
|
|
2665
|
+
})));
|
|
2666
|
+
export const ZToolParamMcp = z.lazy(() => (z.object({
|
|
2667
|
+
server_label: z.string(),
|
|
2668
|
+
type: z.literal("mcp"),
|
|
2669
|
+
allowed_tools: z.union([z.array(z.string()), ZToolParamMcpAllowedToolsMcpToolFilter]).nullable().optional(),
|
|
2670
|
+
authorization: z.string(),
|
|
2671
|
+
connector_id: z.union([z.literal("connector_dropbox"), z.literal("connector_gmail"), z.literal("connector_googlecalendar"), z.literal("connector_googledrive"), z.literal("connector_microsoftteams"), z.literal("connector_outlookcalendar"), z.literal("connector_outlookemail"), z.literal("connector_sharepoint")]),
|
|
2672
|
+
defer_loading: z.boolean(),
|
|
2673
|
+
headers: z.record(z.string(), z.string()).nullable().optional(),
|
|
2674
|
+
require_approval: z.union([ZToolParamMcpRequireApprovalMcpToolApprovalFilter, z.union([z.literal("always"), z.literal("never")])]).nullable().optional(),
|
|
2675
|
+
server_description: z.string(),
|
|
2676
|
+
server_url: z.string(),
|
|
2677
|
+
})));
|
|
2678
|
+
export const ZToolParamCodeInterpreter = z.lazy(() => (z.object({
|
|
2679
|
+
container: z.union([z.string(), ZToolParamCodeInterpreterContainerCodeInterpreterToolAuto]),
|
|
2680
|
+
type: z.literal("code_interpreter"),
|
|
2681
|
+
})));
|
|
2682
|
+
export const ZToolParamImageGeneration = z.lazy(() => (z.object({
|
|
2683
|
+
type: z.literal("image_generation"),
|
|
2684
|
+
action: z.union([z.literal("generate"), z.literal("edit"), z.literal("auto")]),
|
|
2685
|
+
background: z.union([z.literal("transparent"), z.literal("opaque"), z.literal("auto")]),
|
|
2686
|
+
input_fidelity: z.union([z.literal("high"), z.literal("low")]).nullable().optional(),
|
|
2687
|
+
input_image_mask: ZToolParamImageGenerationInputImageMask,
|
|
2688
|
+
model: z.union([z.string(), z.union([z.literal("gpt-image-1"), z.literal("gpt-image-1-mini"), z.literal("gpt-image-1.5")])]),
|
|
2689
|
+
moderation: z.union([z.literal("auto"), z.literal("low")]),
|
|
2690
|
+
output_compression: z.number(),
|
|
2691
|
+
output_format: z.union([z.literal("png"), z.literal("webp"), z.literal("jpeg")]),
|
|
2692
|
+
partial_images: z.number(),
|
|
2693
|
+
quality: z.union([z.literal("low"), z.literal("medium"), z.literal("high"), z.literal("auto")]),
|
|
2694
|
+
size: z.union([z.literal("1024x1024"), z.literal("1024x1536"), z.literal("1536x1024"), z.literal("auto")]),
|
|
2695
|
+
})));
|
|
2696
|
+
export const ZToolParamLocalShell = z.lazy(() => (z.object({
|
|
2697
|
+
type: z.literal("local_shell"),
|
|
2698
|
+
})));
|
|
2699
|
+
export const ZFunctionShellToolParam = z.lazy(() => (z.object({
|
|
2700
|
+
type: z.literal("shell"),
|
|
2701
|
+
environment: z.union([ZContainerAutoParam, ZLocalEnvironmentParam, ZContainerReferenceParam]).nullable().optional(),
|
|
2702
|
+
})));
|
|
2703
|
+
export const ZCustomToolParam = z.lazy(() => (z.object({
|
|
2704
|
+
name: z.string(),
|
|
2705
|
+
type: z.literal("custom"),
|
|
2706
|
+
defer_loading: z.boolean(),
|
|
2707
|
+
description: z.string(),
|
|
2708
|
+
format: z.union([ZCustomToolInputFormatText, ZCustomToolInputFormatGrammar]),
|
|
2709
|
+
})));
|
|
2710
|
+
export const ZNamespaceToolParam = z.lazy(() => (z.object({
|
|
2711
|
+
description: z.string(),
|
|
2712
|
+
name: z.string(),
|
|
2713
|
+
tools: z.array(z.union([ZNamespaceToolParamToolFunction, ZCustomToolParam])),
|
|
2714
|
+
type: z.literal("namespace"),
|
|
2715
|
+
})));
|
|
2716
|
+
export const ZToolSearchToolParam = z.lazy(() => (z.object({
|
|
2717
|
+
type: z.literal("tool_search"),
|
|
2718
|
+
description: z.string().nullable().optional(),
|
|
2719
|
+
execution: z.union([z.literal("server"), z.literal("client")]),
|
|
2720
|
+
parameters: z.object({}).passthrough().nullable().optional(),
|
|
2721
|
+
})));
|
|
2722
|
+
export const ZWebSearchPreviewToolParam = z.lazy(() => (z.object({
|
|
2723
|
+
type: z.union([z.literal("web_search_preview"), z.literal("web_search_preview_2025_03_11")]),
|
|
2724
|
+
search_content_types: z.array(z.union([z.literal("text"), z.literal("image")])),
|
|
2725
|
+
search_context_size: z.union([z.literal("low"), z.literal("medium"), z.literal("high")]),
|
|
2726
|
+
user_location: ZWebSearchPreviewToolParamUserLocation.nullable().optional(),
|
|
2727
|
+
})));
|
|
2728
|
+
export const ZApplyPatchToolParam = z.lazy(() => (z.object({
|
|
2729
|
+
type: z.literal("apply_patch"),
|
|
2730
|
+
})));
|
|
2450
2731
|
export const ZResponseReasoningItemParamSummary = z.lazy(() => (z.object({
|
|
2451
2732
|
text: z.string(),
|
|
2452
2733
|
type: z.literal("summary_text"),
|
|
@@ -2581,6 +2862,10 @@ export const ZActionDragPath = z.lazy(() => (z.object({
|
|
|
2581
2862
|
x: z.number(),
|
|
2582
2863
|
y: z.number(),
|
|
2583
2864
|
})));
|
|
2865
|
+
export const ZDragPath = z.lazy(() => (z.object({
|
|
2866
|
+
x: z.number(),
|
|
2867
|
+
y: z.number(),
|
|
2868
|
+
})));
|
|
2584
2869
|
export const ZActionSearchSource = z.lazy(() => (z.object({
|
|
2585
2870
|
type: z.literal("url"),
|
|
2586
2871
|
url: z.string(),
|
|
@@ -2704,10 +2989,85 @@ export const ZResponseComputerToolCallParamActionDragPath = z.lazy(() => (z.obje
|
|
|
2704
2989
|
x: z.number(),
|
|
2705
2990
|
y: z.number(),
|
|
2706
2991
|
})));
|
|
2992
|
+
export const ZComputerActionListParamDragPath = z.lazy(() => (z.object({
|
|
2993
|
+
x: z.number(),
|
|
2994
|
+
y: z.number(),
|
|
2995
|
+
})));
|
|
2707
2996
|
export const ZResponseFunctionWebSearchParamActionSearchSource = z.lazy(() => (z.object({
|
|
2708
2997
|
type: z.literal("url"),
|
|
2709
2998
|
url: z.string(),
|
|
2710
2999
|
})));
|
|
3000
|
+
export const ZComparisonFilterComparisonFilter = z.lazy(() => (z.object({
|
|
3001
|
+
key: z.string(),
|
|
3002
|
+
type: z.union([z.literal("eq"), z.literal("ne"), z.literal("gt"), z.literal("gte"), z.literal("lt"), z.literal("lte")]),
|
|
3003
|
+
value: z.union([z.string(), z.number(), z.boolean(), z.array(z.union([z.string(), z.number()]))]),
|
|
3004
|
+
})));
|
|
3005
|
+
export const ZCompoundFilterCompoundFilter = z.lazy(() => (z.object({
|
|
3006
|
+
filters: z.array(z.union([ZComparisonFilterComparisonFilter, z.object({}).passthrough()])),
|
|
3007
|
+
type: z.union([z.literal("and"), z.literal("or")]),
|
|
3008
|
+
})));
|
|
3009
|
+
export const ZFileSearchToolParamRankingOptions = z.lazy(() => (z.object({
|
|
3010
|
+
hybrid_search: ZFileSearchToolParamRankingOptionsHybridSearch,
|
|
3011
|
+
ranker: z.union([z.literal("auto"), z.literal("default-2024-11-15")]),
|
|
3012
|
+
score_threshold: z.number(),
|
|
3013
|
+
})));
|
|
3014
|
+
export const ZWebSearchToolParamFilters = z.lazy(() => (z.object({
|
|
3015
|
+
allowed_domains: z.array(z.string()).nullable().optional(),
|
|
3016
|
+
})));
|
|
3017
|
+
export const ZWebSearchToolParamUserLocation = z.lazy(() => (z.object({
|
|
3018
|
+
city: z.string().nullable().optional(),
|
|
3019
|
+
country: z.string().nullable().optional(),
|
|
3020
|
+
region: z.string().nullable().optional(),
|
|
3021
|
+
timezone: z.string().nullable().optional(),
|
|
3022
|
+
type: z.literal("approximate"),
|
|
3023
|
+
})));
|
|
3024
|
+
export const ZToolParamMcpAllowedToolsMcpToolFilter = z.lazy(() => (z.object({
|
|
3025
|
+
read_only: z.boolean(),
|
|
3026
|
+
tool_names: z.array(z.string()),
|
|
3027
|
+
})));
|
|
3028
|
+
export const ZToolParamMcpRequireApprovalMcpToolApprovalFilter = z.lazy(() => (z.object({
|
|
3029
|
+
always: ZToolParamMcpRequireApprovalMcpToolApprovalFilterAlways,
|
|
3030
|
+
never: ZToolParamMcpRequireApprovalMcpToolApprovalFilterNever,
|
|
3031
|
+
})));
|
|
3032
|
+
export const ZToolParamCodeInterpreterContainerCodeInterpreterToolAuto = z.lazy(() => (z.object({
|
|
3033
|
+
type: z.literal("auto"),
|
|
3034
|
+
file_ids: z.array(z.string()),
|
|
3035
|
+
memory_limit: z.union([z.literal("1g"), z.literal("4g"), z.literal("16g"), z.literal("64g")]).nullable().optional(),
|
|
3036
|
+
network_policy: z.union([ZContainerNetworkPolicyDisabledParam, ZContainerNetworkPolicyAllowlistParam]),
|
|
3037
|
+
})));
|
|
3038
|
+
export const ZToolParamImageGenerationInputImageMask = z.lazy(() => (z.object({
|
|
3039
|
+
file_id: z.string(),
|
|
3040
|
+
image_url: z.string(),
|
|
3041
|
+
})));
|
|
3042
|
+
export const ZContainerAutoParam = z.lazy(() => (z.object({
|
|
3043
|
+
type: z.literal("container_auto"),
|
|
3044
|
+
file_ids: z.array(z.string()),
|
|
3045
|
+
memory_limit: z.union([z.literal("1g"), z.literal("4g"), z.literal("16g"), z.literal("64g")]).nullable().optional(),
|
|
3046
|
+
network_policy: z.union([ZContainerNetworkPolicyDisabledParam, ZContainerNetworkPolicyAllowlistParam]),
|
|
3047
|
+
skills: z.array(z.union([ZSkillReferenceParam, ZInlineSkillParam])),
|
|
3048
|
+
})));
|
|
3049
|
+
export const ZCustomToolInputFormatText = z.lazy(() => (z.object({
|
|
3050
|
+
type: z.literal("text"),
|
|
3051
|
+
})));
|
|
3052
|
+
export const ZCustomToolInputFormatGrammar = z.lazy(() => (z.object({
|
|
3053
|
+
definition: z.string(),
|
|
3054
|
+
syntax: z.union([z.literal("lark"), z.literal("regex")]),
|
|
3055
|
+
type: z.literal("grammar"),
|
|
3056
|
+
})));
|
|
3057
|
+
export const ZNamespaceToolParamToolFunction = z.lazy(() => (z.object({
|
|
3058
|
+
name: z.string(),
|
|
3059
|
+
type: z.literal("function"),
|
|
3060
|
+
description: z.string().nullable().optional(),
|
|
3061
|
+
parameters: z.object({}).passthrough().nullable().optional(),
|
|
3062
|
+
strict: z.boolean().nullable().optional(),
|
|
3063
|
+
})));
|
|
3064
|
+
export const ZWebSearchPreviewToolParamUserLocation = z.lazy(() => (z.object({
|
|
3065
|
+
type: z.literal("approximate"),
|
|
3066
|
+
city: z.string().nullable().optional(),
|
|
3067
|
+
country: z.string().nullable().optional(),
|
|
3068
|
+
region: z.string().nullable().optional(),
|
|
3069
|
+
timezone: z.string().nullable().optional(),
|
|
3070
|
+
})));
|
|
2711
3071
|
export const ZLocalSkillParam = z.lazy(() => (z.object({
|
|
2712
3072
|
description: z.string(),
|
|
2713
3073
|
name: z.string(),
|
|
@@ -2767,3 +3127,44 @@ export const ZResponseOutputTextParamLogprobTopLogprob = z.lazy(() => (z.object(
|
|
|
2767
3127
|
bytes: z.array(z.number()),
|
|
2768
3128
|
logprob: z.number(),
|
|
2769
3129
|
})));
|
|
3130
|
+
export const ZFileSearchToolParamRankingOptionsHybridSearch = z.lazy(() => (z.object({
|
|
3131
|
+
embedding_weight: z.number(),
|
|
3132
|
+
text_weight: z.number(),
|
|
3133
|
+
})));
|
|
3134
|
+
export const ZToolParamMcpRequireApprovalMcpToolApprovalFilterAlways = z.lazy(() => (z.object({
|
|
3135
|
+
read_only: z.boolean(),
|
|
3136
|
+
tool_names: z.array(z.string()),
|
|
3137
|
+
})));
|
|
3138
|
+
export const ZToolParamMcpRequireApprovalMcpToolApprovalFilterNever = z.lazy(() => (z.object({
|
|
3139
|
+
read_only: z.boolean(),
|
|
3140
|
+
tool_names: z.array(z.string()),
|
|
3141
|
+
})));
|
|
3142
|
+
export const ZContainerNetworkPolicyDisabledParam = z.lazy(() => (z.object({
|
|
3143
|
+
type: z.literal("disabled"),
|
|
3144
|
+
})));
|
|
3145
|
+
export const ZContainerNetworkPolicyAllowlistParam = z.lazy(() => (z.object({
|
|
3146
|
+
allowed_domains: z.array(z.string()),
|
|
3147
|
+
type: z.literal("allowlist"),
|
|
3148
|
+
domain_secrets: z.array(ZContainerNetworkPolicyDomainSecretParam),
|
|
3149
|
+
})));
|
|
3150
|
+
export const ZSkillReferenceParam = z.lazy(() => (z.object({
|
|
3151
|
+
skill_id: z.string(),
|
|
3152
|
+
type: z.literal("skill_reference"),
|
|
3153
|
+
version: z.string(),
|
|
3154
|
+
})));
|
|
3155
|
+
export const ZInlineSkillParam = z.lazy(() => (z.object({
|
|
3156
|
+
description: z.string(),
|
|
3157
|
+
name: z.string(),
|
|
3158
|
+
source: ZInlineSkillSourceParam,
|
|
3159
|
+
type: z.literal("inline"),
|
|
3160
|
+
})));
|
|
3161
|
+
export const ZContainerNetworkPolicyDomainSecretParam = z.lazy(() => (z.object({
|
|
3162
|
+
domain: z.string(),
|
|
3163
|
+
name: z.string(),
|
|
3164
|
+
value: z.string(),
|
|
3165
|
+
})));
|
|
3166
|
+
export const ZInlineSkillSourceParam = z.lazy(() => (z.object({
|
|
3167
|
+
data: z.string(),
|
|
3168
|
+
media_type: z.literal("application/zip"),
|
|
3169
|
+
type: z.literal("base64"),
|
|
3170
|
+
})));
|