@openrouter/sdk 1.4.25 → 1.5.0

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 (359) hide show
  1. package/esm/funcs/apiKeysList.d.ts +1 -1
  2. package/esm/funcs/apiKeysList.js +3 -2
  3. package/esm/funcs/apiKeysUpdate.d.ts +4 -2
  4. package/esm/funcs/apiKeysUpdate.js +5 -3
  5. package/esm/funcs/chatSend.d.ts +4 -2
  6. package/esm/funcs/containersPromoteContainerFile.d.ts +1 -1
  7. package/esm/funcs/containersPromoteContainerFile.js +2 -2
  8. package/esm/funcs/embeddingsGenerate.d.ts +1 -1
  9. package/esm/funcs/embeddingsGenerate.js +2 -2
  10. package/esm/funcs/{endUsersCreate.d.ts → externalUsersCreate.d.ts} +3 -3
  11. package/esm/funcs/{endUsersCreate.js → externalUsersCreate.js} +11 -11
  12. package/esm/funcs/{endUsersDelete.d.ts → externalUsersDelete.d.ts} +3 -3
  13. package/esm/funcs/{endUsersDelete.js → externalUsersDelete.js} +8 -8
  14. package/esm/funcs/{endUsersGet.d.ts → externalUsersGet.d.ts} +3 -3
  15. package/esm/funcs/{endUsersGet.js → externalUsersGet.js} +10 -10
  16. package/esm/funcs/{endUsersList.d.ts → externalUsersList.d.ts} +3 -3
  17. package/esm/funcs/{endUsersList.js → externalUsersList.js} +10 -10
  18. package/esm/funcs/{endUsersUpdate.d.ts → externalUsersUpdate.d.ts} +3 -3
  19. package/esm/funcs/{endUsersUpdate.js → externalUsersUpdate.js} +11 -11
  20. package/esm/funcs/filesUpload.d.ts +1 -1
  21. package/esm/funcs/filesUpload.js +2 -2
  22. package/esm/funcs/guardrailsListKeyAssignments.d.ts +1 -1
  23. package/esm/funcs/guardrailsListKeyAssignments.js +2 -2
  24. package/esm/funcs/guardrailsListMemberAssignments.d.ts +1 -1
  25. package/esm/funcs/guardrailsListMemberAssignments.js +2 -2
  26. package/esm/funcs/imagesGenerate.d.ts +4 -2
  27. package/esm/funcs/internsGetInternConnections.d.ts +21 -0
  28. package/esm/funcs/internsGetInternConnections.js +105 -0
  29. package/esm/funcs/internsGetInternDaemon.d.ts +1 -1
  30. package/esm/funcs/internsGetInternDaemon.js +1 -1
  31. package/esm/funcs/internsGetInternIcon.d.ts +20 -0
  32. package/esm/funcs/internsGetInternIcon.js +109 -0
  33. package/esm/funcs/internsSignInternDaemonAccessRequest.d.ts +22 -0
  34. package/esm/funcs/internsSignInternDaemonAccessRequest.js +109 -0
  35. package/esm/funcs/internsSignInternDaemonRequest.d.ts +20 -0
  36. package/esm/funcs/internsSignInternDaemonRequest.js +109 -0
  37. package/esm/funcs/modelsListForUser.js +1 -0
  38. package/esm/funcs/privateEndpointsUpdatePricing.d.ts +1 -1
  39. package/esm/funcs/privateEndpointsUpdatePricing.js +1 -1
  40. package/esm/funcs/responsesSend.d.ts +4 -2
  41. package/esm/funcs/vaultDeleteInternVaultSecret.d.ts +1 -1
  42. package/esm/funcs/vaultDeleteInternVaultSecret.js +2 -2
  43. package/esm/funcs/vaultDeleteVaultSecret.d.ts +1 -1
  44. package/esm/funcs/vaultDeleteVaultSecret.js +2 -2
  45. package/esm/funcs/vaultListInternConnections.d.ts +20 -0
  46. package/esm/funcs/vaultListInternConnections.js +104 -0
  47. package/esm/funcs/vaultStoreVaultSecret.d.ts +1 -1
  48. package/esm/funcs/vaultStoreVaultSecret.js +2 -2
  49. package/esm/funcs/videoGenerationGenerate.d.ts +1 -1
  50. package/esm/funcs/videoGenerationGenerate.js +2 -2
  51. package/esm/lib/config.d.ts +3 -3
  52. package/esm/lib/config.js +3 -3
  53. package/esm/lib/encodings.d.ts +10 -9
  54. package/esm/lib/encodings.js +29 -13
  55. package/esm/lib/http.d.ts +1 -1
  56. package/esm/lib/http.js +1 -1
  57. package/esm/lib/security.d.ts +5 -4
  58. package/esm/lib/security.js +4 -5
  59. package/esm/models/additionaltoolsitem.d.ts +16 -1
  60. package/esm/models/additionaltoolsitem.js +10 -0
  61. package/esm/models/alignment.d.ts +1 -1
  62. package/esm/models/alignmentplugin.d.ts +9 -8
  63. package/esm/models/alignmentplugin.js +3 -2
  64. package/esm/models/alignmentrule.d.ts +31 -0
  65. package/esm/models/alignmentrule.js +25 -0
  66. package/esm/models/alignmentrulerecord.d.ts +7 -3
  67. package/esm/models/alignmentrulerecord.js +2 -1
  68. package/esm/models/armorautomode.d.ts +44 -0
  69. package/esm/models/armorautomode.js +49 -0
  70. package/esm/models/armorcontext.d.ts +22 -0
  71. package/esm/models/armorcontext.js +25 -0
  72. package/esm/models/armorenvironmententry.d.ts +14 -0
  73. package/esm/models/armorenvironmententry.js +14 -0
  74. package/esm/models/armorplugin.d.ts +92 -0
  75. package/esm/models/armorplugin.js +60 -0
  76. package/esm/models/armorrule.d.ts +30 -0
  77. package/esm/models/armorrule.js +16 -0
  78. package/esm/models/armorsafeguardresult.d.ts +69 -0
  79. package/esm/models/armorsafeguardresult.js +83 -0
  80. package/esm/models/batchlistitem.d.ts +8 -0
  81. package/esm/models/batchlistitem.js +3 -0
  82. package/esm/models/batchobject.d.ts +13 -0
  83. package/esm/models/batchobject.js +6 -0
  84. package/esm/models/batchsubmitbody.d.ts +5 -0
  85. package/esm/models/batchsubmitbody.js +2 -0
  86. package/esm/models/byokkey.d.ts +3 -3
  87. package/esm/models/byokkey.js +1 -1
  88. package/esm/models/byokproviderslug.d.ts +2 -0
  89. package/esm/models/byokproviderslug.js +2 -0
  90. package/esm/models/chatcontenttext.d.ts +1 -1
  91. package/esm/models/chatfunctiontool.d.ts +4 -0
  92. package/esm/models/chatfunctiontool.js +7 -0
  93. package/esm/models/chatrequest.d.ts +16 -9
  94. package/esm/models/chatrequest.js +9 -6
  95. package/esm/models/chatresult.d.ts +10 -0
  96. package/esm/models/chatresult.js +5 -0
  97. package/esm/models/chatstreamchunk.d.ts +7 -0
  98. package/esm/models/chatstreamchunk.js +5 -0
  99. package/esm/models/chatwebsearchshorthand.d.ts +1 -1
  100. package/esm/models/clientclosedrequestresponseerrordata.d.ts +17 -0
  101. package/esm/models/clientclosedrequestresponseerrordata.js +16 -0
  102. package/esm/models/computeruseservertool.d.ts +5 -5
  103. package/esm/models/computeruseservertool.js +5 -5
  104. package/esm/models/createbyokkeyrequest.d.ts +3 -3
  105. package/esm/models/createbyokkeyrequest.js +1 -1
  106. package/esm/models/createexternaluserrequest.d.ts +15 -0
  107. package/esm/models/createexternaluserrequest.js +13 -0
  108. package/esm/models/createguardrailrequest.d.ts +10 -0
  109. package/esm/models/createguardrailrequest.js +4 -0
  110. package/esm/models/createobservabilitydestinationrequest.d.ts +5 -0
  111. package/esm/models/createobservabilitydestinationrequest.js +2 -0
  112. package/esm/models/customtool.d.ts +2 -0
  113. package/esm/models/customtool.js +11 -0
  114. package/esm/models/decisionsboxanswer.d.ts +21 -0
  115. package/esm/models/decisionsboxanswer.js +26 -0
  116. package/esm/models/decisionsboxquestion.d.ts +34 -0
  117. package/esm/models/decisionsboxquestion.js +23 -0
  118. package/esm/models/decisionsrequest.d.ts +6 -5
  119. package/esm/models/decisionsrequest.js +3 -0
  120. package/esm/models/decisionsresponse.d.ts +4 -3
  121. package/esm/models/decisionsresponse.js +3 -0
  122. package/esm/models/deferredbm25search.d.ts +17 -0
  123. package/esm/models/deferredbm25search.js +19 -0
  124. package/esm/models/deferredcustomsearch.d.ts +21 -0
  125. package/esm/models/deferredcustomsearch.js +23 -0
  126. package/esm/models/deferredregexsearch.d.ts +17 -0
  127. package/esm/models/deferredregexsearch.js +19 -0
  128. package/esm/models/deferredtoolscontrol.d.ts +62 -0
  129. package/esm/models/deferredtoolscontrol.js +38 -0
  130. package/esm/models/deferredtoolssearchstrategy.d.ts +14 -0
  131. package/esm/models/deferredtoolssearchstrategy.js +18 -0
  132. package/esm/models/errors/batchpaymentrequiredresponseerror.d.ts +16 -0
  133. package/esm/models/errors/batchpaymentrequiredresponseerror.js +5 -0
  134. package/esm/models/errors/clientclosedrequestresponseerror.d.ts +39 -0
  135. package/esm/models/errors/clientclosedrequestresponseerror.js +47 -0
  136. package/esm/models/errors/index.d.ts +1 -0
  137. package/esm/models/errors/index.js +1 -0
  138. package/esm/models/{enduser.d.ts → externaluser.d.ts} +5 -5
  139. package/esm/models/{enduser.js → externaluser.js} +6 -5
  140. package/esm/models/externaluserresponse.d.ts +11 -0
  141. package/esm/models/externaluserresponse.js +15 -0
  142. package/esm/models/guardrail.d.ts +8 -0
  143. package/esm/models/guardrail.js +4 -0
  144. package/esm/models/imagegenerationproviderpreferences.d.ts +12 -0
  145. package/esm/models/imagegenerationproviderpreferences.js +3 -0
  146. package/esm/models/index.d.ts +34 -6
  147. package/esm/models/index.js +34 -6
  148. package/esm/models/inputsunion.d.ts +7 -4
  149. package/esm/models/inputsunion.js +9 -0
  150. package/esm/models/inputtext.d.ts +1 -1
  151. package/esm/models/intern.d.ts +12 -0
  152. package/esm/models/intern.js +6 -0
  153. package/esm/models/internconnection.d.ts +118 -0
  154. package/esm/models/internconnection.js +105 -0
  155. package/esm/models/internconnectionlist.d.ts +11 -0
  156. package/esm/models/internconnectionlist.js +15 -0
  157. package/esm/models/jevrouterplugin.d.ts +5 -0
  158. package/esm/models/jevrouterplugin.js +2 -0
  159. package/esm/models/keybudget.d.ts +80 -0
  160. package/esm/models/keybudget.js +58 -0
  161. package/esm/models/legacywebsearchservertool.d.ts +1 -1
  162. package/esm/models/listexternalusersresponse.d.ts +15 -0
  163. package/esm/models/listexternalusersresponse.js +21 -0
  164. package/esm/models/messagesmessageparam.d.ts +7 -6
  165. package/esm/models/messagesmessageparam.js +4 -0
  166. package/esm/models/messagesrequest.d.ts +11 -4
  167. package/esm/models/messagesrequest.js +6 -0
  168. package/esm/models/namespacefunctiontool.d.ts +5 -5
  169. package/esm/models/namespacefunctiontool.js +5 -5
  170. package/esm/models/observabilityarizedestination.d.ts +4 -0
  171. package/esm/models/observabilityarizedestination.js +2 -0
  172. package/esm/models/observabilitybraintrustdestination.d.ts +4 -0
  173. package/esm/models/observabilitybraintrustdestination.js +2 -0
  174. package/esm/models/observabilityclickhousedestination.d.ts +4 -0
  175. package/esm/models/observabilityclickhousedestination.js +2 -0
  176. package/esm/models/observabilitydatadogdestination.d.ts +4 -0
  177. package/esm/models/observabilitydatadogdestination.js +2 -0
  178. package/esm/models/observabilitygrafanadestination.d.ts +4 -0
  179. package/esm/models/observabilitygrafanadestination.js +2 -0
  180. package/esm/models/observabilitylangfusedestination.d.ts +4 -0
  181. package/esm/models/observabilitylangfusedestination.js +2 -0
  182. package/esm/models/observabilitylangsmithdestination.d.ts +4 -0
  183. package/esm/models/observabilitylangsmithdestination.js +2 -0
  184. package/esm/models/observabilitynewrelicdestination.d.ts +4 -0
  185. package/esm/models/observabilitynewrelicdestination.js +2 -0
  186. package/esm/models/observabilityopikdestination.d.ts +4 -0
  187. package/esm/models/observabilityopikdestination.js +2 -0
  188. package/esm/models/observabilityotelcollectordestination.d.ts +4 -0
  189. package/esm/models/observabilityotelcollectordestination.js +2 -0
  190. package/esm/models/observabilityposthogdestination.d.ts +4 -0
  191. package/esm/models/observabilityposthogdestination.js +2 -0
  192. package/esm/models/observabilityrampdestination.d.ts +4 -0
  193. package/esm/models/observabilityrampdestination.js +2 -0
  194. package/esm/models/observabilitys3destination.d.ts +4 -0
  195. package/esm/models/observabilitys3destination.js +2 -0
  196. package/esm/models/observabilitysentrydestination.d.ts +4 -0
  197. package/esm/models/observabilitysentrydestination.js +2 -0
  198. package/esm/models/observabilitysnowflakedestination.d.ts +4 -0
  199. package/esm/models/observabilitysnowflakedestination.js +2 -0
  200. package/esm/models/observabilityweavedestination.d.ts +4 -0
  201. package/esm/models/observabilityweavedestination.js +2 -0
  202. package/esm/models/observabilitywebhookdestination.d.ts +8 -4
  203. package/esm/models/observabilitywebhookdestination.js +5 -4
  204. package/esm/models/openresponseserrorfield.d.ts +1 -0
  205. package/esm/models/openresponseserrorfield.js +1 -0
  206. package/esm/models/openresponseserrormetadata.d.ts +1 -1
  207. package/esm/models/openresponsesresult.d.ts +19 -3
  208. package/esm/models/openresponsesresult.js +14 -0
  209. package/esm/models/operations/{createenduser.d.ts → createexternaluser.d.ts} +8 -8
  210. package/esm/models/operations/createexternaluser.js +23 -0
  211. package/esm/models/operations/deleteexternaluser.d.ts +58 -0
  212. package/esm/models/operations/{deleteenduser.js → deleteexternaluser.js} +5 -5
  213. package/esm/models/operations/getcurrentkey.d.ts +5 -0
  214. package/esm/models/operations/getcurrentkey.js +4 -1
  215. package/esm/models/operations/{updateenduser.d.ts → getexternaluser.d.ts} +7 -10
  216. package/esm/models/operations/{getenduser.js → getexternaluser.js} +5 -5
  217. package/esm/models/operations/{deleteenduser.d.ts → getinternconnections.d.ts} +9 -9
  218. package/esm/models/operations/getinternconnections.js +21 -0
  219. package/esm/models/operations/{getenduser.d.ts → getinternicon.d.ts} +14 -9
  220. package/esm/models/operations/getinternicon.js +22 -0
  221. package/esm/models/operations/index.d.ts +10 -5
  222. package/esm/models/operations/index.js +10 -5
  223. package/esm/models/operations/list.d.ts +5 -0
  224. package/esm/models/operations/list.js +2 -0
  225. package/esm/models/operations/listbatches.d.ts +4 -4
  226. package/esm/models/operations/listbatches.js +3 -3
  227. package/esm/models/operations/listbyokkeys.d.ts +2 -0
  228. package/esm/models/operations/listbyokkeys.js +2 -0
  229. package/esm/models/operations/{listendusers.d.ts → listexternalusers.d.ts} +11 -11
  230. package/esm/models/operations/listexternalusers.js +38 -0
  231. package/esm/models/operations/listinternconnections.d.ts +75 -0
  232. package/esm/models/operations/listinternconnections.js +36 -0
  233. package/esm/models/operations/listmodelsuser.d.ts +29 -0
  234. package/esm/models/operations/listmodelsuser.js +21 -0
  235. package/esm/models/operations/signinterndaemonaccessrequest.d.ts +72 -0
  236. package/esm/models/operations/signinterndaemonaccessrequest.js +38 -0
  237. package/esm/models/operations/signinterndaemonrequest.d.ts +72 -0
  238. package/esm/models/operations/signinterndaemonrequest.js +38 -0
  239. package/esm/models/operations/updateexternaluser.d.ts +61 -0
  240. package/esm/models/operations/updateexternaluser.js +24 -0
  241. package/esm/models/operations/updatekeys.d.ts +5 -0
  242. package/esm/models/operations/updatekeys.js +2 -0
  243. package/esm/models/oranthropiccontentblock.d.ts +2 -1
  244. package/esm/models/oranthropiccontentblock.js +2 -0
  245. package/esm/models/oranthropictoolsearchresult.d.ts +17 -0
  246. package/esm/models/oranthropictoolsearchresult.js +21 -0
  247. package/esm/models/oranthropictoolsearchresultparam.d.ts +23 -0
  248. package/esm/models/oranthropictoolsearchresultparam.js +20 -0
  249. package/esm/models/outputapplypatchservertoolitem.d.ts +7 -2
  250. package/esm/models/outputapplypatchservertoolitem.js +5 -3
  251. package/esm/models/outputarmorblockeditem.d.ts +71 -0
  252. package/esm/models/outputarmorblockeditem.js +60 -0
  253. package/esm/models/outputdatetimeitem.d.ts +7 -2
  254. package/esm/models/outputdatetimeitem.js +5 -3
  255. package/esm/models/outputimagegenerationservertoolitem.d.ts +7 -2
  256. package/esm/models/outputimagegenerationservertoolitem.js +5 -3
  257. package/esm/models/outputitems.d.ts +5 -1
  258. package/esm/models/outputitems.js +4 -0
  259. package/esm/models/outputsearchmodelsservertoolitem.d.ts +7 -2
  260. package/esm/models/outputsearchmodelsservertoolitem.js +5 -3
  261. package/esm/models/outputtoolsearchcallitem.d.ts +26 -0
  262. package/esm/models/outputtoolsearchcallitem.js +30 -0
  263. package/esm/models/outputtoolsearchservertoolitem.d.ts +30 -2
  264. package/esm/models/outputtoolsearchservertoolitem.js +36 -3
  265. package/esm/models/outputwebsearchservertoolitem.d.ts +7 -2
  266. package/esm/models/outputwebsearchservertoolitem.js +5 -3
  267. package/esm/models/preview20250311websearchservertool.d.ts +1 -1
  268. package/esm/models/previewwebsearchservertool.d.ts +1 -1
  269. package/esm/models/privateendpointpricing.d.ts +10 -0
  270. package/esm/models/privateendpointpricing.js +15 -0
  271. package/esm/models/promptcachebreakpoint.d.ts +3 -1
  272. package/esm/models/promptcachebreakpoint.js +2 -0
  273. package/esm/models/promptcacheoptions.d.ts +1 -1
  274. package/esm/models/providername.d.ts +2 -0
  275. package/esm/models/providername.js +2 -0
  276. package/esm/models/provideroptions.d.ts +12 -0
  277. package/esm/models/provideroptions.js +3 -0
  278. package/esm/models/providerresponse.d.ts +2 -0
  279. package/esm/models/providerresponse.js +2 -0
  280. package/esm/models/publicendpoint.d.ts +11 -2
  281. package/esm/models/publicendpoint.js +5 -0
  282. package/esm/models/publicservicetier.d.ts +17 -0
  283. package/esm/models/publicservicetier.js +16 -0
  284. package/esm/models/responsesrequest.d.ts +42 -6
  285. package/esm/models/responsesrequest.js +22 -0
  286. package/esm/models/signinterndaemonrequest.d.ts +54 -0
  287. package/esm/models/signinterndaemonrequest.js +30 -0
  288. package/esm/models/signinterndaemonresponse.d.ts +32 -0
  289. package/esm/models/signinterndaemonresponse.js +27 -0
  290. package/esm/models/speechinput.d.ts +12 -0
  291. package/esm/models/speechinput.js +12 -0
  292. package/esm/models/speechinputreferenceimage.d.ts +1 -1
  293. package/esm/models/speechrequest.d.ts +10 -4
  294. package/esm/models/speechrequest.js +3 -1
  295. package/esm/models/speechturn.d.ts +25 -0
  296. package/esm/models/speechturn.js +15 -0
  297. package/esm/models/switchyardrouterplugin.d.ts +1 -1
  298. package/esm/models/tokenexchangerequest.d.ts +7 -6
  299. package/esm/models/tokenexchangerequest.js +4 -2
  300. package/esm/models/tokenexchangeresponse.d.ts +3 -0
  301. package/esm/models/toolsearchcallitem.d.ts +47 -0
  302. package/esm/models/toolsearchcallitem.js +42 -0
  303. package/esm/models/toolsearchoutputitem.d.ts +150 -0
  304. package/esm/models/toolsearchoutputitem.js +181 -0
  305. package/esm/models/updatebyokkeyrequest.d.ts +3 -3
  306. package/esm/models/updatebyokkeyrequest.js +1 -1
  307. package/esm/models/updateexternaluserrequest.d.ts +15 -0
  308. package/esm/models/updateexternaluserrequest.js +18 -0
  309. package/esm/models/updateguardrailrequest.d.ts +10 -0
  310. package/esm/models/updateguardrailrequest.js +4 -0
  311. package/esm/models/updateobservabilitydestinationrequest.d.ts +5 -0
  312. package/esm/models/updateobservabilitydestinationrequest.js +2 -0
  313. package/esm/models/videogenerationrequest.d.ts +12 -0
  314. package/esm/models/videogenerationrequest.js +3 -0
  315. package/esm/models/videogenerationresponse.d.ts +11 -0
  316. package/esm/models/videogenerationresponse.js +3 -0
  317. package/esm/models/webfetchengineenum.d.ts +2 -2
  318. package/esm/models/webfetchengineenum.js +1 -1
  319. package/esm/models/webfetchservertoolconfig.d.ts +1 -1
  320. package/esm/models/websearchconfig.d.ts +1 -1
  321. package/esm/models/websearchengineenum.d.ts +2 -2
  322. package/esm/models/websearchengineenum.js +1 -1
  323. package/esm/models/websearchservertool.d.ts +1 -1
  324. package/esm/models/websearchservertoolconfig.d.ts +1 -1
  325. package/esm/models/workspacebudget.d.ts +4 -4
  326. package/esm/models/workspacebudget.js +3 -3
  327. package/esm/sdk/apikeys.d.ts +3 -1
  328. package/esm/sdk/apikeys.js +3 -1
  329. package/esm/sdk/betaresponses.d.ts +4 -2
  330. package/esm/sdk/chat.d.ts +4 -2
  331. package/esm/sdk/endusers.d.ts +10 -10
  332. package/esm/sdk/endusers.js +15 -15
  333. package/esm/sdk/externalusers.d.ts +44 -0
  334. package/esm/sdk/externalusers.js +60 -0
  335. package/esm/sdk/images.d.ts +3 -2
  336. package/esm/sdk/interns.d.ts +31 -1
  337. package/esm/sdk/interns.js +43 -1
  338. package/esm/sdk/privateendpoints.d.ts +1 -1
  339. package/esm/sdk/privateendpoints.js +1 -1
  340. package/esm/sdk/responses.d.ts +4 -2
  341. package/esm/sdk/sdk.d.ts +5 -2
  342. package/esm/sdk/sdk.js +7 -3
  343. package/esm/sdk/vault.d.ts +7 -0
  344. package/esm/sdk/vault.js +10 -0
  345. package/jsr.json +1 -1
  346. package/package.json +6 -6
  347. package/esm/models/batchlisttimestamp.d.ts +0 -12
  348. package/esm/models/batchlisttimestamp.js +0 -15
  349. package/esm/models/createenduserrequest.d.ts +0 -15
  350. package/esm/models/createenduserrequest.js +0 -13
  351. package/esm/models/enduserresponse.d.ts +0 -11
  352. package/esm/models/enduserresponse.js +0 -15
  353. package/esm/models/listendusersresponse.d.ts +0 -15
  354. package/esm/models/listendusersresponse.js +0 -21
  355. package/esm/models/operations/createenduser.js +0 -23
  356. package/esm/models/operations/listendusers.js +0 -38
  357. package/esm/models/operations/updateenduser.js +0 -24
  358. package/esm/models/updateenduserrequest.d.ts +0 -15
  359. package/esm/models/updateenduserrequest.js +0 -18
