@openrouter/sdk 0.13.59 → 0.13.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (191) 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/badgatewayresponseerrordata.d.ts +1 -1
  10. package/esm/models/badgatewayresponseerrordata.js +1 -1
  11. package/esm/models/badrequestresponseerrordata.d.ts +1 -1
  12. package/esm/models/badrequestresponseerrordata.js +1 -1
  13. package/esm/models/baseinputsunion.d.ts +3 -3
  14. package/esm/models/baseinputsunion.js +0 -3
  15. package/esm/models/byokproviderslug.d.ts +1 -0
  16. package/esm/models/byokproviderslug.js +1 -0
  17. package/esm/models/chatassistantmessage.d.ts +4 -4
  18. package/esm/models/chatassistantmessage.js +4 -4
  19. package/esm/models/chatfunctiontool.d.ts +2 -2
  20. package/esm/models/chatfunctiontool.js +1 -1
  21. package/esm/models/chatjsonschemaconfig.d.ts +2 -2
  22. package/esm/models/chatjsonschemaconfig.js +1 -1
  23. package/esm/models/chatrequest.d.ts +4 -4
  24. package/esm/models/chatrequest.js +1 -3
  25. package/esm/models/compactionitem.d.ts +1 -1
  26. package/esm/models/compactionitem.js +1 -1
  27. package/esm/models/compoundfilter.d.ts +2 -2
  28. package/esm/models/compoundfilter.js +2 -2
  29. package/esm/models/conflictresponseerrordata.d.ts +1 -1
  30. package/esm/models/conflictresponseerrordata.js +1 -1
  31. package/esm/models/contextcompactionitem.d.ts +1 -1
  32. package/esm/models/contextcompactionitem.js +1 -1
  33. package/esm/models/createobservabilitydestinationrequest.d.ts +2 -2
  34. package/esm/models/createobservabilitydestinationrequest.js +1 -1
  35. package/esm/models/debugevent.d.ts +1 -1
  36. package/esm/models/debugevent.js +1 -1
  37. package/esm/models/easyinputmessage.d.ts +8 -8
  38. package/esm/models/easyinputmessage.js +0 -4
  39. package/esm/models/edgenetworktimeoutresponseerrordata.d.ts +1 -1
  40. package/esm/models/edgenetworktimeoutresponseerrordata.js +1 -1
  41. package/esm/models/errors/badgatewayresponseerror.d.ts +2 -2
  42. package/esm/models/errors/badgatewayresponseerror.js +1 -2
  43. package/esm/models/errors/badrequestresponseerror.d.ts +2 -2
  44. package/esm/models/errors/badrequestresponseerror.js +1 -2
  45. package/esm/models/errors/conflictresponseerror.d.ts +2 -2
  46. package/esm/models/errors/conflictresponseerror.js +1 -2
  47. package/esm/models/errors/edgenetworktimeoutresponseerror.d.ts +2 -2
  48. package/esm/models/errors/edgenetworktimeoutresponseerror.js +1 -2
  49. package/esm/models/errors/forbiddenresponseerror.d.ts +2 -2
  50. package/esm/models/errors/forbiddenresponseerror.js +1 -2
  51. package/esm/models/errors/internalserverresponseerror.d.ts +2 -2
  52. package/esm/models/errors/internalserverresponseerror.js +1 -2
  53. package/esm/models/errors/notfoundresponseerror.d.ts +2 -2
  54. package/esm/models/errors/notfoundresponseerror.js +1 -2
  55. package/esm/models/errors/payloadtoolargeresponseerror.d.ts +2 -2
  56. package/esm/models/errors/payloadtoolargeresponseerror.js +1 -2
  57. package/esm/models/errors/paymentrequiredresponseerror.d.ts +2 -2
  58. package/esm/models/errors/paymentrequiredresponseerror.js +1 -2
  59. package/esm/models/errors/provideroverloadedresponseerror.d.ts +2 -2
  60. package/esm/models/errors/provideroverloadedresponseerror.js +1 -2
  61. package/esm/models/errors/requesttimeoutresponseerror.d.ts +2 -2
  62. package/esm/models/errors/requesttimeoutresponseerror.js +1 -2
  63. package/esm/models/errors/serviceunavailableresponseerror.d.ts +2 -2
  64. package/esm/models/errors/serviceunavailableresponseerror.js +1 -2
  65. package/esm/models/errors/toomanyrequestsresponseerror.d.ts +2 -2
  66. package/esm/models/errors/toomanyrequestsresponseerror.js +1 -2
  67. package/esm/models/errors/unauthorizedresponseerror.d.ts +2 -2
  68. package/esm/models/errors/unauthorizedresponseerror.js +1 -2
  69. package/esm/models/errors/unprocessableentityresponseerror.d.ts +2 -2
  70. package/esm/models/errors/unprocessableentityresponseerror.js +1 -2
  71. package/esm/models/filesearchservertool.d.ts +4 -4
  72. package/esm/models/filesearchservertool.js +1 -8
  73. package/esm/models/forbiddenresponseerrordata.d.ts +1 -1
  74. package/esm/models/forbiddenresponseerrordata.js +1 -1
  75. package/esm/models/formatjsonschemaconfig.d.ts +2 -2
  76. package/esm/models/formatjsonschemaconfig.js +2 -2
  77. package/esm/models/functioncalloutputitem.d.ts +2 -9
  78. package/esm/models/functioncalloutputitem.js +2 -8
  79. package/esm/models/fusionplugin.d.ts +28 -2
  80. package/esm/models/fusionplugin.js +28 -1
  81. package/esm/models/fusionservertoolconfig.d.ts +2 -2
  82. package/esm/models/fusionservertoolconfig.js +1 -1
  83. package/esm/models/generationcontentdata.d.ts +1 -1
  84. package/esm/models/generationcontentdata.js +1 -1
  85. package/esm/models/imageconfig.d.ts +2 -2
  86. package/esm/models/imageconfig.js +1 -1
  87. package/esm/models/imagegenerationproviderpreferences.d.ts +256 -250
  88. package/esm/models/imagegenerationproviderpreferences.js +126 -133
  89. package/esm/models/imagegenerationservertoolconfigunion.d.ts +2 -2
  90. package/esm/models/imagegenerationservertoolconfigunion.js +1 -1
  91. package/esm/models/index.d.ts +0 -2
  92. package/esm/models/index.js +0 -2
  93. package/esm/models/inputsunion.d.ts +8 -8
  94. package/esm/models/inputsunion.js +0 -4
  95. package/esm/models/internalserverresponseerrordata.d.ts +1 -1
  96. package/esm/models/internalserverresponseerrordata.js +1 -1
  97. package/esm/models/listendpointsresponse.d.ts +2 -33
  98. package/esm/models/listendpointsresponse.js +2 -30
  99. package/esm/models/localshellcalloutputitem.d.ts +3 -10
  100. package/esm/models/localshellcalloutputitem.js +2 -9
  101. package/esm/models/mcplisttoolsitem.d.ts +4 -4
  102. package/esm/models/mcplisttoolsitem.js +2 -2
  103. package/esm/models/mcpservertool.d.ts +8 -8
  104. package/esm/models/mcpservertool.js +4 -24
  105. package/esm/models/messagesadvisortoolresultblock.d.ts +2 -2
  106. package/esm/models/messagesadvisortoolresultblock.js +1 -1
  107. package/esm/models/messagesfallbackparam.d.ts +1 -1
  108. package/esm/models/messagesfallbackparam.js +1 -1
  109. package/esm/models/messagesmessageparam.d.ts +4 -4
  110. package/esm/models/messagesmessageparam.js +2 -2
  111. package/esm/models/messagesoutputconfig.d.ts +2 -2
  112. package/esm/models/messagesoutputconfig.js +1 -1
  113. package/esm/models/messagesrequest.d.ts +10 -32
  114. package/esm/models/messagesrequest.js +7 -21
  115. package/esm/models/namespacefunctiontool.d.ts +4 -4
  116. package/esm/models/namespacefunctiontool.js +4 -6
  117. package/esm/models/notfoundresponseerrordata.d.ts +1 -1
  118. package/esm/models/notfoundresponseerrordata.js +1 -1
  119. package/esm/models/openairesponsefunctiontoolcalloutput.d.ts +3 -10
  120. package/esm/models/openairesponsefunctiontoolcalloutput.js +2 -11
  121. package/esm/models/openresponsesresult.d.ts +46 -2
  122. package/esm/models/openresponsesresult.js +69 -3
  123. package/esm/models/operations/listbyokkeys.d.ts +1 -0
  124. package/esm/models/operations/listbyokkeys.js +1 -0
  125. package/esm/models/outputcomputercallitem.d.ts +2 -2
  126. package/esm/models/outputcomputercallitem.js +2 -2
  127. package/esm/models/outputmemoryservertoolitem.d.ts +2 -2
  128. package/esm/models/outputmemoryservertoolitem.js +2 -2
  129. package/esm/models/outputmessage.d.ts +2 -2
  130. package/esm/models/outputmessage.js +0 -2
  131. package/esm/models/outputmessageitem.d.ts +2 -2
  132. package/esm/models/outputmessageitem.js +0 -2
  133. package/esm/models/payloadtoolargeresponseerrordata.d.ts +1 -1
  134. package/esm/models/payloadtoolargeresponseerrordata.js +1 -1
  135. package/esm/models/paymentrequiredresponseerrordata.d.ts +1 -1
  136. package/esm/models/paymentrequiredresponseerrordata.js +1 -1
  137. package/esm/models/pipelinestage.d.ts +1 -1
  138. package/esm/models/pipelinestage.js +1 -1
  139. package/esm/models/preferredmaxlatency.d.ts +2 -2
  140. package/esm/models/preferredmaxlatency.js +1 -1
  141. package/esm/models/preferredminthroughput.d.ts +2 -2
  142. package/esm/models/preferredminthroughput.js +1 -1
  143. package/esm/models/presetdesignatedversion.d.ts +1 -1
  144. package/esm/models/presetdesignatedversion.js +1 -1
  145. package/esm/models/providername.d.ts +2 -1
  146. package/esm/models/providername.js +2 -1
  147. package/esm/models/provideroptions.d.ts +252 -246
  148. package/esm/models/provideroptions.js +124 -123
  149. package/esm/models/provideroverloadedresponseerrordata.d.ts +1 -1
  150. package/esm/models/provideroverloadedresponseerrordata.js +1 -1
  151. package/esm/models/providerpreferences.d.ts +4 -4
  152. package/esm/models/providerpreferences.js +2 -10
  153. package/esm/models/providerresponse.d.ts +2 -1
  154. package/esm/models/providerresponse.js +2 -1
  155. package/esm/models/publicendpoint.d.ts +2 -16
  156. package/esm/models/publicendpoint.js +2 -15
  157. package/esm/models/quantization.d.ts +2 -0
  158. package/esm/models/quantization.js +2 -0
  159. package/esm/models/requesttimeoutresponseerrordata.d.ts +1 -1
  160. package/esm/models/requesttimeoutresponseerrordata.js +1 -1
  161. package/esm/models/responsesrequest.d.ts +34 -5
  162. package/esm/models/responsesrequest.js +24 -4
  163. package/esm/models/routerparams.d.ts +1 -1
  164. package/esm/models/serviceunavailableresponseerrordata.d.ts +1 -1
  165. package/esm/models/serviceunavailableresponseerrordata.js +1 -1
  166. package/esm/models/shellcallitem.d.ts +5 -12
  167. package/esm/models/shellcallitem.js +3 -10
  168. package/esm/models/shellcalloutputitem.d.ts +4 -11
  169. package/esm/models/shellcalloutputitem.js +3 -10
  170. package/esm/models/subagentnestedtool.d.ts +3 -3
  171. package/esm/models/subagentnestedtool.js +2 -2
  172. package/esm/models/toolchoiceallowed.d.ts +2 -2
  173. package/esm/models/toolchoiceallowed.js +2 -2
  174. package/esm/models/toomanyrequestsresponseerrordata.d.ts +1 -1
  175. package/esm/models/toomanyrequestsresponseerrordata.js +1 -1
  176. package/esm/models/traceconfig.d.ts +1 -1
  177. package/esm/models/traceconfig.js +1 -1
  178. package/esm/models/unauthorizedresponseerrordata.d.ts +1 -1
  179. package/esm/models/unauthorizedresponseerrordata.js +1 -1
  180. package/esm/models/unprocessableentityresponseerrordata.d.ts +1 -1
  181. package/esm/models/unprocessableentityresponseerrordata.js +1 -1
  182. package/esm/models/updateobservabilitydestinationrequest.d.ts +2 -2
  183. package/esm/models/updateobservabilitydestinationrequest.js +1 -1
  184. package/esm/models/videogenerationrequest.d.ts +252 -246
  185. package/esm/models/videogenerationrequest.js +124 -123
  186. package/jsr.json +1 -1
  187. package/package.json +7 -7
  188. package/esm/models/reasoningconfig.d.ts +0 -35
  189. package/esm/models/reasoningconfig.js +0 -27
  190. package/esm/models/usage.d.ts +0 -52
  191. package/esm/models/usage.js +0 -75
