@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.
Files changed (193) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/additionaltoolsitem.d.ts +7 -7
  4. package/esm/models/additionaltoolsitem.js +5 -5
  5. package/esm/models/advisornestedtool.d.ts +3 -3
  6. package/esm/models/advisornestedtool.js +2 -2
  7. package/esm/models/agentmessageitem.d.ts +3 -3
  8. package/esm/models/agentmessageitem.js +3 -3
  9. package/esm/models/autobetarouterplugin.d.ts +27 -0
  10. package/esm/models/autobetarouterplugin.js +22 -0
  11. package/esm/models/badgatewayresponseerrordata.d.ts +1 -1
  12. package/esm/models/badgatewayresponseerrordata.js +1 -1
  13. package/esm/models/badrequestresponseerrordata.d.ts +1 -1
  14. package/esm/models/badrequestresponseerrordata.js +1 -1
  15. package/esm/models/baseinputsunion.d.ts +3 -3
  16. package/esm/models/baseinputsunion.js +0 -3
  17. package/esm/models/byokproviderslug.d.ts +1 -0
  18. package/esm/models/byokproviderslug.js +1 -0
  19. package/esm/models/chatassistantmessage.d.ts +4 -4
  20. package/esm/models/chatassistantmessage.js +4 -4
  21. package/esm/models/chatfunctiontool.d.ts +2 -2
  22. package/esm/models/chatfunctiontool.js +1 -1
  23. package/esm/models/chatjsonschemaconfig.d.ts +2 -2
  24. package/esm/models/chatjsonschemaconfig.js +1 -1
  25. package/esm/models/chatrequest.d.ts +9 -8
  26. package/esm/models/chatrequest.js +4 -3
  27. package/esm/models/compactionitem.d.ts +1 -1
  28. package/esm/models/compactionitem.js +1 -1
  29. package/esm/models/compoundfilter.d.ts +2 -2
  30. package/esm/models/compoundfilter.js +2 -2
  31. package/esm/models/conflictresponseerrordata.d.ts +1 -1
  32. package/esm/models/conflictresponseerrordata.js +1 -1
  33. package/esm/models/contextcompactionitem.d.ts +1 -1
  34. package/esm/models/contextcompactionitem.js +1 -1
  35. package/esm/models/createobservabilitydestinationrequest.d.ts +2 -2
  36. package/esm/models/createobservabilitydestinationrequest.js +1 -1
  37. package/esm/models/debugevent.d.ts +1 -1
  38. package/esm/models/debugevent.js +1 -1
  39. package/esm/models/easyinputmessage.d.ts +8 -8
  40. package/esm/models/easyinputmessage.js +0 -4
  41. package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +1 -1
  42. package/esm/models/edgenetworktimeoutresponseerrordata.js +1 -1
  43. package/esm/models/errors/badgatewayresponseerror.d.ts +2 -2
  44. package/esm/models/errors/badgatewayresponseerror.js +1 -2
  45. package/esm/models/errors/badrequestresponseerror.d.ts +2 -2
  46. package/esm/models/errors/badrequestresponseerror.js +1 -2
  47. package/esm/models/errors/conflictresponseerror.d.ts +2 -2
  48. package/esm/models/errors/conflictresponseerror.js +1 -2
  49. package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +2 -2
  50. package/esm/models/errors/edgenetworktimeoutresponseerror.js +1 -2
  51. package/esm/models/errors/forbiddenresponseerror.d.ts +2 -2
  52. package/esm/models/errors/forbiddenresponseerror.js +1 -2
  53. package/esm/models/errors/internalserverresponseerror.d.ts +2 -2
  54. package/esm/models/errors/internalserverresponseerror.js +1 -2
  55. package/esm/models/errors/notfoundresponseerror.d.ts +2 -2
  56. package/esm/models/errors/notfoundresponseerror.js +1 -2
  57. package/esm/models/errors/payloadtoolargeresponseerror.d.ts +2 -2
  58. package/esm/models/errors/payloadtoolargeresponseerror.js +1 -2
  59. package/esm/models/errors/paymentrequiredresponseerror.d.ts +2 -2
  60. package/esm/models/errors/paymentrequiredresponseerror.js +1 -2
  61. package/esm/models/errors/provideroverloadedresponseerror.d.ts +2 -2
  62. package/esm/models/errors/provideroverloadedresponseerror.js +1 -2
  63. package/esm/models/errors/requesttimeoutresponseerror.d.ts +2 -2
  64. package/esm/models/errors/requesttimeoutresponseerror.js +1 -2
  65. package/esm/models/errors/serviceunavailableresponseerror.d.ts +2 -2
  66. package/esm/models/errors/serviceunavailableresponseerror.js +1 -2
  67. package/esm/models/errors/toomanyrequestsresponseerror.d.ts +2 -2
  68. package/esm/models/errors/toomanyrequestsresponseerror.js +1 -2
  69. package/esm/models/errors/unauthorizedresponseerror.d.ts +2 -2
  70. package/esm/models/errors/unauthorizedresponseerror.js +1 -2
  71. package/esm/models/errors/unprocessableentityresponseerror.d.ts +2 -2
  72. package/esm/models/errors/unprocessableentityresponseerror.js +1 -2
  73. package/esm/models/filesearchservertool.d.ts +4 -4
  74. package/esm/models/filesearchservertool.js +1 -8
  75. package/esm/models/forbiddenresponseerrordata.d.ts +1 -1
  76. package/esm/models/forbiddenresponseerrordata.js +1 -1
  77. package/esm/models/formatjsonschemaconfig.d.ts +2 -2
  78. package/esm/models/formatjsonschemaconfig.js +2 -2
  79. package/esm/models/functioncalloutputitem.d.ts +2 -9
  80. package/esm/models/functioncalloutputitem.js +2 -8
  81. package/esm/models/fusionplugin.d.ts +28 -2
  82. package/esm/models/fusionplugin.js +28 -1
  83. package/esm/models/fusionservertoolconfig.d.ts +2 -2
  84. package/esm/models/fusionservertoolconfig.js +1 -1
  85. package/esm/models/generationcontentdata.d.ts +1 -1
  86. package/esm/models/generationcontentdata.js +1 -1
  87. package/esm/models/imageconfig.d.ts +2 -2
  88. package/esm/models/imageconfig.js +1 -1
  89. package/esm/models/imagegenerationproviderpreferences.d.ts +256 -250
  90. package/esm/models/imagegenerationproviderpreferences.js +126 -133
  91. package/esm/models/imagegenerationservertoolconfigunion.d.ts +2 -2
  92. package/esm/models/imagegenerationservertoolconfigunion.js +1 -1
  93. package/esm/models/index.d.ts +1 -2
  94. package/esm/models/index.js +1 -2
  95. package/esm/models/inputsunion.d.ts +8 -8
  96. package/esm/models/inputsunion.js +0 -4
  97. package/esm/models/internalserverresponseerrordata.d.ts +1 -1
  98. package/esm/models/internalserverresponseerrordata.js +1 -1
  99. package/esm/models/listendpointsresponse.d.ts +2 -33
  100. package/esm/models/listendpointsresponse.js +2 -30
  101. package/esm/models/localshellcalloutputitem.d.ts +3 -10
  102. package/esm/models/localshellcalloutputitem.js +2 -9
  103. package/esm/models/mcplisttoolsitem.d.ts +4 -4
  104. package/esm/models/mcplisttoolsitem.js +2 -2
  105. package/esm/models/mcpservertool.d.ts +8 -8
  106. package/esm/models/mcpservertool.js +4 -24
  107. package/esm/models/messagesadvisortoolresultblock.d.ts +2 -2
  108. package/esm/models/messagesadvisortoolresultblock.js +1 -1
  109. package/esm/models/messagesfallbackparam.d.ts +1 -1
  110. package/esm/models/messagesfallbackparam.js +1 -1
  111. package/esm/models/messagesmessageparam.d.ts +4 -4
  112. package/esm/models/messagesmessageparam.js +2 -2
  113. package/esm/models/messagesoutputconfig.d.ts +2 -2
  114. package/esm/models/messagesoutputconfig.js +1 -1
  115. package/esm/models/messagesrequest.d.ts +15 -36
  116. package/esm/models/messagesrequest.js +10 -21
  117. package/esm/models/namespacefunctiontool.d.ts +4 -4
  118. package/esm/models/namespacefunctiontool.js +4 -6
  119. package/esm/models/notfoundresponseerrordata.d.ts +1 -1
  120. package/esm/models/notfoundresponseerrordata.js +1 -1
  121. package/esm/models/openairesponsefunctiontoolcalloutput.d.ts +3 -10
  122. package/esm/models/openairesponsefunctiontoolcalloutput.js +2 -11
  123. package/esm/models/openresponsesresult.d.ts +46 -2
  124. package/esm/models/openresponsesresult.js +69 -3
  125. package/esm/models/operations/listbyokkeys.d.ts +1 -0
  126. package/esm/models/operations/listbyokkeys.js +1 -0
  127. package/esm/models/outputcomputercallitem.d.ts +2 -2
  128. package/esm/models/outputcomputercallitem.js +2 -2
  129. package/esm/models/outputmemoryservertoolitem.d.ts +2 -2
  130. package/esm/models/outputmemoryservertoolitem.js +2 -2
  131. package/esm/models/outputmessage.d.ts +2 -2
  132. package/esm/models/outputmessage.js +0 -2
  133. package/esm/models/outputmessageitem.d.ts +2 -2
  134. package/esm/models/outputmessageitem.js +0 -2
  135. package/esm/models/payloadtoolargeresponseerrordata.d.ts +1 -1
  136. package/esm/models/payloadtoolargeresponseerrordata.js +1 -1
  137. package/esm/models/paymentrequiredresponseerrordata.d.ts +1 -1
  138. package/esm/models/paymentrequiredresponseerrordata.js +1 -1
  139. package/esm/models/pipelinestage.d.ts +1 -1
  140. package/esm/models/pipelinestage.js +1 -1
  141. package/esm/models/preferredmaxlatency.d.ts +2 -2
  142. package/esm/models/preferredmaxlatency.js +1 -1
  143. package/esm/models/preferredminthroughput.d.ts +2 -2
  144. package/esm/models/preferredminthroughput.js +1 -1
  145. package/esm/models/presetdesignatedversion.d.ts +1 -1
  146. package/esm/models/presetdesignatedversion.js +1 -1
  147. package/esm/models/providername.d.ts +2 -1
  148. package/esm/models/providername.js +2 -1
  149. package/esm/models/provideroptions.d.ts +252 -246
  150. package/esm/models/provideroptions.js +124 -123
  151. package/esm/models/provideroverloadedresponseerrordata.d.ts +1 -1
  152. package/esm/models/provideroverloadedresponseerrordata.js +1 -1
  153. package/esm/models/providerpreferences.d.ts +4 -4
  154. package/esm/models/providerpreferences.js +2 -10
  155. package/esm/models/providerresponse.d.ts +2 -1
  156. package/esm/models/providerresponse.js +2 -1
  157. package/esm/models/publicendpoint.d.ts +2 -16
  158. package/esm/models/publicendpoint.js +2 -15
  159. package/esm/models/quantization.d.ts +2 -0
  160. package/esm/models/quantization.js +2 -0
  161. package/esm/models/requesttimeoutresponseerrordata.d.ts +1 -1
  162. package/esm/models/requesttimeoutresponseerrordata.js +1 -1
  163. package/esm/models/responsesrequest.d.ts +39 -9
  164. package/esm/models/responsesrequest.js +27 -4
  165. package/esm/models/routerparams.d.ts +1 -1
  166. package/esm/models/serviceunavailableresponseerrordata.d.ts +1 -1
  167. package/esm/models/serviceunavailableresponseerrordata.js +1 -1
  168. package/esm/models/shellcallitem.d.ts +5 -12
  169. package/esm/models/shellcallitem.js +3 -10
  170. package/esm/models/shellcalloutputitem.d.ts +4 -11
  171. package/esm/models/shellcalloutputitem.js +3 -10
  172. package/esm/models/subagentnestedtool.d.ts +3 -3
  173. package/esm/models/subagentnestedtool.js +2 -2
  174. package/esm/models/toolchoiceallowed.d.ts +2 -2
  175. package/esm/models/toolchoiceallowed.js +2 -2
  176. package/esm/models/toomanyrequestsresponseerrordata.d.ts +1 -1
  177. package/esm/models/toomanyrequestsresponseerrordata.js +1 -1
  178. package/esm/models/traceconfig.d.ts +1 -1
  179. package/esm/models/traceconfig.js +1 -1
  180. package/esm/models/unauthorizedresponseerrordata.d.ts +1 -1
  181. package/esm/models/unauthorizedresponseerrordata.js +1 -1
  182. package/esm/models/unprocessableentityresponseerrordata.d.ts +1 -1
  183. package/esm/models/unprocessableentityresponseerrordata.js +1 -1
  184. package/esm/models/updateobservabilitydestinationrequest.d.ts +2 -2
  185. package/esm/models/updateobservabilitydestinationrequest.js +1 -1
  186. package/esm/models/videogenerationrequest.d.ts +252 -246
  187. package/esm/models/videogenerationrequest.js +124 -123
  188. package/jsr.json +1 -1
  189. package/package.json +6 -6
  190. package/esm/models/reasoningconfig.d.ts +0 -35
  191. package/esm/models/reasoningconfig.js +0 -27
  192. package/esm/models/usage.d.ts +0 -52
  193. package/esm/models/usage.js +0 -75
