@openrouter/sdk 0.5.1 → 0.9.11

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 (280) hide show
  1. package/FUNCTIONS.md +5 -1
  2. package/esm/funcs/analyticsGetUserActivity.d.ts +1 -1
  3. package/esm/funcs/analyticsGetUserActivity.js +4 -2
  4. package/esm/funcs/apiKeysCreate.d.ts +1 -1
  5. package/esm/funcs/apiKeysCreate.js +5 -3
  6. package/esm/funcs/apiKeysDelete.d.ts +1 -1
  7. package/esm/funcs/apiKeysDelete.js +3 -1
  8. package/esm/funcs/apiKeysGet.d.ts +1 -1
  9. package/esm/funcs/apiKeysGet.js +3 -1
  10. package/esm/funcs/apiKeysGetCurrentKeyMetadata.d.ts +1 -1
  11. package/esm/funcs/apiKeysGetCurrentKeyMetadata.js +14 -3
  12. package/esm/funcs/apiKeysList.d.ts +1 -1
  13. package/esm/funcs/apiKeysList.js +4 -2
  14. package/esm/funcs/apiKeysUpdate.d.ts +1 -1
  15. package/esm/funcs/apiKeysUpdate.js +3 -1
  16. package/esm/funcs/betaResponsesSend.d.ts +9 -5
  17. package/esm/funcs/betaResponsesSend.js +10 -5
  18. package/esm/funcs/chatSend.d.ts +11 -7
  19. package/esm/funcs/chatSend.js +28 -7
  20. package/esm/funcs/creditsCreateCoinbaseCharge.d.ts +1 -2
  21. package/esm/funcs/creditsCreateCoinbaseCharge.js +7 -4
  22. package/esm/funcs/creditsGetCredits.d.ts +2 -2
  23. package/esm/funcs/creditsGetCredits.js +15 -4
  24. package/esm/funcs/embeddingsGenerate.js +4 -2
  25. package/esm/funcs/embeddingsListModels.d.ts +2 -1
  26. package/esm/funcs/embeddingsListModels.js +15 -3
  27. package/esm/funcs/endpointsList.js +2 -0
  28. package/esm/funcs/endpointsListZdrEndpoints.d.ts +1 -1
  29. package/esm/funcs/endpointsListZdrEndpoints.js +14 -3
  30. package/esm/funcs/generationsGetGeneration.js +3 -1
  31. package/esm/funcs/guardrailsBulkAssignKeys.d.ts +1 -1
  32. package/esm/funcs/guardrailsBulkAssignKeys.js +3 -1
  33. package/esm/funcs/guardrailsBulkAssignMembers.d.ts +1 -1
  34. package/esm/funcs/guardrailsBulkAssignMembers.js +3 -1
  35. package/esm/funcs/guardrailsBulkUnassignKeys.d.ts +1 -1
  36. package/esm/funcs/guardrailsBulkUnassignKeys.js +3 -1
  37. package/esm/funcs/guardrailsBulkUnassignMembers.d.ts +1 -1
  38. package/esm/funcs/guardrailsBulkUnassignMembers.js +3 -1
  39. package/esm/funcs/guardrailsCreate.d.ts +1 -1
  40. package/esm/funcs/guardrailsCreate.js +5 -3
  41. package/esm/funcs/guardrailsDelete.d.ts +1 -1
  42. package/esm/funcs/guardrailsDelete.js +3 -1
  43. package/esm/funcs/guardrailsGet.d.ts +1 -1
  44. package/esm/funcs/guardrailsGet.js +3 -1
  45. package/esm/funcs/guardrailsList.d.ts +1 -1
  46. package/esm/funcs/guardrailsList.js +4 -2
  47. package/esm/funcs/guardrailsListGuardrailKeyAssignments.d.ts +1 -1
  48. package/esm/funcs/guardrailsListGuardrailKeyAssignments.js +3 -1
  49. package/esm/funcs/guardrailsListGuardrailMemberAssignments.d.ts +1 -1
  50. package/esm/funcs/guardrailsListGuardrailMemberAssignments.js +3 -1
  51. package/esm/funcs/guardrailsListKeyAssignments.d.ts +1 -1
  52. package/esm/funcs/guardrailsListKeyAssignments.js +4 -2
  53. package/esm/funcs/guardrailsListMemberAssignments.d.ts +1 -1
  54. package/esm/funcs/guardrailsListMemberAssignments.js +4 -2
  55. package/esm/funcs/guardrailsUpdate.d.ts +1 -1
  56. package/esm/funcs/guardrailsUpdate.js +3 -1
  57. package/esm/funcs/modelsCount.d.ts +2 -1
  58. package/esm/funcs/modelsCount.js +15 -3
  59. package/esm/funcs/modelsList.js +3 -1
  60. package/esm/funcs/modelsListForUser.d.ts +1 -1
  61. package/esm/funcs/modelsListForUser.js +15 -3
  62. package/esm/funcs/oAuthCreateAuthCode.js +4 -2
  63. package/esm/funcs/oAuthExchangeAuthCodeForAPIKey.js +4 -2
  64. package/esm/funcs/providersList.d.ts +1 -1
  65. package/esm/funcs/providersList.js +14 -3
  66. package/esm/lib/config.d.ts +2 -2
  67. package/esm/lib/config.js +2 -2
  68. package/esm/lib/model-result.d.ts +3 -5
  69. package/esm/lib/model-result.js +98 -46
  70. package/esm/models/assistantmessage.d.ts +47 -36
  71. package/esm/models/assistantmessage.js +35 -47
  72. package/esm/models/assistantmessageimages.d.ts +33 -0
  73. package/esm/models/assistantmessageimages.js +44 -0
  74. package/esm/models/chatgenerationparams.d.ts +318 -182
  75. package/esm/models/chatgenerationparams.js +157 -143
  76. package/esm/models/chatgenerationtokenusage.d.ts +48 -0
  77. package/esm/models/chatmessagecontentitem.d.ts +15 -10
  78. package/esm/models/chatmessagecontentitem.js +25 -4
  79. package/esm/models/chatmessagecontentitemaudio.d.ts +20 -2
  80. package/esm/models/chatmessagecontentitemaudio.js +9 -2
  81. package/esm/models/chatmessagecontentitemcachecontrol.d.ts +14 -3
  82. package/esm/models/chatmessagecontentitemcachecontrol.js +9 -2
  83. package/esm/models/chatmessagecontentitemimage.d.ts +26 -3
  84. package/esm/models/chatmessagecontentitemimage.js +12 -2
  85. package/esm/models/chatmessagecontentitemtext.d.ts +17 -2
  86. package/esm/models/chatmessagecontentitemtext.js +9 -2
  87. package/esm/models/chatmessagecontentitemvideo.d.ts +12 -55
  88. package/esm/models/chatmessagecontentitemvideo.js +5 -72
  89. package/esm/models/chatmessagecontentitemvideolegacy.d.ts +28 -0
  90. package/esm/models/chatmessagecontentitemvideolegacy.js +33 -0
  91. package/esm/models/chatmessagetokenlogprob.d.ts +15 -0
  92. package/esm/models/chatmessagetokenlogprobs.d.ts +9 -0
  93. package/esm/models/chatmessagetoolcall.d.ts +23 -2
  94. package/esm/models/chatmessagetoolcall.js +9 -2
  95. package/esm/models/chatresponse.d.ts +29 -1
  96. package/esm/models/chatresponse.js +6 -1
  97. package/esm/models/chatresponsechoice.d.ts +13 -2
  98. package/esm/models/chatresponsechoice.js +1 -2
  99. package/esm/models/chatstreamingchoice.d.ts +13 -2
  100. package/esm/models/chatstreamingchoice.js +1 -2
  101. package/esm/models/chatstreamingmessagechunk.d.ts +29 -2
  102. package/esm/models/chatstreamingmessagechunk.js +5 -2
  103. package/esm/models/chatstreamingmessagetoolcall.d.ts +38 -1
  104. package/esm/models/chatstreamingmessagetoolcall.js +9 -1
  105. package/esm/models/chatstreamingresponsechunk.d.ts +45 -11
  106. package/esm/models/chatstreamingresponsechunk.js +11 -25
  107. package/esm/models/chatstreamoptions.d.ts +8 -0
  108. package/esm/models/debugoptions.d.ts +18 -0
  109. package/esm/models/debugoptions.js +18 -0
  110. package/esm/models/developermessage.d.ts +35 -0
  111. package/esm/models/developermessage.js +24 -0
  112. package/esm/models/errors/index.d.ts +0 -1
  113. package/esm/models/errors/index.js +0 -1
  114. package/esm/models/index.d.ts +13 -5
  115. package/esm/models/index.js +13 -5
  116. package/esm/models/jsonschemaconfig.d.ts +17 -2
  117. package/esm/models/jsonschemaconfig.js +1 -1
  118. package/esm/models/message.d.ts +10 -23
  119. package/esm/models/message.js +3 -20
  120. package/esm/models/modelscountresponse.d.ts +4 -4
  121. package/esm/models/modelscountresponse.js +4 -4
  122. package/esm/models/namedtoolchoice.d.ts +15 -2
  123. package/esm/models/namedtoolchoice.js +6 -1
  124. package/esm/models/openairesponsesreasoningconfig.d.ts +1 -1
  125. package/esm/models/openairesponsesreasoningconfig.js +1 -1
  126. package/esm/models/openresponsesnonstreamingresponse.d.ts +4 -4
  127. package/esm/models/openresponsesnonstreamingresponse.js +3 -3
  128. package/esm/models/openresponsesreasoning.d.ts +2 -2
  129. package/esm/models/openresponsesreasoning.js +1 -1
  130. package/esm/models/openresponsesreasoningconfig.d.ts +2 -2
  131. package/esm/models/openresponsesreasoningconfig.js +1 -1
  132. package/esm/models/openresponsesrequest.d.ts +31 -13
  133. package/esm/models/openresponsesrequest.js +25 -0
  134. package/esm/models/operations/bulkassignkeystoguardrail.d.ts +30 -0
  135. package/esm/models/operations/bulkassignkeystoguardrail.js +4 -0
  136. package/esm/models/operations/bulkassignmemberstoguardrail.d.ts +30 -0
  137. package/esm/models/operations/bulkassignmemberstoguardrail.js +4 -0
  138. package/esm/models/operations/bulkunassignkeysfromguardrail.d.ts +30 -0
  139. package/esm/models/operations/bulkunassignkeysfromguardrail.js +4 -0
  140. package/esm/models/operations/bulkunassignmembersfromguardrail.d.ts +30 -0
  141. package/esm/models/operations/bulkunassignmembersfromguardrail.js +4 -0
  142. package/esm/models/operations/createauthkeyscode.d.ts +66 -2
  143. package/esm/models/operations/createauthkeyscode.js +30 -1
  144. package/esm/models/operations/createcoinbasecharge.d.ts +41 -0
  145. package/esm/models/operations/createcoinbasecharge.js +16 -0
  146. package/esm/models/operations/createembeddings.d.ts +42 -2
  147. package/esm/models/operations/createembeddings.js +16 -1
  148. package/esm/models/operations/createguardrail.d.ts +42 -2
  149. package/esm/models/operations/createguardrail.js +16 -1
  150. package/esm/models/operations/createkeys.d.ts +42 -2
  151. package/esm/models/operations/createkeys.js +16 -1
  152. package/esm/models/operations/createresponses.d.ts +40 -0
  153. package/esm/models/operations/createresponses.js +16 -0
  154. package/esm/models/operations/deleteguardrail.d.ts +30 -0
  155. package/esm/models/operations/deleteguardrail.js +8 -0
  156. package/esm/models/operations/deletekeys.d.ts +30 -0
  157. package/esm/models/operations/deletekeys.js +8 -0
  158. package/esm/models/operations/exchangeauthcodeforapikey.d.ts +42 -2
  159. package/esm/models/operations/exchangeauthcodeforapikey.js +16 -1
  160. package/esm/models/operations/getcredits.d.ts +38 -0
  161. package/esm/models/operations/getcredits.js +13 -0
  162. package/esm/models/operations/getcurrentkey.d.ts +45 -1
  163. package/esm/models/operations/getcurrentkey.js +15 -0
  164. package/esm/models/operations/getgeneration.d.ts +153 -0
  165. package/esm/models/operations/getgeneration.js +135 -0
  166. package/esm/models/operations/getguardrail.d.ts +30 -0
  167. package/esm/models/operations/getguardrail.js +7 -0
  168. package/esm/models/operations/getkey.d.ts +30 -0
  169. package/esm/models/operations/getkey.js +7 -0
  170. package/esm/models/operations/getmodels.d.ts +30 -0
  171. package/esm/models/operations/getmodels.js +4 -0
  172. package/esm/models/operations/getuseractivity.d.ts +30 -0
  173. package/esm/models/operations/getuseractivity.js +8 -0
  174. package/esm/models/operations/index.d.ts +2 -0
  175. package/esm/models/operations/index.js +2 -0
  176. package/esm/models/operations/list.d.ts +30 -0
  177. package/esm/models/operations/list.js +4 -0
  178. package/esm/models/operations/listembeddingsmodels.d.ts +40 -0
  179. package/esm/models/operations/listembeddingsmodels.js +20 -0
  180. package/esm/models/operations/listendpoints.d.ts +30 -0
  181. package/esm/models/operations/listendpoints.js +8 -0
  182. package/esm/models/operations/listendpointszdr.d.ts +38 -0
  183. package/esm/models/operations/listendpointszdr.js +14 -0
  184. package/esm/models/operations/listguardrailkeyassignments.d.ts +30 -0
  185. package/esm/models/operations/listguardrailkeyassignments.js +7 -0
  186. package/esm/models/operations/listguardrailmemberassignments.d.ts +30 -0
  187. package/esm/models/operations/listguardrailmemberassignments.js +7 -0
  188. package/esm/models/operations/listguardrails.d.ts +30 -0
  189. package/esm/models/operations/listguardrails.js +7 -0
  190. package/esm/models/operations/listkeyassignments.d.ts +30 -0
  191. package/esm/models/operations/listkeyassignments.js +7 -0
  192. package/esm/models/operations/listmemberassignments.d.ts +30 -0
  193. package/esm/models/operations/listmemberassignments.js +7 -0
  194. package/esm/models/operations/listmodelscount.d.ts +40 -0
  195. package/esm/models/operations/listmodelscount.js +20 -0
  196. package/esm/models/operations/listmodelsuser.d.ts +38 -0
  197. package/esm/models/operations/listmodelsuser.js +14 -0
  198. package/esm/models/operations/listproviders.d.ts +38 -0
  199. package/esm/models/operations/listproviders.js +13 -0
  200. package/esm/models/operations/sendchatcompletionrequest.d.ts +53 -1
  201. package/esm/models/operations/sendchatcompletionrequest.js +36 -2
  202. package/esm/models/operations/updateguardrail.d.ts +30 -0
  203. package/esm/models/operations/updateguardrail.js +4 -0
  204. package/esm/models/operations/updatekeys.d.ts +30 -0
  205. package/esm/models/operations/updatekeys.js +4 -0
  206. package/esm/models/providername.d.ts +4 -0
  207. package/esm/models/providername.js +4 -0
  208. package/esm/models/providerpreferences.d.ts +46 -27
  209. package/esm/models/providerpreferences.js +29 -15
  210. package/esm/models/providersort.d.ts +6 -0
  211. package/esm/models/providersort.js +3 -0
  212. package/esm/models/providersortconfig.d.ts +30 -2
  213. package/esm/models/providersortconfig.js +15 -2
  214. package/esm/models/publicendpoint.d.ts +0 -39
  215. package/esm/models/publicpricing.d.ts +0 -39
  216. package/esm/models/reasoningdetailencrypted.d.ts +42 -0
  217. package/esm/models/reasoningdetailencrypted.js +42 -0
  218. package/esm/models/reasoningdetailsummary.d.ts +42 -0
  219. package/esm/models/reasoningdetailsummary.js +42 -0
  220. package/esm/models/reasoningdetailtext.d.ts +44 -0
  221. package/esm/models/reasoningdetailtext.js +44 -0
  222. package/esm/models/reasoningdetailunion.d.ts +19 -0
  223. package/esm/models/reasoningdetailunion.js +28 -0
  224. package/esm/models/responseformatjsonobject.d.ts +20 -0
  225. package/esm/models/responseformatjsonobject.js +21 -0
  226. package/esm/models/responseformatjsonschema.d.ts +6 -0
  227. package/esm/models/responseformattext.d.ts +15 -0
  228. package/esm/models/responseformattext.js +13 -0
  229. package/esm/models/responseformattextconfig.d.ts +3 -3
  230. package/esm/models/responseformattextconfig.js +3 -3
  231. package/esm/models/responseformattextgrammar.d.ts +6 -0
  232. package/esm/models/responseformattextpython.d.ts +15 -0
  233. package/esm/models/responseformattextpython.js +13 -0
  234. package/esm/models/responseserrorfield.d.ts +4 -4
  235. package/esm/models/responseserrorfield.js +4 -4
  236. package/esm/models/responsesoutputitemreasoning.d.ts +2 -2
  237. package/esm/models/responsesoutputitemreasoning.js +2 -2
  238. package/esm/models/systemmessage.d.ts +12 -0
  239. package/esm/models/toolchoiceoption.d.ts +31 -0
  240. package/esm/models/toolchoiceoption.js +32 -0
  241. package/esm/models/tooldefinitionjson.d.ts +38 -4
  242. package/esm/models/tooldefinitionjson.js +14 -2
  243. package/esm/models/toolresponsemessage.d.ts +12 -0
  244. package/esm/models/usermessage.d.ts +12 -0
  245. package/esm/models/videoinput.d.ts +23 -0
  246. package/esm/models/videoinput.js +22 -0
  247. package/esm/sdk/analytics.d.ts +1 -1
  248. package/esm/sdk/analytics.js +1 -1
  249. package/esm/sdk/apikeys.d.ts +6 -6
  250. package/esm/sdk/apikeys.js +7 -7
  251. package/esm/sdk/chat.d.ts +10 -6
  252. package/esm/sdk/credits.d.ts +3 -4
  253. package/esm/sdk/credits.js +3 -3
  254. package/esm/sdk/embeddings.d.ts +1 -1
  255. package/esm/sdk/embeddings.js +2 -2
  256. package/esm/sdk/endpoints.d.ts +1 -1
  257. package/esm/sdk/endpoints.js +2 -2
  258. package/esm/sdk/guardrails.d.ts +13 -13
  259. package/esm/sdk/guardrails.js +13 -13
  260. package/esm/sdk/models.d.ts +2 -2
  261. package/esm/sdk/models.js +4 -4
  262. package/esm/sdk/providers.d.ts +1 -1
  263. package/esm/sdk/providers.js +2 -2
  264. package/esm/sdk/responses.d.ts +9 -5
  265. package/esm/sdk/sdk.d.ts +2 -2
  266. package/esm/sdk/sdk.js +3 -3
  267. package/jsr.json +1 -1
  268. package/package.json +1 -1
  269. package/esm/models/chaterror.d.ts +0 -17
  270. package/esm/models/chaterror.js +0 -25
  271. package/esm/models/errors/chaterror.d.ts +0 -19
  272. package/esm/models/errors/chaterror.js +0 -32
  273. package/esm/models/providersortunion.d.ts +0 -10
  274. package/esm/models/providersortunion.js +0 -13
  275. package/esm/models/responsesformatjsonobject.d.ts +0 -20
  276. package/esm/models/responsesformatjsonobject.js +0 -21
  277. package/esm/models/schema0.d.ts +0 -84
  278. package/esm/models/schema0.js +0 -87
  279. package/esm/models/schema2.d.ts +0 -92
  280. package/esm/models/schema2.js +0 -109