@@ -20,7 +20,7 @@ export type EasyInputMessageContentInputImage = {
20
20
  type: "input_image";
21
21
  };
22
22
  export type EasyInputMessageContentUnion1 = InputText | EasyInputMessageContentInputImage | InputFile | InputAudio | InputVideo;
23
- export type EasyInputMessageContentUnion2 = Array<InputText | EasyInputMessageContentInputImage | InputFile | InputAudio | InputVideo> | string | any;
23
+ export type EasyInputMessageContentUnion2 = Array<InputText | EasyInputMessageContentInputImage | InputFile | InputAudio | InputVideo> | string;
24
24
  export declare const EasyInputMessagePhaseFinalAnswer: {
25
25
  readonly FinalAnswer: "final_answer";
26
26
  };
@@ -32,7 +32,7 @@ export type EasyInputMessagePhaseCommentary = ClosedEnum<typeof EasyInputMessage
32
32
  /**
33
33
  * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.
34
34
  */
35
- export type EasyInputMessagePhaseUnion = EasyInputMessagePhaseCommentary | EasyInputMessagePhaseFinalAnswer | any;
35
+ export type EasyInputMessagePhaseUnion = EasyInputMessagePhaseCommentary | EasyInputMessagePhaseFinalAnswer;
36
36
  export declare const EasyInputMessageRoleDeveloper: {
37
37
  readonly Developer: "developer";
38
38
  };
