@openrouter/sdk 0.13.58 → 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/funcs/betaResponsesSend.d.ts +2 -4
- package/esm/funcs/byokList.js +1 -2
- package/esm/funcs/chatSend.d.ts +2 -4
- package/esm/funcs/datasetsGetAppRankings.js +1 -2
- package/esm/funcs/embeddingsListModels.js +1 -2
- package/esm/funcs/filesList.js +2 -3
- package/esm/funcs/guardrailsList.js +1 -2
- package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +1 -2
- package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +1 -2
- package/esm/funcs/guardrailsListKeyAssignments.js +1 -2
- package/esm/funcs/guardrailsListMemberAssignments.js +1 -2
- package/esm/funcs/imagesGenerate.d.ts +2 -4
- package/esm/funcs/modelsList.js +1 -2
- package/esm/funcs/modelsListForUser.js +1 -2
- package/esm/funcs/observabilityList.js +1 -2
- package/esm/funcs/organizationListMembers.js +1 -2
- package/esm/funcs/presetsList.js +1 -2
- package/esm/funcs/presetsListVersions.js +1 -2
- package/esm/funcs/workspacesList.js +1 -2
- package/esm/funcs/workspacesListMembers.js +1 -2
- package/esm/hooks/types.d.ts +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/lib/encodings.js +1 -1
- package/esm/lib/env.js +3 -3
- package/esm/lib/event-streams.d.ts +7 -2
- package/esm/lib/event-streams.js +30 -14
- package/esm/lib/matchers.js +1 -1
- package/esm/lib/primitives.d.ts +1 -0
- package/esm/lib/primitives.js +17 -0
- package/esm/lib/retries.js +7 -0
- package/esm/lib/sdks.js +50 -16
- 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/chatstreamingresponse.js +3 -1
- 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/imagestreamingresponse.js +3 -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 +37 -5
- package/esm/models/responsesrequest.js +24 -4
- package/esm/models/responsesstreamingresponse.js +3 -1
- 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/esm/sdk/chat.d.ts +2 -4
- package/esm/sdk/images.d.ts +2 -3
- package/esm/sdk/responses.d.ts +2 -4
- package/esm/types/async.js +8 -7
- package/jsr.json +1 -1
- package/package.json +4 -4
- package/esm/lib/dlv.d.ts +0 -14
- package/esm/lib/dlv.js +0 -47
- package/esm/lib/is-plain-object.d.ts +0 -2
- package/esm/lib/is-plain-object.js +0 -39
- 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
|
@@ -27,8 +27,7 @@ export class UnprocessableEntityResponseError extends OpenRouterError {
|
|
|
27
27
|
/** @internal */
|
|
28
28
|
export const UnprocessableEntityResponseError$inboundSchema = z.object({
|
|
29
29
|
error: models.UnprocessableEntityResponseErrorData$inboundSchema,
|
|
30
|
-
openrouter_metadata: z.nullable(z.record(z.string(), z.
|
|
31
|
-
.optional(),
|
|
30
|
+
openrouter_metadata: z.nullable(z.record(z.string(), z.any())).optional(),
|
|
32
31
|
user_id: z.nullable(z.string()).optional(),
|
|
33
32
|
request$: z.custom(x => x instanceof Request),
|
|
34
33
|
response$: z.custom(x => x instanceof Response),
|
|
@@ -19,7 +19,7 @@ export type Filters = {
|
|
|
19
19
|
type: FiltersType;
|
|
20
20
|
value: string | number | boolean | Array<string | number>;
|
|
21
21
|
};
|
|
22
|
-
export type FiltersUnion = Filters | CompoundFilter
|
|
22
|
+
export type FiltersUnion = Filters | CompoundFilter;
|
|
23
23
|
export declare const Ranker: {
|
|
24
24
|
readonly Auto: "auto";
|
|
25
25
|
readonly Default20241115: "default-2024-11-15";
|
|
@@ -37,7 +37,7 @@ export type TypeFileSearch = ClosedEnum<typeof TypeFileSearch>;
|
|
|
37
37
|
* File search tool configuration
|
|
38
38
|
*/
|
|
39
39
|
export type FileSearchServerTool = {
|
|
40
|
-
filters?: Filters | CompoundFilter |
|
|
40
|
+
filters?: Filters | CompoundFilter | null | undefined;
|
|
41
41
|
maxNumResults?: number | undefined;
|
|
42
42
|
rankingOptions?: RankingOptions | undefined;
|
|
43
43
|
type: TypeFileSearch;
|
|
@@ -78,7 +78,7 @@ export declare function filtersFromJSON(jsonString: string): SafeParseResult<Fil
|
|
|
78
78
|
/** @internal */
|
|
79
79
|
export declare const FiltersUnion$inboundSchema: z.ZodType<FiltersUnion, unknown>;
|
|
80
80
|
/** @internal */
|
|
81
|
-
export type FiltersUnion$Outbound = Filters$Outbound | CompoundFilter$Outbound
|
|
81
|
+
export type FiltersUnion$Outbound = Filters$Outbound | CompoundFilter$Outbound;
|
|
82
82
|
/** @internal */
|
|
83
83
|
export declare const FiltersUnion$outboundSchema: z.ZodType<FiltersUnion$Outbound, FiltersUnion>;
|
|
84
84
|
export declare function filtersUnionToJSON(filtersUnion: FiltersUnion): string;
|
|
@@ -106,7 +106,7 @@ export declare const TypeFileSearch$outboundSchema: z.ZodEnum<typeof TypeFileSea
|
|
|
106
106
|
export declare const FileSearchServerTool$inboundSchema: z.ZodType<FileSearchServerTool, unknown>;
|
|
107
107
|
/** @internal */
|
|
108
108
|
export type FileSearchServerTool$Outbound = {
|
|
109
|
-
filters?: Filters$Outbound | CompoundFilter$Outbound |
|
|
109
|
+
filters?: Filters$Outbound | CompoundFilter$Outbound | null | undefined;
|
|
110
110
|
max_num_results?: number | undefined;
|
|
111
111
|
ranking_options?: RankingOptions$Outbound | undefined;
|
|
112
112
|
type: string;
|
|
@@ -87,16 +87,11 @@ export function filtersFromJSON(jsonString) {
|
|
|
87
87
|
}
|
|
88
88
|
/** @internal */
|
|
89
89
|
export const FiltersUnion$inboundSchema = z
|
|
90
|
-
.union([
|
|
91
|
-
z.lazy(() => Filters$inboundSchema),
|
|
92
|
-
CompoundFilter$inboundSchema,
|
|
93
|
-
z.any(),
|
|
94
|
-
]);
|
|
90
|
+
.union([z.lazy(() => Filters$inboundSchema), CompoundFilter$inboundSchema]);
|
|
95
91
|
/** @internal */
|
|
96
92
|
export const FiltersUnion$outboundSchema = z.union([
|
|
97
93
|
z.lazy(() => Filters$outboundSchema),
|
|
98
94
|
CompoundFilter$outboundSchema,
|
|
99
|
-
z.any(),
|
|
100
95
|
]);
|
|
101
96
|
export function filtersUnionToJSON(filtersUnion) {
|
|
102
97
|
return JSON.stringify(FiltersUnion$outboundSchema.parse(filtersUnion));
|
|
@@ -144,7 +139,6 @@ export const FileSearchServerTool$inboundSchema = z.object({
|
|
|
144
139
|
filters: z.nullable(z.union([
|
|
145
140
|
z.lazy(() => Filters$inboundSchema),
|
|
146
141
|
CompoundFilter$inboundSchema,
|
|
147
|
-
z.any(),
|
|
148
142
|
])).optional(),
|
|
149
143
|
max_num_results: z.int().optional(),
|
|
150
144
|
ranking_options: z.lazy(() => RankingOptions$inboundSchema).optional(),
|
|
@@ -162,7 +156,6 @@ export const FileSearchServerTool$outboundSchema = z.object({
|
|
|
162
156
|
filters: z.nullable(z.union([
|
|
163
157
|
z.lazy(() => Filters$outboundSchema),
|
|
164
158
|
CompoundFilter$outboundSchema,
|
|
165
|
-
z.any(),
|
|
166
159
|
])).optional(),
|
|
167
160
|
maxNumResults: z.int().optional(),
|
|
168
161
|
rankingOptions: z.lazy(() => RankingOptions$outboundSchema).optional(),
|
|
@@ -8,7 +8,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
export const ForbiddenResponseErrorData$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 forbiddenResponseErrorDataFromJSON(jsonString) {
|
|
14
14
|
return safeParse(jsonString, (x) => ForbiddenResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ForbiddenResponseErrorData' from JSON`);
|
|
@@ -8,7 +8,7 @@ export type FormatJsonSchemaConfig = {
|
|
|
8
8
|
description?: string | undefined;
|
|
9
9
|
name: string;
|
|
10
10
|
schema: {
|
|
11
|
-
[k: string]: any
|
|
11
|
+
[k: string]: any;
|
|
12
12
|
};
|
|
13
13
|
strict?: boolean | null | undefined;
|
|
14
14
|
type: "json_schema";
|
|
@@ -20,7 +20,7 @@ export type FormatJsonSchemaConfig$Outbound = {
|
|
|
20
20
|
description?: string | undefined;
|
|
21
21
|
name: string;
|
|
22
22
|
schema: {
|
|
23
|
-
[k: string]: any
|
|
23
|
+
[k: string]: any;
|
|
24
24
|
};
|
|
25
25
|
strict?: boolean | null | undefined;
|
|
26
26
|
type: "json_schema";
|
|
@@ -8,7 +8,7 @@ import { safeParse } from "../lib/schemas.js";
|
|
|
8
8
|
export const FormatJsonSchemaConfig$inboundSchema = z.object({
|
|
9
9
|
description: z.string().optional(),
|
|
10
10
|
name: z.string(),
|
|
11
|
-
schema: z.record(z.string(), z.
|
|
11
|
+
schema: z.record(z.string(), z.any()),
|
|
12
12
|
strict: z.nullable(z.boolean()).optional(),
|
|
13
13
|
type: z.literal("json_schema"),
|
|
14
14
|
});
|
|
@@ -16,7 +16,7 @@ export const FormatJsonSchemaConfig$inboundSchema = z.object({
|
|
|
16
16
|
export const FormatJsonSchemaConfig$outboundSchema = z.object({
|
|
17
17
|
description: z.string().optional(),
|
|
18
18
|
name: z.string(),
|
|
19
|
-
schema: z.record(z.string(), z.
|
|
19
|
+
schema: z.record(z.string(), z.any()),
|
|
20
20
|
strict: z.nullable(z.boolean()).optional(),
|
|
21
21
|
type: z.literal("json_schema"),
|
|
22
22
|
});
|
|
@@ -2,6 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { ClosedEnum, OpenEnum } from "../types/enums.js";
|
|
3
3
|
import { InputFile, InputFile$Outbound } from "./inputfile.js";
|
|
4
4
|
import { InputText, InputText$Outbound } from "./inputtext.js";
|
|
5
|
+
import { ToolCallStatus } from "./toolcallstatus.js";
|
|
5
6
|
export declare const FunctionCallOutputItemDetail: {
|
|
6
7
|
readonly Auto: "auto";
|
|
7
8
|
readonly High: "high";
|
|
@@ -19,12 +20,6 @@ export type FunctionCallOutputItemOutputInputImage = {
|
|
|
19
20
|
};
|
|
20
21
|
export type FunctionCallOutputItemOutputUnion1 = InputText | FunctionCallOutputItemOutputInputImage | InputFile;
|
|
21
22
|
export type FunctionCallOutputItemOutputUnion2 = string | Array<InputText | FunctionCallOutputItemOutputInputImage | InputFile>;
|
|
22
|
-
export declare const FunctionCallOutputItemStatus: {
|
|
23
|
-
readonly InProgress: "in_progress";
|
|
24
|
-
readonly Completed: "completed";
|
|
25
|
-
readonly Incomplete: "incomplete";
|
|
26
|
-
};
|
|
27
|
-
export type FunctionCallOutputItemStatus = OpenEnum<typeof FunctionCallOutputItemStatus>;
|
|
28
23
|
export declare const FunctionCallOutputItemTypeFunctionCallOutput: {
|
|
29
24
|
readonly FunctionCallOutput: "function_call_output";
|
|
30
25
|
};
|
|
@@ -36,7 +31,7 @@ export type FunctionCallOutputItem = {
|
|
|
36
31
|
callId: string;
|
|
37
32
|
id?: string | null | undefined;
|
|
38
33
|
output: string | Array<InputText | FunctionCallOutputItemOutputInputImage | InputFile>;
|
|
39
|
-
status?:
|
|
34
|
+
status?: ToolCallStatus | null | undefined;
|
|
40
35
|
type: FunctionCallOutputItemTypeFunctionCallOutput;
|
|
41
36
|
};
|
|
42
37
|
/** @internal */
|
|
@@ -61,8 +56,6 @@ export type FunctionCallOutputItemOutputUnion2$Outbound = string | Array<InputTe
|
|
|
61
56
|
export declare const FunctionCallOutputItemOutputUnion2$outboundSchema: z.ZodType<FunctionCallOutputItemOutputUnion2$Outbound, FunctionCallOutputItemOutputUnion2>;
|
|
62
57
|
export declare function functionCallOutputItemOutputUnion2ToJSON(functionCallOutputItemOutputUnion2: FunctionCallOutputItemOutputUnion2): string;
|
|
63
58
|
/** @internal */
|
|
64
|
-
export declare const FunctionCallOutputItemStatus$outboundSchema: z.ZodType<string, FunctionCallOutputItemStatus>;
|
|
65
|
-
/** @internal */
|
|
66
59
|
export declare const FunctionCallOutputItemTypeFunctionCallOutput$outboundSchema: z.ZodEnum<typeof FunctionCallOutputItemTypeFunctionCallOutput>;
|
|
67
60
|
/** @internal */
|
|
68
61
|
export type FunctionCallOutputItem$Outbound = {
|
|
@@ -7,17 +7,13 @@ import { remap as remap$ } from "../lib/primitives.js";
|
|
|
7
7
|
import * as openEnums from "../types/enums.js";
|
|
8
8
|
import { InputFile$outboundSchema, } from "./inputfile.js";
|
|
9
9
|
import { InputText$outboundSchema, } from "./inputtext.js";
|
|
10
|
+
import { ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
|
|
10
11
|
export const FunctionCallOutputItemDetail = {
|
|
11
12
|
Auto: "auto",
|
|
12
13
|
High: "high",
|
|
13
14
|
Low: "low",
|
|
14
15
|
Original: "original",
|
|
15
16
|
};
|
|
16
|
-
export const FunctionCallOutputItemStatus = {
|
|
17
|
-
InProgress: "in_progress",
|
|
18
|
-
Completed: "completed",
|
|
19
|
-
Incomplete: "incomplete",
|
|
20
|
-
};
|
|
21
17
|
export const FunctionCallOutputItemTypeFunctionCallOutput = {
|
|
22
18
|
FunctionCallOutput: "function_call_output",
|
|
23
19
|
};
|
|
@@ -58,8 +54,6 @@ export function functionCallOutputItemOutputUnion2ToJSON(functionCallOutputItemO
|
|
|
58
54
|
return JSON.stringify(FunctionCallOutputItemOutputUnion2$outboundSchema.parse(functionCallOutputItemOutputUnion2));
|
|
59
55
|
}
|
|
60
56
|
/** @internal */
|
|
61
|
-
export const FunctionCallOutputItemStatus$outboundSchema = openEnums.outboundSchema(FunctionCallOutputItemStatus);
|
|
62
|
-
/** @internal */
|
|
63
57
|
export const FunctionCallOutputItemTypeFunctionCallOutput$outboundSchema = z.enum(FunctionCallOutputItemTypeFunctionCallOutput);
|
|
64
58
|
/** @internal */
|
|
65
59
|
export const FunctionCallOutputItem$outboundSchema = z.object({
|
|
@@ -73,7 +67,7 @@ export const FunctionCallOutputItem$outboundSchema = z.object({
|
|
|
73
67
|
InputFile$outboundSchema,
|
|
74
68
|
])),
|
|
75
69
|
]),
|
|
76
|
-
status: z.nullable(
|
|
70
|
+
status: z.nullable(ToolCallStatus$outboundSchema).optional(),
|
|
77
71
|
type: FunctionCallOutputItemTypeFunctionCallOutput$outboundSchema,
|
|
78
72
|
}).transform((v) => {
|
|
79
73
|
return remap$(v, {
|
|
@@ -12,12 +12,19 @@ export declare const PresetEnum: {
|
|
|
12
12
|
* A curated OpenRouter fusion preset (slugs follow `<task>-<tier>`, e.g. `general-high`). Expands server-side into the preset's analysis_models panel and judge model, so callers never name individual models. Explicitly provided `analysis_models` / `model` take precedence.
|
|
13
13
|
*/
|
|
14
14
|
export type PresetEnum = OpenEnum<typeof PresetEnum>;
|
|
15
|
+
export type Parameters2 = string | number | boolean;
|
|
16
|
+
export type Parameters1 = string | number | boolean;
|
|
17
|
+
export type Parameters3 = string | number | boolean | Array<string | number | boolean | null> | {
|
|
18
|
+
[k: string]: string | number | boolean | null;
|
|
19
|
+
};
|
|
15
20
|
export type FusionPluginTool = {
|
|
16
21
|
/**
|
|
17
22
|
* Optional configuration forwarded as the tool's `parameters` object.
|
|
18
23
|
*/
|
|
19
24
|
parameters?: {
|
|
20
|
-
[k: string]:
|
|
25
|
+
[k: string]: string | number | boolean | Array<string | number | boolean | null> | {
|
|
26
|
+
[k: string]: string | number | boolean | null;
|
|
27
|
+
} | null;
|
|
21
28
|
} | undefined;
|
|
22
29
|
/**
|
|
23
30
|
* Server tool type identifier (e.g. "openrouter:web_search", "openrouter:web_fetch").
|
|
@@ -54,9 +61,28 @@ export type FusionPlugin = {
|
|
|
54
61
|
/** @internal */
|
|
55
62
|
export declare const PresetEnum$outboundSchema: z.ZodType<string, PresetEnum>;
|
|
56
63
|
/** @internal */
|
|
64
|
+
export type Parameters2$Outbound = string | number | boolean;
|
|
65
|
+
/** @internal */
|
|
66
|
+
export declare const Parameters2$outboundSchema: z.ZodType<Parameters2$Outbound, Parameters2>;
|
|
67
|
+
export declare function parameters2ToJSON(parameters2: Parameters2): string;
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type Parameters1$Outbound = string | number | boolean;
|
|
70
|
+
/** @internal */
|
|
71
|
+
export declare const Parameters1$outboundSchema: z.ZodType<Parameters1$Outbound, Parameters1>;
|
|
72
|
+
export declare function parameters1ToJSON(parameters1: Parameters1): string;
|
|
73
|
+
/** @internal */
|
|
74
|
+
export type Parameters3$Outbound = string | number | boolean | Array<string | number | boolean | null> | {
|
|
75
|
+
[k: string]: string | number | boolean | null;
|
|
76
|
+
};
|
|
77
|
+
/** @internal */
|
|
78
|
+
export declare const Parameters3$outboundSchema: z.ZodType<Parameters3$Outbound, Parameters3>;
|
|
79
|
+
export declare function parameters3ToJSON(parameters3: Parameters3): string;
|
|
80
|
+
/** @internal */
|
|
57
81
|
export type FusionPluginTool$Outbound = {
|
|
58
82
|
parameters?: {
|
|
59
|
-
[k: string]:
|
|
83
|
+
[k: string]: string | number | boolean | Array<string | number | boolean | null> | {
|
|
84
|
+
[k: string]: string | number | boolean | null;
|
|
85
|
+
} | null;
|
|
60
86
|
} | undefined;
|
|
61
87
|
type: string;
|
|
62
88
|
};
|
|
@@ -16,8 +16,35 @@ export const PresetEnum = {
|
|
|
16
16
|
/** @internal */
|
|
17
17
|
export const PresetEnum$outboundSchema = openEnums.outboundSchema(PresetEnum);
|
|
18
18
|
/** @internal */
|
|
19
|
+
export const Parameters2$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
|
|
20
|
+
export function parameters2ToJSON(parameters2) {
|
|
21
|
+
return JSON.stringify(Parameters2$outboundSchema.parse(parameters2));
|
|
22
|
+
}
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const Parameters1$outboundSchema = z.union([z.string(), z.number(), z.boolean()]);
|
|
25
|
+
export function parameters1ToJSON(parameters1) {
|
|
26
|
+
return JSON.stringify(Parameters1$outboundSchema.parse(parameters1));
|
|
27
|
+
}
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const Parameters3$outboundSchema = z.union([
|
|
30
|
+
z.string(),
|
|
31
|
+
z.number(),
|
|
32
|
+
z.boolean(),
|
|
33
|
+
z.array(z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
|
|
34
|
+
z.record(z.string(), z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
|
|
35
|
+
]);
|
|
36
|
+
export function parameters3ToJSON(parameters3) {
|
|
37
|
+
return JSON.stringify(Parameters3$outboundSchema.parse(parameters3));
|
|
38
|
+
}
|
|
39
|
+
/** @internal */
|
|
19
40
|
export const FusionPluginTool$outboundSchema = z.object({
|
|
20
|
-
parameters: z.record(z.string(), z.nullable(z.
|
|
41
|
+
parameters: z.record(z.string(), z.nullable(z.union([
|
|
42
|
+
z.string(),
|
|
43
|
+
z.number(),
|
|
44
|
+
z.boolean(),
|
|
45
|
+
z.array(z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
|
|
46
|
+
z.record(z.string(), z.nullable(z.union([z.string(), z.number(), z.boolean()]))),
|
|
47
|
+
]))).optional(),
|
|
21
48
|
type: z.string(),
|
|
22
49
|
});
|
|
23
50
|
export function fusionPluginToolToJSON(fusionPluginTool) {
|
|
@@ -35,7 +35,7 @@ export type FusionServerToolConfigTool = {
|
|
|
35
35
|
* Optional configuration forwarded as the tool's `parameters` object.
|
|
36
36
|
*/
|
|
37
37
|
parameters?: {
|
|
38
|
-
[k: string]: any
|
|
38
|
+
[k: string]: any;
|
|
39
39
|
} | undefined;
|
|
40
40
|
/**
|
|
41
41
|
* Server tool type identifier (e.g. "openrouter:web_search", "openrouter:web_fetch").
|
|
@@ -92,7 +92,7 @@ export declare function fusionServerToolConfigReasoningToJSON(fusionServerToolCo
|
|
|
92
92
|
/** @internal */
|
|
93
93
|
export type FusionServerToolConfigTool$Outbound = {
|
|
94
94
|
parameters?: {
|
|
95
|
-
[k: string]: any
|
|
95
|
+
[k: string]: any;
|
|
96
96
|
} | undefined;
|
|
97
97
|
type: string;
|
|
98
98
|
};
|
|
@@ -34,7 +34,7 @@ export function fusionServerToolConfigReasoningToJSON(fusionServerToolConfigReas
|
|
|
34
34
|
}
|
|
35
35
|
/** @internal */
|
|
36
36
|
export const FusionServerToolConfigTool$outboundSchema = z.object({
|
|
37
|
-
parameters: z.record(z.string(), z.
|
|
37
|
+
parameters: z.record(z.string(), z.any()).optional(),
|
|
38
38
|
type: z.string(),
|
|
39
39
|
});
|
|
40
40
|
export function fusionServerToolConfigToolToJSON(fusionServerToolConfigTool) {
|
|
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
|
|
|
2
2
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
3
3
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
4
4
|
export type Input2 = {
|
|
5
|
-
messages: Array<any
|
|
5
|
+
messages: Array<any>;
|
|
6
6
|
};
|
|
7
7
|
export type Input1 = {
|
|
8
8
|
prompt: string;
|
|
@@ -6,7 +6,7 @@ import * as z from "zod/v4";
|
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
/** @internal */
|
|
8
8
|
export const Input2$inboundSchema = z.object({
|
|
9
|
-
messages: z.array(z.
|
|
9
|
+
messages: z.array(z.any()),
|
|
10
10
|
});
|
|
11
11
|
export function input2FromJSON(jsonString) {
|
|
12
12
|
return safeParse(jsonString, (x) => Input2$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Input2' from JSON`);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as z from "zod/v4";
|
|
2
|
-
export type ImageConfig = string | number | Array<any
|
|
2
|
+
export type ImageConfig = string | number | Array<any>;
|
|
3
3
|
/** @internal */
|
|
4
|
-
export type ImageConfig$Outbound = string | number | Array<any
|
|
4
|
+
export type ImageConfig$Outbound = string | number | Array<any>;
|
|
5
5
|
/** @internal */
|
|
6
6
|
export declare const ImageConfig$outboundSchema: z.ZodType<ImageConfig$Outbound, ImageConfig>;
|
|
7
7
|
export declare function imageConfigToJSON(imageConfig: ImageConfig): string;
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import * as z from "zod/v4";
|
|
6
6
|
/** @internal */
|
|
7
|
-
export const ImageConfig$outboundSchema = z.union([z.string(), z.number(), z.array(z.
|
|
7
|
+
export const ImageConfig$outboundSchema = z.union([z.string(), z.number(), z.array(z.any())]);
|
|
8
8
|
export function imageConfigToJSON(imageConfig) {
|
|
9
9
|
return JSON.stringify(ImageConfig$outboundSchema.parse(imageConfig));
|
|
10
10
|
}
|