@openrouter/sdk 1.5.55 → 1.5.57
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 +5 -4
- package/esm/models/additionaltoolsitem.js +3 -0
- package/esm/models/alignmentresponsesrejected.d.ts +4 -1
- package/esm/models/alignmentresponsesrejected.js +6 -0
- package/esm/models/byokproviderslug.d.ts +1 -0
- package/esm/models/byokproviderslug.js +1 -0
- package/esm/models/createworkspacerequest.d.ts +1 -0
- package/esm/models/createworkspacerequest.js +1 -0
- package/esm/models/decisionschoicequestion.d.ts +4 -4
- package/esm/models/decisionschoicequestion.js +1 -5
- package/esm/models/decisionsnoulquestion.d.ts +12 -12
- package/esm/models/decisionsnoulquestion.js +3 -7
- package/esm/models/decisionsscorequestion.d.ts +4 -4
- package/esm/models/decisionsscorequestion.js +1 -5
- package/esm/models/imagegenerationproviderpreferences.d.ts +6 -0
- package/esm/models/imagegenerationproviderpreferences.js +1 -0
- package/esm/models/imagegenerationrequest.d.ts +51 -4
- package/esm/models/imagegenerationrequest.js +32 -1
- package/esm/models/index.d.ts +6 -0
- package/esm/models/index.js +6 -0
- package/esm/models/mcpapprovalrequestitem.d.ts +7 -0
- package/esm/models/mcpapprovalrequestitem.js +19 -1
- package/esm/models/mcpcallitem.d.ts +17 -1
- package/esm/models/mcpcallitem.js +18 -0
- package/esm/models/mcpservertool.d.ts +78 -69
- package/esm/models/mcpservertool.js +135 -105
- package/esm/models/mcpservertoolopenrouter.d.ts +28 -0
- package/esm/models/mcpservertoolopenrouter.js +20 -0
- package/esm/models/mcpservertoolparameters.d.ts +152 -0
- package/esm/models/mcpservertoolparameters.js +134 -0
- package/esm/models/openairesponsestoolchoiceunion.d.ts +3 -2
- package/esm/models/openairesponsestoolchoiceunion.js +3 -0
- package/esm/models/operations/listbyokkeys.d.ts +1 -0
- package/esm/models/operations/listbyokkeys.js +1 -0
- package/esm/models/outputitemmcpapprovalrequest.d.ts +14 -0
- package/esm/models/outputitemmcpapprovalrequest.js +23 -0
- package/esm/models/outputitemmcpcall.d.ts +74 -0
- package/esm/models/outputitemmcpcall.js +94 -0
- package/esm/models/outputitemmcplisttools.d.ts +25 -0
- package/esm/models/outputitemmcplisttools.js +37 -0
- package/esm/models/outputitems.d.ts +3 -0
- package/esm/models/outputitems.js +2 -0
- package/esm/models/providername.d.ts +1 -0
- package/esm/models/providername.js +1 -0
- package/esm/models/provideroptions.d.ts +6 -0
- package/esm/models/provideroptions.js +1 -0
- package/esm/models/providerresponse.d.ts +1 -0
- package/esm/models/providerresponse.js +1 -0
- package/esm/models/responsesrequest.d.ts +9 -0
- package/esm/models/responsesrequest.js +3 -0
- package/esm/models/toolchoicemcp.d.ts +33 -0
- package/esm/models/toolchoicemcp.js +42 -0
- package/esm/models/toolsearchoutputitem.d.ts +5 -4
- package/esm/models/toolsearchoutputitem.js +3 -0
- package/esm/models/updateworkspacerequest.d.ts +1 -0
- package/esm/models/updateworkspacerequest.js +1 -0
- package/esm/models/videogenerationrequest.d.ts +6 -0
- package/esm/models/videogenerationrequest.js +1 -0
- package/esm/sdk/sdk.d.ts +0 -9
- package/esm/sdk/sdk.js +1 -7
- package/jsr.json +1 -1
- package/package.json +5 -5
- package/esm/funcs/call-model.d.ts +0 -67
- package/esm/funcs/call-model.js +0 -98
- package/esm/lib/anthropic-compat.d.ts +0 -51
- package/esm/lib/anthropic-compat.js +0 -222
- package/esm/lib/async-params.d.ts +0 -107
- package/esm/lib/async-params.js +0 -88
- package/esm/lib/chat-compat.d.ts +0 -47
- package/esm/lib/chat-compat.js +0 -111
- package/esm/lib/claude-constants.d.ts +0 -22
- package/esm/lib/claude-constants.js +0 -20
- package/esm/lib/claude-type-guards.d.ts +0 -10
- package/esm/lib/claude-type-guards.js +0 -70
- package/esm/lib/conversation-state.d.ts +0 -63
- package/esm/lib/conversation-state.js +0 -210
- package/esm/lib/model-result.d.ts +0 -373
- package/esm/lib/model-result.js +0 -1414
- package/esm/lib/next-turn-params.d.ts +0 -30
- package/esm/lib/next-turn-params.js +0 -135
- package/esm/lib/reusable-stream.d.ts +0 -39
- package/esm/lib/reusable-stream.js +0 -192
- package/esm/lib/stop-conditions.d.ts +0 -80
- package/esm/lib/stop-conditions.js +0 -104
- package/esm/lib/stream-transformers.d.ts +0 -118
- package/esm/lib/stream-transformers.js +0 -852
- package/esm/lib/stream-type-guards.d.ts +0 -49
- package/esm/lib/stream-type-guards.js +0 -85
- package/esm/lib/tool-context.d.ts +0 -68
- package/esm/lib/tool-context.js +0 -175
- package/esm/lib/tool-event-broadcaster.d.ts +0 -44
- package/esm/lib/tool-event-broadcaster.js +0 -146
- package/esm/lib/tool-executor.d.ts +0 -74
- package/esm/lib/tool-executor.js +0 -267
- package/esm/lib/tool-orchestrator.d.ts +0 -52
- package/esm/lib/tool-orchestrator.js +0 -180
- package/esm/lib/tool-types.d.ts +0 -573
- package/esm/lib/tool-types.js +0 -80
- package/esm/lib/tool.d.ts +0 -108
- package/esm/lib/tool.js +0 -74
- package/esm/lib/turn-context.d.ts +0 -52
- package/esm/lib/turn-context.js +0 -59
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: e667706c2ed9
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
export const McpServerToolParametersRequireApprovalNever = {
|
|
8
|
+
Never: "never",
|
|
9
|
+
};
|
|
10
|
+
export const McpServerToolParametersRequireApprovalAlways = {
|
|
11
|
+
Always: "always",
|
|
12
|
+
};
|
|
13
|
+
/** @internal */
|
|
14
|
+
export const McpServerToolParametersAllowedTools$outboundSchema = z.object({
|
|
15
|
+
readOnly: z.boolean().optional(),
|
|
16
|
+
toolNames: z.array(z.string()).optional(),
|
|
17
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
18
|
+
}).transform((v) => {
|
|
19
|
+
return {
|
|
20
|
+
...v.additionalProperties,
|
|
21
|
+
...remap$(v, {
|
|
22
|
+
readOnly: "read_only",
|
|
23
|
+
toolNames: "tool_names",
|
|
24
|
+
additionalProperties: null,
|
|
25
|
+
}),
|
|
26
|
+
};
|
|
27
|
+
});
|
|
28
|
+
export function mcpServerToolParametersAllowedToolsToJSON(mcpServerToolParametersAllowedTools) {
|
|
29
|
+
return JSON.stringify(McpServerToolParametersAllowedTools$outboundSchema.parse(mcpServerToolParametersAllowedTools));
|
|
30
|
+
}
|
|
31
|
+
/** @internal */
|
|
32
|
+
export const McpServerToolParametersAllowedToolsUnion$outboundSchema = z.union([
|
|
33
|
+
z.array(z.string()),
|
|
34
|
+
z.lazy(() => McpServerToolParametersAllowedTools$outboundSchema),
|
|
35
|
+
]);
|
|
36
|
+
export function mcpServerToolParametersAllowedToolsUnionToJSON(mcpServerToolParametersAllowedToolsUnion) {
|
|
37
|
+
return JSON.stringify(McpServerToolParametersAllowedToolsUnion$outboundSchema.parse(mcpServerToolParametersAllowedToolsUnion));
|
|
38
|
+
}
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const McpServerToolParametersRequireApprovalNever$outboundSchema = z.enum(McpServerToolParametersRequireApprovalNever);
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const McpServerToolParametersRequireApprovalAlways$outboundSchema = z.enum(McpServerToolParametersRequireApprovalAlways);
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const McpServerToolParametersAlways$outboundSchema = z.object({
|
|
45
|
+
readOnly: z.boolean().optional(),
|
|
46
|
+
toolNames: z.array(z.string()).optional(),
|
|
47
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
48
|
+
}).transform((v) => {
|
|
49
|
+
return {
|
|
50
|
+
...v.additionalProperties,
|
|
51
|
+
...remap$(v, {
|
|
52
|
+
readOnly: "read_only",
|
|
53
|
+
toolNames: "tool_names",
|
|
54
|
+
additionalProperties: null,
|
|
55
|
+
}),
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
export function mcpServerToolParametersAlwaysToJSON(mcpServerToolParametersAlways) {
|
|
59
|
+
return JSON.stringify(McpServerToolParametersAlways$outboundSchema.parse(mcpServerToolParametersAlways));
|
|
60
|
+
}
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const McpServerToolParametersNever$outboundSchema = z.object({
|
|
63
|
+
readOnly: z.boolean().optional(),
|
|
64
|
+
toolNames: z.array(z.string()).optional(),
|
|
65
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
66
|
+
}).transform((v) => {
|
|
67
|
+
return {
|
|
68
|
+
...v.additionalProperties,
|
|
69
|
+
...remap$(v, {
|
|
70
|
+
readOnly: "read_only",
|
|
71
|
+
toolNames: "tool_names",
|
|
72
|
+
additionalProperties: null,
|
|
73
|
+
}),
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
export function mcpServerToolParametersNeverToJSON(mcpServerToolParametersNever) {
|
|
77
|
+
return JSON.stringify(McpServerToolParametersNever$outboundSchema.parse(mcpServerToolParametersNever));
|
|
78
|
+
}
|
|
79
|
+
/** @internal */
|
|
80
|
+
export const McpServerToolParametersRequireApproval$outboundSchema = z.object({
|
|
81
|
+
always: z.lazy(() => McpServerToolParametersAlways$outboundSchema).optional(),
|
|
82
|
+
never: z.lazy(() => McpServerToolParametersNever$outboundSchema).optional(),
|
|
83
|
+
additionalProperties: z.record(z.string(), z.any()).optional(),
|
|
84
|
+
}).transform((v) => {
|
|
85
|
+
return {
|
|
86
|
+
...v.additionalProperties,
|
|
87
|
+
...remap$(v, {
|
|
88
|
+
additionalProperties: null,
|
|
89
|
+
}),
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
export function mcpServerToolParametersRequireApprovalToJSON(mcpServerToolParametersRequireApproval) {
|
|
93
|
+
return JSON.stringify(McpServerToolParametersRequireApproval$outboundSchema.parse(mcpServerToolParametersRequireApproval));
|
|
94
|
+
}
|
|
95
|
+
/** @internal */
|
|
96
|
+
export const McpServerToolParametersRequireApprovalUnion$outboundSchema = z.union([
|
|
97
|
+
z.lazy(() => McpServerToolParametersRequireApproval$outboundSchema),
|
|
98
|
+
McpServerToolParametersRequireApprovalAlways$outboundSchema,
|
|
99
|
+
McpServerToolParametersRequireApprovalNever$outboundSchema,
|
|
100
|
+
]);
|
|
101
|
+
export function mcpServerToolParametersRequireApprovalUnionToJSON(mcpServerToolParametersRequireApprovalUnion) {
|
|
102
|
+
return JSON.stringify(McpServerToolParametersRequireApprovalUnion$outboundSchema.parse(mcpServerToolParametersRequireApprovalUnion));
|
|
103
|
+
}
|
|
104
|
+
/** @internal */
|
|
105
|
+
export const McpServerToolParameters$outboundSchema = z.object({
|
|
106
|
+
allowedTools: z.nullable(z.union([
|
|
107
|
+
z.array(z.string()),
|
|
108
|
+
z.lazy(() => McpServerToolParametersAllowedTools$outboundSchema),
|
|
109
|
+
])).optional(),
|
|
110
|
+
authorization: z.string().optional(),
|
|
111
|
+
connectorId: z.string().optional(),
|
|
112
|
+
headers: z.nullable(z.record(z.string(), z.string())).optional(),
|
|
113
|
+
requireApproval: z.nullable(z.union([
|
|
114
|
+
z.lazy(() => McpServerToolParametersRequireApproval$outboundSchema),
|
|
115
|
+
McpServerToolParametersRequireApprovalAlways$outboundSchema,
|
|
116
|
+
McpServerToolParametersRequireApprovalNever$outboundSchema,
|
|
117
|
+
])).optional(),
|
|
118
|
+
serverDescription: z.string().optional(),
|
|
119
|
+
serverLabel: z.string(),
|
|
120
|
+
serverUrl: z.string().optional(),
|
|
121
|
+
}).transform((v) => {
|
|
122
|
+
return remap$(v, {
|
|
123
|
+
allowedTools: "allowed_tools",
|
|
124
|
+
connectorId: "connector_id",
|
|
125
|
+
requireApproval: "require_approval",
|
|
126
|
+
serverDescription: "server_description",
|
|
127
|
+
serverLabel: "server_label",
|
|
128
|
+
serverUrl: "server_url",
|
|
129
|
+
});
|
|
130
|
+
});
|
|
131
|
+
export function mcpServerToolParametersToJSON(mcpServerToolParameters) {
|
|
132
|
+
return JSON.stringify(McpServerToolParameters$outboundSchema.parse(mcpServerToolParameters));
|
|
133
|
+
}
|
|
134
|
+
//# sourceMappingURL=mcpservertoolparameters.js.map
|
|
@@ -3,6 +3,7 @@ import { ClosedEnum } from "../types/enums.js";
|
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
5
|
import { ToolChoiceAllowed, ToolChoiceAllowed$Outbound } from "./toolchoiceallowed.js";
|
|
6
|
+
import { ToolChoiceMcp, ToolChoiceMcp$Outbound } from "./toolchoicemcp.js";
|
|
6
7
|
export declare const OpenAIResponsesToolChoiceTypeShell: {
|
|
7
8
|
readonly Shell: "shell";
|
|
8
9
|
};
|
|
@@ -49,7 +50,7 @@ export declare const OpenAIResponsesToolChoiceAuto: {
|
|
|
49
50
|
readonly Auto: "auto";
|
|
50
51
|
};
|
|
51
52
|
export type OpenAIResponsesToolChoiceAuto = ClosedEnum<typeof OpenAIResponsesToolChoiceAuto>;
|
|
52
|
-
export type OpenAIResponsesToolChoiceUnion = ToolChoiceAllowed | OpenAIResponsesToolChoiceFunction | OpenAIResponsesToolChoice | OpenAIResponsesToolChoiceApplyPatch | OpenAIResponsesToolChoiceShell | OpenAIResponsesToolChoiceAuto | OpenAIResponsesToolChoiceNone | OpenAIResponsesToolChoiceRequired;
|
|
53
|
+
export type OpenAIResponsesToolChoiceUnion = ToolChoiceAllowed | OpenAIResponsesToolChoiceFunction | ToolChoiceMcp | OpenAIResponsesToolChoice | OpenAIResponsesToolChoiceApplyPatch | OpenAIResponsesToolChoiceShell | OpenAIResponsesToolChoiceAuto | OpenAIResponsesToolChoiceNone | OpenAIResponsesToolChoiceRequired;
|
|
53
54
|
/** @internal */
|
|
54
55
|
export declare const OpenAIResponsesToolChoiceTypeShell$inboundSchema: z.ZodEnum<typeof OpenAIResponsesToolChoiceTypeShell>;
|
|
55
56
|
/** @internal */
|
|
@@ -134,7 +135,7 @@ export declare const OpenAIResponsesToolChoiceAuto$outboundSchema: z.ZodEnum<typ
|
|
|
134
135
|
/** @internal */
|
|
135
136
|
export declare const OpenAIResponsesToolChoiceUnion$inboundSchema: z.ZodType<OpenAIResponsesToolChoiceUnion, unknown>;
|
|
136
137
|
/** @internal */
|
|
137
|
-
export type OpenAIResponsesToolChoiceUnion$Outbound = ToolChoiceAllowed$Outbound | OpenAIResponsesToolChoiceFunction$Outbound | OpenAIResponsesToolChoice$Outbound | OpenAIResponsesToolChoiceApplyPatch$Outbound | OpenAIResponsesToolChoiceShell$Outbound | string | string | string;
|
|
138
|
+
export type OpenAIResponsesToolChoiceUnion$Outbound = ToolChoiceAllowed$Outbound | OpenAIResponsesToolChoiceFunction$Outbound | ToolChoiceMcp$Outbound | OpenAIResponsesToolChoice$Outbound | OpenAIResponsesToolChoiceApplyPatch$Outbound | OpenAIResponsesToolChoiceShell$Outbound | string | string | string;
|
|
138
139
|
/** @internal */
|
|
139
140
|
export declare const OpenAIResponsesToolChoiceUnion$outboundSchema: z.ZodType<OpenAIResponsesToolChoiceUnion$Outbound, OpenAIResponsesToolChoiceUnion>;
|
|
140
141
|
export declare function openAIResponsesToolChoiceUnionToJSON(openAIResponsesToolChoiceUnion: OpenAIResponsesToolChoiceUnion): string;
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { ToolChoiceAllowed$inboundSchema, ToolChoiceAllowed$outboundSchema, } from "./toolchoiceallowed.js";
|
|
8
|
+
import { ToolChoiceMcp$inboundSchema, ToolChoiceMcp$outboundSchema, } from "./toolchoicemcp.js";
|
|
8
9
|
export const OpenAIResponsesToolChoiceTypeShell = {
|
|
9
10
|
Shell: "shell",
|
|
10
11
|
};
|
|
@@ -146,6 +147,7 @@ export const OpenAIResponsesToolChoiceAuto$outboundSchema = OpenAIResponsesToolC
|
|
|
146
147
|
export const OpenAIResponsesToolChoiceUnion$inboundSchema = z.union([
|
|
147
148
|
ToolChoiceAllowed$inboundSchema,
|
|
148
149
|
z.lazy(() => OpenAIResponsesToolChoiceFunction$inboundSchema),
|
|
150
|
+
ToolChoiceMcp$inboundSchema,
|
|
149
151
|
z.lazy(() => OpenAIResponsesToolChoice$inboundSchema),
|
|
150
152
|
z.lazy(() => OpenAIResponsesToolChoiceApplyPatch$inboundSchema),
|
|
151
153
|
z.lazy(() => OpenAIResponsesToolChoiceShell$inboundSchema),
|
|
@@ -157,6 +159,7 @@ export const OpenAIResponsesToolChoiceUnion$inboundSchema = z.union([
|
|
|
157
159
|
export const OpenAIResponsesToolChoiceUnion$outboundSchema = z.union([
|
|
158
160
|
ToolChoiceAllowed$outboundSchema,
|
|
159
161
|
z.lazy(() => OpenAIResponsesToolChoiceFunction$outboundSchema),
|
|
162
|
+
ToolChoiceMcp$outboundSchema,
|
|
160
163
|
z.lazy(() => OpenAIResponsesToolChoice$outboundSchema),
|
|
161
164
|
z.lazy(() => OpenAIResponsesToolChoiceApplyPatch$outboundSchema),
|
|
162
165
|
z.lazy(() => OpenAIResponsesToolChoiceShell$outboundSchema),
|
|
@@ -124,6 +124,7 @@ export declare const Provider: {
|
|
|
124
124
|
readonly Reka: "reka";
|
|
125
125
|
readonly Relace: "relace";
|
|
126
126
|
readonly Respan: "respan";
|
|
127
|
+
readonly River: "river";
|
|
127
128
|
readonly Runway: "runway";
|
|
128
129
|
readonly SailResearch: "sail-research";
|
|
129
130
|
readonly Sakana: "sakana";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type OutputItemMcpApprovalRequest = {
|
|
5
|
+
arguments: string;
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
serverLabel: string;
|
|
9
|
+
type: "mcp_approval_request";
|
|
10
|
+
};
|
|
11
|
+
/** @internal */
|
|
12
|
+
export declare const OutputItemMcpApprovalRequest$inboundSchema: z.ZodType<OutputItemMcpApprovalRequest, unknown>;
|
|
13
|
+
export declare function outputItemMcpApprovalRequestFromJSON(jsonString: string): SafeParseResult<OutputItemMcpApprovalRequest, SDKValidationError>;
|
|
14
|
+
//# sourceMappingURL=outputitemmcpapprovalrequest.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 09f3a53c2bdb
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const OutputItemMcpApprovalRequest$inboundSchema = z.object({
|
|
10
|
+
arguments: z.string(),
|
|
11
|
+
id: z.string(),
|
|
12
|
+
name: z.string(),
|
|
13
|
+
server_label: z.string(),
|
|
14
|
+
type: z.literal("mcp_approval_request"),
|
|
15
|
+
}).transform((v) => {
|
|
16
|
+
return remap$(v, {
|
|
17
|
+
"server_label": "serverLabel",
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
export function outputItemMcpApprovalRequestFromJSON(jsonString) {
|
|
21
|
+
return safeParse(jsonString, (x) => OutputItemMcpApprovalRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemMcpApprovalRequest' from JSON`);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=outputitemmcpapprovalrequest.js.map
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
export declare const ErrorTypeHTTPError: {
|
|
6
|
+
readonly HttpError: "http_error";
|
|
7
|
+
};
|
|
8
|
+
export type ErrorTypeHTTPError = ClosedEnum<typeof ErrorTypeHTTPError>;
|
|
9
|
+
export type ErrorHTTPError = {
|
|
10
|
+
code: number;
|
|
11
|
+
message: string;
|
|
12
|
+
type: ErrorTypeHTTPError;
|
|
13
|
+
};
|
|
14
|
+
export declare const ErrorTypeMcpToolExecutionError: {
|
|
15
|
+
readonly McpToolExecutionError: "mcp_tool_execution_error";
|
|
16
|
+
};
|
|
17
|
+
export type ErrorTypeMcpToolExecutionError = ClosedEnum<typeof ErrorTypeMcpToolExecutionError>;
|
|
18
|
+
export type ErrorMcpToolExecutionError = {
|
|
19
|
+
content?: any | undefined;
|
|
20
|
+
type: ErrorTypeMcpToolExecutionError;
|
|
21
|
+
};
|
|
22
|
+
export declare const ErrorTypeMcpProtocolError: {
|
|
23
|
+
readonly McpProtocolError: "mcp_protocol_error";
|
|
24
|
+
};
|
|
25
|
+
export type ErrorTypeMcpProtocolError = ClosedEnum<typeof ErrorTypeMcpProtocolError>;
|
|
26
|
+
export type ErrorMcpProtocolError = {
|
|
27
|
+
code: number;
|
|
28
|
+
message: string;
|
|
29
|
+
type: ErrorTypeMcpProtocolError;
|
|
30
|
+
};
|
|
31
|
+
export type ErrorT = ErrorMcpProtocolError | ErrorHTTPError | ErrorMcpToolExecutionError | string;
|
|
32
|
+
export declare const OutputItemMcpCallStatus: {
|
|
33
|
+
readonly InProgress: "in_progress";
|
|
34
|
+
readonly Completed: "completed";
|
|
35
|
+
readonly Incomplete: "incomplete";
|
|
36
|
+
readonly Calling: "calling";
|
|
37
|
+
readonly Failed: "failed";
|
|
38
|
+
};
|
|
39
|
+
export type OutputItemMcpCallStatus = OpenEnum<typeof OutputItemMcpCallStatus>;
|
|
40
|
+
export type OutputItemMcpCall = {
|
|
41
|
+
approvalRequestId?: string | null | undefined;
|
|
42
|
+
arguments: string;
|
|
43
|
+
error?: ErrorMcpProtocolError | ErrorHTTPError | ErrorMcpToolExecutionError | string | null | undefined;
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
output?: string | null | undefined;
|
|
47
|
+
serverLabel: string;
|
|
48
|
+
status?: OutputItemMcpCallStatus | undefined;
|
|
49
|
+
type: "mcp_call";
|
|
50
|
+
};
|
|
51
|
+
/** @internal */
|
|
52
|
+
export declare const ErrorTypeHTTPError$inboundSchema: z.ZodEnum<typeof ErrorTypeHTTPError>;
|
|
53
|
+
/** @internal */
|
|
54
|
+
export declare const ErrorHTTPError$inboundSchema: z.ZodType<ErrorHTTPError, unknown>;
|
|
55
|
+
export declare function errorHTTPErrorFromJSON(jsonString: string): SafeParseResult<ErrorHTTPError, SDKValidationError>;
|
|
56
|
+
/** @internal */
|
|
57
|
+
export declare const ErrorTypeMcpToolExecutionError$inboundSchema: z.ZodEnum<typeof ErrorTypeMcpToolExecutionError>;
|
|
58
|
+
/** @internal */
|
|
59
|
+
export declare const ErrorMcpToolExecutionError$inboundSchema: z.ZodType<ErrorMcpToolExecutionError, unknown>;
|
|
60
|
+
export declare function errorMcpToolExecutionErrorFromJSON(jsonString: string): SafeParseResult<ErrorMcpToolExecutionError, SDKValidationError>;
|
|
61
|
+
/** @internal */
|
|
62
|
+
export declare const ErrorTypeMcpProtocolError$inboundSchema: z.ZodEnum<typeof ErrorTypeMcpProtocolError>;
|
|
63
|
+
/** @internal */
|
|
64
|
+
export declare const ErrorMcpProtocolError$inboundSchema: z.ZodType<ErrorMcpProtocolError, unknown>;
|
|
65
|
+
export declare function errorMcpProtocolErrorFromJSON(jsonString: string): SafeParseResult<ErrorMcpProtocolError, SDKValidationError>;
|
|
66
|
+
/** @internal */
|
|
67
|
+
export declare const ErrorT$inboundSchema: z.ZodType<ErrorT, unknown>;
|
|
68
|
+
export declare function errorFromJSON(jsonString: string): SafeParseResult<ErrorT, SDKValidationError>;
|
|
69
|
+
/** @internal */
|
|
70
|
+
export declare const OutputItemMcpCallStatus$inboundSchema: z.ZodType<OutputItemMcpCallStatus, unknown>;
|
|
71
|
+
/** @internal */
|
|
72
|
+
export declare const OutputItemMcpCall$inboundSchema: z.ZodType<OutputItemMcpCall, unknown>;
|
|
73
|
+
export declare function outputItemMcpCallFromJSON(jsonString: string): SafeParseResult<OutputItemMcpCall, SDKValidationError>;
|
|
74
|
+
//# sourceMappingURL=outputitemmcpcall.d.ts.map
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 49ccb6659e1f
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
import * as openEnums from "../types/enums.js";
|
|
9
|
+
export const ErrorTypeHTTPError = {
|
|
10
|
+
HttpError: "http_error",
|
|
11
|
+
};
|
|
12
|
+
export const ErrorTypeMcpToolExecutionError = {
|
|
13
|
+
McpToolExecutionError: "mcp_tool_execution_error",
|
|
14
|
+
};
|
|
15
|
+
export const ErrorTypeMcpProtocolError = {
|
|
16
|
+
McpProtocolError: "mcp_protocol_error",
|
|
17
|
+
};
|
|
18
|
+
export const OutputItemMcpCallStatus = {
|
|
19
|
+
InProgress: "in_progress",
|
|
20
|
+
Completed: "completed",
|
|
21
|
+
Incomplete: "incomplete",
|
|
22
|
+
Calling: "calling",
|
|
23
|
+
Failed: "failed",
|
|
24
|
+
};
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ErrorTypeHTTPError$inboundSchema = z.enum(ErrorTypeHTTPError);
|
|
27
|
+
/** @internal */
|
|
28
|
+
export const ErrorHTTPError$inboundSchema = z.object({
|
|
29
|
+
code: z.int(),
|
|
30
|
+
message: z.string(),
|
|
31
|
+
type: ErrorTypeHTTPError$inboundSchema,
|
|
32
|
+
});
|
|
33
|
+
export function errorHTTPErrorFromJSON(jsonString) {
|
|
34
|
+
return safeParse(jsonString, (x) => ErrorHTTPError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorHTTPError' from JSON`);
|
|
35
|
+
}
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const ErrorTypeMcpToolExecutionError$inboundSchema = z.enum(ErrorTypeMcpToolExecutionError);
|
|
38
|
+
/** @internal */
|
|
39
|
+
export const ErrorMcpToolExecutionError$inboundSchema = z.object({
|
|
40
|
+
content: z.any().optional(),
|
|
41
|
+
type: ErrorTypeMcpToolExecutionError$inboundSchema,
|
|
42
|
+
});
|
|
43
|
+
export function errorMcpToolExecutionErrorFromJSON(jsonString) {
|
|
44
|
+
return safeParse(jsonString, (x) => ErrorMcpToolExecutionError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorMcpToolExecutionError' from JSON`);
|
|
45
|
+
}
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const ErrorTypeMcpProtocolError$inboundSchema = z.enum(ErrorTypeMcpProtocolError);
|
|
48
|
+
/** @internal */
|
|
49
|
+
export const ErrorMcpProtocolError$inboundSchema = z.object({
|
|
50
|
+
code: z.int(),
|
|
51
|
+
message: z.string(),
|
|
52
|
+
type: ErrorTypeMcpProtocolError$inboundSchema,
|
|
53
|
+
});
|
|
54
|
+
export function errorMcpProtocolErrorFromJSON(jsonString) {
|
|
55
|
+
return safeParse(jsonString, (x) => ErrorMcpProtocolError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorMcpProtocolError' from JSON`);
|
|
56
|
+
}
|
|
57
|
+
/** @internal */
|
|
58
|
+
export const ErrorT$inboundSchema = z.union([
|
|
59
|
+
z.lazy(() => ErrorMcpProtocolError$inboundSchema),
|
|
60
|
+
z.lazy(() => ErrorHTTPError$inboundSchema),
|
|
61
|
+
z.lazy(() => ErrorMcpToolExecutionError$inboundSchema),
|
|
62
|
+
z.string(),
|
|
63
|
+
]);
|
|
64
|
+
export function errorFromJSON(jsonString) {
|
|
65
|
+
return safeParse(jsonString, (x) => ErrorT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ErrorT' from JSON`);
|
|
66
|
+
}
|
|
67
|
+
/** @internal */
|
|
68
|
+
export const OutputItemMcpCallStatus$inboundSchema = openEnums.inboundSchema(OutputItemMcpCallStatus);
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const OutputItemMcpCall$inboundSchema = z.object({
|
|
71
|
+
approval_request_id: z.nullable(z.string()).optional(),
|
|
72
|
+
arguments: z.string(),
|
|
73
|
+
error: z.nullable(z.union([
|
|
74
|
+
z.lazy(() => ErrorMcpProtocolError$inboundSchema),
|
|
75
|
+
z.lazy(() => ErrorHTTPError$inboundSchema),
|
|
76
|
+
z.lazy(() => ErrorMcpToolExecutionError$inboundSchema),
|
|
77
|
+
z.string(),
|
|
78
|
+
])).optional(),
|
|
79
|
+
id: z.string(),
|
|
80
|
+
name: z.string(),
|
|
81
|
+
output: z.nullable(z.string()).optional(),
|
|
82
|
+
server_label: z.string(),
|
|
83
|
+
status: OutputItemMcpCallStatus$inboundSchema.optional(),
|
|
84
|
+
type: z.literal("mcp_call"),
|
|
85
|
+
}).transform((v) => {
|
|
86
|
+
return remap$(v, {
|
|
87
|
+
"approval_request_id": "approvalRequestId",
|
|
88
|
+
"server_label": "serverLabel",
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
export function outputItemMcpCallFromJSON(jsonString) {
|
|
92
|
+
return safeParse(jsonString, (x) => OutputItemMcpCall$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemMcpCall' from JSON`);
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=outputitemmcpcall.js.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as z from "zod/v4";
|
|
2
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
|
+
export type OutputItemMcpListToolsTool = {
|
|
5
|
+
annotations?: any | undefined;
|
|
6
|
+
description?: string | null | undefined;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
[k: string]: any;
|
|
9
|
+
};
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
12
|
+
export type OutputItemMcpListTools = {
|
|
13
|
+
error?: string | null | undefined;
|
|
14
|
+
id: string;
|
|
15
|
+
serverLabel: string;
|
|
16
|
+
tools: Array<OutputItemMcpListToolsTool>;
|
|
17
|
+
type: "mcp_list_tools";
|
|
18
|
+
};
|
|
19
|
+
/** @internal */
|
|
20
|
+
export declare const OutputItemMcpListToolsTool$inboundSchema: z.ZodType<OutputItemMcpListToolsTool, unknown>;
|
|
21
|
+
export declare function outputItemMcpListToolsToolFromJSON(jsonString: string): SafeParseResult<OutputItemMcpListToolsTool, SDKValidationError>;
|
|
22
|
+
/** @internal */
|
|
23
|
+
export declare const OutputItemMcpListTools$inboundSchema: z.ZodType<OutputItemMcpListTools, unknown>;
|
|
24
|
+
export declare function outputItemMcpListToolsFromJSON(jsonString: string): SafeParseResult<OutputItemMcpListTools, SDKValidationError>;
|
|
25
|
+
//# sourceMappingURL=outputitemmcplisttools.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
* @generated-id: 936567098fe1
|
|
4
|
+
*/
|
|
5
|
+
import * as z from "zod/v4";
|
|
6
|
+
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../lib/schemas.js";
|
|
8
|
+
/** @internal */
|
|
9
|
+
export const OutputItemMcpListToolsTool$inboundSchema = z.object({
|
|
10
|
+
annotations: z.any().optional(),
|
|
11
|
+
description: z.nullable(z.string()).optional(),
|
|
12
|
+
input_schema: z.record(z.string(), z.any()),
|
|
13
|
+
name: z.string(),
|
|
14
|
+
}).transform((v) => {
|
|
15
|
+
return remap$(v, {
|
|
16
|
+
"input_schema": "inputSchema",
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
export function outputItemMcpListToolsToolFromJSON(jsonString) {
|
|
20
|
+
return safeParse(jsonString, (x) => OutputItemMcpListToolsTool$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemMcpListToolsTool' from JSON`);
|
|
21
|
+
}
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const OutputItemMcpListTools$inboundSchema = z.object({
|
|
24
|
+
error: z.nullable(z.string()).optional(),
|
|
25
|
+
id: z.string(),
|
|
26
|
+
server_label: z.string(),
|
|
27
|
+
tools: z.array(z.lazy(() => OutputItemMcpListToolsTool$inboundSchema)),
|
|
28
|
+
type: z.literal("mcp_list_tools"),
|
|
29
|
+
}).transform((v) => {
|
|
30
|
+
return remap$(v, {
|
|
31
|
+
"server_label": "serverLabel",
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
export function outputItemMcpListToolsFromJSON(jsonString) {
|
|
35
|
+
return safeParse(jsonString, (x) => OutputItemMcpListTools$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputItemMcpListTools' from JSON`);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=outputitemmcplisttools.js.map
|
|
@@ -2,6 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
|
|
3
3
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
4
4
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
5
|
+
import { McpApprovalRequestItem } from "./mcpapprovalrequestitem.js";
|
|
5
6
|
import { McpCallItem } from "./mcpcallitem.js";
|
|
6
7
|
import { McpListToolsItem } from "./mcplisttoolsitem.js";
|
|
7
8
|
import { OutputAdvisorServerToolItem } from "./outputadvisorservertoolitem.js";
|
|
@@ -48,6 +49,8 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
|
|
|
48
49
|
type: "file_search_call";
|
|
49
50
|
}) | OutputFunctionCallItem | (OutputImageGenerationCallItem & {
|
|
50
51
|
type: "image_generation_call";
|
|
52
|
+
}) | (McpApprovalRequestItem & {
|
|
53
|
+
type: "mcp_approval_request";
|
|
51
54
|
}) | (McpCallItem & {
|
|
52
55
|
type: "mcp_call";
|
|
53
56
|
}) | (McpListToolsItem & {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { discriminatedUnion } from "../types/discriminatedUnion.js";
|
|
8
|
+
import { McpApprovalRequestItem$inboundSchema, } from "./mcpapprovalrequestitem.js";
|
|
8
9
|
import { McpCallItem$inboundSchema } from "./mcpcallitem.js";
|
|
9
10
|
import { McpListToolsItem$inboundSchema, } from "./mcplisttoolsitem.js";
|
|
10
11
|
import { OutputAdvisorServerToolItem$inboundSchema, } from "./outputadvisorservertoolitem.js";
|
|
@@ -50,6 +51,7 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
|
|
|
50
51
|
file_search_call: OutputFileSearchCallItem$inboundSchema.and(z.object({ type: z.literal("file_search_call") })),
|
|
51
52
|
function_call: OutputFunctionCallItem$inboundSchema,
|
|
52
53
|
image_generation_call: OutputImageGenerationCallItem$inboundSchema.and(z.object({ type: z.literal("image_generation_call") })),
|
|
54
|
+
mcp_approval_request: McpApprovalRequestItem$inboundSchema.and(z.object({ type: z.literal("mcp_approval_request") })),
|
|
53
55
|
mcp_call: McpCallItem$inboundSchema.and(z.object({ type: z.literal("mcp_call") })),
|
|
54
56
|
mcp_list_tools: McpListToolsItem$inboundSchema.and(z.object({ type: z.literal("mcp_list_tools") })),
|
|
55
57
|
message: OutputMessageItem$inboundSchema,
|
|
@@ -96,6 +96,7 @@ export declare const ProviderName: {
|
|
|
96
96
|
readonly Reka: "Reka";
|
|
97
97
|
readonly Relace: "Relace";
|
|
98
98
|
readonly Respan: "Respan";
|
|
99
|
+
readonly River: "River";
|
|
99
100
|
readonly SailResearch: "Sail Research";
|
|
100
101
|
readonly SakanaAI: "Sakana AI";
|
|
101
102
|
readonly SambaNova: "SambaNova";
|
|
@@ -366,6 +366,9 @@ export type ProviderOptions = {
|
|
|
366
366
|
respan?: {
|
|
367
367
|
[k: string]: any;
|
|
368
368
|
} | undefined;
|
|
369
|
+
river?: {
|
|
370
|
+
[k: string]: any;
|
|
371
|
+
} | undefined;
|
|
369
372
|
runway?: {
|
|
370
373
|
[k: string]: any;
|
|
371
374
|
} | undefined;
|
|
@@ -831,6 +834,9 @@ export type ProviderOptions$Outbound = {
|
|
|
831
834
|
respan?: {
|
|
832
835
|
[k: string]: any;
|
|
833
836
|
} | undefined;
|
|
837
|
+
river?: {
|
|
838
|
+
[k: string]: any;
|
|
839
|
+
} | undefined;
|
|
834
840
|
runway?: {
|
|
835
841
|
[k: string]: any;
|
|
836
842
|
} | undefined;
|
|
@@ -127,6 +127,7 @@ export const ProviderOptions$outboundSchema = z.object({
|
|
|
127
127
|
relace: z.record(z.string(), z.any()).optional(),
|
|
128
128
|
replicate: z.record(z.string(), z.any()).optional(),
|
|
129
129
|
respan: z.record(z.string(), z.any()).optional(),
|
|
130
|
+
river: z.record(z.string(), z.any()).optional(),
|
|
130
131
|
runway: z.record(z.string(), z.any()).optional(),
|
|
131
132
|
sailResearch: z.record(z.string(), z.any()).optional(),
|
|
132
133
|
sakana: z.record(z.string(), z.any()).optional(),
|
|
@@ -129,6 +129,7 @@ export declare const ProviderResponseProviderName: {
|
|
|
129
129
|
readonly Reka: "Reka";
|
|
130
130
|
readonly Relace: "Relace";
|
|
131
131
|
readonly Respan: "Respan";
|
|
132
|
+
readonly River: "River";
|
|
132
133
|
readonly SailResearch: "Sail Research";
|
|
133
134
|
readonly SakanaAI: "Sakana AI";
|
|
134
135
|
readonly SambaNova: "SambaNova";
|
|
@@ -29,6 +29,7 @@ import { InputsUnion, InputsUnion$Outbound } from "./inputsunion.js";
|
|
|
29
29
|
import { JevRouterPlugin, JevRouterPlugin$Outbound } from "./jevrouterplugin.js";
|
|
30
30
|
import { LegacyWebSearchServerTool, LegacyWebSearchServerTool$Outbound } from "./legacywebsearchservertool.js";
|
|
31
31
|
import { McpServerTool, McpServerTool$Outbound } from "./mcpservertool.js";
|
|
32
|
+
import { McpServerToolOpenRouter, McpServerToolOpenRouter$Outbound } from "./mcpservertoolopenrouter.js";
|
|
32
33
|
import { ModerationPlugin, ModerationPlugin$Outbound } from "./moderationplugin.js";
|
|
33
34
|
import { NamespaceTool, NamespaceTool$Outbound } from "./namespacetool.js";
|
|
34
35
|
import { OpenAIResponsesToolChoiceUnion, OpenAIResponsesToolChoiceUnion$Outbound } from "./openairesponsestoolchoiceunion.js";
|
|
@@ -190,6 +191,8 @@ export type ResponsesRequestToolUnion = ResponsesRequestToolFunction | (PreviewW
|
|
|
190
191
|
type: "openrouter:shell";
|
|
191
192
|
}) | (ToolSearchServerTool & {
|
|
192
193
|
type: "openrouter:tool_search";
|
|
194
|
+
}) | (McpServerToolOpenRouter & {
|
|
195
|
+
type: "openrouter:mcp";
|
|
193
196
|
});
|
|
194
197
|
/**
|
|
195
198
|
* Request schema for Responses endpoint
|
|
@@ -348,6 +351,8 @@ export type ResponsesRequest = {
|
|
|
348
351
|
type: "openrouter:shell";
|
|
349
352
|
}) | (ToolSearchServerTool & {
|
|
350
353
|
type: "openrouter:tool_search";
|
|
354
|
+
}) | (McpServerToolOpenRouter & {
|
|
355
|
+
type: "openrouter:mcp";
|
|
351
356
|
})> | undefined;
|
|
352
357
|
topK?: number | undefined;
|
|
353
358
|
topLogprobs?: number | null | undefined;
|
|
@@ -471,6 +476,8 @@ export type ResponsesRequestToolUnion$Outbound = ResponsesRequestToolFunction$Ou
|
|
|
471
476
|
type: "openrouter:shell";
|
|
472
477
|
}) | (ToolSearchServerTool$Outbound & {
|
|
473
478
|
type: "openrouter:tool_search";
|
|
479
|
+
}) | (McpServerToolOpenRouter$Outbound & {
|
|
480
|
+
type: "openrouter:mcp";
|
|
474
481
|
});
|
|
475
482
|
/** @internal */
|
|
476
483
|
export declare const ResponsesRequestToolUnion$outboundSchema: z.ZodType<ResponsesRequestToolUnion$Outbound, ResponsesRequestToolUnion>;
|
|
@@ -570,6 +577,8 @@ export type ResponsesRequest$Outbound = {
|
|
|
570
577
|
type: "openrouter:shell";
|
|
571
578
|
}) | (ToolSearchServerTool$Outbound & {
|
|
572
579
|
type: "openrouter:tool_search";
|
|
580
|
+
}) | (McpServerToolOpenRouter$Outbound & {
|
|
581
|
+
type: "openrouter:mcp";
|
|
573
582
|
})> | undefined;
|
|
574
583
|
top_k?: number | undefined;
|
|
575
584
|
top_logprobs?: number | null | undefined;
|
|
@@ -34,6 +34,7 @@ import { InputsUnion$outboundSchema, } from "./inputsunion.js";
|
|
|
34
34
|
import { JevRouterPlugin$outboundSchema, } from "./jevrouterplugin.js";
|
|
35
35
|
import { LegacyWebSearchServerTool$outboundSchema, } from "./legacywebsearchservertool.js";
|
|
36
36
|
import { McpServerTool$outboundSchema, } from "./mcpservertool.js";
|
|
37
|
+
import { McpServerToolOpenRouter$outboundSchema, } from "./mcpservertoolopenrouter.js";
|
|
37
38
|
import { ModerationPlugin$outboundSchema, } from "./moderationplugin.js";
|
|
38
39
|
import { NamespaceTool$outboundSchema, } from "./namespacetool.js";
|
|
39
40
|
import { OpenAIResponsesToolChoiceUnion$outboundSchema, } from "./openairesponsestoolchoiceunion.js";
|
|
@@ -191,6 +192,7 @@ export const ResponsesRequestToolUnion$outboundSchema = z.union([
|
|
|
191
192
|
BashServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:bash") })),
|
|
192
193
|
ShellServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:shell") })),
|
|
193
194
|
ToolSearchServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:tool_search") })),
|
|
195
|
+
McpServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:mcp") })),
|
|
194
196
|
]);
|
|
195
197
|
export function responsesRequestToolUnionToJSON(responsesRequestToolUnion) {
|
|
196
198
|
return JSON.stringify(ResponsesRequestToolUnion$outboundSchema.parse(responsesRequestToolUnion));
|
|
@@ -279,6 +281,7 @@ export const ResponsesRequest$outboundSchema = z.object({
|
|
|
279
281
|
BashServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:bash") })),
|
|
280
282
|
ShellServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:shell") })),
|
|
281
283
|
ToolSearchServerTool$outboundSchema.and(z.object({ type: z.literal("openrouter:tool_search") })),
|
|
284
|
+
McpServerToolOpenRouter$outboundSchema.and(z.object({ type: z.literal("openrouter:mcp") })),
|
|
282
285
|
])).optional(),
|
|
283
286
|
topK: z.int().optional(),
|
|
284
287
|
topLogprobs: z.nullable(z.int()).optional(),
|