@@ -55,11 +55,11 @@ export declare const EasyInputMessageTypeMessage: {
55
55
  };
56
56
  export type EasyInputMessageTypeMessage = ClosedEnum<typeof EasyInputMessageTypeMessage>;
57
57
  export type EasyInputMessage = {
58
- content?: Array<InputText | EasyInputMessageContentInputImage | InputFile | InputAudio | InputVideo> | string | any | null | undefined;
58
+ content?: Array<InputText | EasyInputMessageContentInputImage | InputFile | InputAudio | InputVideo> | string | null | undefined;
59
59
  /**
60
60
  * The phase of an assistant message. Use `commentary` for an intermediate assistant message and `final_answer` for the final assistant message. For follow-up requests with models like `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. Omitting it can degrade performance. Not used for user messages.
61
61
  */
62
- phase?: EasyInputMessagePhaseCommentary | EasyInputMessagePhaseFinalAnswer | any | null | undefined;
62
+ phase?: EasyInputMessagePhaseCommentary | EasyInputMessagePhaseFinalAnswer | null | undefined;
63
63
  role: EasyInputMessageRoleUser | EasyInputMessageRoleSystem | EasyInputMessageRoleAssistant | EasyInputMessageRoleDeveloper;
64
64
  type?: EasyInputMessageTypeMessage | undefined;
65
65
  };