@@ -0,0 +1,60 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 97c8f227ed0a
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ export const OutputArmorBlockedItemStatus = {
9
+ Completed: "completed",
10
+ };
11
+ export const OutputArmorBlockedItemType = {
12
+ OpenrouterArmorBlocked: "openrouter:armor_blocked",
13
+ };
14
+ /** @internal */
15
+ export const OutputArmorBlockedItemStatus$inboundSchema = z.enum(OutputArmorBlockedItemStatus);
16
+ /** @internal */
17
+ export const OutputArmorBlockedItemStatus$outboundSchema = OutputArmorBlockedItemStatus$inboundSchema;
18
+ /** @internal */
19
+ export const OutputArmorBlockedItemType$inboundSchema = z.enum(OutputArmorBlockedItemType);
20
+ /** @internal */
21
+ export const OutputArmorBlockedItemType$outboundSchema = OutputArmorBlockedItemType$inboundSchema;
22
+ /** @internal */
23
+ export const OutputArmorBlockedItem$inboundSchema = z.object({
24
+ arguments: z.string(),
25
+ call_id: z.string(),
26
+ explanation: z.string(),
27
+ id: z.string(),
28
+ name: z.string(),
29
+ namespace: z.string().optional(),
30
+ reason: z.string(),
31
+ status: OutputArmorBlockedItemStatus$inboundSchema,
32
+ type: OutputArmorBlockedItemType$inboundSchema,
33
+ }).transform((v) => {
34
+ return remap$(v, {
35
+ "call_id": "callId",
36
+ });
37
+ });
38
+ /** @internal */
39
+ export const OutputArmorBlockedItem$outboundSchema = z.object({
40
+ arguments: z.string(),
41
+ callId: z.string(),
42
+ explanation: z.string(),
43
+ id: z.string(),
44
+ name: z.string(),
45
+ namespace: z.string().optional(),
46
+ reason: z.string(),
47
+ status: OutputArmorBlockedItemStatus$outboundSchema,
48
+ type: OutputArmorBlockedItemType$outboundSchema,
49
+ }).transform((v) => {
50
+ return remap$(v, {
51
+ callId: "call_id",
52
+ });
53
+ });
54
+ export function outputArmorBlockedItemToJSON(outputArmorBlockedItem) {
55
+ return JSON.stringify(OutputArmorBlockedItem$outboundSchema.parse(outputArmorBlockedItem));
56
+ }
57
+ export function outputArmorBlockedItemFromJSON(jsonString) {
58
+ return safeParse(jsonString, (x) => OutputArmorBlockedItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputArmorBlockedItem' from JSON`);
59
+ }
60
+ //# sourceMappingURL=outputarmorblockeditem.js.map
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- import { ToolCallStatus } from "./toolcallstatus.js";
5
+ import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
6
6
  export declare const OutputDatetimeItemType: {
7
7
  readonly OpenrouterDatetime: "openrouter:datetime";
8
8
  };
@@ -15,8 +15,12 @@ export type OutputDatetimeItem = {
15
15
  * ISO 8601 datetime string
16
16
  */
17
17
  datetime: string;
18
+ /**
19
+ * The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
20
+ */
21
+ error?: string | undefined;
18
22
  id?: string | undefined;
19
- status: ToolCallStatus;
23
+ status: FailableToolCallStatus;
20
24
  /**
21
25
  * IANA timezone name
22
26
  */
@@ -32,6 +36,7 @@ export declare const OutputDatetimeItem$inboundSchema: z.ZodType<OutputDatetimeI
32
36
  /** @internal */
33
37
  export type OutputDatetimeItem$Outbound = {
34
38
  datetime: string;
39
+ error?: string | undefined;
35
40
  id?: string | undefined;
36
41
  status: string;
37
42
  timezone: string;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
7
+ import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
8
8
  export const OutputDatetimeItemType = {
9
9
  OpenrouterDatetime: "openrouter:datetime",
10
10
  };
@@ -15,16 +15,18 @@ export const OutputDatetimeItemType$outboundSchema = OutputDatetimeItemType$inbo
15
15
  /** @internal */
16
16
  export const OutputDatetimeItem$inboundSchema = z.object({
17
17
  datetime: z.string(),
18
+ error: z.string().optional(),
18
19
  id: z.string().optional(),
19
- status: ToolCallStatus$inboundSchema,
20
+ status: FailableToolCallStatus$inboundSchema,
20
21
  timezone: z.string(),
21
22
  type: OutputDatetimeItemType$inboundSchema,
22
23
  });
23
24
  /** @internal */
24
25
  export const OutputDatetimeItem$outboundSchema = z.object({
25
26
  datetime: z.string(),
27
+ error: z.string().optional(),
26
28
  id: z.string().optional(),
27
- status: ToolCallStatus$outboundSchema,
29
+ status: FailableToolCallStatus$outboundSchema,
28
30
  timezone: z.string(),
29
31
  type: OutputDatetimeItemType$outboundSchema,
30
32
  });
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- import { ToolCallStatus } from "./toolcallstatus.js";
5
+ import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
6
6
  export declare const OutputImageGenerationServerToolItemType: {
7
7
  readonly OpenrouterImageGeneration: "openrouter:image_generation";
8
8
  };
@@ -11,6 +11,10 @@ export type OutputImageGenerationServerToolItemType = ClosedEnum<typeof OutputIm
11
11
  * An openrouter:image_generation server tool output item
12
12
  */
13
13
  export type OutputImageGenerationServerToolItem = {
14
+ /**
15
+ * The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
16
+ */
17
+ error?: string | undefined;
14
18
  id?: string | undefined;
15
19
  imageB64?: string | undefined;
16
20
  imageUrl?: string | undefined;
@@ -23,7 +27,7 @@ export type OutputImageGenerationServerToolItem = {
23
27
  */
24
28
  result?: string | null | undefined;
25
29
  revisedPrompt?: string | undefined;
26
- status: ToolCallStatus;
30
+ status: FailableToolCallStatus;
27
31
  type: OutputImageGenerationServerToolItemType;
28
32
  };
29
33
  /** @internal */
@@ -34,6 +38,7 @@ export declare const OutputImageGenerationServerToolItemType$outboundSchema: z.Z
34
38
  export declare const OutputImageGenerationServerToolItem$inboundSchema: z.ZodType<OutputImageGenerationServerToolItem, unknown>;
35
39
  /** @internal */
36
40
  export type OutputImageGenerationServerToolItem$Outbound = {
41
+ error?: string | undefined;
37
42
  id?: string | undefined;
38
43
  imageB64?: string | undefined;
39
44
  imageUrl?: string | undefined;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
7
+ import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
8
8
  export const OutputImageGenerationServerToolItemType = {
9
9
  OpenrouterImageGeneration: "openrouter:image_generation",
10
10
  };
@@ -14,24 +14,26 @@ export const OutputImageGenerationServerToolItemType$inboundSchema = z.enum(Outp
14
14
  export const OutputImageGenerationServerToolItemType$outboundSchema = OutputImageGenerationServerToolItemType$inboundSchema;
15
15
  /** @internal */
16
16
  export const OutputImageGenerationServerToolItem$inboundSchema = z.object({
17
+ error: z.string().optional(),
17
18
  id: z.string().optional(),
18
19
  imageB64: z.string().optional(),
19
20
  imageUrl: z.string().optional(),
20
21
  prompt: z.string().optional(),
21
22
  result: z.nullable(z.string()).optional(),
22
23
  revisedPrompt: z.string().optional(),
23
- status: ToolCallStatus$inboundSchema,
24
+ status: FailableToolCallStatus$inboundSchema,
24
25
  type: OutputImageGenerationServerToolItemType$inboundSchema,
25
26
  });
26
27
  /** @internal */
27
28
  export const OutputImageGenerationServerToolItem$outboundSchema = z.object({
29
+ error: z.string().optional(),
28
30
  id: z.string().optional(),
29
31
  imageB64: z.string().optional(),
30
32
  imageUrl: z.string().optional(),
31
33
  prompt: z.string().optional(),
32
34
  result: z.nullable(z.string()).optional(),
33
35
  revisedPrompt: z.string().optional(),
34
- status: ToolCallStatus$outboundSchema,
36
+ status: FailableToolCallStatus$outboundSchema,
35
37
  type: OutputImageGenerationServerToolItemType$outboundSchema,
36
38
  });
37
39
  export function outputImageGenerationServerToolItemToJSON(outputImageGenerationServerToolItem) {
@@ -5,6 +5,7 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
5
  import { OutputAdvisorServerToolItem } from "./outputadvisorservertoolitem.js";
6
6
  import { OutputApplyPatchCallItem } from "./outputapplypatchcallitem.js";
7
7
  import { OutputApplyPatchServerToolItem } from "./outputapplypatchservertoolitem.js";
8
+ import { OutputArmorBlockedItem } from "./outputarmorblockeditem.js";
8
9
  import { OutputBashServerToolItem } from "./outputbashservertoolitem.js";
9
10
  import { OutputBrowserUseServerToolItem } from "./outputbrowseruseservertoolitem.js";
10
11
  import { OutputCodeInterpreterCallItem } from "./outputcodeinterpretercallitem.js";
@@ -29,6 +30,7 @@ import { OutputShellCallOutputItem } from "./outputshellcalloutputitem.js";
29
30
  import { OutputShellServerToolItem } from "./outputshellservertoolitem.js";
30
31
  import { OutputSubagentServerToolItem } from "./outputsubagentservertoolitem.js";
31
32
  import { OutputTextEditorServerToolItem } from "./outputtexteditorservertoolitem.js";
33
+ import { OutputToolSearchCallItem } from "./outputtoolsearchcallitem.js";
32
34
  import { OutputToolSearchServerToolItem } from "./outputtoolsearchservertoolitem.js";
33
35
  import { OutputWebFetchServerToolItem } from "./outputwebfetchservertoolitem.js";
34
36
  import { OutputWebSearchCallItem } from "./outputwebsearchcallitem.js";
@@ -48,6 +50,8 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
48
50
  type: "openrouter:advisor";
49
51
  }) | (OutputApplyPatchServerToolItem & {
50
52
  type: "openrouter:apply_patch";
53
+ }) | (OutputArmorBlockedItem & {
54
+ type: "openrouter:armor_blocked";
51
55
  }) | (OutputBashServerToolItem & {
52
56
  type: "openrouter:bash";
53
57
  }) | (OutputBrowserUseServerToolItem & {
@@ -82,7 +86,7 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
82
86
  type: "openrouter:web_fetch";
83
87
  }) | (OutputWebSearchServerToolItem & {
84
88
  type: "openrouter:web_search";
85
- }) | OutputReasoningItem | OutputShellCallItem | OutputShellCallOutputItem | (OutputWebSearchCallItem & {
89
+ }) | OutputReasoningItem | OutputShellCallItem | OutputShellCallOutputItem | OutputToolSearchCallItem | (OutputWebSearchCallItem & {
86
90
  type: "web_search_call";
87
91
  }) | discriminatedUnionTypes.Unknown<"type">;
88
92
  /** @internal */
@@ -8,6 +8,7 @@ import { discriminatedUnion } from "../types/discriminatedUnion.js";
8
8
  import { OutputAdvisorServerToolItem$inboundSchema, } from "./outputadvisorservertoolitem.js";
9
9
  import { OutputApplyPatchCallItem$inboundSchema, } from "./outputapplypatchcallitem.js";
10
10
  import { OutputApplyPatchServerToolItem$inboundSchema, } from "./outputapplypatchservertoolitem.js";
11
+ import { OutputArmorBlockedItem$inboundSchema, } from "./outputarmorblockeditem.js";
11
12
  import { OutputBashServerToolItem$inboundSchema, } from "./outputbashservertoolitem.js";
12
13
  import { OutputBrowserUseServerToolItem$inboundSchema, } from "./outputbrowseruseservertoolitem.js";
13
14
  import { OutputCodeInterpreterCallItem$inboundSchema, } from "./outputcodeinterpretercallitem.js";
@@ -32,6 +33,7 @@ import { OutputShellCallOutputItem$inboundSchema, } from "./outputshellcalloutpu
32
33
  import { OutputShellServerToolItem$inboundSchema, } from "./outputshellservertoolitem.js";
33
34
  import { OutputSubagentServerToolItem$inboundSchema, } from "./outputsubagentservertoolitem.js";
34
35
  import { OutputTextEditorServerToolItem$inboundSchema, } from "./outputtexteditorservertoolitem.js";
36
+ import { OutputToolSearchCallItem$inboundSchema, } from "./outputtoolsearchcallitem.js";
35
37
  import { OutputToolSearchServerToolItem$inboundSchema, } from "./outputtoolsearchservertoolitem.js";
36
38
  import { OutputWebFetchServerToolItem$inboundSchema, } from "./outputwebfetchservertoolitem.js";
37
39
  import { OutputWebSearchCallItem$inboundSchema, } from "./outputwebsearchcallitem.js";
@@ -49,6 +51,7 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
49
51
  ["openrouter:advisor"]: OutputAdvisorServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:advisor") })),
50
52
  ["openrouter:apply_patch"]: OutputApplyPatchServerToolItem$inboundSchema
51
53
  .and(z.object({ type: z.literal("openrouter:apply_patch") })),
54
+ ["openrouter:armor_blocked"]: OutputArmorBlockedItem$inboundSchema.and(z.object({ type: z.literal("openrouter:armor_blocked") })),
52
55
  ["openrouter:bash"]: OutputBashServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:bash") })),
53
56
  ["openrouter:browser_use"]: OutputBrowserUseServerToolItem$inboundSchema
54
57
  .and(z.object({ type: z.literal("openrouter:browser_use") })),
@@ -73,6 +76,7 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
73
76
  reasoning: OutputReasoningItem$inboundSchema,
74
77
  shell_call: OutputShellCallItem$inboundSchema,
75
78
  shell_call_output: OutputShellCallOutputItem$inboundSchema,
79
+ tool_search_call: OutputToolSearchCallItem$inboundSchema,
76
80
  web_search_call: OutputWebSearchCallItem$inboundSchema.and(z.object({ type: z.literal("web_search_call") })),
77
81
  });
78
82
  export function outputItemsFromJSON(jsonString) {
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- import { ToolCallStatus } from "./toolcallstatus.js";
5
+ import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
6
6
  export declare const OutputSearchModelsServerToolItemType: {
7
7
  readonly OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models";
8
8
  };
@@ -15,9 +15,13 @@ export type OutputSearchModelsServerToolItem = {
15
15
  * The JSON arguments submitted to the search tool (e.g. {"query":"Claude"})
16
16
  */
17
17
  arguments?: string | undefined;
18
+ /**
19
+ * The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
20
+ */
21
+ error?: string | undefined;
18
22
  id?: string | undefined;
19
23
  query?: string | undefined;
20
- status: ToolCallStatus;
24
+ status: FailableToolCallStatus;
21
25
  type: OutputSearchModelsServerToolItemType;
22
26
  };
23
27
  /** @internal */
@@ -29,6 +33,7 @@ export declare const OutputSearchModelsServerToolItem$inboundSchema: z.ZodType<O
29
33
  /** @internal */
30
34
  export type OutputSearchModelsServerToolItem$Outbound = {
31
35
  arguments?: string | undefined;
36
+ error?: string | undefined;
32
37
  id?: string | undefined;
33
38
  query?: string | undefined;
34
39
  status: string;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
7
+ import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
8
8
  export const OutputSearchModelsServerToolItemType = {
9
9
  OpenrouterExperimentalSearchModels: "openrouter:experimental__search_models",
10
10
  };
@@ -15,17 +15,19 @@ export const OutputSearchModelsServerToolItemType$outboundSchema = OutputSearchM
15
15
  /** @internal */
16
16
  export const OutputSearchModelsServerToolItem$inboundSchema = z.object({
17
17
  arguments: z.string().optional(),
18
+ error: z.string().optional(),
18
19
  id: z.string().optional(),
19
20
  query: z.string().optional(),
20
- status: ToolCallStatus$inboundSchema,
21
+ status: FailableToolCallStatus$inboundSchema,
21
22
  type: OutputSearchModelsServerToolItemType$inboundSchema,
22
23
  });
23
24
  /** @internal */
24
25
  export const OutputSearchModelsServerToolItem$outboundSchema = z.object({
25
26
  arguments: z.string().optional(),
27
+ error: z.string().optional(),
26
28
  id: z.string().optional(),
27
29
  query: z.string().optional(),
28
- status: ToolCallStatus$outboundSchema,
30
+ status: FailableToolCallStatus$outboundSchema,
29
31
  type: OutputSearchModelsServerToolItemType$outboundSchema,
30
32
  });
31
33
  export function outputSearchModelsServerToolItemToJSON(outputSearchModelsServerToolItem) {
@@ -0,0 +1,26 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { Result as SafeParseResult } from "../types/fp.js";
4
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ import { ToolCallStatus } from "./toolcallstatus.js";
6
+ export declare const OutputToolSearchCallItemExecution: {
7
+ readonly Client: "client";
8
+ };
9
+ export type OutputToolSearchCallItemExecution = ClosedEnum<typeof OutputToolSearchCallItemExecution>;
10
+ /**
11
+ * A call the model made to a `tool_search` tool declared with `"execution": "client"`. The client runs the search and replays this item with a `tool_search_output` item.
12
+ */
13
+ export type OutputToolSearchCallItem = {
14
+ arguments?: any | undefined;
15
+ callId: string;
16
+ execution: OutputToolSearchCallItemExecution;
17
+ id?: string | undefined;
18
+ status: ToolCallStatus;
19
+ type: "tool_search_call";
20
+ };
21
+ /** @internal */
22
+ export declare const OutputToolSearchCallItemExecution$inboundSchema: z.ZodEnum<typeof OutputToolSearchCallItemExecution>;
23
+ /** @internal */
24
+ export declare const OutputToolSearchCallItem$inboundSchema: z.ZodType<OutputToolSearchCallItem, unknown>;
25
+ export declare function outputToolSearchCallItemFromJSON(jsonString: string): SafeParseResult<OutputToolSearchCallItem, SDKValidationError>;
26
+ //# sourceMappingURL=outputtoolsearchcallitem.d.ts.map
@@ -0,0 +1,30 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 5eee8247f3f8
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { safeParse } from "../lib/schemas.js";
8
+ import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
9
+ export const OutputToolSearchCallItemExecution = {
10
+ Client: "client",
11
+ };
12
+ /** @internal */
13
+ export const OutputToolSearchCallItemExecution$inboundSchema = z.enum(OutputToolSearchCallItemExecution);
14
+ /** @internal */
15
+ export const OutputToolSearchCallItem$inboundSchema = z.object({
16
+ arguments: z.any().optional(),
17
+ call_id: z.string(),
18
+ execution: OutputToolSearchCallItemExecution$inboundSchema,
19
+ id: z.string().optional(),
20
+ status: ToolCallStatus$inboundSchema,
21
+ type: z.literal("tool_search_call"),
22
+ }).transform((v) => {
23
+ return remap$(v, {
24
+ "call_id": "callId",
25
+ });
26
+ });
27
+ export function outputToolSearchCallItemFromJSON(jsonString) {
28
+ return safeParse(jsonString, (x) => OutputToolSearchCallItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputToolSearchCallItem' from JSON`);
29
+ }
30
+ //# sourceMappingURL=outputtoolsearchcallitem.js.map
@@ -2,7 +2,14 @@ import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- import { ToolCallStatus } from "./toolcallstatus.js";
5
+ import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
6
+ export type Match = {
7
+ definition: {
8
+ [k: string]: any;
9
+ };
10
+ schemaDigest: string;
11
+ toolId: string;
12
+ };
6
13
  export declare const OutputToolSearchServerToolItemType: {
7
14
  readonly OpenrouterToolSearch: "openrouter:tool_search";
8
15
  };
@@ -11,12 +18,31 @@ export type OutputToolSearchServerToolItemType = ClosedEnum<typeof OutputToolSea
11
18
  * An openrouter:tool_search server tool output item
12
19
  */
13
20
  export type OutputToolSearchServerToolItem = {
21
+ /**
22
+ * The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
23
+ */
24
+ error?: string | undefined;
14
25
  id?: string | undefined;
26
+ matches?: Array<Match> | undefined;
15
27
  query?: string | undefined;
16
- status: ToolCallStatus;
28
+ status: FailableToolCallStatus;
17
29
  type: OutputToolSearchServerToolItemType;
18
30
  };
19
31
  /** @internal */
32
+ export declare const Match$inboundSchema: z.ZodType<Match, unknown>;
33
+ /** @internal */
34
+ export type Match$Outbound = {
35
+ definition: {
36
+ [k: string]: any;
37
+ };
38
+ schema_digest: string;
39
+ tool_id: string;
40
+ };
41
+ /** @internal */
42
+ export declare const Match$outboundSchema: z.ZodType<Match$Outbound, Match>;
43
+ export declare function matchToJSON(match: Match): string;
44
+ export declare function matchFromJSON(jsonString: string): SafeParseResult<Match, SDKValidationError>;
45
+ /** @internal */
20
46
  export declare const OutputToolSearchServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputToolSearchServerToolItemType>;
21
47
  /** @internal */
22
48
  export declare const OutputToolSearchServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputToolSearchServerToolItemType>;
@@ -24,7 +50,9 @@ export declare const OutputToolSearchServerToolItemType$outboundSchema: z.ZodEnu
24
50
  export declare const OutputToolSearchServerToolItem$inboundSchema: z.ZodType<OutputToolSearchServerToolItem, unknown>;
25
51
  /** @internal */
26
52
  export type OutputToolSearchServerToolItem$Outbound = {
53
+ error?: string | undefined;
27
54
  id?: string | undefined;
55
+ matches?: Array<Match$Outbound> | undefined;
28
56
  query?: string | undefined;
29
57
  status: string;
30
58
  type: string;
@@ -3,27 +3,60 @@
3
3
  * @generated-id: 54b4dacceeab
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
6
7
  import { safeParse } from "../lib/schemas.js";
7
- import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
8
+ import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
8
9
  export const OutputToolSearchServerToolItemType = {
9
10
  OpenrouterToolSearch: "openrouter:tool_search",
10
11
  };
11
12
  /** @internal */
13
+ export const Match$inboundSchema = z.object({
14
+ definition: z.record(z.string(), z.any()),
15
+ schema_digest: z.string(),
16
+ tool_id: z.string(),
17
+ }).transform((v) => {
18
+ return remap$(v, {
19
+ "schema_digest": "schemaDigest",
20
+ "tool_id": "toolId",
21
+ });
22
+ });
23
+ /** @internal */
24
+ export const Match$outboundSchema = z.object({
25
+ definition: z.record(z.string(), z.any()),
26
+ schemaDigest: z.string(),
27
+ toolId: z.string(),
28
+ }).transform((v) => {
29
+ return remap$(v, {
30
+ schemaDigest: "schema_digest",
31
+ toolId: "tool_id",
32
+ });
33
+ });
34
+ export function matchToJSON(match) {
35
+ return JSON.stringify(Match$outboundSchema.parse(match));
36
+ }
37
+ export function matchFromJSON(jsonString) {
38
+ return safeParse(jsonString, (x) => Match$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Match' from JSON`);
39
+ }
40
+ /** @internal */
12
41
  export const OutputToolSearchServerToolItemType$inboundSchema = z.enum(OutputToolSearchServerToolItemType);
13
42
  /** @internal */
14
43
  export const OutputToolSearchServerToolItemType$outboundSchema = OutputToolSearchServerToolItemType$inboundSchema;
15
44
  /** @internal */
16
45
  export const OutputToolSearchServerToolItem$inboundSchema = z.object({
46
+ error: z.string().optional(),
17
47
  id: z.string().optional(),
48
+ matches: z.array(z.lazy(() => Match$inboundSchema)).optional(),
18
49
  query: z.string().optional(),
19
- status: ToolCallStatus$inboundSchema,
50
+ status: FailableToolCallStatus$inboundSchema,
20
51
  type: OutputToolSearchServerToolItemType$inboundSchema,
21
52
  });
22
53
  /** @internal */
23
54
  export const OutputToolSearchServerToolItem$outboundSchema = z.object({
55
+ error: z.string().optional(),
24
56
  id: z.string().optional(),
57
+ matches: z.array(z.lazy(() => Match$outboundSchema)).optional(),
25
58
  query: z.string().optional(),
26
- status: ToolCallStatus$outboundSchema,
59
+ status: FailableToolCallStatus$outboundSchema,
27
60
  type: OutputToolSearchServerToolItemType$outboundSchema,
28
61
  });
29
62
  export function outputToolSearchServerToolItemToJSON(outputToolSearchServerToolItem) {
@@ -2,7 +2,7 @@ import * as z from "zod/v4";
2
2
  import { ClosedEnum } from "../types/enums.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
- import { ToolCallStatus } from "./toolcallstatus.js";
5
+ import { FailableToolCallStatus } from "./failabletoolcallstatus.js";
6
6
  export declare const OutputWebSearchServerToolItemTypeURL: {
7
7
  readonly Url: "url";
8
8
  };
@@ -35,8 +35,12 @@ export type OutputWebSearchServerToolItem = {
35
35
  * The search action performed, matching OpenAI web_search_call.action shape. Includes the query the model issued and optional source URLs returned by the search provider.
36
36
  */
37
37
  action?: OutputWebSearchServerToolItemAction | undefined;
38
+ /**
39
+ * The error message when the tool call failed before producing a result. Set together with `status: 'failed'`; absent on a successful call.
40
+ */
41
+ error?: string | undefined;
38
42
  id?: string | undefined;
39
- status: ToolCallStatus;
43
+ status: FailableToolCallStatus;
40
44
  type: OutputWebSearchServerToolItemTypeOpenrouterWebSearch;
41
45
  };
42
46
  /** @internal */
@@ -79,6 +83,7 @@ export declare const OutputWebSearchServerToolItem$inboundSchema: z.ZodType<Outp
79
83
  /** @internal */
80
84
  export type OutputWebSearchServerToolItem$Outbound = {
81
85
  action?: OutputWebSearchServerToolItemAction$Outbound | undefined;
86
+ error?: string | undefined;
82
87
  id?: string | undefined;
83
88
  status: string;
84
89
  type: string;
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
- import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
7
+ import { FailableToolCallStatus$inboundSchema, FailableToolCallStatus$outboundSchema, } from "./failabletoolcallstatus.js";
8
8
  export const OutputWebSearchServerToolItemTypeURL = {
9
9
  Url: "url",
10
10
  };
@@ -65,16 +65,18 @@ export const OutputWebSearchServerToolItemTypeOpenrouterWebSearch$outboundSchema
65
65
  export const OutputWebSearchServerToolItem$inboundSchema = z.object({
66
66
  action: z.lazy(() => OutputWebSearchServerToolItemAction$inboundSchema)
67
67
  .optional(),
68
+ error: z.string().optional(),
68
69
  id: z.string().optional(),
69
- status: ToolCallStatus$inboundSchema,
70
+ status: FailableToolCallStatus$inboundSchema,
70
71
  type: OutputWebSearchServerToolItemTypeOpenrouterWebSearch$inboundSchema,
71
72
  });
72
73
  /** @internal */
73
74
  export const OutputWebSearchServerToolItem$outboundSchema = z.object({
74
75
  action: z.lazy(() => OutputWebSearchServerToolItemAction$outboundSchema)
75
76
  .optional(),
77
+ error: z.string().optional(),
76
78
  id: z.string().optional(),
77
- status: ToolCallStatus$outboundSchema,
79
+ status: FailableToolCallStatus$outboundSchema,
78
80
  type: OutputWebSearchServerToolItemTypeOpenrouterWebSearch$outboundSchema,
79
81
  });
80
82
  export function outputWebSearchServerToolItemToJSON(outputWebSearchServerToolItem) {
@@ -17,7 +17,7 @@ export type Preview20250311WebSearchServerToolType = ClosedEnum<typeof Preview20
17
17
  */
18
18
  export type Preview20250311WebSearchServerTool = {
19
19
  /**
20
- * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results).
20
+ * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results).
21
21
  */
22
22
  engine?: WebSearchEngineEnum | undefined;
23
23
  filters?: WebSearchDomainFilter | null | undefined;
@@ -17,7 +17,7 @@ export type PreviewWebSearchServerToolType = ClosedEnum<typeof PreviewWebSearchS
17
17
  */
18
18
  export type PreviewWebSearchServerTool = {
19
19
  /**
20
- * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses Firecrawl (requires BYOK). "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results).
20
+ * Which search engine to use. "auto" (default) uses native if the provider supports it, otherwise Exa. "native" forces the provider's built-in search. "exa" forces the Exa search API. "firecrawl" uses the Firecrawl search API. "parallel" uses the Parallel search API. "perplexity" uses the Perplexity Search API (raw ranked results).
21
21
  */
22
22
  engine?: WebSearchEngineEnum | undefined;
23
23
  filters?: WebSearchDomainFilter | null | undefined;
@@ -5,6 +5,14 @@ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
5
  * Negotiated per-token rates reported for requests routed to this endpoint.
6
6
  */
7
7
  export type PrivateEndpointPricing = {
8
+ /**
9
+ * USD per cache-read prompt token, as a decimal string. Omit it to bill cache reads at the provider pricing strategy's default, which for most strategies is the prompt rate.
10
+ */
11
+ cacheRead?: string | undefined;
12
+ /**
13
+ * USD per cache-write prompt token, as a decimal string. Omit it to bill cache writes at the provider pricing strategy's default.
14
+ */
15
+ cacheWrite?: string | undefined;
8
16
  /**
9
17
  * USD per completion token, as a decimal string.
10
18
  */
@@ -18,6 +26,8 @@ export type PrivateEndpointPricing = {
18
26
  export declare const PrivateEndpointPricing$inboundSchema: z.ZodType<PrivateEndpointPricing, unknown>;
19
27
  /** @internal */
20
28
  export type PrivateEndpointPricing$Outbound = {
29
+ cache_read?: string | undefined;
30
+ cache_write?: string | undefined;
21
31
  completion: string;
22
32
  prompt: string;
23
33
  };
@@ -3,16 +3,31 @@
3
3
  * @generated-id: c780fa3f1dc9
4
4
  */
5
5
  import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
6
7
  import { safeParse } from "../lib/schemas.js";
7
8
  /** @internal */
8
9
  export const PrivateEndpointPricing$inboundSchema = z.object({
10
+ cache_read: z.string().optional(),
11
+ cache_write: z.string().optional(),
9
12
  completion: z.string(),
10
13
  prompt: z.string(),
14
+ }).transform((v) => {
15
+ return remap$(v, {
16
+ "cache_read": "cacheRead",
17
+ "cache_write": "cacheWrite",
18
+ });
11
19
  });
12
20
  /** @internal */
13
21
  export const PrivateEndpointPricing$outboundSchema = z.object({
22
+ cacheRead: z.string().optional(),
23
+ cacheWrite: z.string().optional(),
14
24
  completion: z.string(),
15
25
  prompt: z.string(),
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ cacheRead: "cache_read",
29
+ cacheWrite: "cache_write",
30
+ });
16
31
  });
17
32
  export function privateEndpointPricingToJSON(privateEndpointPricing) {
18
33
  return JSON.stringify(PrivateEndpointPricing$outboundSchema.parse(privateEndpointPricing));