@@ -10,7 +10,7 @@ export type UnprocessableEntityResponseErrorData = {
10
10
  */
11
11
  error: models.UnprocessableEntityResponseErrorData;
12
12
  openrouterMetadata?: {
13
- [k: string]: any | null;
13
+ [k: string]: any;
14
14
  } | null | undefined;
15
15
  userId?: string | null | undefined;
16
16
  };
@@ -23,7 +23,7 @@ export declare class UnprocessableEntityResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.UnprocessableEntityResponseErrorData;
25
25
  openrouterMetadata?: {
26
- [k: string]: any | null;
26
+ [k: string]: any;
27
27
  } | null | undefined;
28
28
  userId?: string | null | undefined;
29
29
  /** The original data that was passed to this error instance. */
@@ -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.nullable(z.any())))
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 | any;
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 | any | null | undefined;
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 | any;
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 | any | null | undefined;
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 @@ export type ForbiddenResponseErrorData = {
8
8
  code: number;
9
9
  message: string;
10
10
  metadata?: {
11
- [k: string]: any | null;
11
+ [k: string]: any;
12
12
  } | null | undefined;
13
13
  };
14
14
  /** @internal */
@@ -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.nullable(z.any()))).optional(),
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 | null;
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 | null;
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.nullable(z.any())),
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.nullable(z.any())),
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?: FunctionCallOutputItemStatus | null | undefined;
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(FunctionCallOutputItemStatus$outboundSchema).optional(),
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]: any | null;
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]: any | null;
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.any())).optional(),
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 | null;
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 | null;
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.nullable(z.any())).optional(),
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 | null>;
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.nullable(z.any())),
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 | null>;
2
+ export type ImageConfig = string | number | Array<any>;
3
3
  /** @internal */
4
- export type ImageConfig$Outbound = string | number | Array<any | null>;
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.nullable(z.any()))]);
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
  }