@@ -80,7 +80,7 @@ export type EasyInputMessageContentUnion1$Outbound = InputText$Outbound | EasyIn
80
80
  export declare const EasyInputMessageContentUnion1$outboundSchema: z.ZodType<EasyInputMessageContentUnion1$Outbound, EasyInputMessageContentUnion1>;
81
81
  export declare function easyInputMessageContentUnion1ToJSON(easyInputMessageContentUnion1: EasyInputMessageContentUnion1): string;
82
82
  /** @internal */
83
- export type EasyInputMessageContentUnion2$Outbound = Array<InputText$Outbound | EasyInputMessageContentInputImage$Outbound | InputFile$Outbound | InputAudio$Outbound | InputVideo$Outbound> | string | any;
83
+ export type EasyInputMessageContentUnion2$Outbound = Array<InputText$Outbound | EasyInputMessageContentInputImage$Outbound | InputFile$Outbound | InputAudio$Outbound | InputVideo$Outbound> | string;
84
84
  /** @internal */
85
85
  export declare const EasyInputMessageContentUnion2$outboundSchema: z.ZodType<EasyInputMessageContentUnion2$Outbound, EasyInputMessageContentUnion2>;
86
86
  export declare function easyInputMessageContentUnion2ToJSON(easyInputMessageContentUnion2: EasyInputMessageContentUnion2): string;
