@openrouter/sdk 0.13.37 → 0.13.39
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/esm/funcs/generationsSubmitFeedback.d.ts +19 -0
- package/esm/funcs/generationsSubmitFeedback.js +100 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/lib/conversation-state.d.ts +1 -1
- package/esm/lib/turn-context.d.ts +1 -1
- package/esm/models/additionaltoolsitem.d.ts +117 -0
- package/esm/models/additionaltoolsitem.js +152 -0
- package/esm/models/applypatchservertool.d.ts +11 -2
- package/esm/models/applypatchservertool.js +9 -2
- package/esm/models/applypatchservertoolopenrouter.d.ts +9 -2
- package/esm/models/applypatchservertoolopenrouter.js +6 -1
- package/esm/models/byokproviderslug.d.ts +1 -1
- package/esm/models/byokproviderslug.js +1 -1
- package/esm/models/codeinterpreterservertool.d.ts +10 -2
- package/esm/models/codeinterpreterservertool.js +9 -2
- package/esm/models/codexlocalshelltool.d.ts +11 -2
- package/esm/models/codexlocalshelltool.js +9 -2
- package/esm/models/computeruseservertool.d.ts +11 -3
- package/esm/models/computeruseservertool.js +9 -2
- package/esm/models/customtool.d.ts +11 -3
- package/esm/models/customtool.js +9 -2
- package/esm/models/filesearchservertool.d.ts +11 -3
- package/esm/models/filesearchservertool.js +10 -2
- package/esm/models/imagegenerationrequest.d.ts +2 -2
- package/esm/models/imagegenerationrequest.js +1 -2
- package/esm/models/imagegenerationservertool.d.ts +11 -3
- package/esm/models/imagegenerationservertool.js +9 -2
- package/esm/models/index.d.ts +3 -0
- package/esm/models/index.js +3 -0
- package/esm/models/inputsunion.d.ts +5 -4
- package/esm/models/inputsunion.js +3 -0
- package/esm/models/legacywebsearchservertool.d.ts +11 -2
- package/esm/models/legacywebsearchservertool.js +9 -2
- package/esm/models/mcpservertool.d.ts +10 -2
- package/esm/models/mcpservertool.js +9 -2
- package/esm/models/openresponsesresult.d.ts +54 -2
- package/esm/models/openresponsesresult.js +26 -26
- package/esm/models/operations/index.d.ts +1 -0
- package/esm/models/operations/index.js +1 -0
- package/esm/models/operations/listbyokkeys.d.ts +1 -1
- package/esm/models/operations/listbyokkeys.js +1 -1
- package/esm/models/operations/submitgenerationfeedback.d.ts +56 -0
- package/esm/models/operations/submitgenerationfeedback.js +23 -0
- package/esm/models/preview20250311websearchservertool.d.ts +11 -2
- package/esm/models/preview20250311websearchservertool.js +9 -2
- package/esm/models/previewwebsearchservertool.d.ts +11 -2
- package/esm/models/previewwebsearchservertool.js +9 -2
- package/esm/models/provideroptions.d.ts +2 -2
- package/esm/models/provideroptions.js +1 -2
- package/esm/models/responsesrequest.d.ts +140 -12
- package/esm/models/responsesrequest.js +32 -32
- package/esm/models/shellservertool.d.ts +11 -2
- package/esm/models/shellservertool.js +9 -2
- package/esm/models/shellservertoolopenrouter.d.ts +9 -2
- package/esm/models/shellservertoolopenrouter.js +6 -1
- package/esm/models/submitgenerationfeedbackrequest.d.ts +47 -0
- package/esm/models/submitgenerationfeedbackrequest.js +36 -0
- package/esm/models/submitgenerationfeedbackresponse.d.ts +22 -0
- package/esm/models/submitgenerationfeedbackresponse.js +21 -0
- package/esm/models/videogenerationrequest.d.ts +2 -2
- package/esm/models/videogenerationrequest.js +1 -2
- package/esm/models/websearchservertool.d.ts +11 -2
- package/esm/models/websearchservertool.js +9 -2
- package/esm/models/websearchservertoolopenrouter.d.ts +9 -2
- package/esm/models/websearchservertoolopenrouter.js +6 -1
- package/esm/sdk/generations.d.ts +7 -0
- package/esm/sdk/generations.js +10 -0
- package/jsr.json +1 -1
- package/package.json +5 -5
|
@@ -70,7 +70,33 @@ export type ResponsesRequestToolFunction = {
|
|
|
70
70
|
strict?: boolean | null | undefined;
|
|
71
71
|
type: "function";
|
|
72
72
|
};
|
|
73
|
-
export type ResponsesRequestToolUnion = ResponsesRequestToolFunction | PreviewWebSearchServerTool
|
|
73
|
+
export type ResponsesRequestToolUnion = ResponsesRequestToolFunction | (PreviewWebSearchServerTool & {
|
|
74
|
+
type: "web_search_preview";
|
|
75
|
+
}) | (Preview20250311WebSearchServerTool & {
|
|
76
|
+
type: "web_search_preview_2025_03_11";
|
|
77
|
+
}) | (LegacyWebSearchServerTool & {
|
|
78
|
+
type: "web_search";
|
|
79
|
+
}) | (WebSearchServerTool & {
|
|
80
|
+
type: "web_search_2025_08_26";
|
|
81
|
+
}) | (FileSearchServerTool & {
|
|
82
|
+
type: "file_search";
|
|
83
|
+
}) | (ComputerUseServerTool & {
|
|
84
|
+
type: "computer_use_preview";
|
|
85
|
+
}) | (CodeInterpreterServerTool & {
|
|
86
|
+
type: "code_interpreter";
|
|
87
|
+
}) | (McpServerTool & {
|
|
88
|
+
type: "mcp";
|
|
89
|
+
}) | (ImageGenerationServerTool & {
|
|
90
|
+
type: "image_generation";
|
|
91
|
+
}) | (CodexLocalShellTool & {
|
|
92
|
+
type: "local_shell";
|
|
93
|
+
}) | (ShellServerTool & {
|
|
94
|
+
type: "shell";
|
|
95
|
+
}) | (ApplyPatchServerTool & {
|
|
96
|
+
type: "apply_patch";
|
|
97
|
+
}) | (CustomTool & {
|
|
98
|
+
type: "custom";
|
|
99
|
+
}) | (AdvisorServerToolOpenRouter & {
|
|
74
100
|
type: "openrouter:advisor";
|
|
75
101
|
}) | (SubagentServerToolOpenRouter & {
|
|
76
102
|
type: "openrouter:subagent";
|
|
@@ -86,9 +112,15 @@ export type ResponsesRequestToolUnion = ResponsesRequestToolFunction | PreviewWe
|
|
|
86
112
|
type: "openrouter:experimental__search_models";
|
|
87
113
|
}) | (WebFetchServerTool & {
|
|
88
114
|
type: "openrouter:web_fetch";
|
|
89
|
-
}) | WebSearchServerToolOpenRouter
|
|
115
|
+
}) | (WebSearchServerToolOpenRouter & {
|
|
116
|
+
type: "openrouter:web_search";
|
|
117
|
+
}) | (ApplyPatchServerToolOpenRouter & {
|
|
118
|
+
type: "openrouter:apply_patch";
|
|
119
|
+
}) | (BashServerTool & {
|
|
90
120
|
type: "openrouter:bash";
|
|
91
|
-
}) | ShellServerToolOpenRouter
|
|
121
|
+
}) | (ShellServerToolOpenRouter & {
|
|
122
|
+
type: "openrouter:shell";
|
|
123
|
+
});
|
|
92
124
|
/**
|
|
93
125
|
* Request schema for Responses endpoint
|
|
94
126
|
*/
|
|
@@ -168,7 +200,33 @@ export type ResponsesRequest = {
|
|
|
168
200
|
*/
|
|
169
201
|
text?: TextExtendedConfig | undefined;
|
|
170
202
|
toolChoice?: OpenAIResponsesToolChoiceUnion | undefined;
|
|
171
|
-
tools?: Array<ResponsesRequestToolFunction | PreviewWebSearchServerTool
|
|
203
|
+
tools?: Array<ResponsesRequestToolFunction | (PreviewWebSearchServerTool & {
|
|
204
|
+
type: "web_search_preview";
|
|
205
|
+
}) | (Preview20250311WebSearchServerTool & {
|
|
206
|
+
type: "web_search_preview_2025_03_11";
|
|
207
|
+
}) | (LegacyWebSearchServerTool & {
|
|
208
|
+
type: "web_search";
|
|
209
|
+
}) | (WebSearchServerTool & {
|
|
210
|
+
type: "web_search_2025_08_26";
|
|
211
|
+
}) | (FileSearchServerTool & {
|
|
212
|
+
type: "file_search";
|
|
213
|
+
}) | (ComputerUseServerTool & {
|
|
214
|
+
type: "computer_use_preview";
|
|
215
|
+
}) | (CodeInterpreterServerTool & {
|
|
216
|
+
type: "code_interpreter";
|
|
217
|
+
}) | (McpServerTool & {
|
|
218
|
+
type: "mcp";
|
|
219
|
+
}) | (ImageGenerationServerTool & {
|
|
220
|
+
type: "image_generation";
|
|
221
|
+
}) | (CodexLocalShellTool & {
|
|
222
|
+
type: "local_shell";
|
|
223
|
+
}) | (ShellServerTool & {
|
|
224
|
+
type: "shell";
|
|
225
|
+
}) | (ApplyPatchServerTool & {
|
|
226
|
+
type: "apply_patch";
|
|
227
|
+
}) | (CustomTool & {
|
|
228
|
+
type: "custom";
|
|
229
|
+
}) | (AdvisorServerToolOpenRouter & {
|
|
172
230
|
type: "openrouter:advisor";
|
|
173
231
|
}) | (SubagentServerToolOpenRouter & {
|
|
174
232
|
type: "openrouter:subagent";
|
|
@@ -184,9 +242,15 @@ export type ResponsesRequest = {
|
|
|
184
242
|
type: "openrouter:experimental__search_models";
|
|
185
243
|
}) | (WebFetchServerTool & {
|
|
186
244
|
type: "openrouter:web_fetch";
|
|
187
|
-
}) | WebSearchServerToolOpenRouter
|
|
245
|
+
}) | (WebSearchServerToolOpenRouter & {
|
|
246
|
+
type: "openrouter:web_search";
|
|
247
|
+
}) | (ApplyPatchServerToolOpenRouter & {
|
|
248
|
+
type: "openrouter:apply_patch";
|
|
249
|
+
}) | (BashServerTool & {
|
|
188
250
|
type: "openrouter:bash";
|
|
189
|
-
}) | ShellServerToolOpenRouter
|
|
251
|
+
}) | (ShellServerToolOpenRouter & {
|
|
252
|
+
type: "openrouter:shell";
|
|
253
|
+
})> | undefined;
|
|
190
254
|
topK?: number | undefined;
|
|
191
255
|
topLogprobs?: number | null | undefined;
|
|
192
256
|
topP?: number | null | undefined;
|
|
@@ -221,7 +285,33 @@ export type ResponsesRequestToolFunction$Outbound = {
|
|
|
221
285
|
export declare const ResponsesRequestToolFunction$outboundSchema: z.ZodType<ResponsesRequestToolFunction$Outbound, ResponsesRequestToolFunction>;
|
|
222
286
|
export declare function responsesRequestToolFunctionToJSON(responsesRequestToolFunction: ResponsesRequestToolFunction): string;
|
|
223
287
|
/** @internal */
|
|
224
|
-
export type ResponsesRequestToolUnion$Outbound = ResponsesRequestToolFunction$Outbound | PreviewWebSearchServerTool$Outbound
|
|
288
|
+
export type ResponsesRequestToolUnion$Outbound = ResponsesRequestToolFunction$Outbound | (PreviewWebSearchServerTool$Outbound & {
|
|
289
|
+
type: "web_search_preview";
|
|
290
|
+
}) | (Preview20250311WebSearchServerTool$Outbound & {
|
|
291
|
+
type: "web_search_preview_2025_03_11";
|
|
292
|
+
}) | (LegacyWebSearchServerTool$Outbound & {
|
|
293
|
+
type: "web_search";
|
|
294
|
+
}) | (WebSearchServerTool$Outbound & {
|
|
295
|
+
type: "web_search_2025_08_26";
|
|
296
|
+
}) | (FileSearchServerTool$Outbound & {
|
|
297
|
+
type: "file_search";
|
|
298
|
+
}) | (ComputerUseServerTool$Outbound & {
|
|
299
|
+
type: "computer_use_preview";
|
|
300
|
+
}) | (CodeInterpreterServerTool$Outbound & {
|
|
301
|
+
type: "code_interpreter";
|
|
302
|
+
}) | (McpServerTool$Outbound & {
|
|
303
|
+
type: "mcp";
|
|
304
|
+
}) | (ImageGenerationServerTool$Outbound & {
|
|
305
|
+
type: "image_generation";
|
|
306
|
+
}) | (CodexLocalShellTool$Outbound & {
|
|
307
|
+
type: "local_shell";
|
|
308
|
+
}) | (ShellServerTool$Outbound & {
|
|
309
|
+
type: "shell";
|
|
310
|
+
}) | (ApplyPatchServerTool$Outbound & {
|
|
311
|
+
type: "apply_patch";
|
|
312
|
+
}) | (CustomTool$Outbound & {
|
|
313
|
+
type: "custom";
|
|
314
|
+
}) | (AdvisorServerToolOpenRouter$Outbound & {
|
|
225
315
|
type: "openrouter:advisor";
|
|
226
316
|
}) | (SubagentServerToolOpenRouter$Outbound & {
|
|
227
317
|
type: "openrouter:subagent";
|
|
@@ -237,9 +327,15 @@ export type ResponsesRequestToolUnion$Outbound = ResponsesRequestToolFunction$Ou
|
|
|
237
327
|
type: "openrouter:experimental__search_models";
|
|
238
328
|
}) | (WebFetchServerTool$Outbound & {
|
|
239
329
|
type: "openrouter:web_fetch";
|
|
240
|
-
}) | WebSearchServerToolOpenRouter$Outbound
|
|
330
|
+
}) | (WebSearchServerToolOpenRouter$Outbound & {
|
|
331
|
+
type: "openrouter:web_search";
|
|
332
|
+
}) | (ApplyPatchServerToolOpenRouter$Outbound & {
|
|
333
|
+
type: "openrouter:apply_patch";
|
|
334
|
+
}) | (BashServerTool$Outbound & {
|
|
241
335
|
type: "openrouter:bash";
|
|
242
|
-
}) | ShellServerToolOpenRouter$Outbound
|
|
336
|
+
}) | (ShellServerToolOpenRouter$Outbound & {
|
|
337
|
+
type: "openrouter:shell";
|
|
338
|
+
});
|
|
243
339
|
/** @internal */
|
|
244
340
|
export declare const ResponsesRequestToolUnion$outboundSchema: z.ZodType<ResponsesRequestToolUnion$Outbound, ResponsesRequestToolUnion>;
|
|
245
341
|
export declare function responsesRequestToolUnionToJSON(responsesRequestToolUnion: ResponsesRequestToolUnion): string;
|
|
@@ -281,7 +377,33 @@ export type ResponsesRequest$Outbound = {
|
|
|
281
377
|
temperature?: number | null | undefined;
|
|
282
378
|
text?: TextExtendedConfig$Outbound | undefined;
|
|
283
379
|
tool_choice?: OpenAIResponsesToolChoiceUnion$Outbound | undefined;
|
|
284
|
-
tools?: Array<ResponsesRequestToolFunction$Outbound | PreviewWebSearchServerTool$Outbound
|
|
380
|
+
tools?: Array<ResponsesRequestToolFunction$Outbound | (PreviewWebSearchServerTool$Outbound & {
|
|
381
|
+
type: "web_search_preview";
|
|
382
|
+
}) | (Preview20250311WebSearchServerTool$Outbound & {
|
|
383
|
+
type: "web_search_preview_2025_03_11";
|
|
384
|
+
}) | (LegacyWebSearchServerTool$Outbound & {
|
|
385
|
+
type: "web_search";
|
|
386
|
+
}) | (WebSearchServerTool$Outbound & {
|
|
387
|
+
type: "web_search_2025_08_26";
|
|
388
|
+
}) | (FileSearchServerTool$Outbound & {
|
|
389
|
+
type: "file_search";
|
|
390
|
+
}) | (ComputerUseServerTool$Outbound & {
|
|
391
|
+
type: "computer_use_preview";
|
|
392
|
+
}) | (CodeInterpreterServerTool$Outbound & {
|
|
393
|
+
type: "code_interpreter";
|
|
394
|
+
}) | (McpServerTool$Outbound & {
|
|
395
|
+
type: "mcp";
|
|
396
|
+
}) | (ImageGenerationServerTool$Outbound & {
|
|
397
|
+
type: "image_generation";
|
|
398
|
+
}) | (CodexLocalShellTool$Outbound & {
|
|
399
|
+
type: "local_shell";
|
|
400
|
+
}) | (ShellServerTool$Outbound & {
|
|
401
|
+
type: "shell";
|
|
402
|
+
}) | (ApplyPatchServerTool$Outbound & {
|
|
403
|
+
type: "apply_patch";
|
|
404
|
+
}) | (CustomTool$Outbound & {
|
|
405
|
+
type: "custom";
|
|
406
|
+
}) | (AdvisorServerToolOpenRouter$Outbound & {
|
|
285
407
|
type: "openrouter:advisor";
|
|
286
408
|
}) | (SubagentServerToolOpenRouter$Outbound & {
|
|
287
409
|
type: "openrouter:subagent";
|
|
@@ -297,9 +419,15 @@ export type ResponsesRequest$Outbound = {
|
|
|
297
419
|
type: "openrouter:experimental__search_models";
|
|
298
420
|
}) | (WebFetchServerTool$Outbound & {
|
|
299
421
|
type: "openrouter:web_fetch";
|
|
300
|
-
}) | WebSearchServerToolOpenRouter$Outbound
|
|
422
|
+
}) | (WebSearchServerToolOpenRouter$Outbound & {
|
|
423
|
+
type: "openrouter:web_search";
|
|
424
|
+
}) | (ApplyPatchServerToolOpenRouter$Outbound & {
|
|
425
|
+
type: "openrouter:apply_patch";
|
|
426
|
+
}) | (BashServerTool$Outbound & {
|
|
301
427
|
type: "openrouter:bash";
|
|
302
|
-
}) | ShellServerToolOpenRouter$Outbound
|
|
428
|
+
}) | (ShellServerToolOpenRouter$Outbound & {
|
|
429
|
+
type: "openrouter:shell";
|
|
430
|
+
})> | undefined;
|
|
303
431
|
top_k?: number | undefined;
|
|
304
432
|
top_logprobs?: number | null | undefined;
|
|
305
433
|
top_p?: number | null | undefined;
|
|
@@ -92,19 +92,19 @@ export function responsesRequestToolFunctionToJSON(responsesRequestToolFunction)
|
|
|
92
92
|
/** @internal */
|
|
93
93
|
export const ResponsesRequestToolUnion$outboundSchema = z.union([
|
|
94
94
|
z.lazy(() => ResponsesRequestToolFunction$outboundSchema),
|
|
95
|
-
PreviewWebSearchServerTool$outboundSchema,
|
|
96
|
-
Preview20250311WebSearchServerTool$outboundSchema,
|
|
97
|
-
LegacyWebSearchServerTool$outboundSchema,
|
|
98
|
-
WebSearchServerTool$outboundSchema,
|
|
99
|
-
FileSearchServerTool$outboundSchema,
|
|
100
|
-
ComputerUseServerTool$outboundSchema,
|
|
101
|
-
CodeInterpreterServerTool$outboundSchema,
|
|
102
|
-
McpServerTool$outboundSchema,
|
|
103
|
-
ImageGenerationServerTool$outboundSchema,
|
|
104
|
-
CodexLocalShellTool$outboundSchema,
|
|
105
|
-
ShellServerTool$outboundSchema,
|
|
106
|
-
ApplyPatchServerTool$outboundSchema,
|
|
107
|
-
CustomTool$outboundSchema,
|
|
95
|
+
PreviewWebSearchServerTool$outboundSchema.and(z.object({ type: z.literal("web_search_preview") })),
|
|
96
|
+
Preview20250311WebSearchServerTool$outboundSchema.and(z.object({ type: z.literal("web_search_preview_2025_03_11") })),
|
|
97
|
+
LegacyWebSearchServerTool$outboundSchema.and(z.object({ type: z.literal("web_search") })),
|
|
98
|
+
WebSearchServerTool$outboundSchema.and(z.object({ type: z.literal("web_search_2025_08_26") })),
|
|
99
|
+
FileSearchServerTool$outboundSchema.and(z.object({ type: z.literal("file_search") })),
|
|
100
|
+
ComputerUseServerTool$outboundSchema.and(z.object({ type: z.literal("computer_use_preview") })),
|
|
101
|
+
CodeInterpreterServerTool$outboundSchema.and(z.object({ type: z.literal("code_interpreter") })),
|
|
102
|
+
McpServerTool$outboundSchema.and(z.object({ type: z.literal("mcp") })),
|
|
103
|
+
ImageGenerationServerTool$outboundSchema.and(z.object({ type: z.literal("image_generation") })),
|
|
104
|
+
CodexLocalShellTool$outboundSchema.and(z.object({ type: z.literal("local_shell") })),
|
|
105
|
+
ShellServerTool$outboundSchema.and(z.object({ type: z.literal("shell") })),
|
|
106
|
+
ApplyPatchServerTool$outboundSchema.and(z.object({ type: z.literal("apply_patch") })),
|
|
107
|
+
CustomTool$outboundSchema.and(z.object({ type: z.literal("custom") })),
|
|
108
108
|
AdvisorServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:advisor") })),
|
|
109
109
|
SubagentServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:subagent") })),
|
|
110
110
|
DatetimeServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:datetime") })),
|
|
@@ -113,10 +113,10 @@ export const ResponsesRequestToolUnion$outboundSchema = z.union([
|
|
|
113
113
|
ImageGenerationServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:image_generation") })),
|
|
114
114
|
ChatSearchModelsServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
|
|
115
115
|
WebFetchServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:web_fetch") })),
|
|
116
|
-
WebSearchServerToolOpenRouter$outboundSchema,
|
|
117
|
-
ApplyPatchServerToolOpenRouter$outboundSchema,
|
|
116
|
+
WebSearchServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:web_search") })),
|
|
117
|
+
ApplyPatchServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:apply_patch") })),
|
|
118
118
|
BashServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:bash") })),
|
|
119
|
-
ShellServerToolOpenRouter$outboundSchema,
|
|
119
|
+
ShellServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:shell") })),
|
|
120
120
|
]);
|
|
121
121
|
export function responsesRequestToolUnionToJSON(responsesRequestToolUnion) {
|
|
122
122
|
return JSON.stringify(ResponsesRequestToolUnion$outboundSchema.parse(responsesRequestToolUnion));
|
|
@@ -168,19 +168,19 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
168
168
|
toolChoice: OpenAIResponsesToolChoiceUnion$outboundSchema.optional(),
|
|
169
169
|
tools: z.array(z.union([
|
|
170
170
|
z.lazy(() => ResponsesRequestToolFunction$outboundSchema),
|
|
171
|
-
PreviewWebSearchServerTool$outboundSchema,
|
|
172
|
-
Preview20250311WebSearchServerTool$outboundSchema,
|
|
173
|
-
LegacyWebSearchServerTool$outboundSchema,
|
|
174
|
-
WebSearchServerTool$outboundSchema,
|
|
175
|
-
FileSearchServerTool$outboundSchema,
|
|
176
|
-
ComputerUseServerTool$outboundSchema,
|
|
177
|
-
CodeInterpreterServerTool$outboundSchema,
|
|
178
|
-
McpServerTool$outboundSchema,
|
|
179
|
-
ImageGenerationServerTool$outboundSchema,
|
|
180
|
-
CodexLocalShellTool$outboundSchema,
|
|
181
|
-
ShellServerTool$outboundSchema,
|
|
182
|
-
ApplyPatchServerTool$outboundSchema,
|
|
183
|
-
CustomTool$outboundSchema,
|
|
171
|
+
PreviewWebSearchServerTool$outboundSchema.and(z.object({ type: z.literal("web_search_preview") })),
|
|
172
|
+
Preview20250311WebSearchServerTool$outboundSchema.and(z.object({ type: z.literal("web_search_preview_2025_03_11") })),
|
|
173
|
+
LegacyWebSearchServerTool$outboundSchema.and(z.object({ type: z.literal("web_search") })),
|
|
174
|
+
WebSearchServerTool$outboundSchema.and(z.object({ type: z.literal("web_search_2025_08_26") })),
|
|
175
|
+
FileSearchServerTool$outboundSchema.and(z.object({ type: z.literal("file_search") })),
|
|
176
|
+
ComputerUseServerTool$outboundSchema.and(z.object({ type: z.literal("computer_use_preview") })),
|
|
177
|
+
CodeInterpreterServerTool$outboundSchema.and(z.object({ type: z.literal("code_interpreter") })),
|
|
178
|
+
McpServerTool$outboundSchema.and(z.object({ type: z.literal("mcp") })),
|
|
179
|
+
ImageGenerationServerTool$outboundSchema.and(z.object({ type: z.literal("image_generation") })),
|
|
180
|
+
CodexLocalShellTool$outboundSchema.and(z.object({ type: z.literal("local_shell") })),
|
|
181
|
+
ShellServerTool$outboundSchema.and(z.object({ type: z.literal("shell") })),
|
|
182
|
+
ApplyPatchServerTool$outboundSchema.and(z.object({ type: z.literal("apply_patch") })),
|
|
183
|
+
CustomTool$outboundSchema.and(z.object({ type: z.literal("custom") })),
|
|
184
184
|
AdvisorServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:advisor") })),
|
|
185
185
|
SubagentServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:subagent") })),
|
|
186
186
|
DatetimeServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:datetime") })),
|
|
@@ -189,10 +189,10 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
189
189
|
ImageGenerationServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:image_generation") })),
|
|
190
190
|
ChatSearchModelsServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
|
|
191
191
|
WebFetchServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:web_fetch") })),
|
|
192
|
-
WebSearchServerToolOpenRouter$outboundSchema,
|
|
193
|
-
ApplyPatchServerToolOpenRouter$outboundSchema,
|
|
192
|
+
WebSearchServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:web_search") })),
|
|
193
|
+
ApplyPatchServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:apply_patch") })),
|
|
194
194
|
BashServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:bash") })),
|
|
195
|
-
ShellServerToolOpenRouter$outboundSchema,
|
|
195
|
+
ShellServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:shell") })),
|
|
196
196
|
])).optional(),
|
|
197
197
|
topK: z.int().optional(),
|
|
198
198
|
topLogprobs: z.nullable(z.int()).optional(),
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const ShellServerToolType: {
|
|
6
|
+
readonly Shell: "shell";
|
|
7
|
+
};
|
|
8
|
+
export type ShellServerToolType = ClosedEnum<typeof ShellServerToolType>;
|
|
4
9
|
/**
|
|
5
10
|
* Shell tool configuration
|
|
6
11
|
*/
|
|
7
12
|
export type ShellServerTool = {
|
|
8
|
-
type:
|
|
13
|
+
type: ShellServerToolType;
|
|
9
14
|
};
|
|
10
15
|
/** @internal */
|
|
16
|
+
export declare const ShellServerToolType$inboundSchema: z.ZodEnum<typeof ShellServerToolType>;
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const ShellServerToolType$outboundSchema: z.ZodEnum<typeof ShellServerToolType>;
|
|
19
|
+
/** @internal */
|
|
11
20
|
export declare const ShellServerTool$inboundSchema: z.ZodType<ShellServerTool, unknown>;
|
|
12
21
|
/** @internal */
|
|
13
22
|
export type ShellServerTool$Outbound = {
|
|
14
|
-
type:
|
|
23
|
+
type: string;
|
|
15
24
|
};
|
|
16
25
|
/** @internal */
|
|
17
26
|
export declare const ShellServerTool$outboundSchema: z.ZodType<ShellServerTool$Outbound, ShellServerTool>;
|
|
@@ -4,13 +4,20 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
export const ShellServerToolType = {
|
|
8
|
+
Shell: "shell",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ShellServerToolType$inboundSchema = z.enum(ShellServerToolType);
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const ShellServerToolType$outboundSchema = ShellServerToolType$inboundSchema;
|
|
7
14
|
/** @internal */
|
|
8
15
|
export const ShellServerTool$inboundSchema = z.object({
|
|
9
|
-
type:
|
|
16
|
+
type: ShellServerToolType$inboundSchema,
|
|
10
17
|
});
|
|
11
18
|
/** @internal */
|
|
12
19
|
export const ShellServerTool$outboundSchema = z.object({
|
|
13
|
-
type:
|
|
20
|
+
type: ShellServerToolType$outboundSchema,
|
|
14
21
|
});
|
|
15
22
|
export function shellServerToolToJSON(shellServerTool) {
|
|
16
23
|
return JSON.stringify(ShellServerTool$outboundSchema.parse(shellServerTool));
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
2
3
|
import { ShellServerToolConfig, ShellServerToolConfig$Outbound } from "./shellservertoolconfig.js";
|
|
4
|
+
export declare const ShellServerToolOpenRouterType: {
|
|
5
|
+
readonly OpenrouterShell: "openrouter:shell";
|
|
6
|
+
};
|
|
7
|
+
export type ShellServerToolOpenRouterType = ClosedEnum<typeof ShellServerToolOpenRouterType>;
|
|
3
8
|
/**
|
|
4
9
|
* OpenRouter built-in server tool: runs shell commands server-side in a sandboxed container (a sandbox-backed clone of OpenAI's hosted shell tool)
|
|
5
10
|
*/
|
|
@@ -8,12 +13,14 @@ export type ShellServerToolOpenRouter = {
|
|
|
8
13
|
* Configuration for the openrouter:shell server tool
|
|
9
14
|
*/
|
|
10
15
|
parameters?: ShellServerToolConfig | undefined;
|
|
11
|
-
type:
|
|
16
|
+
type: ShellServerToolOpenRouterType;
|
|
12
17
|
};
|
|
13
18
|
/** @internal */
|
|
19
|
+
export declare const ShellServerToolOpenRouterType$outboundSchema: z.ZodEnum<typeof ShellServerToolOpenRouterType>;
|
|
20
|
+
/** @internal */
|
|
14
21
|
export type ShellServerToolOpenRouter$Outbound = {
|
|
15
22
|
parameters?: ShellServerToolConfig$Outbound | undefined;
|
|
16
|
-
type:
|
|
23
|
+
type: string;
|
|
17
24
|
};
|
|
18
25
|
/** @internal */
|
|
19
26
|
export declare const ShellServerToolOpenRouter$outboundSchema: z.ZodType<ShellServerToolOpenRouter$Outbound, ShellServerToolOpenRouter>;
|
|
@@ -4,10 +4,15 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { ShellServerToolConfig$outboundSchema, } from "./shellservertoolconfig.js";
|
|
7
|
+
export const ShellServerToolOpenRouterType = {
|
|
8
|
+
OpenrouterShell: "openrouter:shell",
|
|
9
|
+
};
|
|
10
|
+
/** @internal */
|
|
11
|
+
export const ShellServerToolOpenRouterType$outboundSchema = z.enum(ShellServerToolOpenRouterType);
|
|
7
12
|
/** @internal */
|
|
8
13
|
export const ShellServerToolOpenRouter$outboundSchema = z.object({
|
|
9
14
|
parameters: ShellServerToolConfig$outboundSchema.optional(),
|
|
10
|
-
type:
|
|
15
|
+
type: ShellServerToolOpenRouterType$outboundSchema,
|
|
11
16
|
});
|
|
12
17
|
export function shellServerToolOpenRouterToJSON(shellServerToolOpenRouter) {
|
|
13
18
|
return JSON.stringify(ShellServerToolOpenRouter$outboundSchema.parse(shellServerToolOpenRouter));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { OpenEnum } from "../types/enums.js";
|
|
3
|
+
/**
|
|
4
|
+
* The category of feedback being reported
|
|
5
|
+
*/
|
|
6
|
+
export declare const Category: {
|
|
7
|
+
readonly Latency: "latency";
|
|
8
|
+
readonly Incoherence: "incoherence";
|
|
9
|
+
readonly IncorrectResponse: "incorrect_response";
|
|
10
|
+
readonly Formatting: "formatting";
|
|
11
|
+
readonly Billing: "billing";
|
|
12
|
+
readonly ApiError: "api_error";
|
|
13
|
+
readonly Other: "other";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* The category of feedback being reported
|
|
17
|
+
*/
|
|
18
|
+
export type Category = OpenEnum<typeof Category>;
|
|
19
|
+
/**
|
|
20
|
+
* Structured feedback about a specific generation
|
|
21
|
+
*/
|
|
22
|
+
export type SubmitGenerationFeedbackRequest = {
|
|
23
|
+
/**
|
|
24
|
+
* The category of feedback being reported
|
|
25
|
+
*/
|
|
26
|
+
category: Category;
|
|
27
|
+
/**
|
|
28
|
+
* An optional free-text comment describing the feedback
|
|
29
|
+
*/
|
|
30
|
+
comment?: string | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* The generation to submit feedback on
|
|
33
|
+
*/
|
|
34
|
+
generationId: string;
|
|
35
|
+
};
|
|
36
|
+
/** @internal */
|
|
37
|
+
export declare const Category$outboundSchema: z.ZodType<string, Category>;
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type SubmitGenerationFeedbackRequest$Outbound = {
|
|
40
|
+
category: string;
|
|
41
|
+
comment?: string | undefined;
|
|
42
|
+
generation_id: string;
|
|
43
|
+
};
|
|
44
|
+
/** @internal */
|
|
45
|
+
export declare const SubmitGenerationFeedbackRequest$outboundSchema: z.ZodType<SubmitGenerationFeedbackRequest$Outbound, SubmitGenerationFeedbackRequest>;
|
|
46
|
+
export declare function submitGenerationFeedbackRequestToJSON(submitGenerationFeedbackRequest: SubmitGenerationFeedbackRequest): string;
|
|
47
|
+
//# sourceMappingURL=submitgenerationfeedbackrequest.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: c8bd4306e20e
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import * as openEnums from "../types/enums.js";
|
|
8
|
+
/**
|
|
9
|
+
* The category of feedback being reported
|
|
10
|
+
*/
|
|
11
|
+
export const Category = {
|
|
12
|
+
Latency: "latency",
|
|
13
|
+
Incoherence: "incoherence",
|
|
14
|
+
IncorrectResponse: "incorrect_response",
|
|
15
|
+
Formatting: "formatting",
|
|
16
|
+
Billing: "billing",
|
|
17
|
+
ApiError: "api_error",
|
|
18
|
+
Other: "other",
|
|
19
|
+
};
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const Category$outboundSchema = openEnums
|
|
22
|
+
.outboundSchema(Category);
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const SubmitGenerationFeedbackRequest$outboundSchema = z.object({
|
|
25
|
+
category: Category$outboundSchema,
|
|
26
|
+
comment: z.string().optional(),
|
|
27
|
+
generationId: z.string(),
|
|
28
|
+
}).transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
generationId: "generation_id",
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
export function submitGenerationFeedbackRequestToJSON(submitGenerationFeedbackRequest) {
|
|
34
|
+
return JSON.stringify(SubmitGenerationFeedbackRequest$outboundSchema.parse(submitGenerationFeedbackRequest));
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=submitgenerationfeedbackrequest.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type SubmitGenerationFeedbackResponseData = {
|
|
5
|
+
/**
|
|
6
|
+
* Whether the feedback was recorded
|
|
7
|
+
*/
|
|
8
|
+
success: true;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Confirmation that the feedback was recorded
|
|
12
|
+
*/
|
|
13
|
+
export type SubmitGenerationFeedbackResponse = {
|
|
14
|
+
data: SubmitGenerationFeedbackResponseData;
|
|
15
|
+
};
|
|
16
|
+
/** @internal */
|
|
17
|
+
export declare const SubmitGenerationFeedbackResponseData$inboundSchema: z.ZodType<SubmitGenerationFeedbackResponseData, unknown>;
|
|
18
|
+
export declare function submitGenerationFeedbackResponseDataFromJSON(jsonString: string): SafeParseResult<SubmitGenerationFeedbackResponseData, SDKValidationError>;
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const SubmitGenerationFeedbackResponse$inboundSchema: z.ZodType<SubmitGenerationFeedbackResponse, unknown>;
|
|
21
|
+
export declare function submitGenerationFeedbackResponseFromJSON(jsonString: string): SafeParseResult<SubmitGenerationFeedbackResponse, SDKValidationError>;
|
|
22
|
+
//# sourceMappingURL=submitgenerationfeedbackresponse.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 16760a92290d
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
/** @internal */
|
|
8
|
+
export const SubmitGenerationFeedbackResponseData$inboundSchema = z.object({
|
|
9
|
+
success: z.literal(true),
|
|
10
|
+
});
|
|
11
|
+
export function submitGenerationFeedbackResponseDataFromJSON(jsonString) {
|
|
12
|
+
return safeParse(jsonString, (x) => SubmitGenerationFeedbackResponseData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SubmitGenerationFeedbackResponseData' from JSON`);
|
|
13
|
+
}
|
|
14
|
+
/** @internal */
|
|
15
|
+
export const SubmitGenerationFeedbackResponse$inboundSchema = z.object({
|
|
16
|
+
data: z.lazy(() => SubmitGenerationFeedbackResponseData$inboundSchema),
|
|
17
|
+
});
|
|
18
|
+
export function submitGenerationFeedbackResponseFromJSON(jsonString) {
|
|
19
|
+
return safeParse(jsonString, (x) => SubmitGenerationFeedbackResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'SubmitGenerationFeedbackResponse' from JSON`);
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=submitgenerationfeedbackresponse.js.map
|
|
@@ -315,7 +315,7 @@ export type VideoGenerationRequestOptions = {
|
|
|
315
315
|
replicate?: {
|
|
316
316
|
[k: string]: any | null;
|
|
317
317
|
} | undefined;
|
|
318
|
-
|
|
318
|
+
sakana?: {
|
|
319
319
|
[k: string]: any | null;
|
|
320
320
|
} | undefined;
|
|
321
321
|
sambanova?: {
|
|
@@ -745,7 +745,7 @@ export type VideoGenerationRequestOptions$Outbound = {
|
|
|
745
745
|
replicate?: {
|
|
746
746
|
[k: string]: any | null;
|
|
747
747
|
} | undefined;
|
|
748
|
-
|
|
748
|
+
sakana?: {
|
|
749
749
|
[k: string]: any | null;
|
|
750
750
|
} | undefined;
|
|
751
751
|
sambanova?: {
|
|
@@ -133,7 +133,7 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
|
|
|
133
133
|
reka: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
134
134
|
relace: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
135
135
|
replicate: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
136
|
-
|
|
136
|
+
sakana: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
137
137
|
sambanova: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
138
138
|
sambanovaCloaked: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
139
139
|
seed: z.record(z.string(), z.nullable(z.any())).optional(),
|
|
@@ -176,7 +176,6 @@ export const VideoGenerationRequestOptions$outboundSchema = z.object({
|
|
|
176
176
|
mancerOld: "mancer-old",
|
|
177
177
|
nexAgi: "nex-agi",
|
|
178
178
|
openInference: "open-inference",
|
|
179
|
-
sakanaAi: "sakana-ai",
|
|
180
179
|
sambanovaCloaked: "sambanova-cloaked",
|
|
181
180
|
sfCompute: "sf-compute",
|
|
182
181
|
togetherLite: "together-lite",
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
2
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
5
|
import { SearchContextSizeEnum } from "./searchcontextsizeenum.js";
|
|
5
6
|
import { WebSearchDomainFilter, WebSearchDomainFilter$Outbound } from "./websearchdomainfilter.js";
|
|
6
7
|
import { WebSearchEngineEnum } from "./websearchengineenum.js";
|
|
7
8
|
import { WebSearchUserLocation, WebSearchUserLocation$Outbound } from "./websearchuserlocation.js";
|
|
9
|
+
export declare const WebSearchServerToolType: {
|
|
10
|
+
readonly WebSearch20250826: "web_search_2025_08_26";
|
|
11
|
+
};
|
|
12
|
+
export type WebSearchServerToolType = ClosedEnum<typeof WebSearchServerToolType>;
|
|
8
13
|
/**
|
|
9
14
|
* Web search tool configuration (2025-08-26 version)
|
|
10
15
|
*/
|
|
@@ -22,13 +27,17 @@ export type WebSearchServerTool = {
|
|
|
22
27
|
* Size of the search context for web search tools
|
|
23
28
|
*/
|
|
24
29
|
searchContextSize?: SearchContextSizeEnum | undefined;
|
|
25
|
-
type:
|
|
30
|
+
type: WebSearchServerToolType;
|
|
26
31
|
/**
|
|
27
32
|
* User location information for web search
|
|
28
33
|
*/
|
|
29
34
|
userLocation?: WebSearchUserLocation | null | undefined;
|
|
30
35
|
};
|
|
31
36
|
/** @internal */
|
|
37
|
+
export declare const WebSearchServerToolType$inboundSchema: z.ZodEnum<typeof WebSearchServerToolType>;
|
|
38
|
+
/** @internal */
|
|
39
|
+
export declare const WebSearchServerToolType$outboundSchema: z.ZodEnum<typeof WebSearchServerToolType>;
|
|
40
|
+
/** @internal */
|
|
32
41
|
export declare const WebSearchServerTool$inboundSchema: z.ZodType<WebSearchServerTool, unknown>;
|
|
33
42
|
/** @internal */
|
|
34
43
|
export type WebSearchServerTool$Outbound = {
|
|
@@ -36,7 +45,7 @@ export type WebSearchServerTool$Outbound = {
|
|
|
36
45
|
filters?: WebSearchDomainFilter$Outbound | null | undefined;
|
|
37
46
|
max_results?: number | undefined;
|
|
38
47
|
search_context_size?: string | undefined;
|
|
39
|
-
type:
|
|
48
|
+
type: string;
|
|
40
49
|
user_location?: WebSearchUserLocation$Outbound | null | undefined;
|
|
41
50
|
};
|
|
42
51
|
/** @internal */
|
|
@@ -9,13 +9,20 @@ import { SearchContextSizeEnum$inboundSchema, SearchContextSizeEnum$outboundSche
|
|
|
9
9
|
import { WebSearchDomainFilter$inboundSchema, WebSearchDomainFilter$outboundSchema, } from "./websearchdomainfilter.js";
|
|
10
10
|
import { WebSearchEngineEnum$inboundSchema, WebSearchEngineEnum$outboundSchema, } from "./websearchengineenum.js";
|
|
11
11
|
import { WebSearchUserLocation$inboundSchema, WebSearchUserLocation$outboundSchema, } from "./websearchuserlocation.js";
|
|
12
|
+
export const WebSearchServerToolType = {
|
|
13
|
+
WebSearch20250826: "web_search_2025_08_26",
|
|
14
|
+
};
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const WebSearchServerToolType$inboundSchema = z.enum(WebSearchServerToolType);
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const WebSearchServerToolType$outboundSchema = WebSearchServerToolType$inboundSchema;
|
|
12
19
|
/** @internal */
|
|
13
20
|
export const WebSearchServerTool$inboundSchema = z.object({
|
|
14
21
|
engine: WebSearchEngineEnum$inboundSchema.optional(),
|
|
15
22
|
filters: z.nullable(WebSearchDomainFilter$inboundSchema).optional(),
|
|
16
23
|
max_results: z.int().optional(),
|
|
17
24
|
search_context_size: SearchContextSizeEnum$inboundSchema.optional(),
|
|
18
|
-
type:
|
|
25
|
+
type: WebSearchServerToolType$inboundSchema,
|
|
19
26
|
user_location: z.nullable(WebSearchUserLocation$inboundSchema).optional(),
|
|
20
27
|
}).transform((v) => {
|
|
21
28
|
return remap$(v, {
|
|
@@ -30,7 +37,7 @@ export const WebSearchServerTool$outboundSchema = z.object({
|
|
|
30
37
|
filters: z.nullable(WebSearchDomainFilter$outboundSchema).optional(),
|
|
31
38
|
maxResults: z.int().optional(),
|
|
32
39
|
searchContextSize: SearchContextSizeEnum$outboundSchema.optional(),
|
|
33
|
-
type:
|
|
40
|
+
type: WebSearchServerToolType$outboundSchema,
|
|
34
41
|
userLocation: z.nullable(WebSearchUserLocation$outboundSchema).optional(),
|
|
35
42
|
}).transform((v) => {
|
|
36
43
|
return remap$(v, {
|