@@ -1,54 +1,103 @@
1
1
  import * as z from "zod/v4";
2
- import { OpenEnum } from "../types/enums.js";
2
+ import { ClosedEnum, OpenEnum } from "../types/enums.js";
3
3
  import { ChatStreamOptions, ChatStreamOptions$Outbound } from "./chatstreamoptions.js";
4
+ import { DataCollection } from "./datacollection.js";
5
+ import { DebugOptions, DebugOptions$Outbound } from "./debugoptions.js";
4
6
  import { Message, Message$Outbound } from "./message.js";
5
- import { ProviderSortUnion, ProviderSortUnion$Outbound } from "./providersortunion.js";
6
- import { ReasoningSummaryVerbosity } from "./reasoningsummaryverbosity.js";
7
+ import { PDFParserOptions, PDFParserOptions$Outbound } from "./pdfparseroptions.js";
8
+ import { PreferredMaxLatency, PreferredMaxLatency$Outbound } from "./preferredmaxlatency.js";
9
+ import { PreferredMinThroughput, PreferredMinThroughput$Outbound } from "./preferredminthroughput.js";
10
+ import { ProviderName } from "./providername.js";
11
+ import { Quantization } from "./quantization.js";
12
+ import { ResponseFormatJSONObject, ResponseFormatJSONObject$Outbound } from "./responseformatjsonobject.js";
7
13
  import { ResponseFormatJSONSchema, ResponseFormatJSONSchema$Outbound } from "./responseformatjsonschema.js";