@@ -89,7 +89,7 @@ export declare const EasyInputMessagePhaseFinalAnswer$outboundSchema: z.ZodEnum<
89
89
  /** @internal */
90
90
  export declare const EasyInputMessagePhaseCommentary$outboundSchema: z.ZodEnum<typeof EasyInputMessagePhaseCommentary>;
91
91
  /** @internal */
92
- export type EasyInputMessagePhaseUnion$Outbound = string | string | any;
92
+ export type EasyInputMessagePhaseUnion$Outbound = string | string;
93
93
  /** @internal */
94
94
  export declare const EasyInputMessagePhaseUnion$outboundSchema: z.ZodType<EasyInputMessagePhaseUnion$Outbound, EasyInputMessagePhaseUnion>;
95
95
  export declare function easyInputMessagePhaseUnionToJSON(easyInputMessagePhaseUnion: EasyInputMessagePhaseUnion): string;
@@ -110,8 +110,8 @@ export declare function easyInputMessageRoleUnionToJSON(easyInputMessageRoleUnio
110
110
  export declare const EasyInputMessageTypeMessage$outboundSchema: z.ZodEnum<typeof EasyInputMessageTypeMessage>;
111
111
  /** @internal */
112
112
  export type EasyInputMessage$Outbound = {
113
- content?: Array<InputText$Outbound | EasyInputMessageContentInputImage$Outbound | InputFile$Outbound | InputAudio$Outbound | InputVideo$Outbound> | string | any | null | undefined;
114
- phase?: string | string | any | null | undefined;
113
+ content?: Array<InputText$Outbound | EasyInputMessageContentInputImage$Outbound | InputFile$Outbound | InputAudio$Outbound | InputVideo$Outbound> | string | null | undefined;
114
+ phase?: string | string | null | undefined;
115
115
  role: string | string | string | string;
116
116
  type?: string | undefined;
117
117
  };
@@ -72,7 +72,6 @@ export const EasyInputMessageContentUnion2$outboundSchema = z.union([
72
72
  InputVideo$outboundSchema,
73
73
  ])),
74
74
  z.string(),
