@openrouter/sdk 0.13.59 → 0.13.60
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/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/additionaltoolsitem.d.ts +7 -7
- package/esm/models/additionaltoolsitem.js +5 -5
- package/esm/models/advisornestedtool.d.ts +3 -3
- package/esm/models/advisornestedtool.js +2 -2
- package/esm/models/agentmessageitem.d.ts +3 -3
- package/esm/models/agentmessageitem.js +3 -3
- package/esm/models/badgatewayresponseerrordata.d.ts +1 -1
- package/esm/models/badgatewayresponseerrordata.js +1 -1
- package/esm/models/badrequestresponseerrordata.d.ts +1 -1
- package/esm/models/badrequestresponseerrordata.js +1 -1
- package/esm/models/baseinputsunion.d.ts +3 -3
- package/esm/models/baseinputsunion.js +0 -3
- package/esm/models/byokproviderslug.d.ts +1 -0
- package/esm/models/byokproviderslug.js +1 -0
- package/esm/models/chatassistantmessage.d.ts +4 -4
- package/esm/models/chatassistantmessage.js +4 -4
- package/esm/models/chatfunctiontool.d.ts +2 -2
- package/esm/models/chatfunctiontool.js +1 -1
- package/esm/models/chatjsonschemaconfig.d.ts +2 -2
- package/esm/models/chatjsonschemaconfig.js +1 -1
- package/esm/models/chatrequest.d.ts +4 -4
- package/esm/models/chatrequest.js +1 -3
- package/esm/models/compactionitem.d.ts +1 -1
- package/esm/models/compactionitem.js +1 -1
- package/esm/models/compoundfilter.d.ts +2 -2
- package/esm/models/compoundfilter.js +2 -2
- package/esm/models/conflictresponseerrordata.d.ts +1 -1
- package/esm/models/conflictresponseerrordata.js +1 -1
- package/esm/models/contextcompactionitem.d.ts +1 -1
- package/esm/models/contextcompactionitem.js +1 -1
- package/esm/models/createobservabilitydestinationrequest.d.ts +2 -2
- package/esm/models/createobservabilitydestinationrequest.js +1 -1
- package/esm/models/debugevent.d.ts +1 -1
- package/esm/models/debugevent.js +1 -1
- package/esm/models/easyinputmessage.d.ts +8 -8
- package/esm/models/easyinputmessage.js +0 -4
- package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +1 -1
- package/esm/models/edgenetworktimeoutresponseerrordata.js +1 -1
- package/esm/models/errors/badgatewayresponseerror.d.ts +2 -2
- package/esm/models/errors/badgatewayresponseerror.js +1 -2
- package/esm/models/errors/badrequestresponseerror.d.ts +2 -2
- package/esm/models/errors/badrequestresponseerror.js +1 -2
- package/esm/models/errors/conflictresponseerror.d.ts +2 -2
- package/esm/models/errors/conflictresponseerror.js +1 -2
- package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +2 -2
- package/esm/models/errors/edgenetworktimeoutresponseerror.js +1 -2
- package/esm/models/errors/forbiddenresponseerror.d.ts +2 -2
- package/esm/models/errors/forbiddenresponseerror.js +1 -2
- package/esm/models/errors/internalserverresponseerror.d.ts +2 -2
- package/esm/models/errors/internalserverresponseerror.js +1 -2
- package/esm/models/errors/notfoundresponseerror.d.ts +2 -2
- package/esm/models/errors/notfoundresponseerror.js +1 -2
- package/esm/models/errors/payloadtoolargeresponseerror.d.ts +2 -2
- package/esm/models/errors/payloadtoolargeresponseerror.js +1 -2
- package/esm/models/errors/paymentrequiredresponseerror.d.ts +2 -2
- package/esm/models/errors/paymentrequiredresponseerror.js +1 -2
- package/esm/models/errors/provideroverloadedresponseerror.d.ts +2 -2
- package/esm/models/errors/provideroverloadedresponseerror.js +1 -2
- package/esm/models/errors/requesttimeoutresponseerror.d.ts +2 -2
- package/esm/models/errors/requesttimeoutresponseerror.js +1 -2
- package/esm/models/errors/serviceunavailableresponseerror.d.ts +2 -2
- package/esm/models/errors/serviceunavailableresponseerror.js +1 -2
- package/esm/models/errors/toomanyrequestsresponseerror.d.ts +2 -2
- package/esm/models/errors/toomanyrequestsresponseerror.js +1 -2
- package/esm/models/errors/unauthorizedresponseerror.d.ts +2 -2
- package/esm/models/errors/unauthorizedresponseerror.js +1 -2
- package/esm/models/errors/unprocessableentityresponseerror.d.ts +2 -2
- package/esm/models/errors/unprocessableentityresponseerror.js +1 -2
- package/esm/models/filesearchservertool.d.ts +4 -4
- package/esm/models/filesearchservertool.js +1 -8
- package/esm/models/forbiddenresponseerrordata.d.ts +1 -1
- package/esm/models/forbiddenresponseerrordata.js +1 -1
- package/esm/models/formatjsonschemaconfig.d.ts +2 -2
- package/esm/models/formatjsonschemaconfig.js +2 -2
- package/esm/models/functioncalloutputitem.d.ts +2 -9
- package/esm/models/functioncalloutputitem.js +2 -8
- package/esm/models/fusionplugin.d.ts +28 -2
- package/esm/models/fusionplugin.js +28 -1
- package/esm/models/fusionservertoolconfig.d.ts +2 -2
- package/esm/models/fusionservertoolconfig.js +1 -1
- package/esm/models/generationcontentdata.d.ts +1 -1
- package/esm/models/generationcontentdata.js +1 -1
- package/esm/models/imageconfig.d.ts +2 -2
- package/esm/models/imageconfig.js +1 -1
- package/esm/models/imagegenerationproviderpreferences.d.ts +256 -250
- package/esm/models/imagegenerationproviderpreferences.js +126 -133
- package/esm/models/imagegenerationservertoolconfigunion.d.ts +2 -2
- package/esm/models/imagegenerationservertoolconfigunion.js +1 -1
- package/esm/models/index.d.ts +0 -2
- package/esm/models/index.js +0 -2
- package/esm/models/inputsunion.d.ts +8 -8
- package/esm/models/inputsunion.js +0 -4
- package/esm/models/internalserverresponseerrordata.d.ts +1 -1
- package/esm/models/internalserverresponseerrordata.js +1 -1
- package/esm/models/listendpointsresponse.d.ts +2 -33
- package/esm/models/listendpointsresponse.js +2 -30
- package/esm/models/localshellcalloutputitem.d.ts +3 -10
- package/esm/models/localshellcalloutputitem.js +2 -9
- package/esm/models/mcplisttoolsitem.d.ts +4 -4
- package/esm/models/mcplisttoolsitem.js +2 -2
- package/esm/models/mcpservertool.d.ts +8 -8
- package/esm/models/mcpservertool.js +4 -24
- package/esm/models/messagesadvisortoolresultblock.d.ts +2 -2
- package/esm/models/messagesadvisortoolresultblock.js +1 -1
- package/esm/models/messagesfallbackparam.d.ts +1 -1
- package/esm/models/messagesfallbackparam.js +1 -1
- package/esm/models/messagesmessageparam.d.ts +4 -4
- package/esm/models/messagesmessageparam.js +2 -2
- package/esm/models/messagesoutputconfig.d.ts +2 -2
- package/esm/models/messagesoutputconfig.js +1 -1
- package/esm/models/messagesrequest.d.ts +10 -32
- package/esm/models/messagesrequest.js +7 -21
- package/esm/models/namespacefunctiontool.d.ts +4 -4
- package/esm/models/namespacefunctiontool.js +4 -6
- package/esm/models/notfoundresponseerrordata.d.ts +1 -1
- package/esm/models/notfoundresponseerrordata.js +1 -1
- package/esm/models/openairesponsefunctiontoolcalloutput.d.ts +3 -10
- package/esm/models/openairesponsefunctiontoolcalloutput.js +2 -11
- package/esm/models/openresponsesresult.d.ts +46 -2
- package/esm/models/openresponsesresult.js +69 -3
- package/esm/models/operations/listbyokkeys.d.ts +1 -0
- package/esm/models/operations/listbyokkeys.js +1 -0
- package/esm/models/outputcomputercallitem.d.ts +2 -2
- package/esm/models/outputcomputercallitem.js +2 -2
- package/esm/models/outputmemoryservertoolitem.d.ts +2 -2
- package/esm/models/outputmemoryservertoolitem.js +2 -2
- package/esm/models/outputmessage.d.ts +2 -2
- package/esm/models/outputmessage.js +0 -2
- package/esm/models/outputmessageitem.d.ts +2 -2
- package/esm/models/outputmessageitem.js +0 -2
- package/esm/models/payloadtoolargeresponseerrordata.d.ts +1 -1
- package/esm/models/payloadtoolargeresponseerrordata.js +1 -1
- package/esm/models/paymentrequiredresponseerrordata.d.ts +1 -1
- package/esm/models/paymentrequiredresponseerrordata.js +1 -1
- package/esm/models/pipelinestage.d.ts +1 -1
- package/esm/models/pipelinestage.js +1 -1
- package/esm/models/preferredmaxlatency.d.ts +2 -2
- package/esm/models/preferredmaxlatency.js +1 -1
- package/esm/models/preferredminthroughput.d.ts +2 -2
- package/esm/models/preferredminthroughput.js +1 -1
- package/esm/models/presetdesignatedversion.d.ts +1 -1
- package/esm/models/presetdesignatedversion.js +1 -1
- package/esm/models/providername.d.ts +2 -1
- package/esm/models/providername.js +2 -1
- package/esm/models/provideroptions.d.ts +252 -246
- package/esm/models/provideroptions.js +124 -123
- package/esm/models/provideroverloadedresponseerrordata.d.ts +1 -1
- package/esm/models/provideroverloadedresponseerrordata.js +1 -1
- package/esm/models/providerpreferences.d.ts +4 -4
- package/esm/models/providerpreferences.js +2 -10
- package/esm/models/providerresponse.d.ts +2 -1
- package/esm/models/providerresponse.js +2 -1
- package/esm/models/publicendpoint.d.ts +2 -16
- package/esm/models/publicendpoint.js +2 -15
- package/esm/models/quantization.d.ts +2 -0
- package/esm/models/quantization.js +2 -0
- package/esm/models/requesttimeoutresponseerrordata.d.ts +1 -1
- package/esm/models/requesttimeoutresponseerrordata.js +1 -1
- package/esm/models/responsesrequest.d.ts +34 -5
- package/esm/models/responsesrequest.js +24 -4
- package/esm/models/routerparams.d.ts +1 -1
- package/esm/models/serviceunavailableresponseerrordata.d.ts +1 -1
- package/esm/models/serviceunavailableresponseerrordata.js +1 -1
- package/esm/models/shellcallitem.d.ts +5 -12
- package/esm/models/shellcallitem.js +3 -10
- package/esm/models/shellcalloutputitem.d.ts +4 -11
- package/esm/models/shellcalloutputitem.js +3 -10
- package/esm/models/subagentnestedtool.d.ts +3 -3
- package/esm/models/subagentnestedtool.js +2 -2
- package/esm/models/toolchoiceallowed.d.ts +2 -2
- package/esm/models/toolchoiceallowed.js +2 -2
- package/esm/models/toomanyrequestsresponseerrordata.d.ts +1 -1
- package/esm/models/toomanyrequestsresponseerrordata.js +1 -1
- package/esm/models/traceconfig.d.ts +1 -1
- package/esm/models/traceconfig.js +1 -1
- package/esm/models/unauthorizedresponseerrordata.d.ts +1 -1
- package/esm/models/unauthorizedresponseerrordata.js +1 -1
- package/esm/models/unprocessableentityresponseerrordata.d.ts +1 -1
- package/esm/models/unprocessableentityresponseerrordata.js +1 -1
- package/esm/models/updateobservabilitydestinationrequest.d.ts +2 -2
- package/esm/models/updateobservabilitydestinationrequest.js +1 -1
- package/esm/models/videogenerationrequest.d.ts +252 -246
- package/esm/models/videogenerationrequest.js +124 -123
- package/jsr.json +1 -1
- package/package.json +7 -7
- package/esm/models/reasoningconfig.d.ts +0 -35
- package/esm/models/reasoningconfig.js +0 -27
- package/esm/models/usage.d.ts +0 -52
- package/esm/models/usage.js +0 -75
|
@@ -9,9 +9,9 @@ export const McpListToolsItemType = {
|
|
|
9
9
|
};
|
|
10
10
|
/** @internal */
|
|
11
11
|
export const McpListToolsItemTool$outboundSchema = z.object({
|
|
12
|
-
annotations: z.
|
|
12
|
+
annotations: z.any().optional(),
|
|
13
13
|
description: z.nullable(z.string()).optional(),
|
|
14
|
-
inputSchema: z.record(z.string(), z.
|
|
14
|
+
inputSchema: z.record(z.string(), z.any()),
|
|
15
15
|
name: z.string(),
|
|
16
16
|
}).transform((v) => {
|
|
17
17
|
return remap$(v, {
|
|
@@ -6,7 +6,7 @@ export type AllowedTools = {
|
|
|
6
6
|
readOnly?: boolean | undefined;
|
|
7
7
|
toolNames?: Array<string> | undefined;
|
|
8
8
|
};
|
|
9
|
-
export type AllowedToolsUnion = Array<string> | AllowedTools
|
|
9
|
+
export type AllowedToolsUnion = Array<string> | AllowedTools;
|
|
10
10
|
export declare const ConnectorId: {
|
|
11
11
|
readonly ConnectorDropbox: "connector_dropbox";
|
|
12
12
|
readonly ConnectorGmail: "connector_gmail";
|
|
@@ -36,7 +36,7 @@ export type RequireApproval = {
|
|
|
36
36
|
always?: Always | undefined;
|
|
37
37
|
never?: Never | undefined;
|
|
38
38
|
};
|
|
39
|
-
export type RequireApprovalUnion = RequireApproval | RequireApprovalAlways | RequireApprovalNever
|
|
39
|
+
export type RequireApprovalUnion = RequireApproval | RequireApprovalAlways | RequireApprovalNever;
|
|
40
40
|
export declare const McpServerToolType: {
|
|
41
41
|
readonly Mcp: "mcp";
|
|
42
42
|
};
|
|
@@ -45,13 +45,13 @@ export type McpServerToolType = ClosedEnum<typeof McpServerToolType>;
|
|
|
45
45
|
* MCP (Model Context Protocol) tool configuration
|
|
46
46
|
*/
|
|
47
47
|
export type McpServerTool = {
|
|
48
|
-
allowedTools?: Array<string> | AllowedTools |
|
|
48
|
+
allowedTools?: Array<string> | AllowedTools | null | undefined;
|
|
49
49
|
authorization?: string | undefined;
|
|
50
50
|
connectorId?: ConnectorId | undefined;
|
|
51
51
|
headers?: {
|
|
52
52
|
[k: string]: string;
|
|
53
53
|
} | null | undefined;
|
|
54
|
-
requireApproval?: RequireApproval | RequireApprovalAlways | RequireApprovalNever |
|
|
54
|
+
requireApproval?: RequireApproval | RequireApprovalAlways | RequireApprovalNever | null | undefined;
|
|
55
55
|
serverDescription?: string | undefined;
|
|
56
56
|
serverLabel: string;
|
|
57
57
|
serverUrl?: string | undefined;
|
|
@@ -71,7 +71,7 @@ export declare function allowedToolsFromJSON(jsonString: string): SafeParseResul
|
|
|
71
71
|
/** @internal */
|
|
72
72
|
export declare const AllowedToolsUnion$inboundSchema: z.ZodType<AllowedToolsUnion, unknown>;
|
|
73
73
|
/** @internal */
|
|
74
|
-
export type AllowedToolsUnion$Outbound = Array<string> | AllowedTools$Outbound
|
|
74
|
+
export type AllowedToolsUnion$Outbound = Array<string> | AllowedTools$Outbound;
|
|
75
75
|
/** @internal */
|
|
76
76
|
export declare const AllowedToolsUnion$outboundSchema: z.ZodType<AllowedToolsUnion$Outbound, AllowedToolsUnion>;
|
|
77
77
|
export declare function allowedToolsUnionToJSON(allowedToolsUnion: AllowedToolsUnion): string;
|
|
@@ -122,7 +122,7 @@ export declare function requireApprovalFromJSON(jsonString: string): SafeParseRe
|
|
|
122
122
|
/** @internal */
|
|
123
123
|
export declare const RequireApprovalUnion$inboundSchema: z.ZodType<RequireApprovalUnion, unknown>;
|
|
124
124
|
/** @internal */
|
|
125
|
-
export type RequireApprovalUnion$Outbound = RequireApproval$Outbound | string | string
|
|
125
|
+
export type RequireApprovalUnion$Outbound = RequireApproval$Outbound | string | string;
|
|
126
126
|
/** @internal */
|
|
127
127
|
export declare const RequireApprovalUnion$outboundSchema: z.ZodType<RequireApprovalUnion$Outbound, RequireApprovalUnion>;
|
|
128
128
|
export declare function requireApprovalUnionToJSON(requireApprovalUnion: RequireApprovalUnion): string;
|
|
@@ -135,13 +135,13 @@ export declare const McpServerToolType$outboundSchema: z.ZodEnum<typeof McpServe
|
|
|
135
135
|
export declare const McpServerTool$inboundSchema: z.ZodType<McpServerTool, unknown>;
|
|
136
136
|
/** @internal */
|
|
137
137
|
export type McpServerTool$Outbound = {
|
|
138
|
-
allowed_tools?: Array<string> | AllowedTools$Outbound |
|
|
138
|
+
allowed_tools?: Array<string> | AllowedTools$Outbound | null | undefined;
|
|
139
139
|
authorization?: string | undefined;
|
|
140
140
|
connector_id?: string | undefined;
|
|
141
141
|
headers?: {
|
|
142
142
|
[k: string]: string;
|
|
143
143
|
} | null | undefined;
|
|
144
|
-
require_approval?: RequireApproval$Outbound | string | string |
|
|
144
|
+
require_approval?: RequireApproval$Outbound | string | string | null | undefined;
|
|
145
145
|
server_description?: string | undefined;
|
|
146
146
|
server_label: string;
|
|
147
147
|
server_url?: string | undefined;
|
|
@@ -53,17 +53,9 @@ export function allowedToolsFromJSON(jsonString) {
|
|
|
53
53
|
return safeParse(jsonString, (x) => AllowedTools$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AllowedTools' from JSON`);
|
|
54
54
|
}
|
|
55
55
|
/** @internal */
|
|
56
|
-
export const AllowedToolsUnion$inboundSchema = z.union([
|
|
57
|
-
z.array(z.string()),
|
|
58
|
-
z.lazy(() => AllowedTools$inboundSchema),
|
|
59
|
-
z.any(),
|
|
60
|
-
]);
|
|
56
|
+
export const AllowedToolsUnion$inboundSchema = z.union([z.array(z.string()), z.lazy(() => AllowedTools$inboundSchema)]);
|
|
61
57
|
/** @internal */
|
|
62
|
-
export const AllowedToolsUnion$outboundSchema = z.union([
|
|
63
|
-
z.array(z.string()),
|
|
64
|
-
z.lazy(() => AllowedTools$outboundSchema),
|
|
65
|
-
z.any(),
|
|
66
|
-
]);
|
|
58
|
+
export const AllowedToolsUnion$outboundSchema = z.union([z.array(z.string()), z.lazy(() => AllowedTools$outboundSchema)]);
|
|
67
59
|
export function allowedToolsUnionToJSON(allowedToolsUnion) {
|
|
68
60
|
return JSON.stringify(AllowedToolsUnion$outboundSchema.parse(allowedToolsUnion));
|
|
69
61
|
}
|
|
@@ -148,14 +140,12 @@ export const RequireApprovalUnion$inboundSchema = z.union([
|
|
|
148
140
|
z.lazy(() => RequireApproval$inboundSchema),
|
|
149
141
|
RequireApprovalAlways$inboundSchema,
|
|
150
142
|
RequireApprovalNever$inboundSchema,
|
|
151
|
-
z.any(),
|
|
152
143
|
]);
|
|
153
144
|
/** @internal */
|
|
154
145
|
export const RequireApprovalUnion$outboundSchema = z.union([
|
|
155
146
|
z.lazy(() => RequireApproval$outboundSchema),
|
|
156
147
|
RequireApprovalAlways$outboundSchema,
|
|
157
148
|
RequireApprovalNever$outboundSchema,
|
|
158
|
-
z.any(),
|
|
159
149
|
]);
|
|
160
150
|
export function requireApprovalUnionToJSON(requireApprovalUnion) {
|
|
161
151
|
return JSON.stringify(RequireApprovalUnion$outboundSchema.parse(requireApprovalUnion));
|
|
@@ -170,11 +160,7 @@ export const McpServerToolType$outboundSchema = McpServerToolType$inboundSchema;
|
|
|
170
160
|
/** @internal */
|
|
171
161
|
export const McpServerTool$inboundSchema = z
|
|
172
162
|
.object({
|
|
173
|
-
allowed_tools: z.nullable(z.union([
|
|
174
|
-
z.array(z.string()),
|
|
175
|
-
z.lazy(() => AllowedTools$inboundSchema),
|
|
176
|
-
z.any(),
|
|
177
|
-
])).optional(),
|
|
163
|
+
allowed_tools: z.nullable(z.union([z.array(z.string()), z.lazy(() => AllowedTools$inboundSchema)])).optional(),
|
|
178
164
|
authorization: z.string().optional(),
|
|
179
165
|
connector_id: ConnectorId$inboundSchema.optional(),
|
|
180
166
|
headers: z.nullable(z.record(z.string(), z.string())).optional(),
|
|
@@ -182,7 +168,6 @@ export const McpServerTool$inboundSchema = z
|
|
|
182
168
|
z.lazy(() => RequireApproval$inboundSchema),
|
|
183
169
|
RequireApprovalAlways$inboundSchema,
|
|
184
170
|
RequireApprovalNever$inboundSchema,
|
|
185
|
-
z.any(),
|
|
186
171
|
])).optional(),
|
|
187
172
|
server_description: z.string().optional(),
|
|
188
173
|
server_label: z.string(),
|
|
@@ -200,11 +185,7 @@ export const McpServerTool$inboundSchema = z
|
|
|
200
185
|
});
|
|
201
186
|
/** @internal */
|
|
202
187
|
export const McpServerTool$outboundSchema = z.object({
|
|
203
|
-
allowedTools: z.nullable(z.union([
|
|
204
|
-
z.array(z.string()),
|
|
205
|
-
z.lazy(() => AllowedTools$outboundSchema),
|
|
206
|
-
z.any(),
|
|
207
|
-
])).optional(),
|
|
188
|
+
allowedTools: z.nullable(z.union([z.array(z.string()), z.lazy(() => AllowedTools$outboundSchema)])).optional(),
|
|
208
189
|
authorization: z.string().optional(),
|
|
209
190
|
connectorId: ConnectorId$outboundSchema.optional(),
|
|
210
191
|
headers: z.nullable(z.record(z.string(), z.string())).optional(),
|
|
@@ -212,7 +193,6 @@ export const McpServerTool$outboundSchema = z.object({
|
|
|
212
193
|
z.lazy(() => RequireApproval$outboundSchema),
|
|
213
194
|
RequireApprovalAlways$outboundSchema,
|
|
214
195
|
RequireApprovalNever$outboundSchema,
|
|
215
|
-
z.any(),
|
|
216
196
|
])).optional(),
|
|
217
197
|
serverDescription: z.string().optional(),
|
|
218
198
|
serverLabel: z.string(),
|
|
@@ -4,7 +4,7 @@ import * as z from "zod/v4";
|
|
|
4
4
|
*/
|
|
5
5
|
export type MessagesAdvisorToolResultBlock = {
|
|
6
6
|
content: {
|
|
7
|
-
[k: string]: any
|
|
7
|
+
[k: string]: any;
|
|
8
8
|
};
|
|
9
9
|
toolUseId: string;
|
|
10
10
|
type: "advisor_tool_result";
|
|
@@ -12,7 +12,7 @@ export type MessagesAdvisorToolResultBlock = {
|
|
|
12
12
|
/** @internal */
|
|
13
13
|
export type MessagesAdvisorToolResultBlock$Outbound = {
|
|
14
14
|
content: {
|
|
15
|
-
[k: string]: any
|
|
15
|
+
[k: string]: any;
|
|
16
16
|
};
|
|
17
17
|
tool_use_id: string;
|
|
18
18
|
type: "advisor_tool_result";
|
|
@@ -6,7 +6,7 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const MessagesAdvisorToolResultBlock$outboundSchema = z.object({
|
|
9
|
-
content: z.record(z.string(), z.
|
|
9
|
+
content: z.record(z.string(), z.any()),
|
|
10
10
|
toolUseId: z.string(),
|
|
11
11
|
type: z.literal("advisor_tool_result"),
|
|
12
12
|
}).transform((v) => {
|
|
@@ -7,7 +7,7 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const MessagesFallbackParam$outboundSchema = z.object({
|
|
9
9
|
model: z.string(),
|
|
10
|
-
additionalProperties: z.record(z.string(), z.
|
|
10
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
11
11
|
}).transform((v) => {
|
|
12
12
|
return {
|
|
13
13
|
...v.additionalProperties,
|
|
@@ -47,7 +47,7 @@ export type ContentServerToolUse = {
|
|
|
47
47
|
*/
|
|
48
48
|
cacheControl?: AnthropicCacheControlDirective | undefined;
|
|
49
49
|
id: string;
|
|
50
|
-
input?: any |
|
|
50
|
+
input?: any | undefined;
|
|
51
51
|
name: string;
|
|
52
52
|
type: "server_tool_use";
|
|
53
53
|
};
|
|
@@ -82,7 +82,7 @@ export type ContentToolUse = {
|
|
|
82
82
|
*/
|
|
83
83
|
cacheControl?: AnthropicCacheControlDirective | undefined;
|
|
84
84
|
id: string;
|
|
85
|
-
input?: any |
|
|
85
|
+
input?: any | undefined;
|
|
86
86
|
name: string;
|
|
87
87
|
type: "tool_use";
|
|
88
88
|
};
|
|
@@ -141,7 +141,7 @@ export declare function contentWebSearchToolResultToJSON(contentWebSearchToolRes
|
|
|
141
141
|
export type ContentServerToolUse$Outbound = {
|
|
142
142
|
cache_control?: AnthropicCacheControlDirective$Outbound | undefined;
|
|
143
143
|
id: string;
|
|
144
|
-
input?: any |
|
|
144
|
+
input?: any | undefined;
|
|
145
145
|
name: string;
|
|
146
146
|
type: "server_tool_use";
|
|
147
147
|
};
|
|
@@ -198,7 +198,7 @@ export declare function contentToolResultToJSON(contentToolResult: ContentToolRe
|
|
|
198
198
|
export type ContentToolUse$Outbound = {
|
|
199
199
|
cache_control?: AnthropicCacheControlDirective$Outbound | undefined;
|
|
200
200
|
id: string;
|
|
201
|
-
input?: any |
|
|
201
|
+
input?: any | undefined;
|
|
202
202
|
name: string;
|
|
203
203
|
type: "tool_use";
|
|
204
204
|
};
|
|
@@ -87,7 +87,7 @@ export function contentWebSearchToolResultToJSON(contentWebSearchToolResult) {
|
|
|
87
87
|
export const ContentServerToolUse$outboundSchema = z.object({
|
|
88
88
|
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
89
89
|
id: z.string(),
|
|
90
|
-
input: z.
|
|
90
|
+
input: z.any().optional(),
|
|
91
91
|
name: z.string(),
|
|
92
92
|
type: z.literal("server_tool_use"),
|
|
93
93
|
}).transform((v) => {
|
|
@@ -182,7 +182,7 @@ export function contentToolResultToJSON(contentToolResult) {
|
|
|
182
182
|
export const ContentToolUse$outboundSchema = z.object({
|
|
183
183
|
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
184
184
|
id: z.string(),
|
|
185
|
-
input: z.
|
|
185
|
+
input: z.any().optional(),
|
|
186
186
|
name: z.string(),
|
|
187
187
|
type: z.literal("tool_use"),
|
|
188
188
|
}).transform((v) => {
|
|
@@ -23,7 +23,7 @@ export type MessagesOutputConfigTypeJSONSchema = ClosedEnum<typeof MessagesOutpu
|
|
|
23
23
|
*/
|
|
24
24
|
export type MessagesOutputConfigFormat = {
|
|
25
25
|
schema: {
|
|
26
|
-
[k: string]: any
|
|
26
|
+
[k: string]: any;
|
|
27
27
|
};
|
|
28
28
|
type: MessagesOutputConfigTypeJSONSchema;
|
|
29
29
|
};
|
|
@@ -63,7 +63,7 @@ export declare const MessagesOutputConfigTypeJSONSchema$outboundSchema: z.ZodEnu
|
|
|
63
63
|
/** @internal */
|
|
64
64
|
export type MessagesOutputConfigFormat$Outbound = {
|
|
65
65
|
schema: {
|
|
66
|
-
[k: string]: any
|
|
66
|
+
[k: string]: any;
|
|
67
67
|
};
|
|
68
68
|
type: string;
|
|
69
69
|
};
|
|
@@ -27,7 +27,7 @@ export const MessagesOutputConfigEffort$outboundSchema = openEnums.outboundSchem
|
|
|
27
27
|
export const MessagesOutputConfigTypeJSONSchema$outboundSchema = z.enum(MessagesOutputConfigTypeJSONSchema);
|
|
28
28
|
/** @internal */
|
|
29
29
|
export const MessagesOutputConfigFormat$outboundSchema = z.object({
|
|
30
|
-
schema: z.record(z.string(), z.
|
|
30
|
+
schema: z.record(z.string(), z.any()),
|
|
31
31
|
type: MessagesOutputConfigTypeJSONSchema$outboundSchema,
|
|
32
32
|
});
|
|
33
33
|
export function messagesOutputConfigFormatToJSON(messagesOutputConfigFormat) {
|
|
@@ -2,7 +2,6 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { AnthropicAllowedCallers } from "./anthropicallowedcallers.js";
|
|
4
4
|
import { AnthropicCacheControlDirective, AnthropicCacheControlDirective$Outbound } from "./anthropiccachecontroldirective.js";
|
|
5
|
-
import { AnthropicCacheControlTtl } from "./anthropiccachecontrolttl.js";
|
|
6
5
|
import { AnthropicInputTokensClearAtLeast, AnthropicInputTokensClearAtLeast$Outbound } from "./anthropicinputtokensclearatleast.js";
|
|
7
6
|
import { AnthropicInputTokensTrigger, AnthropicInputTokensTrigger$Outbound } from "./anthropicinputtokenstrigger.js";
|
|
8
7
|
import { AnthropicTextBlockParam, AnthropicTextBlockParam$Outbound } from "./anthropictextblockparam.js";
|
|
@@ -62,11 +61,11 @@ export type EditClearThinking20251015 = {
|
|
|
62
61
|
keep?: AnthropicThinkingTurns | KeepAll | KeepEnum | undefined;
|
|
63
62
|
type: "clear_thinking_20251015";
|
|
64
63
|
};
|
|
65
|
-
export type ClearToolInputs = boolean | Array<string
|
|
64
|
+
export type ClearToolInputs = boolean | Array<string>;
|
|
66
65
|
export type Trigger = AnthropicInputTokensTrigger | AnthropicToolUsesTrigger;
|
|
67
66
|
export type EditClearToolUses20250919 = {
|
|
68
67
|
clearAtLeast?: AnthropicInputTokensClearAtLeast | null | undefined;
|
|
69
|
-
clearToolInputs?: boolean | Array<string> |
|
|
68
|
+
clearToolInputs?: boolean | Array<string> | null | undefined;
|
|
70
69
|
excludeTools?: Array<string> | null | undefined;
|
|
71
70
|
keep?: AnthropicToolUsesKeep | undefined;
|
|
72
71
|
trigger?: AnthropicInputTokensTrigger | AnthropicToolUsesTrigger | undefined;
|
|
@@ -125,20 +124,9 @@ export type ToolChoice = ToolChoiceAuto | ToolChoiceAny | ToolChoiceNone | ToolC
|
|
|
125
124
|
export type MessagesRequestTool = {
|
|
126
125
|
type: string;
|
|
127
126
|
additionalProperties?: {
|
|
128
|
-
[k: string]: any
|
|
127
|
+
[k: string]: any;
|
|
129
128
|
} | undefined;
|
|
130
129
|
};
|
|
131
|
-
export declare const ToolTypeEphemeral: {
|
|
132
|
-
readonly Ephemeral: "ephemeral";
|
|
133
|
-
};
|
|
134
|
-
export type ToolTypeEphemeral = ClosedEnum<typeof ToolTypeEphemeral>;
|
|
135
|
-
/**
|
|
136
|
-
* Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
|
|
137
|
-
*/
|
|
138
|
-
export type Caching = {
|
|
139
|
-
ttl?: AnthropicCacheControlTtl | undefined;
|
|
140
|
-
type: ToolTypeEphemeral;
|
|
141
|
-
};
|
|
142
130
|
export declare const NameAdvisor: {
|
|
143
131
|
readonly Advisor: "advisor";
|
|
144
132
|
};
|
|
@@ -153,7 +141,7 @@ export type ToolAdvisor20260301 = {
|
|
|
153
141
|
* Enable automatic prompt caching. When set at the top level, the system automatically applies cache breakpoints to the last cacheable block in the request. When set on an individual content block, it marks an explicit cache breakpoint; block-level markers also work on OpenAI models that support explicit prompt caching — OpenRouter converts them to the provider's native format.
|
|
154
142
|
*/
|
|
155
143
|
cacheControl?: AnthropicCacheControlDirective | undefined;
|
|
156
|
-
caching?:
|
|
144
|
+
caching?: AnthropicCacheControlDirective | null | undefined;
|
|
157
145
|
deferLoading?: boolean | undefined;
|
|
158
146
|
maxUses?: number | undefined;
|
|
159
147
|
model: string;
|
|
@@ -234,11 +222,11 @@ export type ToolBash20250124 = {
|
|
|
234
222
|
type: TypeBash20250124;
|
|
235
223
|
};
|
|
236
224
|
export type InputSchema = {
|
|
237
|
-
properties?: any |
|
|
225
|
+
properties?: any | undefined;
|
|
238
226
|
required?: Array<string> | null | undefined;
|
|
239
227
|
type?: string | undefined;
|
|
240
228
|
additionalProperties?: {
|
|
241
|
-
[k: string]: any
|
|
229
|
+
[k: string]: any;
|
|
242
230
|
} | undefined;
|
|
243
231
|
};
|
|
244
232
|
export declare const ToolTypeCustom: {
|
|
@@ -359,7 +347,7 @@ export type EditClearThinking20251015$Outbound = {
|
|
|
359
347
|
export declare const EditClearThinking20251015$outboundSchema: z.ZodType<EditClearThinking20251015$Outbound, EditClearThinking20251015>;
|
|
360
348
|
export declare function editClearThinking20251015ToJSON(editClearThinking20251015: EditClearThinking20251015): string;
|
|
361
349
|
/** @internal */
|
|
362
|
-
export type ClearToolInputs$Outbound = boolean | Array<string
|
|
350
|
+
export type ClearToolInputs$Outbound = boolean | Array<string>;
|
|
363
351
|
/** @internal */
|
|
364
352
|
export declare const ClearToolInputs$outboundSchema: z.ZodType<ClearToolInputs$Outbound, ClearToolInputs>;
|
|
365
353
|
export declare function clearToolInputsToJSON(clearToolInputs: ClearToolInputs): string;
|
|
@@ -371,7 +359,7 @@ export declare function triggerToJSON(trigger: Trigger): string;
|
|
|
371
359
|
/** @internal */
|
|
372
360
|
export type EditClearToolUses20250919$Outbound = {
|
|
373
361
|
clear_at_least?: AnthropicInputTokensClearAtLeast$Outbound | null | undefined;
|
|
374
|
-
clear_tool_inputs?: boolean | Array<string> |
|
|
362
|
+
clear_tool_inputs?: boolean | Array<string> | null | undefined;
|
|
375
363
|
exclude_tools?: Array<string> | null | undefined;
|
|
376
364
|
keep?: AnthropicToolUsesKeep$Outbound | undefined;
|
|
377
365
|
trigger?: AnthropicInputTokensTrigger$Outbound | AnthropicToolUsesTrigger$Outbound | undefined;
|
|
@@ -486,16 +474,6 @@ export type MessagesRequestTool$Outbound = {
|
|
|
486
474
|
export declare const MessagesRequestTool$outboundSchema: z.ZodType<MessagesRequestTool$Outbound, MessagesRequestTool>;
|
|
487
475
|
export declare function messagesRequestToolToJSON(messagesRequestTool: MessagesRequestTool): string;
|
|
488
476
|
/** @internal */
|
|
489
|
-
export declare const ToolTypeEphemeral$outboundSchema: z.ZodEnum<typeof ToolTypeEphemeral>;
|
|
490
|
-
/** @internal */
|
|
491
|
-
export type Caching$Outbound = {
|
|
492
|
-
ttl?: string | undefined;
|
|
493
|
-
type: string;
|
|
494
|
-
};
|
|
495
|
-
/** @internal */
|
|
496
|
-
export declare const Caching$outboundSchema: z.ZodType<Caching$Outbound, Caching>;
|
|
497
|
-
export declare function cachingToJSON(caching: Caching): string;
|
|
498
|
-
/** @internal */
|
|
499
477
|
export declare const NameAdvisor$outboundSchema: z.ZodEnum<typeof NameAdvisor>;
|
|
500
478
|
/** @internal */
|
|
501
479
|
export declare const TypeAdvisor20260301$outboundSchema: z.ZodEnum<typeof TypeAdvisor20260301>;
|
|
@@ -503,7 +481,7 @@ export declare const TypeAdvisor20260301$outboundSchema: z.ZodEnum<typeof TypeAd
|
|
|
503
481
|
export type ToolAdvisor20260301$Outbound = {
|
|
504
482
|
allowed_callers?: Array<string> | undefined;
|
|
505
483
|
cache_control?: AnthropicCacheControlDirective$Outbound | undefined;
|
|
506
|
-
caching?:
|
|
484
|
+
caching?: AnthropicCacheControlDirective$Outbound | null | undefined;
|
|
507
485
|
defer_loading?: boolean | undefined;
|
|
508
486
|
max_uses?: number | undefined;
|
|
509
487
|
model: string;
|
|
@@ -576,7 +554,7 @@ export declare const ToolBash20250124$outboundSchema: z.ZodType<ToolBash20250124
|
|
|
576
554
|
export declare function toolBash20250124ToJSON(toolBash20250124: ToolBash20250124): string;
|
|
577
555
|
/** @internal */
|
|
578
556
|
export type InputSchema$Outbound = {
|
|
579
|
-
properties?: any |
|
|
557
|
+
properties?: any | undefined;
|
|
580
558
|
required?: Array<string> | null | undefined;
|
|
581
559
|
type: string;
|
|
582
560
|
[additionalProperties: string]: unknown;
|
|
@@ -7,7 +7,6 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
8
|
import { AnthropicAllowedCallers$outboundSchema, } from "./anthropicallowedcallers.js";
|
|
9
9
|
import { AnthropicCacheControlDirective$outboundSchema, } from "./anthropiccachecontroldirective.js";
|
|
10
|
-
import { AnthropicCacheControlTtl$outboundSchema, } from "./anthropiccachecontrolttl.js";
|
|
11
10
|
import { AnthropicInputTokensClearAtLeast$outboundSchema, } from "./anthropicinputtokensclearatleast.js";
|
|
12
11
|
import { AnthropicInputTokensTrigger$outboundSchema, } from "./anthropicinputtokenstrigger.js";
|
|
13
12
|
import { AnthropicTextBlockParam$outboundSchema, } from "./anthropictextblockparam.js";
|
|
@@ -53,9 +52,6 @@ export const Speed = {
|
|
|
53
52
|
Fast: "fast",
|
|
54
53
|
Standard: "standard",
|
|
55
54
|
};
|
|
56
|
-
export const ToolTypeEphemeral = {
|
|
57
|
-
Ephemeral: "ephemeral",
|
|
58
|
-
};
|
|
59
55
|
export const NameAdvisor = {
|
|
60
56
|
Advisor: "advisor",
|
|
61
57
|
};
|
|
@@ -148,7 +144,7 @@ export function editClearThinking20251015ToJSON(editClearThinking20251015) {
|
|
|
148
144
|
return JSON.stringify(EditClearThinking20251015$outboundSchema.parse(editClearThinking20251015));
|
|
149
145
|
}
|
|
150
146
|
/** @internal */
|
|
151
|
-
export const ClearToolInputs$outboundSchema = z.union([z.boolean(), z.array(z.string())
|
|
147
|
+
export const ClearToolInputs$outboundSchema = z.union([z.boolean(), z.array(z.string())]);
|
|
152
148
|
export function clearToolInputsToJSON(clearToolInputs) {
|
|
153
149
|
return JSON.stringify(ClearToolInputs$outboundSchema.parse(clearToolInputs));
|
|
154
150
|
}
|
|
@@ -165,7 +161,8 @@ export function triggerToJSON(trigger) {
|
|
|
165
161
|
export const EditClearToolUses20250919$outboundSchema = z.object({
|
|
166
162
|
clearAtLeast: z.nullable(AnthropicInputTokensClearAtLeast$outboundSchema)
|
|
167
163
|
.optional(),
|
|
168
|
-
clearToolInputs: z.nullable(z.union([z.boolean(), z.array(z.string())
|
|
164
|
+
clearToolInputs: z.nullable(z.union([z.boolean(), z.array(z.string())]))
|
|
165
|
+
.optional(),
|
|
169
166
|
excludeTools: z.nullable(z.array(z.string())).optional(),
|
|
170
167
|
keep: AnthropicToolUsesKeep$outboundSchema.optional(),
|
|
171
168
|
trigger: z.union([
|
|
@@ -333,7 +330,7 @@ export function toolChoiceToJSON(toolChoice) {
|
|
|
333
330
|
/** @internal */
|
|
334
331
|
export const MessagesRequestTool$outboundSchema = z.object({
|
|
335
332
|
type: z.string(),
|
|
336
|
-
additionalProperties: z.record(z.string(), z.
|
|
333
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
337
334
|
}).transform((v) => {
|
|
338
335
|
return {
|
|
339
336
|
...v.additionalProperties,
|
|
@@ -346,17 +343,6 @@ export function messagesRequestToolToJSON(messagesRequestTool) {
|
|
|
346
343
|
return JSON.stringify(MessagesRequestTool$outboundSchema.parse(messagesRequestTool));
|
|
347
344
|
}
|
|
348
345
|
/** @internal */
|
|
349
|
-
export const ToolTypeEphemeral$outboundSchema = z.enum(ToolTypeEphemeral);
|
|
350
|
-
/** @internal */
|
|
351
|
-
export const Caching$outboundSchema = z
|
|
352
|
-
.object({
|
|
353
|
-
ttl: AnthropicCacheControlTtl$outboundSchema.optional(),
|
|
354
|
-
type: ToolTypeEphemeral$outboundSchema,
|
|
355
|
-
});
|
|
356
|
-
export function cachingToJSON(caching) {
|
|
357
|
-
return JSON.stringify(Caching$outboundSchema.parse(caching));
|
|
358
|
-
}
|
|
359
|
-
/** @internal */
|
|
360
346
|
export const NameAdvisor$outboundSchema = z.enum(NameAdvisor);
|
|
361
347
|
/** @internal */
|
|
362
348
|
export const TypeAdvisor20260301$outboundSchema = z.enum(TypeAdvisor20260301);
|
|
@@ -364,7 +350,7 @@ export const TypeAdvisor20260301$outboundSchema = z.enum(TypeAdvisor20260301);
|
|
|
364
350
|
export const ToolAdvisor20260301$outboundSchema = z.object({
|
|
365
351
|
allowedCallers: z.array(AnthropicAllowedCallers$outboundSchema).optional(),
|
|
366
352
|
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
367
|
-
caching: z.nullable(
|
|
353
|
+
caching: z.nullable(AnthropicCacheControlDirective$outboundSchema).optional(),
|
|
368
354
|
deferLoading: z.boolean().optional(),
|
|
369
355
|
maxUses: z.int().optional(),
|
|
370
356
|
model: z.string(),
|
|
@@ -473,10 +459,10 @@ export function toolBash20250124ToJSON(toolBash20250124) {
|
|
|
473
459
|
}
|
|
474
460
|
/** @internal */
|
|
475
461
|
export const InputSchema$outboundSchema = z.object({
|
|
476
|
-
properties: z.
|
|
462
|
+
properties: z.any().optional(),
|
|
477
463
|
required: z.nullable(z.array(z.string())).optional(),
|
|
478
464
|
type: z.string().default("object"),
|
|
479
|
-
additionalProperties: z.record(z.string(), z.
|
|
465
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
480
466
|
}).transform((v) => {
|
|
481
467
|
return {
|
|
482
468
|
...v.additionalProperties,
|
|
@@ -16,10 +16,10 @@ export type NamespaceFunctionTool = {
|
|
|
16
16
|
description?: string | null | undefined;
|
|
17
17
|
name: string;
|
|
18
18
|
outputSchema?: {
|
|
19
|
-
[k: string]: any
|
|
19
|
+
[k: string]: any;
|
|
20
20
|
} | null | undefined;
|
|
21
21
|
parameters?: {
|
|
22
|
-
[k: string]: any
|
|
22
|
+
[k: string]: any;
|
|
23
23
|
} | null | undefined;
|
|
24
24
|
strict?: boolean | null | undefined;
|
|
25
25
|
type: "function";
|
|
@@ -37,10 +37,10 @@ export type NamespaceFunctionTool$Outbound = {
|
|
|
37
37
|
description?: string | null | undefined;
|
|
38
38
|
name: string;
|
|
39
39
|
output_schema?: {
|
|
40
|
-
[k: string]: any
|
|
40
|
+
[k: string]: any;
|
|
41
41
|
} | null | undefined;
|
|
42
42
|
parameters?: {
|
|
43
|
-
[k: string]: any
|
|
43
|
+
[k: string]: any;
|
|
44
44
|
} | null | undefined;
|
|
45
45
|
strict?: boolean | null | undefined;
|
|
46
46
|
type: "function";
|
|
@@ -20,9 +20,8 @@ export const NamespaceFunctionTool$inboundSchema = z.object({
|
|
|
20
20
|
defer_loading: z.boolean().optional(),
|
|
21
21
|
description: z.nullable(z.string()).optional(),
|
|
22
22
|
name: z.string(),
|
|
23
|
-
output_schema: z.nullable(z.record(z.string(), z.
|
|
24
|
-
|
|
25
|
-
parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
23
|
+
output_schema: z.nullable(z.record(z.string(), z.any())).optional(),
|
|
24
|
+
parameters: z.nullable(z.record(z.string(), z.any())).optional(),
|
|
26
25
|
strict: z.nullable(z.boolean()).optional(),
|
|
27
26
|
type: z.literal("function"),
|
|
28
27
|
}).transform((v) => {
|
|
@@ -38,9 +37,8 @@ export const NamespaceFunctionTool$outboundSchema = z.object({
|
|
|
38
37
|
deferLoading: z.boolean().optional(),
|
|
39
38
|
description: z.nullable(z.string()).optional(),
|
|
40
39
|
name: z.string(),
|
|
41
|
-
outputSchema: z.nullable(z.record(z.string(), z.
|
|
42
|
-
|
|
43
|
-
parameters: z.nullable(z.record(z.string(), z.nullable(z.any()))).optional(),
|
|
40
|
+
outputSchema: z.nullable(z.record(z.string(), z.any())).optional(),
|
|
41
|
+
parameters: z.nullable(z.record(z.string(), z.any())).optional(),
|
|
44
42
|
strict: z.nullable(z.boolean()).optional(),
|
|
45
43
|
type: z.literal("function"),
|
|
46
44
|
}).transform((v) => {
|
|
@@ -8,7 +8,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
export const NotFoundResponseErrorData$inboundSchema = z.object({
|
|
9
9
|
code: z.int(),
|
|
10
10
|
message: z.string(),
|
|
11
|
-
metadata: z.nullable(z.record(z.string(), z.
|
|
11
|
+
metadata: z.nullable(z.record(z.string(), z.any())).optional(),
|
|
12
12
|
});
|
|
13
13
|
export function notFoundResponseErrorDataFromJSON(jsonString) {
|
|
14
14
|
return safeParse(jsonString, (x) => NotFoundResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'NotFoundResponseErrorData' from JSON`);
|
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
|
-
import { ClosedEnum
|
|
3
|
+
import { ClosedEnum } from "../types/enums.js";
|
|
4
4
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
5
5
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
6
6
|
import { InputFile } from "./inputfile.js";
|
|
7
7
|
import { InputImage } from "./inputimage.js";
|
|
8
8
|
import { InputText } from "./inputtext.js";
|
|
9
|
+
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
9
10
|
export type OpenAIResponseFunctionToolCallOutputOutput1 = InputFile | (InputImage & {
|
|
10
11
|
type: "input_image";
|
|
11
12
|
}) | InputText | discriminatedUnionTypes.Unknown<"type">;
|
|
12
13
|
export type OpenAIResponseFunctionToolCallOutputOutput2 = string | Array<InputFile | (InputImage & {
|
|
13
14
|
type: "input_image";
|
|
14
15
|
}) | InputText | discriminatedUnionTypes.Unknown<"type">>;
|
|
15
|
-
export declare const OpenAIResponseFunctionToolCallOutputStatus: {
|
|
16
|
-
readonly InProgress: "in_progress";
|
|
17
|
-
readonly Completed: "completed";
|
|
18
|
-
readonly Incomplete: "incomplete";
|
|
19
|
-
};
|
|
20
|
-
export type OpenAIResponseFunctionToolCallOutputStatus = OpenEnum<typeof OpenAIResponseFunctionToolCallOutputStatus>;
|
|
21
16
|
export declare const OpenAIResponseFunctionToolCallOutputType: {
|
|
22
17
|
readonly FunctionCallOutput: "function_call_output";
|
|
23
18
|
};
|
|
@@ -28,7 +23,7 @@ export type OpenAIResponseFunctionToolCallOutput = {
|
|
|
28
23
|
output: string | Array<InputFile | (InputImage & {
|
|
29
24
|
type: "input_image";
|
|
30
25
|
}) | InputText | discriminatedUnionTypes.Unknown<"type">>;
|
|
31
|
-
status?:
|
|
26
|
+
status?: ToolCallStatus | null | undefined;
|
|
32
27
|
type: OpenAIResponseFunctionToolCallOutputType;
|
|
33
28
|
};
|
|
34
29
|
/** @internal */
|
|
@@ -38,8 +33,6 @@ export declare function openAIResponseFunctionToolCallOutputOutput1FromJSON(json
|
|
|
38
33
|
export declare const OpenAIResponseFunctionToolCallOutputOutput2$inboundSchema: z.ZodType<OpenAIResponseFunctionToolCallOutputOutput2, unknown>;
|
|
39
34
|
export declare function openAIResponseFunctionToolCallOutputOutput2FromJSON(jsonString: string): SafeParseResult<OpenAIResponseFunctionToolCallOutputOutput2, SDKValidationError>;
|
|
40
35
|
/** @internal */
|
|
41
|
-
export declare const OpenAIResponseFunctionToolCallOutputStatus$inboundSchema: z.ZodType<OpenAIResponseFunctionToolCallOutputStatus, unknown>;
|
|
42
|
-
/** @internal */
|
|
43
36
|
export declare const OpenAIResponseFunctionToolCallOutputType$inboundSchema: z.ZodEnum<typeof OpenAIResponseFunctionToolCallOutputType>;
|
|
44
37
|
/** @internal */
|
|
45
38
|
export declare const OpenAIResponseFunctionToolCallOutput$inboundSchema: z.ZodType<OpenAIResponseFunctionToolCallOutput, unknown>;
|
|
@@ -6,15 +6,10 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
9
|
-
import * as openEnums from "../types/enums.js";
|
|
10
9
|
import { InputFile$inboundSchema } from "./inputfile.js";
|
|
11
10
|
import { InputImage$inboundSchema } from "./inputimage.js";
|
|
12
11
|
import { InputText$inboundSchema } from "./inputtext.js";
|
|
13
|
-
|
|
14
|
-
InProgress: "in_progress",
|
|
15
|
-
Completed: "completed",
|
|
16
|
-
Incomplete: "incomplete",
|
|
17
|
-
};
|
|
12
|
+
import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
|
|
18
13
|
export const OpenAIResponseFunctionToolCallOutputType = {
|
|
19
14
|
FunctionCallOutput: "function_call_output",
|
|
20
15
|
};
|
|
@@ -40,9 +35,6 @@ export function openAIResponseFunctionToolCallOutputOutput2FromJSON(jsonString)
|
|
|
40
35
|
return safeParse(jsonString, (x) => OpenAIResponseFunctionToolCallOutputOutput2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OpenAIResponseFunctionToolCallOutputOutput2' from JSON`);
|
|
41
36
|
}
|
|
42
37
|
/** @internal */
|
|
43
|
-
export const OpenAIResponseFunctionToolCallOutputStatus$inboundSchema = openEnums
|
|
44
|
-
.inboundSchema(OpenAIResponseFunctionToolCallOutputStatus);
|
|
45
|
-
/** @internal */
|
|
46
38
|
export const OpenAIResponseFunctionToolCallOutputType$inboundSchema = z.enum(OpenAIResponseFunctionToolCallOutputType);
|
|
47
39
|
/** @internal */
|
|
48
40
|
export const OpenAIResponseFunctionToolCallOutput$inboundSchema = z.object({
|
|
@@ -56,8 +48,7 @@ export const OpenAIResponseFunctionToolCallOutput$inboundSchema = z.object({
|
|
|
56
48
|
input_text: InputText$inboundSchema,
|
|
57
49
|
})),
|
|
58
50
|
]),
|
|
59
|
-
status: z.nullable(
|
|
60
|
-
.optional(),
|
|
51
|
+
status: z.nullable(ToolCallStatus$inboundSchema).optional(),
|
|
61
52
|
type: OpenAIResponseFunctionToolCallOutputType$inboundSchema,
|
|
62
53
|
}).transform((v) => {
|
|
63
54
|
return remap$(v, {
|