@openrouter/sdk 0.13.59 → 0.13.61
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/autobetarouterplugin.d.ts +27 -0
- package/esm/models/autobetarouterplugin.js +22 -0
- 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 +9 -8
- package/esm/models/chatrequest.js +4 -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 +1 -2
- package/esm/models/index.js +1 -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 +15 -36
- package/esm/models/messagesrequest.js +10 -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 +39 -9
- package/esm/models/responsesrequest.js +27 -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 +6 -6
- 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
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
2
|
import { ClosedEnum } from "../types/enums.js";
|
|
3
3
|
export type McpListToolsItemTool = {
|
|
4
|
-
annotations?: any |
|
|
4
|
+
annotations?: any | undefined;
|
|
5
5
|
description?: string | null | undefined;
|
|
6
6
|
inputSchema: {
|
|
7
|
-
[k: string]: any
|
|
7
|
+
[k: string]: any;
|
|
8
8
|
};
|
|
9
9
|
name: string;
|
|
10
10
|
};
|
|
@@ -24,10 +24,10 @@ export type McpListToolsItem = {
|
|
|
24
24
|
};
|
|
25
25
|
/** @internal */
|
|
26
26
|
export type McpListToolsItemTool$Outbound = {
|
|
27
|
-
annotations?: any |
|
|
27
|
+
annotations?: any | undefined;
|
|
28
28
|
description?: string | null | undefined;
|
|
29
29
|
input_schema: {
|
|
30
|
-
[k: string]: any
|
|
30
|
+
[k: string]: any;
|
|
31
31
|
};
|
|
32
32
|
name: string;
|
|
33
33
|
};
|
|
@@ -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";
|
|
@@ -11,6 +10,7 @@ import { AnthropicThinkingTurns, AnthropicThinkingTurns$Outbound } from "./anthr
|
|
|
11
10
|
import { AnthropicToolUsesKeep, AnthropicToolUsesKeep$Outbound } from "./anthropictooluseskeep.js";
|
|
12
11
|
import { AnthropicToolUsesTrigger, AnthropicToolUsesTrigger$Outbound } from "./anthropictoolusestrigger.js";
|
|
13
12
|
import { AnthropicWebSearchToolUserLocation, AnthropicWebSearchToolUserLocation$Outbound } from "./anthropicwebsearchtooluserlocation.js";
|
|
13
|
+
import { AutoBetaRouterPlugin, AutoBetaRouterPlugin$Outbound } from "./autobetarouterplugin.js";
|
|
14
14
|
import { AutoRouterPlugin, AutoRouterPlugin$Outbound } from "./autorouterplugin.js";
|
|
15
15
|
import { BashServerTool, BashServerTool$Outbound } from "./bashservertool.js";
|
|
16
16
|
import { ContextCompressionPlugin, ContextCompressionPlugin$Outbound } from "./contextcompressionplugin.js";
|
|
@@ -62,11 +62,11 @@ export type EditClearThinking20251015 = {
|
|
|
62
62
|
keep?: AnthropicThinkingTurns | KeepAll | KeepEnum | undefined;
|
|
63
63
|
type: "clear_thinking_20251015";
|
|
64
64
|
};
|
|
65
|
-
export type ClearToolInputs = boolean | Array<string
|
|
65
|
+
export type ClearToolInputs = boolean | Array<string>;
|
|
66
66
|
export type Trigger = AnthropicInputTokensTrigger | AnthropicToolUsesTrigger;
|
|
67
67
|
export type EditClearToolUses20250919 = {
|
|
68
68
|
clearAtLeast?: AnthropicInputTokensClearAtLeast | null | undefined;
|
|
69
|
-
clearToolInputs?: boolean | Array<string> |
|
|
69
|
+
clearToolInputs?: boolean | Array<string> | null | undefined;
|
|
70
70
|
excludeTools?: Array<string> | null | undefined;
|
|
71
71
|
keep?: AnthropicToolUsesKeep | undefined;
|
|
72
72
|
trigger?: AnthropicInputTokensTrigger | AnthropicToolUsesTrigger | undefined;
|
|
@@ -79,7 +79,7 @@ export type ContextManagement = {
|
|
|
79
79
|
export type MessagesRequestMetadata = {
|
|
80
80
|
userId?: string | null | undefined;
|
|
81
81
|
};
|
|
82
|
-
export type MessagesRequestPlugin = AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
82
|
+
export type MessagesRequestPlugin = AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin;
|
|
83
83
|
/**
|
|
84
84
|
* Controls output generation speed. When set to `fast`, uses a higher-speed inference configuration at premium pricing. Defaults to `standard` when omitted.
|
|
85
85
|
*/
|
|
@@ -125,20 +125,9 @@ export type ToolChoice = ToolChoiceAuto | ToolChoiceAny | ToolChoiceNone | ToolC
|
|
|
125
125
|
export type MessagesRequestTool = {
|
|
126
126
|
type: string;
|
|
127
127
|
additionalProperties?: {
|
|
128
|
-
[k: string]: any
|
|
128
|
+
[k: string]: any;
|
|
129
129
|
} | undefined;
|
|
130
130
|
};
|
|
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
131
|
export declare const NameAdvisor: {
|
|
143
132
|
readonly Advisor: "advisor";
|
|
144
133
|
};
|
|
@@ -153,7 +142,7 @@ export type ToolAdvisor20260301 = {
|
|
|
153
142
|
* 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
143
|
*/
|
|
155
144
|
cacheControl?: AnthropicCacheControlDirective | undefined;
|
|
156
|
-
caching?:
|
|
145
|
+
caching?: AnthropicCacheControlDirective | null | undefined;
|
|
157
146
|
deferLoading?: boolean | undefined;
|
|
158
147
|
maxUses?: number | undefined;
|
|
159
148
|
model: string;
|
|
@@ -234,11 +223,11 @@ export type ToolBash20250124 = {
|
|
|
234
223
|
type: TypeBash20250124;
|
|
235
224
|
};
|
|
236
225
|
export type InputSchema = {
|
|
237
|
-
properties?: any |
|
|
226
|
+
properties?: any | undefined;
|
|
238
227
|
required?: Array<string> | null | undefined;
|
|
239
228
|
type?: string | undefined;
|
|
240
229
|
additionalProperties?: {
|
|
241
|
-
[k: string]: any
|
|
230
|
+
[k: string]: any;
|
|
242
231
|
} | undefined;
|
|
243
232
|
};
|
|
244
233
|
export declare const ToolTypeCustom: {
|
|
@@ -281,7 +270,7 @@ export type MessagesRequest = {
|
|
|
281
270
|
/**
|
|
282
271
|
* Plugins you want to enable for this request, including their settings.
|
|
283
272
|
*/
|
|
284
|
-
plugins?: Array<AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
273
|
+
plugins?: Array<AutoBetaRouterPlugin | AutoRouterPlugin | ContextCompressionPlugin | FileParserPlugin | FusionPlugin | ModerationPlugin | ParetoRouterPlugin | ResponseHealingPlugin | WebSearchPlugin | WebFetchPlugin> | undefined;
|
|
285
274
|
/**
|
|
286
275
|
* When multiple model providers are available, optionally indicate your routing preference.
|
|
287
276
|
*/
|
|
@@ -359,7 +348,7 @@ export type EditClearThinking20251015$Outbound = {
|
|
|
359
348
|
export declare const EditClearThinking20251015$outboundSchema: z.ZodType<EditClearThinking20251015$Outbound, EditClearThinking20251015>;
|
|
360
349
|
export declare function editClearThinking20251015ToJSON(editClearThinking20251015: EditClearThinking20251015): string;
|
|
361
350
|
/** @internal */
|
|
362
|
-
export type ClearToolInputs$Outbound = boolean | Array<string
|
|
351
|
+
export type ClearToolInputs$Outbound = boolean | Array<string>;
|
|
363
352
|
/** @internal */
|
|
364
353
|
export declare const ClearToolInputs$outboundSchema: z.ZodType<ClearToolInputs$Outbound, ClearToolInputs>;
|
|
365
354
|
export declare function clearToolInputsToJSON(clearToolInputs: ClearToolInputs): string;
|
|
@@ -371,7 +360,7 @@ export declare function triggerToJSON(trigger: Trigger): string;
|
|
|
371
360
|
/** @internal */
|
|
372
361
|
export type EditClearToolUses20250919$Outbound = {
|
|
373
362
|
clear_at_least?: AnthropicInputTokensClearAtLeast$Outbound | null | undefined;
|
|
374
|
-
clear_tool_inputs?: boolean | Array<string> |
|
|
363
|
+
clear_tool_inputs?: boolean | Array<string> | null | undefined;
|
|
375
364
|
exclude_tools?: Array<string> | null | undefined;
|
|
376
365
|
keep?: AnthropicToolUsesKeep$Outbound | undefined;
|
|
377
366
|
trigger?: AnthropicInputTokensTrigger$Outbound | AnthropicToolUsesTrigger$Outbound | undefined;
|
|
@@ -400,7 +389,7 @@ export type MessagesRequestMetadata$Outbound = {
|
|
|
400
389
|
export declare const MessagesRequestMetadata$outboundSchema: z.ZodType<MessagesRequestMetadata$Outbound, MessagesRequestMetadata>;
|
|
401
390
|
export declare function messagesRequestMetadataToJSON(messagesRequestMetadata: MessagesRequestMetadata): string;
|
|
402
391
|
/** @internal */
|
|
403
|
-
export type MessagesRequestPlugin$Outbound = AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
392
|
+
export type MessagesRequestPlugin$Outbound = AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound;
|
|
404
393
|
/** @internal */
|
|
405
394
|
export declare const MessagesRequestPlugin$outboundSchema: z.ZodType<MessagesRequestPlugin$Outbound, MessagesRequestPlugin>;
|
|
406
395
|
export declare function messagesRequestPluginToJSON(messagesRequestPlugin: MessagesRequestPlugin): string;
|
|
@@ -486,16 +475,6 @@ export type MessagesRequestTool$Outbound = {
|
|
|
486
475
|
export declare const MessagesRequestTool$outboundSchema: z.ZodType<MessagesRequestTool$Outbound, MessagesRequestTool>;
|
|
487
476
|
export declare function messagesRequestToolToJSON(messagesRequestTool: MessagesRequestTool): string;
|
|
488
477
|
/** @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
478
|
export declare const NameAdvisor$outboundSchema: z.ZodEnum<typeof NameAdvisor>;
|
|
500
479
|
/** @internal */
|
|
501
480
|
export declare const TypeAdvisor20260301$outboundSchema: z.ZodEnum<typeof TypeAdvisor20260301>;
|
|
@@ -503,7 +482,7 @@ export declare const TypeAdvisor20260301$outboundSchema: z.ZodEnum<typeof TypeAd
|
|
|
503
482
|
export type ToolAdvisor20260301$Outbound = {
|
|
504
483
|
allowed_callers?: Array<string> | undefined;
|
|
505
484
|
cache_control?: AnthropicCacheControlDirective$Outbound | undefined;
|
|
506
|
-
caching?:
|
|
485
|
+
caching?: AnthropicCacheControlDirective$Outbound | null | undefined;
|
|
507
486
|
defer_loading?: boolean | undefined;
|
|
508
487
|
max_uses?: number | undefined;
|
|
509
488
|
model: string;
|
|
@@ -576,7 +555,7 @@ export declare const ToolBash20250124$outboundSchema: z.ZodType<ToolBash20250124
|
|
|
576
555
|
export declare function toolBash20250124ToJSON(toolBash20250124: ToolBash20250124): string;
|
|
577
556
|
/** @internal */
|
|
578
557
|
export type InputSchema$Outbound = {
|
|
579
|
-
properties?: any |
|
|
558
|
+
properties?: any | undefined;
|
|
580
559
|
required?: Array<string> | null | undefined;
|
|
581
560
|
type: string;
|
|
582
561
|
[additionalProperties: string]: unknown;
|
|
@@ -613,7 +592,7 @@ export type MessagesRequest$Outbound = {
|
|
|
613
592
|
model: string;
|
|
614
593
|
models?: Array<string> | undefined;
|
|
615
594
|
output_config?: MessagesOutputConfig$Outbound | undefined;
|
|
616
|
-
plugins?: Array<AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
595
|
+
plugins?: Array<AutoBetaRouterPlugin$Outbound | AutoRouterPlugin$Outbound | ContextCompressionPlugin$Outbound | FileParserPlugin$Outbound | FusionPlugin$Outbound | ModerationPlugin$Outbound | ParetoRouterPlugin$Outbound | ResponseHealingPlugin$Outbound | WebSearchPlugin$Outbound | WebFetchPlugin$Outbound> | undefined;
|
|
617
596
|
provider?: ProviderPreferences$Outbound | null | undefined;
|
|
618
597
|
service_tier?: string | undefined;
|
|
619
598
|
session_id?: string | undefined;
|
|
@@ -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";
|
|
@@ -16,6 +15,7 @@ import { AnthropicThinkingTurns$outboundSchema, } from "./anthropicthinkingturns
|
|
|
16
15
|
import { AnthropicToolUsesKeep$outboundSchema, } from "./anthropictooluseskeep.js";
|
|
17
16
|
import { AnthropicToolUsesTrigger$outboundSchema, } from "./anthropictoolusestrigger.js";
|
|
18
17
|
import { AnthropicWebSearchToolUserLocation$outboundSchema, } from "./anthropicwebsearchtooluserlocation.js";
|
|
18
|
+
import { AutoBetaRouterPlugin$outboundSchema, } from "./autobetarouterplugin.js";
|
|
19
19
|
import { AutoRouterPlugin$outboundSchema, } from "./autorouterplugin.js";
|
|
20
20
|
import { BashServerTool$outboundSchema, } from "./bashservertool.js";
|
|
21
21
|
import { ContextCompressionPlugin$outboundSchema, } from "./contextcompressionplugin.js";
|
|
@@ -53,9 +53,6 @@ export const Speed = {
|
|
|
53
53
|
Fast: "fast",
|
|
54
54
|
Standard: "standard",
|
|
55
55
|
};
|
|
56
|
-
export const ToolTypeEphemeral = {
|
|
57
|
-
Ephemeral: "ephemeral",
|
|
58
|
-
};
|
|
59
56
|
export const NameAdvisor = {
|
|
60
57
|
Advisor: "advisor",
|
|
61
58
|
};
|
|
@@ -148,7 +145,7 @@ export function editClearThinking20251015ToJSON(editClearThinking20251015) {
|
|
|
148
145
|
return JSON.stringify(EditClearThinking20251015$outboundSchema.parse(editClearThinking20251015));
|
|
149
146
|
}
|
|
150
147
|
/** @internal */
|
|
151
|
-
export const ClearToolInputs$outboundSchema = z.union([z.boolean(), z.array(z.string())
|
|
148
|
+
export const ClearToolInputs$outboundSchema = z.union([z.boolean(), z.array(z.string())]);
|
|
152
149
|
export function clearToolInputsToJSON(clearToolInputs) {
|
|
153
150
|
return JSON.stringify(ClearToolInputs$outboundSchema.parse(clearToolInputs));
|
|
154
151
|
}
|
|
@@ -165,7 +162,8 @@ export function triggerToJSON(trigger) {
|
|
|
165
162
|
export const EditClearToolUses20250919$outboundSchema = z.object({
|
|
166
163
|
clearAtLeast: z.nullable(AnthropicInputTokensClearAtLeast$outboundSchema)
|
|
167
164
|
.optional(),
|
|
168
|
-
clearToolInputs: z.nullable(z.union([z.boolean(), z.array(z.string())
|
|
165
|
+
clearToolInputs: z.nullable(z.union([z.boolean(), z.array(z.string())]))
|
|
166
|
+
.optional(),
|
|
169
167
|
excludeTools: z.nullable(z.array(z.string())).optional(),
|
|
170
168
|
keep: AnthropicToolUsesKeep$outboundSchema.optional(),
|
|
171
169
|
trigger: z.union([
|
|
@@ -216,6 +214,7 @@ export function messagesRequestMetadataToJSON(messagesRequestMetadata) {
|
|
|
216
214
|
}
|
|
217
215
|
/** @internal */
|
|
218
216
|
export const MessagesRequestPlugin$outboundSchema = z.union([
|
|
217
|
+
AutoBetaRouterPlugin$outboundSchema,
|
|
219
218
|
AutoRouterPlugin$outboundSchema,
|
|
220
219
|
ContextCompressionPlugin$outboundSchema,
|
|
221
220
|
FileParserPlugin$outboundSchema,
|
|
@@ -333,7 +332,7 @@ export function toolChoiceToJSON(toolChoice) {
|
|
|
333
332
|
/** @internal */
|
|
334
333
|
export const MessagesRequestTool$outboundSchema = z.object({
|
|
335
334
|
type: z.string(),
|
|
336
|
-
additionalProperties: z.record(z.string(), z.
|
|
335
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
337
336
|
}).transform((v) => {
|
|
338
337
|
return {
|
|
339
338
|
...v.additionalProperties,
|
|
@@ -346,17 +345,6 @@ export function messagesRequestToolToJSON(messagesRequestTool) {
|
|
|
346
345
|
return JSON.stringify(MessagesRequestTool$outboundSchema.parse(messagesRequestTool));
|
|
347
346
|
}
|
|
348
347
|
/** @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
348
|
export const NameAdvisor$outboundSchema = z.enum(NameAdvisor);
|
|
361
349
|
/** @internal */
|
|
362
350
|
export const TypeAdvisor20260301$outboundSchema = z.enum(TypeAdvisor20260301);
|
|
@@ -364,7 +352,7 @@ export const TypeAdvisor20260301$outboundSchema = z.enum(TypeAdvisor20260301);
|
|
|
364
352
|
export const ToolAdvisor20260301$outboundSchema = z.object({
|
|
365
353
|
allowedCallers: z.array(AnthropicAllowedCallers$outboundSchema).optional(),
|
|
366
354
|
cacheControl: AnthropicCacheControlDirective$outboundSchema.optional(),
|
|
367
|
-
caching: z.nullable(
|
|
355
|
+
caching: z.nullable(AnthropicCacheControlDirective$outboundSchema).optional(),
|
|
368
356
|
deferLoading: z.boolean().optional(),
|
|
369
357
|
maxUses: z.int().optional(),
|
|
370
358
|
model: z.string(),
|
|
@@ -473,10 +461,10 @@ export function toolBash20250124ToJSON(toolBash20250124) {
|
|
|
473
461
|
}
|
|
474
462
|
/** @internal */
|
|
475
463
|
export const InputSchema$outboundSchema = z.object({
|
|
476
|
-
properties: z.
|
|
464
|
+
properties: z.any().optional(),
|
|
477
465
|
required: z.nullable(z.array(z.string())).optional(),
|
|
478
466
|
type: z.string().default("object"),
|
|
479
|
-
additionalProperties: z.record(z.string(), z.
|
|
467
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
480
468
|
}).transform((v) => {
|
|
481
469
|
return {
|
|
482
470
|
...v.additionalProperties,
|
|
@@ -540,6 +528,7 @@ export const MessagesRequest$outboundSchema = z.object({
|
|
|
540
528
|
models: z.array(z.string()).optional(),
|
|
541
529
|
outputConfig: MessagesOutputConfig$outboundSchema.optional(),
|
|
542
530
|
plugins: z.array(z.union([
|
|
531
|
+
AutoBetaRouterPlugin$outboundSchema,
|
|
543
532
|
AutoRouterPlugin$outboundSchema,
|
|
544
533
|
ContextCompressionPlugin$outboundSchema,
|
|
545
534
|
FileParserPlugin$outboundSchema,
|
|
@@ -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`);
|