75
- z.any(),
76
75
  ]);
77
76
  export function easyInputMessageContentUnion2ToJSON(easyInputMessageContentUnion2) {
78
77
  return JSON.stringify(EasyInputMessageContentUnion2$outboundSchema.parse(easyInputMessageContentUnion2));
@@ -85,7 +84,6 @@ export const EasyInputMessagePhaseCommentary$outboundSchema = z.enum(EasyInputMe
85
84
  export const EasyInputMessagePhaseUnion$outboundSchema = z.union([
86
85
  EasyInputMessagePhaseCommentary$outboundSchema,
87
86
  EasyInputMessagePhaseFinalAnswer$outboundSchema,
88
- z.any(),
89
87
  ]);
90
88
  export function easyInputMessagePhaseUnionToJSON(easyInputMessagePhaseUnion) {
91
89
  return JSON.stringify(EasyInputMessagePhaseUnion$outboundSchema.parse(easyInputMessagePhaseUnion));
@@ -121,12 +119,10 @@ export const EasyInputMessage$outboundSchema = z.object({
121
119
  InputVideo$outboundSchema,
122
120
  ])),
123
121
  z.string(),
124
- z.any(),
125
122
  ])).optional(),
126
123
  phase: z.nullable(z.union([
127
124
  EasyInputMessagePhaseCommentary$outboundSchema,
128
125
  EasyInputMessagePhaseFinalAnswer$outboundSchema,
129
- z.any(),
130
126
  ])).optional(),