14
+ import { ResponseFormatText, ResponseFormatText$Outbound } from "./responseformattext.js";
8
15
  import { ResponseFormatTextGrammar, ResponseFormatTextGrammar$Outbound } from "./responseformattextgrammar.js";
9
- import { Schema0, Schema0$Outbound } from "./schema0.js";
16
+ import { ResponseFormatTextPython, ResponseFormatTextPython$Outbound } from "./responseformattextpython.js";
17
+ import { ToolChoiceOption, ToolChoiceOption$Outbound } from "./toolchoiceoption.js";
10
18
  import { ToolDefinitionJson, ToolDefinitionJson$Outbound } from "./tooldefinitionjson.js";
11
- export declare const ChatGenerationParamsDataCollection: {
12
- readonly Deny: "deny";
13
- readonly Allow: "allow";
19
+ import { WebSearchEngine } from "./websearchengine.js";
20
+ export type ChatGenerationParamsOrder = ProviderName | string;
21
+ export type ChatGenerationParamsOnly = ProviderName | string;
22
+ export type ChatGenerationParamsIgnore = ProviderName | string;
23
+ export declare const ChatGenerationParamsSortEnum: {
24
+ readonly Price: "price";
25
+ readonly Throughput: "throughput";
26
+ readonly Latency: "latency";
27
+ };
28
+ export type ChatGenerationParamsSortEnum = OpenEnum<typeof ChatGenerationParamsSortEnum>;
29
+ export declare const ChatGenerationParamsProviderSortConfigEnum: {
30
+ readonly Price: "price";
31
+ readonly Throughput: "throughput";
32
+ readonly Latency: "latency";
33
+ };
34
+ export type ChatGenerationParamsProviderSortConfigEnum = ClosedEnum<typeof ChatGenerationParamsProviderSortConfigEnum>;
35
+ /**
36
+ * The provider sorting strategy (price, throughput, latency)
37
+ */
38
+ export declare const ChatGenerationParamsBy: {
39
+ readonly Price: "price";
40
+ readonly Throughput: "throughput";
41
+ readonly Latency: "latency";
14
42
  };
15
- export type ChatGenerationParamsDataCollection = OpenEnum<typeof ChatGenerationParamsDataCollection>;
16
- export declare const Quantizations: {
17
- readonly Int4: "int4";
18
- readonly Int8: "int8";
19
- readonly Fp4: "fp4";
20
- readonly Fp6: "fp6";
21
- readonly Fp8: "fp8";
22
- readonly Fp16: "fp16";
23
- readonly Bf16: "bf16";
24
- readonly Fp32: "fp32";
25
- readonly Unknown: "unknown";
43
+ /**
44
+ * The provider sorting strategy (price, throughput, latency)
45
+ */
46
+ export type ChatGenerationParamsBy = OpenEnum<typeof ChatGenerationParamsBy>;
47
+ /**
48
+ * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
49
+ */
50
+ export declare const ChatGenerationParamsPartition: {
51
+ readonly Model: "model";
52
+ readonly None: "none";
26
53
  };
27
- export type Quantizations = OpenEnum<typeof Quantizations>;
28
54
  /**
29
- * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
55
+ * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
30
56
  */
31
- export type ChatGenerationParamsMaxPrice = {
32
- prompt?: any | undefined;
33
- completion?: any | undefined;
34
- image?: any | undefined;
35
- audio?: any | undefined;
36
- request?: any | undefined;
57
+ export type ChatGenerationParamsPartition = OpenEnum<typeof ChatGenerationParamsPartition>;
58
+ export type ChatGenerationParamsProviderSortConfig = {
59
+ /**
60
+ * The provider sorting strategy (price, throughput, latency)
61
+ */
62
+ by?: ChatGenerationParamsBy | null | undefined;
63
+ /**
64
+ * Partitioning strategy for sorting: "model" (default) groups endpoints by model before sorting (fallback models remain fallbacks), "none" sorts all endpoints together regardless of model.
65
+ */
66
+ partition?: ChatGenerationParamsPartition | null | undefined;
37
67
  };
38
- export type ChatGenerationParamsPreferredMinThroughput = {
39
- p50?: number | null | undefined;
40
- p75?: number | null | undefined;
41
- p90?: number | null | undefined;
42
- p99?: number | null | undefined;
68
+ export type ChatGenerationParamsProviderSortConfigUnion = ChatGenerationParamsProviderSortConfig | ChatGenerationParamsProviderSortConfigEnum;
69
+ /**
70
+ * The provider sorting strategy (price, throughput, latency)
71
+ */
72
+ export declare const ChatGenerationParamsProviderSort: {
73
+ readonly Price: "price";
74
+ readonly Throughput: "throughput";
75
+ readonly Latency: "latency";
43
76
  };
44
- export type ChatGenerationParamsPreferredMinThroughputUnion = number | ChatGenerationParamsPreferredMinThroughput;
45
- export type ChatGenerationParamsPreferredMaxLatency = {
46
- p50?: number | null | undefined;
47
- p75?: number | null | undefined;
48
- p90?: number | null | undefined;
49
- p99?: number | null | undefined;
77
+ /**
78
+ * The provider sorting strategy (price, throughput, latency)
79
+ */
80
+ export type ChatGenerationParamsProviderSort = OpenEnum<typeof ChatGenerationParamsProviderSort>;
81
+ /**
82
+ * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
83
+ */
84
+ export type ChatGenerationParamsSortUnion = ChatGenerationParamsProviderSort | ChatGenerationParamsProviderSortConfig | ChatGenerationParamsProviderSortConfigEnum | ChatGenerationParamsSortEnum;
85
+ /**
86
+ * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
87
+ */
88
+ export type ChatGenerationParamsMaxPrice = {
89
+ /**
90
+ * Price per million prompt tokens
91
+ */
92
+ prompt?: string | undefined;
93
+ completion?: string | undefined;
94
+ image?: string | undefined;
95
+ audio?: string | undefined;
96
+ request?: string | undefined;
50
97
  };
51
- export type ChatGenerationParamsPreferredMaxLatencyUnion = number | ChatGenerationParamsPreferredMaxLatency;
98
+ /**
99
+ * When multiple model providers are available, optionally indicate your routing preference.
100
+ */
52
101
  export type ChatGenerationParamsProvider = {
53
102
  /**
54
103
  * Whether to allow backup providers to serve requests
@@ -70,29 +119,32 @@ export type ChatGenerationParamsProvider = {
70
119
  *
71
120
  * - deny: use only providers which do not collect user data.
72
121
  */
73
- dataCollection?: ChatGenerationParamsDataCollection | null | undefined;
122
+ dataCollection?: DataCollection | null | undefined;
123
+ /**
124
+ * Whether to restrict routing to only ZDR (Zero Data Retention) endpoints. When true, only endpoints that do not retain prompts will be used.
125
+ */
74
126
  zdr?: boolean | null | undefined;
127
+ /**
128
+ * Whether to restrict routing to only models that allow text distillation. When true, only models where the author has allowed distillation will be used.
129
+ */
75
130
  enforceDistillableText?: boolean | null | undefined;
76
131
  /**
77
132
  * An ordered list of provider slugs. The router will attempt to use the first provider in the subset of this list that supports your requested model, and fall back to the next if it is unavailable. If no providers are available, the request will fail with an error message.
78
133
  */
79
- order?: Array<Schema0> | null | undefined;
134
+ order?: Array<ProviderName | string> | null | undefined;
80
135
  /**
81
136
  * List of provider slugs to allow. If provided, this list is merged with your account-wide allowed provider settings for this request.
82
137
  */
83
- only?: Array<Schema0> | null | undefined;
138
+ only?: Array<ProviderName | string> | null | undefined;
84
139
  /**
85
140
  * List of provider slugs to ignore. If provided, this list is merged with your account-wide ignored provider settings for this request.
86
141
  */
87
- ignore?: Array<Schema0> | null | undefined;
142
+ ignore?: Array<ProviderName | string> | null | undefined;
88
143
  /**
89
144
  * A list of quantization levels to filter the provider by.
90
145
  */
91
- quantizations?: Array<Quantizations> | null | undefined;
92
- /**
93
- * The sorting strategy to use for this request, if "order" is not specified. When set, no load balancing is performed.
94
- */
95
- sort?: ProviderSortUnion | null | undefined;
146
+ quantizations?: Array<Quantization> | null | undefined;
147
+ sort?: ChatGenerationParamsProviderSort | ChatGenerationParamsProviderSortConfig | ChatGenerationParamsProviderSortConfigEnum | ChatGenerationParamsSortEnum | null | undefined;
96
148
  /**
97
149
  * The object specifying the maximum price you want to pay for this request. USD price per million tokens, for prompt and completion.
98
150
  */
@@ -100,56 +152,74 @@ export type ChatGenerationParamsProvider = {
100
152
  /**
101
153
  * Preferred minimum throughput (in tokens per second). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints below the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
102
154
  */
103
- preferredMinThroughput?: number | ChatGenerationParamsPreferredMinThroughput | null | undefined;
155
+ preferredMinThroughput?: PreferredMinThroughput | null | undefined;
104
156
  /**
105
157
  * Preferred maximum latency (in seconds). Can be a number (applies to p50) or an object with percentile-specific cutoffs. Endpoints above the threshold(s) may still be used, but are deprioritized in routing. When using fallback models, this may cause a fallback model to be used instead of the primary model if it meets the threshold.
106
158
  */
107
- preferredMaxLatency?: number | ChatGenerationParamsPreferredMaxLatency | null | undefined;
159
+ preferredMaxLatency?: PreferredMaxLatency | null | undefined;
108
160
  };
109
161
  export type ChatGenerationParamsPluginResponseHealing = {
110
162
  id: "response-healing";
163
+ /**
164
+ * Set to false to disable the response-healing plugin for this request. Defaults to true.
165
+ */
111
166
  enabled?: boolean | undefined;
112
167
  };
113
- export declare const PdfEngine: {
114
- readonly MistralOcr: "mistral-ocr";
115
- readonly PdfText: "pdf-text";
116
- readonly Native: "native";
117
- };
118
- export type PdfEngine = OpenEnum<typeof PdfEngine>;
119
- export type Pdf = {
120
- engine?: PdfEngine | undefined;
121
- };
122
168
  export type ChatGenerationParamsPluginFileParser = {
123
169
  id: "file-parser";
170
+ /**
171
+ * Set to false to disable the file-parser plugin for this request. Defaults to true.
172
+ */
124
173
  enabled?: boolean | undefined;
125
- pdf?: Pdf | undefined;
126
- };
127
- export declare const Engine: {
128
- readonly Native: "native";
129
- readonly Exa: "exa";
174
+ /**
175
+ * Options for PDF parsing.
176
+ */
177
+ pdf?: PDFParserOptions | undefined;
130
178
  };
131
- export type Engine = OpenEnum<typeof Engine>;
132
179
  export type ChatGenerationParamsPluginWeb = {
133
180
  id: "web";
181
+ /**
182
+ * Set to false to disable the web-search plugin for this request. Defaults to true.
183
+ */
134
184
  enabled?: boolean | undefined;
135
185
  maxResults?: number | undefined;
136
186
  searchPrompt?: string | undefined;
137
- engine?: Engine | undefined;
187
+ /**
188
+ * The search engine to use for web search.
189
+ */
190
+ engine?: WebSearchEngine | undefined;
138
191
  };
139
192
  export type ChatGenerationParamsPluginModeration = {
140
193
  id: "moderation";
141
194
  };
142
195
  export type ChatGenerationParamsPluginAutoRouter = {
143
196
  id: "auto-router";
197
+ /**
198
+ * Set to false to disable the auto-router plugin for this request. Defaults to true.
199
+ */
144
200
  enabled?: boolean | undefined;
201
+ /**
202
+ * List of model patterns to filter which models the auto-router can route between. Supports wildcards (e.g., "anthropic/*" matches all Anthropic models). When not specified, uses the default supported models list.
203
+ */
145
204
  allowedModels?: Array<string> | undefined;
146
205
  };
147
206
  export type ChatGenerationParamsPluginUnion = ChatGenerationParamsPluginAutoRouter | ChatGenerationParamsPluginModeration | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser | ChatGenerationParamsPluginResponseHealing;
148
- export declare const Route: {
149
- readonly Fallback: "fallback";
150
- readonly Sort: "sort";
207
+ /**
208
+ * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
209
+ */
210
+ export type ChatGenerationParamsTrace = {
211
+ traceId?: string | undefined;
212
+ traceName?: string | undefined;
213
+ spanName?: string | undefined;
214
+ generationName?: string | undefined;
215
+ parentSpanId?: string | undefined;
216
+ additionalProperties?: {
217
+ [k: string]: any | null;
218
+ } | undefined;
151
219
  };
152
- export type Route = OpenEnum<typeof Route>;
220
+ /**
221
+ * Constrains effort on reasoning for reasoning models
222
+ */
153
223
  export declare const Effort: {
154
224
  readonly Xhigh: "xhigh";
155
225
  readonly High: "high";
@@ -158,31 +228,37 @@ export declare const Effort: {
158
228
  readonly Minimal: "minimal";
159
229
  readonly None: "none";
160
230
  };
231
+ /**
232
+ * Constrains effort on reasoning for reasoning models
233
+ */
161
234
  export type Effort = OpenEnum<typeof Effort>;
235
+ /**
236
+ * Configuration options for reasoning models
237
+ */
162
238
  export type Reasoning = {
239
+ /**
240
+ * Constrains effort on reasoning for reasoning models
241
+ */
163
242
  effort?: Effort | null | undefined;
164
- summary?: ReasoningSummaryVerbosity | null | undefined;
165
- };
166
- export type ResponseFormatPython = {
167
- type: "python";
168
- };
169
- export type ResponseFormatJSONObject = {
170
- type: "json_object";
171
- };
172
- export type ResponseFormatText = {
173
- type: "text";
174
- };
175
- export type ResponseFormat = ResponseFormatText | ResponseFormatJSONObject | ResponseFormatJSONSchema | ResponseFormatTextGrammar | ResponseFormatPython;
176
- export type Stop = string | Array<string>;
177
- export type Debug = {
178
- echoUpstreamBody?: boolean | undefined;
243
+ summary?: any | null | undefined;
179
244
  };
180
- export type ChatGenerationParamsImageConfig = string | number;
245
+ /**
246
+ * Response format configuration
247
+ */
248
+ export type ResponseFormat = ResponseFormatText | ResponseFormatJSONObject | ResponseFormatJSONSchema | ResponseFormatTextGrammar | ResponseFormatTextPython;
249
+ /**
250
+ * Stop sequences (up to 4)
251
+ */
252
+ export type Stop = string | Array<string> | any;
253
+ export type ChatGenerationParamsImageConfig = string | number | Array<any | null>;
181
254
  export declare const Modality: {
182
255
  readonly Text: "text";
183
256
  readonly Image: "image";
184
257
  };
185
258
  export type Modality = OpenEnum<typeof Modality>;
259
+ /**
260
+ * Chat completion request parameters
261
+ */
186
262
  export type ChatGenerationParams = {
187
263
  /**
188
264
  * When multiple model providers are available, optionally indicate your routing preference.
@@ -192,88 +268,176 @@ export type ChatGenerationParams = {
192
268
  * Plugins you want to enable for this request, including their settings.
193
269
  */
194
270
  plugins?: Array<ChatGenerationParamsPluginAutoRouter | ChatGenerationParamsPluginModeration | ChatGenerationParamsPluginWeb | ChatGenerationParamsPluginFileParser | ChatGenerationParamsPluginResponseHealing> | undefined;
195
- route?: Route | null | undefined;
271
+ /**
272
+ * Unique user identifier
273
+ */
196
274
  user?: string | undefined;
197
275
  /**
198
276
  * A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.
199
277
  */
200
278
  sessionId?: string | undefined;
279
+ /**
280
+ * Metadata for observability and tracing. Known keys (trace_id, trace_name, span_name, generation_name, parent_span_id) have special handling. Additional keys are passed through as custom metadata to configured broadcast destinations.
281
+ */
282
+ trace?: ChatGenerationParamsTrace | undefined;
283
+ /**
284
+ * List of messages for the conversation
285
+ */
201
286
  messages: Array<Message>;
287
+ /**
288
+ * Model to use for completion
289
+ */
202
290
  model?: string | undefined;
291
+ /**
292
+ * Models to use for completion
293
+ */
203
294
  models?: Array<string> | undefined;
295
+ /**
296
+ * Frequency penalty (-2.0 to 2.0)
297
+ */
204
298
  frequencyPenalty?: number | null | undefined;
299
+ /**
300
+ * Token logit bias adjustments
301
+ */
205
302
  logitBias?: {
206
303
  [k: string]: number;
207
304
  } | null | undefined;
305
+ /**
306
+ * Return log probabilities
307
+ */
208
308
  logprobs?: boolean | null | undefined;
309
+ /**
310
+ * Number of top log probabilities to return (0-20)
311
+ */
209
312
  topLogprobs?: number | null | undefined;
313
+ /**
314
+ * Maximum tokens in completion
315
+ */
210
316
  maxCompletionTokens?: number | null | undefined;
317
+ /**
318
+ * Maximum tokens (deprecated, use max_completion_tokens)
319
+ */
211
320
  maxTokens?: number | null | undefined;
321
+ /**
322
+ * Key-value pairs for additional object information (max 16 pairs, 64 char keys, 512 char values)
323
+ */
212
324
  metadata?: {
213
325
  [k: string]: string;
214
326
  } | undefined;
327
+ /**
328
+ * Presence penalty (-2.0 to 2.0)
329
+ */
215
330
  presencePenalty?: number | null | undefined;
331
+ /**
332
+ * Configuration options for reasoning models
333
+ */
216
334
  reasoning?: Reasoning | undefined;
217
- responseFormat?: ResponseFormatText | ResponseFormatJSONObject | ResponseFormatJSONSchema | ResponseFormatTextGrammar | ResponseFormatPython | undefined;
335
+ /**
336
+ * Response format configuration
337
+ */
338
+ responseFormat?: ResponseFormatText | ResponseFormatJSONObject | ResponseFormatJSONSchema | ResponseFormatTextGrammar | ResponseFormatTextPython | undefined;
339
+ /**
340
+ * Random seed for deterministic outputs
341
+ */
218
342
  seed?: number | null | undefined;
219
- stop?: string | Array<string> | null | undefined;
343
+ /**
344
+ * Stop sequences (up to 4)
345
+ */
346
+ stop?: string | Array<string> | any | null | undefined;
347
+ /**
348
+ * Enable streaming response
349
+ */
220
350
  stream?: boolean | undefined;
351
+ /**
352
+ * Streaming configuration options
353
+ */
221
354
  streamOptions?: ChatStreamOptions | null | undefined;
355
+ /**
356
+ * Sampling temperature (0-2)
357
+ */
222
358
  temperature?: number | null | undefined;
223
- toolChoice?: any | undefined;
359
+ parallelToolCalls?: boolean | null | undefined;
360
+ /**
361
+ * Tool choice configuration
362
+ */
363
+ toolChoice?: ToolChoiceOption | undefined;
364
+ /**
365
+ * Available tools for function calling
366
+ */
224
367
  tools?: Array<ToolDefinitionJson> | undefined;
368
+ /**
369
+ * Nucleus sampling parameter (0-1)
370
+ */
225
371
  topP?: number | null | undefined;
226
- debug?: Debug | undefined;
372
+ /**
373
+ * Debug options for inspecting request transformations (streaming only)
374
+ */
375
+ debug?: DebugOptions | undefined;
376
+ /**
377
+ * Provider-specific image configuration options. Keys and values vary by model/provider. See https://openrouter.ai/docs/guides/overview/multimodal/image-generation for more details.
378
+ */
227
379
  imageConfig?: {
228
- [k: string]: string | number;
380
+ [k: string]: string | number | Array<any | null>;
229
381
  } | undefined;
382
+ /**
383
+ * Output modalities for the response. Supported values are "text" and "image".
384
+ */
230
385
  modalities?: Array<Modality> | undefined;
231
386
  };
232
387
  /** @internal */
233
- export declare const ChatGenerationParamsDataCollection$outboundSchema: z.ZodType<string, ChatGenerationParamsDataCollection>;
388
+ export type ChatGenerationParamsOrder$Outbound = string | string;
234
389
  /** @internal */
235
- export declare const Quantizations$outboundSchema: z.ZodType<string, Quantizations>;
390
+ export declare const ChatGenerationParamsOrder$outboundSchema: z.ZodType<ChatGenerationParamsOrder$Outbound, ChatGenerationParamsOrder>;
391
+ export declare function chatGenerationParamsOrderToJSON(chatGenerationParamsOrder: ChatGenerationParamsOrder): string;
236
392
  /** @internal */
237
- export type ChatGenerationParamsMaxPrice$Outbound = {
238
- prompt?: any | undefined;
239
- completion?: any | undefined;
240
- image?: any | undefined;
241
- audio?: any | undefined;
242
- request?: any | undefined;
243
- };
393
+ export type ChatGenerationParamsOnly$Outbound = string | string;
244
394
  /** @internal */
245
- export declare const ChatGenerationParamsMaxPrice$outboundSchema: z.ZodType<ChatGenerationParamsMaxPrice$Outbound, ChatGenerationParamsMaxPrice>;
246
- export declare function chatGenerationParamsMaxPriceToJSON(chatGenerationParamsMaxPrice: ChatGenerationParamsMaxPrice): string;
395
+ export declare const ChatGenerationParamsOnly$outboundSchema: z.ZodType<ChatGenerationParamsOnly$Outbound, ChatGenerationParamsOnly>;
396
+ export declare function chatGenerationParamsOnlyToJSON(chatGenerationParamsOnly: ChatGenerationParamsOnly): string;
247
397
  /** @internal */
248
- export type ChatGenerationParamsPreferredMinThroughput$Outbound = {
249
- p50?: number | null | undefined;
250
- p75?: number | null | undefined;
251
- p90?: number | null | undefined;
252
- p99?: number | null | undefined;
253
- };
398
+ export type ChatGenerationParamsIgnore$Outbound = string | string;
399
+ /** @internal */
400
+ export declare const ChatGenerationParamsIgnore$outboundSchema: z.ZodType<ChatGenerationParamsIgnore$Outbound, ChatGenerationParamsIgnore>;
401
+ export declare function chatGenerationParamsIgnoreToJSON(chatGenerationParamsIgnore: ChatGenerationParamsIgnore): string;
402
+ /** @internal */
403
+ export declare const ChatGenerationParamsSortEnum$outboundSchema: z.ZodType<string, ChatGenerationParamsSortEnum>;
254
404
  /** @internal */
255
- export declare const ChatGenerationParamsPreferredMinThroughput$outboundSchema: z.ZodType<ChatGenerationParamsPreferredMinThroughput$Outbound, ChatGenerationParamsPreferredMinThroughput>;
256
- export declare function chatGenerationParamsPreferredMinThroughputToJSON(chatGenerationParamsPreferredMinThroughput: ChatGenerationParamsPreferredMinThroughput): string;
405
+ export declare const ChatGenerationParamsProviderSortConfigEnum$outboundSchema: z.ZodEnum<typeof ChatGenerationParamsProviderSortConfigEnum>;
257
406
  /** @internal */
258
- export type ChatGenerationParamsPreferredMinThroughputUnion$Outbound = number | ChatGenerationParamsPreferredMinThroughput$Outbound;
407
+ export declare const ChatGenerationParamsBy$outboundSchema: z.ZodType<string, ChatGenerationParamsBy>;
259
408
  /** @internal */
260
- export declare const ChatGenerationParamsPreferredMinThroughputUnion$outboundSchema: z.ZodType<ChatGenerationParamsPreferredMinThroughputUnion$Outbound, ChatGenerationParamsPreferredMinThroughputUnion>;
261
- export declare function chatGenerationParamsPreferredMinThroughputUnionToJSON(chatGenerationParamsPreferredMinThroughputUnion: ChatGenerationParamsPreferredMinThroughputUnion): string;
409
+ export declare const ChatGenerationParamsPartition$outboundSchema: z.ZodType<string, ChatGenerationParamsPartition>;
262
410
  /** @internal */
263
- export type ChatGenerationParamsPreferredMaxLatency$Outbound = {
264
- p50?: number | null | undefined;
265
- p75?: number | null | undefined;
266
- p90?: number | null | undefined;
267
- p99?: number | null | undefined;
411
+ export type ChatGenerationParamsProviderSortConfig$Outbound = {
412
+ by?: string | null | undefined;
413
+ partition?: string | null | undefined;
268
414
  };
269
415
  /** @internal */
270
- export declare const ChatGenerationParamsPreferredMaxLatency$outboundSchema: z.ZodType<ChatGenerationParamsPreferredMaxLatency$Outbound, ChatGenerationParamsPreferredMaxLatency>;
271
- export declare function chatGenerationParamsPreferredMaxLatencyToJSON(chatGenerationParamsPreferredMaxLatency: ChatGenerationParamsPreferredMaxLatency): string;
416
+ export declare const ChatGenerationParamsProviderSortConfig$outboundSchema: z.ZodType<ChatGenerationParamsProviderSortConfig$Outbound, ChatGenerationParamsProviderSortConfig>;
417
+ export declare function chatGenerationParamsProviderSortConfigToJSON(chatGenerationParamsProviderSortConfig: ChatGenerationParamsProviderSortConfig): string;
272
418
  /** @internal */
273
- export type ChatGenerationParamsPreferredMaxLatencyUnion$Outbound = number | ChatGenerationParamsPreferredMaxLatency$Outbound;
419
+ export type ChatGenerationParamsProviderSortConfigUnion$Outbound = ChatGenerationParamsProviderSortConfig$Outbound | string;
274
420
  /** @internal */
275
- export declare const ChatGenerationParamsPreferredMaxLatencyUnion$outboundSchema: z.ZodType<ChatGenerationParamsPreferredMaxLatencyUnion$Outbound, ChatGenerationParamsPreferredMaxLatencyUnion>;
276
- export declare function chatGenerationParamsPreferredMaxLatencyUnionToJSON(chatGenerationParamsPreferredMaxLatencyUnion: ChatGenerationParamsPreferredMaxLatencyUnion): string;
421
+ export declare const ChatGenerationParamsProviderSortConfigUnion$outboundSchema: z.ZodType<ChatGenerationParamsProviderSortConfigUnion$Outbound, ChatGenerationParamsProviderSortConfigUnion>;
422
+ export declare function chatGenerationParamsProviderSortConfigUnionToJSON(chatGenerationParamsProviderSortConfigUnion: ChatGenerationParamsProviderSortConfigUnion): string;
423
+ /** @internal */
424
+ export declare const ChatGenerationParamsProviderSort$outboundSchema: z.ZodType<string, ChatGenerationParamsProviderSort>;
425
+ /** @internal */
426
+ export type ChatGenerationParamsSortUnion$Outbound = string | ChatGenerationParamsProviderSortConfig$Outbound | string | string;
427
+ /** @internal */
428
+ export declare const ChatGenerationParamsSortUnion$outboundSchema: z.ZodType<ChatGenerationParamsSortUnion$Outbound, ChatGenerationParamsSortUnion>;
429
+ export declare function chatGenerationParamsSortUnionToJSON(chatGenerationParamsSortUnion: ChatGenerationParamsSortUnion): string;
430
+ /** @internal */
431
+ export type ChatGenerationParamsMaxPrice$Outbound = {
432
+ prompt?: string | undefined;
433
+ completion?: string | undefined;
434
+ image?: string | undefined;
435
+ audio?: string | undefined;
436
+ request?: string | undefined;
437
+ };
438
+ /** @internal */
439
+ export declare const ChatGenerationParamsMaxPrice$outboundSchema: z.ZodType<ChatGenerationParamsMaxPrice$Outbound, ChatGenerationParamsMaxPrice>;
440
+ export declare function chatGenerationParamsMaxPriceToJSON(chatGenerationParamsMaxPrice: ChatGenerationParamsMaxPrice): string;
277
441
  /** @internal */
278
442
  export type ChatGenerationParamsProvider$Outbound = {
279
443
  allow_fallbacks?: boolean | null | undefined;
@@ -281,14 +445,14 @@ export type ChatGenerationParamsProvider$Outbound = {
281
445
  data_collection?: string | null | undefined;
282
446
  zdr?: boolean | null | undefined;
283
447
  enforce_distillable_text?: boolean | null | undefined;
284
- order?: Array<Schema0$Outbound> | null | undefined;
285
- only?: Array<Schema0$Outbound> | null | undefined;
286
- ignore?: Array<Schema0$Outbound> | null | undefined;
448
+ order?: Array<string | string> | null | undefined;
449
+ only?: Array<string | string> | null | undefined;
450
+ ignore?: Array<string | string> | null | undefined;
287
451
  quantizations?: Array<string> | null | undefined;
288
- sort?: ProviderSortUnion$Outbound | null | undefined;
452
+ sort?: string | ChatGenerationParamsProviderSortConfig$Outbound | string | string | null | undefined;
289
453
  max_price?: ChatGenerationParamsMaxPrice$Outbound | undefined;
290
- preferred_min_throughput?: number | ChatGenerationParamsPreferredMinThroughput$Outbound | null | undefined;
291
- preferred_max_latency?: number | ChatGenerationParamsPreferredMaxLatency$Outbound | null | undefined;
454
+ preferred_min_throughput?: PreferredMinThroughput$Outbound | null | undefined;
455
+ preferred_max_latency?: PreferredMaxLatency$Outbound | null | undefined;
292
456
  };
293
457
  /** @internal */
294
458
  export declare const ChatGenerationParamsProvider$outboundSchema: z.ZodType<ChatGenerationParamsProvider$Outbound, ChatGenerationParamsProvider>;
@@ -302,26 +466,15 @@ export type ChatGenerationParamsPluginResponseHealing$Outbound = {
302
466
  export declare const ChatGenerationParamsPluginResponseHealing$outboundSchema: z.ZodType<ChatGenerationParamsPluginResponseHealing$Outbound, ChatGenerationParamsPluginResponseHealing>;
303
467
  export declare function chatGenerationParamsPluginResponseHealingToJSON(chatGenerationParamsPluginResponseHealing: ChatGenerationParamsPluginResponseHealing): string;
304
468
  /** @internal */
305
- export declare const PdfEngine$outboundSchema: z.ZodType<string, PdfEngine>;
306
- /** @internal */
307
- export type Pdf$Outbound = {
308
- engine?: string | undefined;
309
- };
310
- /** @internal */
311
- export declare const Pdf$outboundSchema: z.ZodType<Pdf$Outbound, Pdf>;
312
- export declare function pdfToJSON(pdf: Pdf): string;
313
- /** @internal */
314
469
  export type ChatGenerationParamsPluginFileParser$Outbound = {
315
470
  id: "file-parser";
316
471
  enabled?: boolean | undefined;
317
- pdf?: Pdf$Outbound | undefined;
472
+ pdf?: PDFParserOptions$Outbound | undefined;
318
473
  };
319
474
  /** @internal */
320
475
  export declare const ChatGenerationParamsPluginFileParser$outboundSchema: z.ZodType<ChatGenerationParamsPluginFileParser$Outbound, ChatGenerationParamsPluginFileParser>;
321
476
  export declare function chatGenerationParamsPluginFileParserToJSON(chatGenerationParamsPluginFileParser: ChatGenerationParamsPluginFileParser): string;
322
477
  /** @internal */
323
- export declare const Engine$outboundSchema: z.ZodType<string, Engine>;
324
- /** @internal */
325
478
  export type ChatGenerationParamsPluginWeb$Outbound = {
326
479
  id: "web";
327
480
  enabled?: boolean | undefined;
@@ -354,57 +507,39 @@ export type ChatGenerationParamsPluginUnion$Outbound = ChatGenerationParamsPlugi
354
507
  export declare const ChatGenerationParamsPluginUnion$outboundSchema: z.ZodType<ChatGenerationParamsPluginUnion$Outbound, ChatGenerationParamsPluginUnion>;
355
508
  export declare function chatGenerationParamsPluginUnionToJSON(chatGenerationParamsPluginUnion: ChatGenerationParamsPluginUnion): string;
356
509
  /** @internal */
357
- export declare const Route$outboundSchema: z.ZodType<string, Route>;
510
+ export type ChatGenerationParamsTrace$Outbound = {
511
+ trace_id?: string | undefined;
512
+ trace_name?: string | undefined;
513
+ span_name?: string | undefined;
514
+ generation_name?: string | undefined;
515
+ parent_span_id?: string | undefined;
516
+ [additionalProperties: string]: unknown;
517
+ };
518
+ /** @internal */
519
+ export declare const ChatGenerationParamsTrace$outboundSchema: z.ZodType<ChatGenerationParamsTrace$Outbound, ChatGenerationParamsTrace>;
520
+ export declare function chatGenerationParamsTraceToJSON(chatGenerationParamsTrace: ChatGenerationParamsTrace): string;
358
521
  /** @internal */
359
522
  export declare const Effort$outboundSchema: z.ZodType<string, Effort>;
360
523
  /** @internal */
361
524
  export type Reasoning$Outbound = {
362
525
  effort?: string | null | undefined;
363
- summary?: string | null | undefined;
526
+ summary?: any | null | undefined;
364
527
  };
365
528
  /** @internal */
366
529
  export declare const Reasoning$outboundSchema: z.ZodType<Reasoning$Outbound, Reasoning>;
367
530
  export declare function reasoningToJSON(reasoning: Reasoning): string;
368
531
  /** @internal */
369
- export type ResponseFormatPython$Outbound = {
370
- type: "python";
371
- };
372
- /** @internal */
373
- export declare const ResponseFormatPython$outboundSchema: z.ZodType<ResponseFormatPython$Outbound, ResponseFormatPython>;
374
- export declare function responseFormatPythonToJSON(responseFormatPython: ResponseFormatPython): string;
375
- /** @internal */
376
- export type ResponseFormatJSONObject$Outbound = {
377
- type: "json_object";
378
- };
379
- /** @internal */
380
- export declare const ResponseFormatJSONObject$outboundSchema: z.ZodType<ResponseFormatJSONObject$Outbound, ResponseFormatJSONObject>;
381
- export declare function responseFormatJSONObjectToJSON(responseFormatJSONObject: ResponseFormatJSONObject): string;
382
- /** @internal */
383
- export type ResponseFormatText$Outbound = {
384
- type: "text";
385
- };
386
- /** @internal */
387
- export declare const ResponseFormatText$outboundSchema: z.ZodType<ResponseFormatText$Outbound, ResponseFormatText>;
388
- export declare function responseFormatTextToJSON(responseFormatText: ResponseFormatText): string;
389
- /** @internal */
390
- export type ResponseFormat$Outbound = ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | ResponseFormatPython$Outbound;
532
+ export type ResponseFormat$Outbound = ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | ResponseFormatTextPython$Outbound;
391
533
  /** @internal */
392
534
  export declare const ResponseFormat$outboundSchema: z.ZodType<ResponseFormat$Outbound, ResponseFormat>;
393
535
  export declare function responseFormatToJSON(responseFormat: ResponseFormat): string;
394
536
  /** @internal */
395
- export type Stop$Outbound = string | Array<string>;
537
+ export type Stop$Outbound = string | Array<string> | any;
396
538
  /** @internal */
397
539
  export declare const Stop$outboundSchema: z.ZodType<Stop$Outbound, Stop>;
398
540
  export declare function stopToJSON(stop: Stop): string;
399
541
  /** @internal */
400
- export type Debug$Outbound = {
401
- echo_upstream_body?: boolean | undefined;
402
- };
403
- /** @internal */
404
- export declare const Debug$outboundSchema: z.ZodType<Debug$Outbound, Debug>;
405
- export declare function debugToJSON(debug: Debug): string;
406
- /** @internal */
407
- export type ChatGenerationParamsImageConfig$Outbound = string | number;
542
+ export type ChatGenerationParamsImageConfig$Outbound = string | number | Array<any | null>;
408
543
  /** @internal */
409
544
  export declare const ChatGenerationParamsImageConfig$outboundSchema: z.ZodType<ChatGenerationParamsImageConfig$Outbound, ChatGenerationParamsImageConfig>;
410
545
  export declare function chatGenerationParamsImageConfigToJSON(chatGenerationParamsImageConfig: ChatGenerationParamsImageConfig): string;
@@ -414,9 +549,9 @@ export declare const Modality$outboundSchema: z.ZodType<string, Modality>;
414
549
  export type ChatGenerationParams$Outbound = {
415
550
  provider?: ChatGenerationParamsProvider$Outbound | null | undefined;
416
551
  plugins?: Array<ChatGenerationParamsPluginAutoRouter$Outbound | ChatGenerationParamsPluginModeration$Outbound | ChatGenerationParamsPluginWeb$Outbound | ChatGenerationParamsPluginFileParser$Outbound | ChatGenerationParamsPluginResponseHealing$Outbound> | undefined;
417
- route?: string | null | undefined;
418
552
  user?: string | undefined;
419
553
  session_id?: string | undefined;
554
+ trace?: ChatGenerationParamsTrace$Outbound | undefined;
420
555
  messages: Array<Message$Outbound>;
421
556
  model?: string | undefined;
422
557
  models?: Array<string> | undefined;
@@ -433,18 +568,19 @@ export type ChatGenerationParams$Outbound = {
433
568
  } | undefined;
434
569
  presence_penalty?: number | null | undefined;
435
570
  reasoning?: Reasoning$Outbound | undefined;
436
- response_format?: ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | ResponseFormatPython$Outbound | undefined;
571
+ response_format?: ResponseFormatText$Outbound | ResponseFormatJSONObject$Outbound | ResponseFormatJSONSchema$Outbound | ResponseFormatTextGrammar$Outbound | ResponseFormatTextPython$Outbound | undefined;
437
572
  seed?: number | null | undefined;
438
- stop?: string | Array<string> | null | undefined;
573
+ stop?: string | Array<string> | any | null | undefined;
439
574
  stream: boolean;
440
575
  stream_options?: ChatStreamOptions$Outbound | null | undefined;
441
- temperature?: number | null | undefined;
442
- tool_choice?: any | undefined;
576
+ temperature: number | null;
577
+ parallel_tool_calls?: boolean | null | undefined;
578
+ tool_choice?: ToolChoiceOption$Outbound | undefined;
443
579
  tools?: Array<ToolDefinitionJson$Outbound> | undefined;
444
- top_p?: number | null | undefined;
445
- debug?: Debug$Outbound | undefined;
580
+ top_p: number | null;
581
+ debug?: DebugOptions$Outbound | undefined;
446
582
  image_config?: {
447
- [k: string]: string | number;
583
+ [k: string]: string | number | Array<any | null>;
448
584
  } | undefined;
449
585
  modalities?: Array<string> | undefined;
450
586
  };