131
127
  role: z.union([
132
128
  EasyInputMessageRoleUser$outboundSchema,
@@ -8,7 +8,7 @@ export type EdgeNetworkTimeoutResponseErrorData = {
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 EdgeNetworkTimeoutResponseErrorData$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 edgeNetworkTimeoutResponseErrorDataFromJSON(jsonString) {
14
14
  return safeParse(jsonString, (x) => EdgeNetworkTimeoutResponseErrorData$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'EdgeNetworkTimeoutResponseErrorData' from JSON`);
@@ -10,7 +10,7 @@ export type BadGatewayResponseErrorData = {
10
10
  */
11
11
  error: models.BadGatewayResponseErrorData;
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 BadGatewayResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.BadGatewayResponseErrorData;
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 BadGatewayResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const BadGatewayResponseError$inboundSchema = z.object({
29
29
  error: models.BadGatewayResponseErrorData$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),
@@ -10,7 +10,7 @@ export type BadRequestResponseErrorData = {
10
10
  */
11
11
  error: models.BadRequestResponseErrorData;
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 BadRequestResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.BadRequestResponseErrorData;
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 BadRequestResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const BadRequestResponseError$inboundSchema = z.object({
29
29
  error: models.BadRequestResponseErrorData$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),
@@ -10,7 +10,7 @@ export type ConflictResponseErrorData = {
10
10
  */
11
11
  error: models.ConflictResponseErrorData;
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 ConflictResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.ConflictResponseErrorData;
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 ConflictResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const ConflictResponseError$inboundSchema = z.object({
29
29
  error: models.ConflictResponseErrorData$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),
@@ -10,7 +10,7 @@ export type EdgeNetworkTimeoutResponseErrorData = {
10
10
  */
11
11
  error: models.EdgeNetworkTimeoutResponseErrorData;
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 EdgeNetworkTimeoutResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.EdgeNetworkTimeoutResponseErrorData;
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 EdgeNetworkTimeoutResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const EdgeNetworkTimeoutResponseError$inboundSchema = z.object({
29
29
  error: models.EdgeNetworkTimeoutResponseErrorData$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),
@@ -10,7 +10,7 @@ export type ForbiddenResponseErrorData = {
10
10
  */
11
11
  error: models.ForbiddenResponseErrorData;
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 ForbiddenResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.ForbiddenResponseErrorData;
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 ForbiddenResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const ForbiddenResponseError$inboundSchema = z.object({
29
29
  error: models.ForbiddenResponseErrorData$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),
@@ -10,7 +10,7 @@ export type InternalServerResponseErrorData = {
10
10
  */
11
11
  error: models.InternalServerResponseErrorData;
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 InternalServerResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.InternalServerResponseErrorData;
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 InternalServerResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const InternalServerResponseError$inboundSchema = z.object({
29
29
  error: models.InternalServerResponseErrorData$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),
@@ -10,7 +10,7 @@ export type NotFoundResponseErrorData = {
10
10
  */
11
11
  error: models.NotFoundResponseErrorData;
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 NotFoundResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.NotFoundResponseErrorData;
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 NotFoundResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const NotFoundResponseError$inboundSchema = z.object({
29
29
  error: models.NotFoundResponseErrorData$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),
@@ -10,7 +10,7 @@ export type PayloadTooLargeResponseErrorData = {
10
10
  */
11
11
  error: models.PayloadTooLargeResponseErrorData;
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 PayloadTooLargeResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.PayloadTooLargeResponseErrorData;
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 PayloadTooLargeResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const PayloadTooLargeResponseError$inboundSchema = z.object({
29
29
  error: models.PayloadTooLargeResponseErrorData$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),
@@ -10,7 +10,7 @@ export type PaymentRequiredResponseErrorData = {
10
10
  */
11
11
  error: models.PaymentRequiredResponseErrorData;
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 PaymentRequiredResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.PaymentRequiredResponseErrorData;
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 PaymentRequiredResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const PaymentRequiredResponseError$inboundSchema = z.object({
29
29
  error: models.PaymentRequiredResponseErrorData$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),
@@ -10,7 +10,7 @@ export type ProviderOverloadedResponseErrorData = {
10
10
  */
11
11
  error: models.ProviderOverloadedResponseErrorData;
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 ProviderOverloadedResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.ProviderOverloadedResponseErrorData;
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 ProviderOverloadedResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const ProviderOverloadedResponseError$inboundSchema = z.object({
29
29
  error: models.ProviderOverloadedResponseErrorData$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),
@@ -10,7 +10,7 @@ export type RequestTimeoutResponseErrorData = {
10
10
  */
11
11
  error: models.RequestTimeoutResponseErrorData;
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 RequestTimeoutResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.RequestTimeoutResponseErrorData;
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 RequestTimeoutResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const RequestTimeoutResponseError$inboundSchema = z.object({
29
29
  error: models.RequestTimeoutResponseErrorData$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),
@@ -10,7 +10,7 @@ export type ServiceUnavailableResponseErrorData = {
10
10
  */
11
11
  error: models.ServiceUnavailableResponseErrorData;
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 ServiceUnavailableResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.ServiceUnavailableResponseErrorData;
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 ServiceUnavailableResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const ServiceUnavailableResponseError$inboundSchema = z.object({
29
29
  error: models.ServiceUnavailableResponseErrorData$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),
@@ -10,7 +10,7 @@ export type TooManyRequestsResponseErrorData = {
10
10
  */
11
11
  error: models.TooManyRequestsResponseErrorData;
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 TooManyRequestsResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.TooManyRequestsResponseErrorData;
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 TooManyRequestsResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const TooManyRequestsResponseError$inboundSchema = z.object({
29
29
  error: models.TooManyRequestsResponseErrorData$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),
@@ -10,7 +10,7 @@ export type UnauthorizedResponseErrorData = {
10
10
  */
11
11
  error: models.UnauthorizedResponseErrorData;
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 UnauthorizedResponseError extends OpenRouterError {
23
23
  */
24
24
  error: models.UnauthorizedResponseErrorData;
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 UnauthorizedResponseError extends OpenRouterError {
27
27
  /** @internal */
28
28
  export const UnauthorizedResponseError$inboundSchema = z.object({
29
29
  error: models.UnauthorizedResponseErrorData$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),
@@ -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 */