@openrouter/sdk 0.12.79 → 0.13.7

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 (303) hide show
  1. package/README.md +40 -0
  2. package/esm/funcs/betaAnalyticsGetAnalyticsMeta.d.ts +18 -0
  3. package/esm/funcs/betaAnalyticsGetAnalyticsMeta.js +96 -0
  4. package/esm/funcs/betaAnalyticsQueryAnalytics.d.ts +18 -0
  5. package/esm/funcs/betaAnalyticsQueryAnalytics.js +97 -0
  6. package/esm/funcs/betaResponsesSend.js +1 -1
  7. package/esm/funcs/chatSend.js +1 -1
  8. package/esm/funcs/datasetsGetAppRankings.d.ts +43 -0
  9. package/esm/funcs/datasetsGetAppRankings.js +161 -0
  10. package/esm/funcs/datasetsGetBenchmarksArtificialAnalysis.d.ts +19 -0
  11. package/esm/funcs/datasetsGetBenchmarksArtificialAnalysis.js +102 -0
  12. package/esm/funcs/datasetsGetBenchmarksDesignArena.d.ts +19 -0
  13. package/esm/funcs/datasetsGetBenchmarksDesignArena.js +104 -0
  14. package/esm/funcs/filesDelete.d.ts +19 -0
  15. package/esm/funcs/filesDelete.js +107 -0
  16. package/esm/funcs/filesDownload.d.ts +18 -0
  17. package/esm/funcs/filesDownload.js +107 -0
  18. package/esm/funcs/filesList.d.ts +21 -0
  19. package/esm/funcs/filesList.js +131 -0
  20. package/esm/funcs/filesRetrieve.d.ts +19 -0
  21. package/esm/funcs/filesRetrieve.js +107 -0
  22. package/esm/funcs/filesUpload.d.ts +19 -0
  23. package/esm/funcs/filesUpload.js +121 -0
  24. package/esm/funcs/modelsGet.d.ts +19 -0
  25. package/esm/funcs/modelsGet.js +107 -0
  26. package/esm/funcs/modelsList.js +12 -0
  27. package/esm/funcs/oAuthCreateAuthCode.d.ts +1 -1
  28. package/esm/funcs/oAuthCreateAuthCode.js +1 -1
  29. package/esm/funcs/presetsGet.d.ts +21 -0
  30. package/esm/funcs/presetsGet.js +105 -0
  31. package/esm/funcs/presetsGetVersion.d.ts +21 -0
  32. package/esm/funcs/presetsGetVersion.js +109 -0
  33. package/esm/funcs/presetsList.d.ts +23 -0
  34. package/esm/funcs/presetsList.js +136 -0
  35. package/esm/funcs/presetsListVersions.d.ts +23 -0
  36. package/esm/funcs/presetsListVersions.js +142 -0
  37. package/esm/lib/config.d.ts +2 -2
  38. package/esm/lib/config.js +2 -2
  39. package/esm/models/aabenchmarkentry.d.ts +24 -0
  40. package/esm/models/aabenchmarkentry.js +23 -0
  41. package/esm/models/advisornestedtool.d.ts +25 -0
  42. package/esm/models/advisornestedtool.js +23 -0
  43. package/esm/models/advisorreasoning.d.ts +41 -0
  44. package/esm/models/advisorreasoning.js +33 -0
  45. package/esm/models/advisorservertoolconfig.d.ts +65 -0
  46. package/esm/models/advisorservertoolconfig.js +31 -0
  47. package/esm/models/advisorservertoolopenrouter.d.ts +28 -0
  48. package/esm/models/advisorservertoolopenrouter.js +20 -0
  49. package/esm/models/apprankingsitem.d.ts +29 -0
  50. package/esm/models/apprankingsitem.js +26 -0
  51. package/esm/models/apprankingsresponse.d.ts +16 -0
  52. package/esm/models/apprankingsresponse.js +17 -0
  53. package/esm/models/bashservertool.d.ts +28 -0
  54. package/esm/models/bashservertool.js +20 -0
  55. package/esm/models/bashservertoolconfig.d.ts +30 -0
  56. package/esm/models/bashservertoolconfig.js +22 -0
  57. package/esm/models/bashservertoolengine.d.ts +17 -0
  58. package/esm/models/bashservertoolengine.js +16 -0
  59. package/esm/models/bashservertoolenvironment.d.ts +13 -0
  60. package/esm/models/bashservertoolenvironment.js +16 -0
  61. package/esm/models/benchmarkpricing.d.ts +20 -0
  62. package/esm/models/benchmarkpricing.js +15 -0
  63. package/esm/models/benchmarksaaitem.d.ts +34 -0
  64. package/esm/models/benchmarksaaitem.js +29 -0
  65. package/esm/models/benchmarksaameta.d.ts +70 -0
  66. package/esm/models/benchmarksaameta.js +50 -0
  67. package/esm/models/benchmarksaaresponse.d.ts +13 -0
  68. package/esm/models/benchmarksaaresponse.js +17 -0
  69. package/esm/models/benchmarksdaitem.d.ts +59 -0
  70. package/esm/models/benchmarksdaitem.js +50 -0
  71. package/esm/models/benchmarksdameta.d.ts +98 -0
  72. package/esm/models/benchmarksdameta.js +62 -0
  73. package/esm/models/benchmarksdaresponse.d.ts +13 -0
  74. package/esm/models/benchmarksdaresponse.js +17 -0
  75. package/esm/models/byokproviderslug.d.ts +2 -1
  76. package/esm/models/byokproviderslug.js +2 -1
  77. package/esm/models/chatfunctiontool.d.ts +5 -2
  78. package/esm/models/chatfunctiontool.js +6 -0
  79. package/esm/models/chatrequest.d.ts +42 -0
  80. package/esm/models/chatrequest.js +24 -0
  81. package/esm/models/chatwebsearchshorthand.d.ts +10 -5
  82. package/esm/models/chatwebsearchshorthand.js +2 -0
  83. package/esm/models/containerautoenvironment.d.ts +15 -0
  84. package/esm/models/containerautoenvironment.js +13 -0
  85. package/esm/models/containerreferenceenvironment.d.ts +20 -0
  86. package/esm/models/containerreferenceenvironment.js +19 -0
  87. package/esm/models/contentfilterbuiltinentry.d.ts +5 -0
  88. package/esm/models/contentfilterbuiltinentry.js +7 -0
  89. package/esm/models/contentfilterbuiltinentryinput.d.ts +6 -0
  90. package/esm/models/contentfilterbuiltinentryinput.js +7 -0
  91. package/esm/models/contentpartaudio.d.ts +24 -0
  92. package/esm/models/contentpartaudio.js +27 -0
  93. package/esm/models/contentpartimage.d.ts +2 -9
  94. package/esm/models/contentpartimage.js +1 -6
  95. package/esm/models/contentpartvideo.d.ts +24 -0
  96. package/esm/models/contentpartvideo.js +27 -0
  97. package/esm/models/createobservabilitydestinationrequest.d.ts +1 -1
  98. package/esm/models/dabenchmarkentry.d.ts +32 -0
  99. package/esm/models/dabenchmarkentry.js +23 -0
  100. package/esm/models/filedeleteresponse.d.ts +21 -0
  101. package/esm/models/filedeleteresponse.js +20 -0
  102. package/esm/models/filelistresponse.d.ts +21 -0
  103. package/esm/models/filelistresponse.js +26 -0
  104. package/esm/models/filemetadata.d.ts +26 -0
  105. package/esm/models/filemetadata.js +33 -0
  106. package/esm/models/fusionanalysisresult.d.ts +88 -0
  107. package/esm/models/fusionanalysisresult.js +109 -0
  108. package/esm/models/fusioncallanalysiscompletedevent.d.ts +21 -0
  109. package/esm/models/fusioncallanalysiscompletedevent.js +26 -0
  110. package/esm/models/fusioncallanalysisinprogressevent.d.ts +17 -0
  111. package/esm/models/fusioncallanalysisinprogressevent.js +26 -0
  112. package/esm/models/fusioncallcompletedevent.d.ts +16 -0
  113. package/esm/models/fusioncallcompletedevent.js +24 -0
  114. package/esm/models/fusioncallinprogressevent.d.ts +16 -0
  115. package/esm/models/fusioncallinprogressevent.js +24 -0
  116. package/esm/models/fusioncallpaneladdedevent.d.ts +17 -0
  117. package/esm/models/fusioncallpaneladdedevent.js +25 -0
  118. package/esm/models/fusioncallpanelcompletedevent.d.ts +18 -0
  119. package/esm/models/fusioncallpanelcompletedevent.js +26 -0
  120. package/esm/models/fusioncallpaneldeltaevent.d.ts +18 -0
  121. package/esm/models/fusioncallpaneldeltaevent.js +26 -0
  122. package/esm/models/fusioncallpanelfailedevent.d.ts +19 -0
  123. package/esm/models/fusioncallpanelfailedevent.js +28 -0
  124. package/esm/models/fusioncallpanelreasoningdeltaevent.d.ts +18 -0
  125. package/esm/models/fusioncallpanelreasoningdeltaevent.js +26 -0
  126. package/esm/models/fusionplugin.d.ts +46 -0
  127. package/esm/models/fusionplugin.js +20 -0
  128. package/esm/models/fusionservertoolconfig.d.ts +27 -0
  129. package/esm/models/fusionservertoolconfig.js +10 -0
  130. package/esm/models/generationresponse.d.ts +22 -0
  131. package/esm/models/generationresponse.js +14 -0
  132. package/esm/models/getpresetresponse.d.ts +17 -0
  133. package/esm/models/getpresetresponse.js +15 -0
  134. package/esm/models/getpresetversionresponse.d.ts +17 -0
  135. package/esm/models/getpresetversionresponse.js +15 -0
  136. package/esm/models/index.d.ts +60 -0
  137. package/esm/models/index.js +60 -0
  138. package/esm/models/inputreference.d.ts +14 -0
  139. package/esm/models/inputreference.js +18 -0
  140. package/esm/models/inputsunion.d.ts +7 -4
  141. package/esm/models/inputsunion.js +11 -2
  142. package/esm/models/legacywebsearchservertool.d.ts +2 -2
  143. package/esm/models/listpresetsresponse.d.ts +15 -0
  144. package/esm/models/listpresetsresponse.js +21 -0
  145. package/esm/models/listpresetversionsresponse.d.ts +15 -0
  146. package/esm/models/listpresetversionsresponse.js +21 -0
  147. package/esm/models/messagesfallbackparam.d.ts +19 -0
  148. package/esm/models/messagesfallbackparam.js +22 -0
  149. package/esm/models/messagesrequest.d.ts +11 -4
  150. package/esm/models/messagesrequest.js +6 -0
  151. package/esm/models/model.d.ts +5 -0
  152. package/esm/models/model.js +2 -0
  153. package/esm/models/modelbenchmarks.d.ts +22 -0
  154. package/esm/models/modelbenchmarks.js +23 -0
  155. package/esm/models/modelresponse.d.ts +17 -0
  156. package/esm/models/modelresponse.js +16 -0
  157. package/esm/models/observabilityarizedestination.d.ts +1 -1
  158. package/esm/models/observabilitybraintrustdestination.d.ts +1 -1
  159. package/esm/models/observabilityclickhousedestination.d.ts +1 -1
  160. package/esm/models/observabilitydatadogdestination.d.ts +1 -1
  161. package/esm/models/observabilitygrafanadestination.d.ts +1 -1
  162. package/esm/models/observabilitylangfusedestination.d.ts +1 -1
  163. package/esm/models/observabilitylangsmithdestination.d.ts +1 -1
  164. package/esm/models/observabilitynewrelicdestination.d.ts +1 -1
  165. package/esm/models/observabilityopikdestination.d.ts +1 -1
  166. package/esm/models/observabilityotelcollectordestination.d.ts +1 -1
  167. package/esm/models/observabilityposthogdestination.d.ts +1 -1
  168. package/esm/models/observabilityrampdestination.d.ts +1 -1
  169. package/esm/models/observabilitys3destination.d.ts +1 -1
  170. package/esm/models/observabilitysentrydestination.d.ts +1 -1
  171. package/esm/models/observabilitysnowflakedestination.d.ts +1 -1
  172. package/esm/models/observabilityweavedestination.d.ts +1 -1
  173. package/esm/models/observabilitywebhookdestination.d.ts +1 -1
  174. package/esm/models/operations/createauthkeyscode.d.ts +6 -1
  175. package/esm/models/operations/createauthkeyscode.js +2 -0
  176. package/esm/models/operations/creatererank.d.ts +44 -10
  177. package/esm/models/operations/creatererank.js +21 -6
  178. package/esm/models/operations/createresponses.d.ts +3 -3
  179. package/esm/models/operations/createresponses.js +2 -3
  180. package/esm/models/operations/deletefile.d.ts +60 -0
  181. package/esm/models/operations/deletefile.js +24 -0
  182. package/esm/models/operations/downloadfilecontent.d.ts +60 -0
  183. package/esm/models/operations/downloadfilecontent.js +24 -0
  184. package/esm/models/operations/getanalyticsmeta.d.ts +198 -0
  185. package/esm/models/operations/getanalyticsmeta.js +141 -0
  186. package/esm/models/operations/getapprankings.d.ts +152 -0
  187. package/esm/models/operations/getapprankings.js +85 -0
  188. package/esm/models/operations/getbenchmarksartificialanalysis.d.ts +58 -0
  189. package/esm/models/operations/getbenchmarksartificialanalysis.js +22 -0
  190. package/esm/models/operations/getbenchmarksdesignarena.d.ts +83 -0
  191. package/esm/models/operations/getbenchmarksdesignarena.js +36 -0
  192. package/esm/models/operations/getfilemetadata.d.ts +60 -0
  193. package/esm/models/operations/getfilemetadata.js +24 -0
  194. package/esm/models/operations/getmodel.d.ts +63 -0
  195. package/esm/models/operations/getmodel.js +22 -0
  196. package/esm/models/operations/getmodels.d.ts +121 -5
  197. package/esm/models/operations/getmodels.js +59 -4
  198. package/esm/models/operations/getpreset.d.ts +58 -0
  199. package/esm/models/operations/getpreset.js +21 -0
  200. package/esm/models/operations/getpresetversion.d.ts +63 -0
  201. package/esm/models/operations/getpresetversion.js +22 -0
  202. package/esm/models/operations/index.d.ts +15 -0
  203. package/esm/models/operations/index.js +15 -0
  204. package/esm/models/operations/listbyokkeys.d.ts +2 -1
  205. package/esm/models/operations/listbyokkeys.js +2 -1
  206. package/esm/models/operations/listfiles.d.ts +77 -0
  207. package/esm/models/operations/listfiles.js +37 -0
  208. package/esm/models/operations/listpresets.d.ts +72 -0
  209. package/esm/models/operations/listpresets.js +35 -0
  210. package/esm/models/operations/listpresetversions.d.ts +77 -0
  211. package/esm/models/operations/listpresetversions.js +36 -0
  212. package/esm/models/operations/queryanalytics.d.ts +195 -0
  213. package/esm/models/operations/queryanalytics.js +129 -0
  214. package/esm/models/operations/sendchatcompletionrequest.d.ts +3 -3
  215. package/esm/models/operations/sendchatcompletionrequest.js +2 -3
  216. package/esm/models/operations/uploadfile.d.ts +82 -0
  217. package/esm/models/operations/uploadfile.js +45 -0
  218. package/esm/models/outputadvisorservertoolitem.d.ts +59 -0
  219. package/esm/models/outputadvisorservertoolitem.js +52 -0
  220. package/esm/models/outputfusionservertoolitem.d.ts +44 -43
  221. package/esm/models/outputfusionservertoolitem.js +49 -51
  222. package/esm/models/outputitems.d.ts +13 -3
  223. package/esm/models/outputitems.js +9 -1
  224. package/esm/models/outputshellcallitem.d.ts +29 -0
  225. package/esm/models/outputshellcallitem.js +38 -0
  226. package/esm/models/outputshellcalloutputitem.d.ts +48 -0
  227. package/esm/models/outputshellcalloutputitem.js +67 -0
  228. package/esm/models/outputsubagentservertoolitem.d.ts +59 -0
  229. package/esm/models/outputsubagentservertoolitem.js +54 -0
  230. package/esm/models/outputwebsearchcallitem.d.ts +2 -2
  231. package/esm/models/outputwebsearchcallitem.js +2 -2
  232. package/esm/models/preset.d.ts +27 -0
  233. package/esm/models/preset.js +35 -0
  234. package/esm/models/presetstatus.d.ts +17 -0
  235. package/esm/models/presetstatus.js +16 -0
  236. package/esm/models/presetwithdesignatedversion.d.ts +9 -14
  237. package/esm/models/presetwithdesignatedversion.js +4 -11
  238. package/esm/models/preview20250311websearchservertool.d.ts +2 -2
  239. package/esm/models/previewwebsearchservertool.d.ts +2 -2
  240. package/esm/models/promptinjectionscanscope.d.ts +18 -0
  241. package/esm/models/promptinjectionscanscope.js +17 -0
  242. package/esm/models/providername.d.ts +2 -1
  243. package/esm/models/providername.js +2 -1
  244. package/esm/models/provideroptions.d.ts +12 -0
  245. package/esm/models/provideroptions.js +2 -0
  246. package/esm/models/providerresponse.d.ts +3 -1
  247. package/esm/models/providerresponse.js +4 -2
  248. package/esm/models/rankingsdailymeta.d.ts +4 -4
  249. package/esm/models/rankingsdailymeta.js +3 -3
  250. package/esm/models/responsesrequest.d.ts +36 -8
  251. package/esm/models/responsesrequest.js +12 -0
  252. package/esm/models/searchqualitylevel.d.ts +2 -2
  253. package/esm/models/searchqualitylevel.js +1 -1
  254. package/esm/models/shellcallstatus.d.ts +17 -0
  255. package/esm/models/shellcallstatus.js +16 -0
  256. package/esm/models/shellservertoolconfig.d.ts +30 -0
  257. package/esm/models/shellservertoolconfig.js +22 -0
  258. package/esm/models/shellservertoolengine.d.ts +16 -0
  259. package/esm/models/shellservertoolengine.js +15 -0
  260. package/esm/models/shellservertoolenvironment.d.ts +13 -0
  261. package/esm/models/shellservertoolenvironment.js +16 -0
  262. package/esm/models/shellservertoolopenrouter.d.ts +21 -0
  263. package/esm/models/shellservertoolopenrouter.js +15 -0
  264. package/esm/models/streamevents.d.ts +10 -1
  265. package/esm/models/streamevents.js +18 -0
  266. package/esm/models/subagentnestedtool.d.ts +25 -0
  267. package/esm/models/subagentnestedtool.js +23 -0
  268. package/esm/models/subagentreasoning.d.ts +41 -0
  269. package/esm/models/subagentreasoning.js +33 -0
  270. package/esm/models/subagentservertoolconfig.d.ts +50 -0
  271. package/esm/models/subagentservertoolconfig.js +27 -0
  272. package/esm/models/subagentservertoolopenrouter.d.ts +28 -0
  273. package/esm/models/subagentservertoolopenrouter.js +20 -0
  274. package/esm/models/updateobservabilitydestinationrequest.d.ts +1 -1
  275. package/esm/models/urlcitation.d.ts +2 -0
  276. package/esm/models/urlcitation.js +2 -0
  277. package/esm/models/videogenerationrequest.d.ts +16 -4
  278. package/esm/models/videogenerationrequest.js +4 -2
  279. package/esm/models/websearchconfig.d.ts +10 -5
  280. package/esm/models/websearchconfig.js +2 -0
  281. package/esm/models/websearchengine.d.ts +1 -0
  282. package/esm/models/websearchengine.js +1 -0
  283. package/esm/models/websearchengineenum.d.ts +4 -3
  284. package/esm/models/websearchengineenum.js +3 -2
  285. package/esm/models/websearchservertool.d.ts +2 -2
  286. package/esm/models/websearchservertoolconfig.d.ts +10 -5
  287. package/esm/models/websearchservertoolconfig.js +2 -0
  288. package/esm/sdk/beta.d.ts +3 -0
  289. package/esm/sdk/beta.js +4 -0
  290. package/esm/sdk/betaanalytics.d.ts +19 -0
  291. package/esm/sdk/betaanalytics.js +29 -0
  292. package/esm/sdk/datasets.d.ts +46 -0
  293. package/esm/sdk/datasets.js +53 -0
  294. package/esm/sdk/files.d.ts +44 -0
  295. package/esm/sdk/files.js +60 -0
  296. package/esm/sdk/models.d.ts +7 -0
  297. package/esm/sdk/models.js +10 -0
  298. package/esm/sdk/presets.d.ts +33 -0
  299. package/esm/sdk/presets.js +41 -0
  300. package/esm/sdk/sdk.d.ts +5 -2
  301. package/esm/sdk/sdk.js +7 -3
  302. package/jsr.json +1 -1
  303. package/package.json +3 -3
@@ -12,13 +12,12 @@ export const SendChatCompletionRequestRequest$outboundSchema = z.object({
12
12
  httpReferer: z.string().optional(),
13
13
  appTitle: z.string().optional(),
14
14
  appCategories: z.string().optional(),
15
- xOpenRouterExperimentalMetadata: models.MetadataLevel$outboundSchema
16
- .optional(),
15
+ xOpenRouterMetadata: models.MetadataLevel$outboundSchema.optional(),
17
16
  chatRequest: models.ChatRequest$outboundSchema,
18
17
  }).transform((v) => {
19
18
  return remap$(v, {
20
19
  httpReferer: "HTTP-Referer",
21
- xOpenRouterExperimentalMetadata: "X-OpenRouter-Experimental-Metadata",
20
+ xOpenRouterMetadata: "X-OpenRouter-Metadata",
22
21
  chatRequest: "ChatRequest",
23
22
  });
24
23
  });
@@ -0,0 +1,82 @@
1
+ import * as z from "zod/v4";
2
+ export type UploadFileGlobals = {
3
+ /**
4
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
+ *
6
+ * @remarks
7
+ * This is used to track API usage per application.
8
+ */
9
+ httpReferer?: string | undefined;
10
+ /**
11
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
+ *
13
+ * @remarks
14
+ */
15
+ appTitle?: string | undefined;
16
+ /**
17
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
18
+ *
19
+ * @remarks
20
+ */
21
+ appCategories?: string | undefined;
22
+ };
23
+ export type FileT = {
24
+ fileName: string;
25
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
26
+ };
27
+ export type UploadFileRequestBody = {
28
+ file: FileT | Blob;
29
+ };
30
+ export type UploadFileRequest = {
31
+ /**
32
+ * The app identifier should be your app's URL and is used as the primary identifier for rankings.
33
+ *
34
+ * @remarks
35
+ * This is used to track API usage per application.
36
+ */
37
+ httpReferer?: string | undefined;
38
+ /**
39
+ * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
40
+ *
41
+ * @remarks
42
+ */
43
+ appTitle?: string | undefined;
44
+ /**
45
+ * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
46
+ *
47
+ * @remarks
48
+ */
49
+ appCategories?: string | undefined;
50
+ /**
51
+ * Workspace to scope the request to. Defaults to the caller’s default workspace.
52
+ */
53
+ workspaceId?: string | undefined;
54
+ requestBody: UploadFileRequestBody;
55
+ };
56
+ /** @internal */
57
+ export type FileT$Outbound = {
58
+ fileName: string;
59
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
60
+ };
61
+ /** @internal */
62
+ export declare const FileT$outboundSchema: z.ZodType<FileT$Outbound, FileT>;
63
+ export declare function fileToJSON(fileT: FileT): string;
64
+ /** @internal */
65
+ export type UploadFileRequestBody$Outbound = {
66
+ file: FileT$Outbound | Blob;
67
+ };
68
+ /** @internal */
69
+ export declare const UploadFileRequestBody$outboundSchema: z.ZodType<UploadFileRequestBody$Outbound, UploadFileRequestBody>;
70
+ export declare function uploadFileRequestBodyToJSON(uploadFileRequestBody: UploadFileRequestBody): string;
71
+ /** @internal */
72
+ export type UploadFileRequest$Outbound = {
73
+ "HTTP-Referer"?: string | undefined;
74
+ appTitle?: string | undefined;
75
+ appCategories?: string | undefined;
76
+ workspace_id?: string | undefined;
77
+ RequestBody: UploadFileRequestBody$Outbound;
78
+ };
79
+ /** @internal */
80
+ export declare const UploadFileRequest$outboundSchema: z.ZodType<UploadFileRequest$Outbound, UploadFileRequest>;
81
+ export declare function uploadFileRequestToJSON(uploadFileRequest: UploadFileRequest): string;
82
+ //# sourceMappingURL=uploadfile.d.ts.map
@@ -0,0 +1,45 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: e2f1b0f34a4a
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { blobLikeSchema } from "../../types/blobs.js";
8
+ /** @internal */
9
+ export const FileT$outboundSchema = z.object({
10
+ fileName: z.string(),
11
+ content: z.union([
12
+ z.custom(x => x instanceof ReadableStream),
13
+ z.custom(x => x instanceof Blob),
14
+ z.custom(x => x instanceof ArrayBuffer),
15
+ z.custom(x => x instanceof Uint8Array),
16
+ ]),
17
+ });
18
+ export function fileToJSON(fileT) {
19
+ return JSON.stringify(FileT$outboundSchema.parse(fileT));
20
+ }
21
+ /** @internal */
22
+ export const UploadFileRequestBody$outboundSchema = z.object({
23
+ file: z.lazy(() => FileT$outboundSchema).or(blobLikeSchema),
24
+ });
25
+ export function uploadFileRequestBodyToJSON(uploadFileRequestBody) {
26
+ return JSON.stringify(UploadFileRequestBody$outboundSchema.parse(uploadFileRequestBody));
27
+ }
28
+ /** @internal */
29
+ export const UploadFileRequest$outboundSchema = z.object({
30
+ httpReferer: z.string().optional(),
31
+ appTitle: z.string().optional(),
32
+ appCategories: z.string().optional(),
33
+ workspaceId: z.string().optional(),
34
+ requestBody: z.lazy(() => UploadFileRequestBody$outboundSchema),
35
+ }).transform((v) => {
36
+ return remap$(v, {
37
+ httpReferer: "HTTP-Referer",
38
+ workspaceId: "workspace_id",
39
+ requestBody: "RequestBody",
40
+ });
41
+ });
42
+ export function uploadFileRequestToJSON(uploadFileRequest) {
43
+ return JSON.stringify(UploadFileRequest$outboundSchema.parse(uploadFileRequest));
44
+ }
45
+ //# sourceMappingURL=uploadfile.js.map
@@ -0,0 +1,59 @@
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 OutputAdvisorServerToolItemType: {
7
+ readonly OpenrouterAdvisor: "openrouter:advisor";
8
+ };
9
+ export type OutputAdvisorServerToolItemType = ClosedEnum<typeof OutputAdvisorServerToolItemType>;
10
+ /**
11
+ * An openrouter:advisor server tool output item
12
+ */
13
+ export type OutputAdvisorServerToolItem = {
14
+ /**
15
+ * The advisor model's response (the advice text returned to the executor).
16
+ */
17
+ advice?: string | undefined;
18
+ /**
19
+ * Error message when the advisor call did not produce advice.
20
+ */
21
+ error?: string | undefined;
22
+ id?: string | undefined;
23
+ /**
24
+ * Provider-safe function name of the specific advisor instance that produced this item (e.g. `openrouter_advisor__1`). Present only when more than one advisor tool is configured; omitted for the default single advisor. Echo this field back unchanged so the advisor's cross-request memory stays namespaced to the correct instance. This identity is positional: it is derived from the index of the advisor entry in the request `tools` array, so clients must keep the order of advisor tool entries stable across requests in a conversation. Reordering or inserting advisor entries shifts these names and causes each advisor's cross-request memory to be attributed to the wrong instance.
25
+ */
26
+ instanceName?: string | undefined;
27
+ /**
28
+ * Slug of the advisor model that was consulted.
29
+ */
30
+ model?: string | undefined;
31
+ /**
32
+ * The prompt the executor sent to the advisor.
33
+ */
34
+ prompt?: string | undefined;
35
+ status: ToolCallStatus;
36
+ type: OutputAdvisorServerToolItemType;
37
+ };
38
+ /** @internal */
39
+ export declare const OutputAdvisorServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputAdvisorServerToolItemType>;
40
+ /** @internal */
41
+ export declare const OutputAdvisorServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputAdvisorServerToolItemType>;
42
+ /** @internal */
43
+ export declare const OutputAdvisorServerToolItem$inboundSchema: z.ZodType<OutputAdvisorServerToolItem, unknown>;
44
+ /** @internal */
45
+ export type OutputAdvisorServerToolItem$Outbound = {
46
+ advice?: string | undefined;
47
+ error?: string | undefined;
48
+ id?: string | undefined;
49
+ instance_name?: string | undefined;
50
+ model?: string | undefined;
51
+ prompt?: string | undefined;
52
+ status: string;
53
+ type: string;
54
+ };
55
+ /** @internal */
56
+ export declare const OutputAdvisorServerToolItem$outboundSchema: z.ZodType<OutputAdvisorServerToolItem$Outbound, OutputAdvisorServerToolItem>;
57
+ export declare function outputAdvisorServerToolItemToJSON(outputAdvisorServerToolItem: OutputAdvisorServerToolItem): string;
58
+ export declare function outputAdvisorServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputAdvisorServerToolItem, SDKValidationError>;
59
+ //# sourceMappingURL=outputadvisorservertoolitem.d.ts.map
@@ -0,0 +1,52 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 0c9d6ff77975
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, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
9
+ export const OutputAdvisorServerToolItemType = {
10
+ OpenrouterAdvisor: "openrouter:advisor",
11
+ };
12
+ /** @internal */
13
+ export const OutputAdvisorServerToolItemType$inboundSchema = z.enum(OutputAdvisorServerToolItemType);
14
+ /** @internal */
15
+ export const OutputAdvisorServerToolItemType$outboundSchema = OutputAdvisorServerToolItemType$inboundSchema;
16
+ /** @internal */
17
+ export const OutputAdvisorServerToolItem$inboundSchema = z.object({
18
+ advice: z.string().optional(),
19
+ error: z.string().optional(),
20
+ id: z.string().optional(),
21
+ instance_name: z.string().optional(),
22
+ model: z.string().optional(),
23
+ prompt: z.string().optional(),
24
+ status: ToolCallStatus$inboundSchema,
25
+ type: OutputAdvisorServerToolItemType$inboundSchema,
26
+ }).transform((v) => {
27
+ return remap$(v, {
28
+ "instance_name": "instanceName",
29
+ });
30
+ });
31
+ /** @internal */
32
+ export const OutputAdvisorServerToolItem$outboundSchema = z.object({
33
+ advice: z.string().optional(),
34
+ error: z.string().optional(),
35
+ id: z.string().optional(),
36
+ instanceName: z.string().optional(),
37
+ model: z.string().optional(),
38
+ prompt: z.string().optional(),
39
+ status: ToolCallStatus$outboundSchema,
40
+ type: OutputAdvisorServerToolItemType$outboundSchema,
41
+ }).transform((v) => {
42
+ return remap$(v, {
43
+ instanceName: "instance_name",
44
+ });
45
+ });
46
+ export function outputAdvisorServerToolItemToJSON(outputAdvisorServerToolItem) {
47
+ return JSON.stringify(OutputAdvisorServerToolItem$outboundSchema.parse(outputAdvisorServerToolItem));
48
+ }
49
+ export function outputAdvisorServerToolItemFromJSON(jsonString) {
50
+ return safeParse(jsonString, (x) => OutputAdvisorServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputAdvisorServerToolItem' from JSON`);
51
+ }
52
+ //# sourceMappingURL=outputadvisorservertoolitem.js.map
@@ -1,33 +1,9 @@
1
1
  import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
2
3
  import { Result as SafeParseResult } from "../types/fp.js";
3
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ import { FusionAnalysisResult, FusionAnalysisResult$Outbound } from "./fusionanalysisresult.js";
4
6
  import { ToolCallStatus } from "./toolcallstatus.js";
5
- export type Stance = {
6
- model: string;
7
- stance: string;
8
- };
9
- export type Contradiction = {
10
- stances: Array<Stance>;
11
- topic: string;
12
- };
13
- export type PartialCoverage = {
14
- models: Array<string>;
15
- point: string;
16
- };
17
- export type UniqueInsight = {
18
- insight: string;
19
- model: string;
20
- };
21
- /**
22
- * Structured analysis produced by the fusion judge model.
23
- */
24
- export type Analysis = {
25
- blindSpots: Array<string>;
26
- consensus: Array<string>;
27
- contradictions: Array<Contradiction>;
28
- partialCoverage: Array<PartialCoverage>;
29
- uniqueInsights: Array<UniqueInsight>;
30
- };
31
7
  export type FailedModel = {
32
8
  /**
33
9
  * Error message describing why the model failed.
@@ -43,8 +19,13 @@ export type FailedModel = {
43
19
  statusCode?: number | undefined;
44
20
  };
45
21
  export type ResponseT = {
22
+ content?: string | undefined;
46
23
  model: string;
47
24
  };
25
+ export declare const OutputFusionServerToolItemType: {
26
+ readonly OpenrouterFusion: "openrouter:fusion";
27
+ };
28
+ export type OutputFusionServerToolItemType = ClosedEnum<typeof OutputFusionServerToolItemType>;
48
29
  /**
49
30
  * An openrouter:fusion server tool output item
50
31
  */
@@ -52,7 +33,7 @@ export type OutputFusionServerToolItem = {
52
33
  /**
53
34
  * Structured analysis produced by the fusion judge model.
54
35
  */
55
- analysis?: Analysis | undefined;
36
+ analysis?: FusionAnalysisResult | undefined;
56
37
  /**
57
38
  * Error message when the fusion run did not produce an analysis result.
58
39
  */
@@ -67,34 +48,54 @@ export type OutputFusionServerToolItem = {
67
48
  failureReason?: string | undefined;
68
49
  id?: string | undefined;
69
50
  /**
70
- * Slugs of the analysis models that produced a response in this fusion run.
51
+ * Analysis models that produced a response in this fusion run, with each model's full panel content.
71
52
  */
72
53
  responses?: Array<ResponseT> | undefined;
73
54
  status: ToolCallStatus;
74
- type: "openrouter:fusion";
55
+ type: OutputFusionServerToolItemType;
75
56
  };
76
57
  /** @internal */
77
- export declare const Stance$inboundSchema: z.ZodType<Stance, unknown>;
78
- export declare function stanceFromJSON(jsonString: string): SafeParseResult<Stance, SDKValidationError>;
79
- /** @internal */
80
- export declare const Contradiction$inboundSchema: z.ZodType<Contradiction, unknown>;
81
- export declare function contradictionFromJSON(jsonString: string): SafeParseResult<Contradiction, SDKValidationError>;
82
- /** @internal */
83
- export declare const PartialCoverage$inboundSchema: z.ZodType<PartialCoverage, unknown>;
84
- export declare function partialCoverageFromJSON(jsonString: string): SafeParseResult<PartialCoverage, SDKValidationError>;
85
- /** @internal */
86
- export declare const UniqueInsight$inboundSchema: z.ZodType<UniqueInsight, unknown>;
87
- export declare function uniqueInsightFromJSON(jsonString: string): SafeParseResult<UniqueInsight, SDKValidationError>;
58
+ export declare const FailedModel$inboundSchema: z.ZodType<FailedModel, unknown>;
88
59
  /** @internal */
89
- export declare const Analysis$inboundSchema: z.ZodType<Analysis, unknown>;
90
- export declare function analysisFromJSON(jsonString: string): SafeParseResult<Analysis, SDKValidationError>;
60
+ export type FailedModel$Outbound = {
61
+ error: string;
62
+ model: string;
63
+ status_code?: number | undefined;
64
+ };
91
65
  /** @internal */
92
- export declare const FailedModel$inboundSchema: z.ZodType<FailedModel, unknown>;
66
+ export declare const FailedModel$outboundSchema: z.ZodType<FailedModel$Outbound, FailedModel>;
67
+ export declare function failedModelToJSON(failedModel: FailedModel): string;
93
68
  export declare function failedModelFromJSON(jsonString: string): SafeParseResult<FailedModel, SDKValidationError>;
94
69
  /** @internal */
95
70
  export declare const ResponseT$inboundSchema: z.ZodType<ResponseT, unknown>;
71
+ /** @internal */
72
+ export type ResponseT$Outbound = {
73
+ content?: string | undefined;
74
+ model: string;
75
+ };
76
+ /** @internal */
77
+ export declare const ResponseT$outboundSchema: z.ZodType<ResponseT$Outbound, ResponseT>;
78
+ export declare function responseToJSON(responseT: ResponseT): string;
96
79
  export declare function responseFromJSON(jsonString: string): SafeParseResult<ResponseT, SDKValidationError>;
97
80
  /** @internal */
81
+ export declare const OutputFusionServerToolItemType$inboundSchema: z.ZodEnum<typeof OutputFusionServerToolItemType>;
82
+ /** @internal */
83
+ export declare const OutputFusionServerToolItemType$outboundSchema: z.ZodEnum<typeof OutputFusionServerToolItemType>;
84
+ /** @internal */
98
85
  export declare const OutputFusionServerToolItem$inboundSchema: z.ZodType<OutputFusionServerToolItem, unknown>;
86
+ /** @internal */
87
+ export type OutputFusionServerToolItem$Outbound = {
88
+ analysis?: FusionAnalysisResult$Outbound | undefined;
89
+ error?: string | undefined;
90
+ failed_models?: Array<FailedModel$Outbound> | undefined;
91
+ failure_reason?: string | undefined;
92
+ id?: string | undefined;
93
+ responses?: Array<ResponseT$Outbound> | undefined;
94
+ status: string;
95
+ type: string;
96
+ };
97
+ /** @internal */
98
+ export declare const OutputFusionServerToolItem$outboundSchema: z.ZodType<OutputFusionServerToolItem$Outbound, OutputFusionServerToolItem>;
99
+ export declare function outputFusionServerToolItemToJSON(outputFusionServerToolItem: OutputFusionServerToolItem): string;
99
100
  export declare function outputFusionServerToolItemFromJSON(jsonString: string): SafeParseResult<OutputFusionServerToolItem, SDKValidationError>;
100
101
  //# sourceMappingURL=outputfusionservertoolitem.d.ts.map
@@ -5,95 +5,93 @@
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import { safeParse } from "../lib/schemas.js";
8
- import { ToolCallStatus$inboundSchema, } from "./toolcallstatus.js";
8
+ import { FusionAnalysisResult$inboundSchema, FusionAnalysisResult$outboundSchema, } from "./fusionanalysisresult.js";
9
+ import { ToolCallStatus$inboundSchema, ToolCallStatus$outboundSchema, } from "./toolcallstatus.js";
10
+ export const OutputFusionServerToolItemType = {
11
+ OpenrouterFusion: "openrouter:fusion",
12
+ };
9
13
  /** @internal */
10
- export const Stance$inboundSchema = z.object({
11
- model: z.string(),
12
- stance: z.string(),
13
- });
14
- export function stanceFromJSON(jsonString) {
15
- return safeParse(jsonString, (x) => Stance$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Stance' from JSON`);
16
- }
17
- /** @internal */
18
- export const Contradiction$inboundSchema = z
19
- .object({
20
- stances: z.array(z.lazy(() => Stance$inboundSchema)),
21
- topic: z.string(),
22
- });
23
- export function contradictionFromJSON(jsonString) {
24
- return safeParse(jsonString, (x) => Contradiction$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Contradiction' from JSON`);
25
- }
26
- /** @internal */
27
- export const PartialCoverage$inboundSchema = z.object({
28
- models: z.array(z.string()),
29
- point: z.string(),
30
- });
31
- export function partialCoverageFromJSON(jsonString) {
32
- return safeParse(jsonString, (x) => PartialCoverage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'PartialCoverage' from JSON`);
33
- }
34
- /** @internal */
35
- export const UniqueInsight$inboundSchema = z
14
+ export const FailedModel$inboundSchema = z
36
15
  .object({
37
- insight: z.string(),
16
+ error: z.string(),
38
17
  model: z.string(),
39
- });
40
- export function uniqueInsightFromJSON(jsonString) {
41
- return safeParse(jsonString, (x) => UniqueInsight$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'UniqueInsight' from JSON`);
42
- }
43
- /** @internal */
44
- export const Analysis$inboundSchema = z.object({
45
- blind_spots: z.array(z.string()),
46
- consensus: z.array(z.string()),
47
- contradictions: z.array(z.lazy(() => Contradiction$inboundSchema)),
48
- partial_coverage: z.array(z.lazy(() => PartialCoverage$inboundSchema)),
49
- unique_insights: z.array(z.lazy(() => UniqueInsight$inboundSchema)),
18
+ status_code: z.int().optional(),
50
19
  }).transform((v) => {
51
20
  return remap$(v, {
52
- "blind_spots": "blindSpots",
53
- "partial_coverage": "partialCoverage",
54
- "unique_insights": "uniqueInsights",
21
+ "status_code": "statusCode",
55
22
  });
56
23
  });
57
- export function analysisFromJSON(jsonString) {
58
- return safeParse(jsonString, (x) => Analysis$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Analysis' from JSON`);
59
- }
60
24
  /** @internal */
61
- export const FailedModel$inboundSchema = z
62
- .object({
25
+ export const FailedModel$outboundSchema = z.object({
63
26
  error: z.string(),
64
27
  model: z.string(),
65
- status_code: z.int().optional(),
28
+ statusCode: z.int().optional(),
66
29
  }).transform((v) => {
67
30
  return remap$(v, {
68
- "status_code": "statusCode",
31
+ statusCode: "status_code",
69
32
  });
70
33
  });
34
+ export function failedModelToJSON(failedModel) {
35
+ return JSON.stringify(FailedModel$outboundSchema.parse(failedModel));
36
+ }
71
37
  export function failedModelFromJSON(jsonString) {
72
38
  return safeParse(jsonString, (x) => FailedModel$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'FailedModel' from JSON`);
73
39
  }
74
40
  /** @internal */
75
41
  export const ResponseT$inboundSchema = z.object({
42
+ content: z.string().optional(),
76
43
  model: z.string(),
77
44
  });
45
+ /** @internal */
46
+ export const ResponseT$outboundSchema = z.object({
47
+ content: z.string().optional(),
48
+ model: z.string(),
49
+ });
50
+ export function responseToJSON(responseT) {
51
+ return JSON.stringify(ResponseT$outboundSchema.parse(responseT));
52
+ }
78
53
  export function responseFromJSON(jsonString) {
79
54
  return safeParse(jsonString, (x) => ResponseT$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ResponseT' from JSON`);
80
55
  }
81
56
  /** @internal */
57
+ export const OutputFusionServerToolItemType$inboundSchema = z.enum(OutputFusionServerToolItemType);
58
+ /** @internal */
59
+ export const OutputFusionServerToolItemType$outboundSchema = OutputFusionServerToolItemType$inboundSchema;
60
+ /** @internal */
82
61
  export const OutputFusionServerToolItem$inboundSchema = z.object({
83
- analysis: z.lazy(() => Analysis$inboundSchema).optional(),
62
+ analysis: FusionAnalysisResult$inboundSchema.optional(),
84
63
  error: z.string().optional(),
85
64
  failed_models: z.array(z.lazy(() => FailedModel$inboundSchema)).optional(),
86
65
  failure_reason: z.string().optional(),
87
66
  id: z.string().optional(),
88
67
  responses: z.array(z.lazy(() => ResponseT$inboundSchema)).optional(),
89
68
  status: ToolCallStatus$inboundSchema,
90
- type: z.literal("openrouter:fusion"),
69
+ type: OutputFusionServerToolItemType$inboundSchema,
91
70
  }).transform((v) => {
92
71
  return remap$(v, {
93
72
  "failed_models": "failedModels",
94
73
  "failure_reason": "failureReason",
95
74
  });
96
75
  });
76
+ /** @internal */
77
+ export const OutputFusionServerToolItem$outboundSchema = z.object({
78
+ analysis: FusionAnalysisResult$outboundSchema.optional(),
79
+ error: z.string().optional(),
80
+ failedModels: z.array(z.lazy(() => FailedModel$outboundSchema)).optional(),
81
+ failureReason: z.string().optional(),
82
+ id: z.string().optional(),
83
+ responses: z.array(z.lazy(() => ResponseT$outboundSchema)).optional(),
84
+ status: ToolCallStatus$outboundSchema,
85
+ type: OutputFusionServerToolItemType$outboundSchema,
86
+ }).transform((v) => {
87
+ return remap$(v, {
88
+ failedModels: "failed_models",
89
+ failureReason: "failure_reason",
90
+ });
91
+ });
92
+ export function outputFusionServerToolItemToJSON(outputFusionServerToolItem) {
93
+ return JSON.stringify(OutputFusionServerToolItem$outboundSchema.parse(outputFusionServerToolItem));
94
+ }
97
95
  export function outputFusionServerToolItemFromJSON(jsonString) {
98
96
  return safeParse(jsonString, (x) => OutputFusionServerToolItem$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'OutputFusionServerToolItem' from JSON`);
99
97
  }
@@ -2,6 +2,7 @@ import * as z from "zod/v4";
2
2
  import * as discriminatedUnionTypes from "../types/discriminatedUnion.js";
3
3
  import { Result as SafeParseResult } from "../types/fp.js";
4
4
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
5
+ import { OutputAdvisorServerToolItem } from "./outputadvisorservertoolitem.js";
5
6
  import { OutputApplyPatchCallItem } from "./outputapplypatchcallitem.js";
6
7
  import { OutputApplyPatchServerToolItem } from "./outputapplypatchservertoolitem.js";
7
8
  import { OutputBashServerToolItem } from "./outputbashservertoolitem.js";
@@ -22,6 +23,9 @@ import { OutputMemoryServerToolItem } from "./outputmemoryservertoolitem.js";
22
23
  import { OutputMessageItem } from "./outputmessageitem.js";
23
24
  import { OutputReasoningItem } from "./outputreasoningitem.js";
24
25
  import { OutputSearchModelsServerToolItem } from "./outputsearchmodelsservertoolitem.js";
26
+ import { OutputShellCallItem } from "./outputshellcallitem.js";
27
+ import { OutputShellCallOutputItem } from "./outputshellcalloutputitem.js";
28
+ import { OutputSubagentServerToolItem } from "./outputsubagentservertoolitem.js";
25
29
  import { OutputTextEditorServerToolItem } from "./outputtexteditorservertoolitem.js";
26
30
  import { OutputToolSearchServerToolItem } from "./outputtoolsearchservertoolitem.js";
27
31
  import { OutputWebFetchServerToolItem } from "./outputwebfetchservertoolitem.js";
@@ -42,7 +46,9 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
42
46
  type: "function_call";
43
47
  }) | (OutputImageGenerationCallItem & {
44
48
  type: "image_generation_call";
45
- }) | OutputMessageItem | (OutputApplyPatchServerToolItem & {
49
+ }) | OutputMessageItem | (OutputAdvisorServerToolItem & {
50
+ type: "openrouter:advisor";
51
+ }) | (OutputApplyPatchServerToolItem & {
46
52
  type: "openrouter:apply_patch";
47
53
  }) | (OutputBashServerToolItem & {
48
54
  type: "openrouter:bash";
@@ -56,12 +62,16 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
56
62
  type: "openrouter:experimental__search_models";
57
63
  }) | (OutputFileSearchServerToolItem & {
58
64
  type: "openrouter:file_search";
59
- }) | OutputFusionServerToolItem | (OutputImageGenerationServerToolItem & {
65
+ }) | (OutputFusionServerToolItem & {
66
+ type: "openrouter:fusion";
67
+ }) | (OutputImageGenerationServerToolItem & {
60
68
  type: "openrouter:image_generation";
61
69
  }) | (OutputMcpServerToolItem & {
62
70
  type: "openrouter:mcp";
63
71
  }) | (OutputMemoryServerToolItem & {
64
72
  type: "openrouter:memory";
73
+ }) | (OutputSubagentServerToolItem & {
74
+ type: "openrouter:subagent";
65
75
  }) | (OutputTextEditorServerToolItem & {
66
76
  type: "openrouter:text_editor";
67
77
  }) | (OutputToolSearchServerToolItem & {
@@ -70,7 +80,7 @@ export type OutputItems = OutputApplyPatchCallItem | (OutputCodeInterpreterCallI
70
80
  type: "openrouter:web_fetch";
71
81
  }) | (OutputWebSearchServerToolItem & {
72
82
  type: "openrouter:web_search";
73
- }) | OutputReasoningItem | (OutputWebSearchCallItem & {
83
+ }) | OutputReasoningItem | OutputShellCallItem | OutputShellCallOutputItem | (OutputWebSearchCallItem & {
74
84
  type: "web_search_call";
75
85
  }) | discriminatedUnionTypes.Unknown<"type">;
76
86
  /** @internal */
@@ -5,6 +5,7 @@
5
5
  import * as z from "zod/v4";
6
6
  import { safeParse } from "../lib/schemas.js";
7
7
  import { discriminatedUnion } from "../types/discriminatedUnion.js";
8
+ import { OutputAdvisorServerToolItem$inboundSchema, } from "./outputadvisorservertoolitem.js";
8
9
  import { OutputApplyPatchCallItem$inboundSchema, } from "./outputapplypatchcallitem.js";
9
10
  import { OutputApplyPatchServerToolItem$inboundSchema, } from "./outputapplypatchservertoolitem.js";
10
11
  import { OutputBashServerToolItem$inboundSchema, } from "./outputbashservertoolitem.js";
@@ -25,6 +26,9 @@ import { OutputMemoryServerToolItem$inboundSchema, } from "./outputmemoryservert
25
26
  import { OutputMessageItem$inboundSchema, } from "./outputmessageitem.js";
26
27
  import { OutputReasoningItem$inboundSchema, } from "./outputreasoningitem.js";
27
28
  import { OutputSearchModelsServerToolItem$inboundSchema, } from "./outputsearchmodelsservertoolitem.js";
29
+ import { OutputShellCallItem$inboundSchema, } from "./outputshellcallitem.js";
30
+ import { OutputShellCallOutputItem$inboundSchema, } from "./outputshellcalloutputitem.js";
31
+ import { OutputSubagentServerToolItem$inboundSchema, } from "./outputsubagentservertoolitem.js";
28
32
  import { OutputTextEditorServerToolItem$inboundSchema, } from "./outputtexteditorservertoolitem.js";
29
33
  import { OutputToolSearchServerToolItem$inboundSchema, } from "./outputtoolsearchservertoolitem.js";
30
34
  import { OutputWebFetchServerToolItem$inboundSchema, } from "./outputwebfetchservertoolitem.js";
@@ -40,6 +44,7 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
40
44
  function_call: OutputFunctionCallItem$inboundSchema.and(z.object({ type: z.literal("function_call") })),
41
45
  image_generation_call: OutputImageGenerationCallItem$inboundSchema.and(z.object({ type: z.literal("image_generation_call") })),
42
46
  message: OutputMessageItem$inboundSchema,
47
+ ["openrouter:advisor"]: OutputAdvisorServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:advisor") })),
43
48
  ["openrouter:apply_patch"]: OutputApplyPatchServerToolItem$inboundSchema
44
49
  .and(z.object({ type: z.literal("openrouter:apply_patch") })),
45
50
  ["openrouter:bash"]: OutputBashServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:bash") })),
@@ -50,10 +55,11 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
50
55
  ["openrouter:experimental__search_models"]: OutputSearchModelsServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:experimental__search_models") })),
51
56
  ["openrouter:file_search"]: OutputFileSearchServerToolItem$inboundSchema
52
57
  .and(z.object({ type: z.literal("openrouter:file_search") })),
53
- ["openrouter:fusion"]: OutputFusionServerToolItem$inboundSchema,
58
+ ["openrouter:fusion"]: OutputFusionServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:fusion") })),
54
59
  ["openrouter:image_generation"]: OutputImageGenerationServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:image_generation") })),
55
60
  ["openrouter:mcp"]: OutputMcpServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:mcp") })),
56
61
  ["openrouter:memory"]: OutputMemoryServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:memory") })),
62
+ ["openrouter:subagent"]: OutputSubagentServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:subagent") })),
57
63
  ["openrouter:text_editor"]: OutputTextEditorServerToolItem$inboundSchema
58
64
  .and(z.object({ type: z.literal("openrouter:text_editor") })),
59
65
  ["openrouter:tool_search"]: OutputToolSearchServerToolItem$inboundSchema
@@ -61,6 +67,8 @@ export const OutputItems$inboundSchema = discriminatedUnion("type", {
61
67
  ["openrouter:web_fetch"]: OutputWebFetchServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:web_fetch") })),
62
68
  ["openrouter:web_search"]: OutputWebSearchServerToolItem$inboundSchema.and(z.object({ type: z.literal("openrouter:web_search") })),
63
69
  reasoning: OutputReasoningItem$inboundSchema,
70
+ shell_call: OutputShellCallItem$inboundSchema,
71
+ shell_call_output: OutputShellCallOutputItem$inboundSchema,
64
72
  web_search_call: OutputWebSearchCallItem$inboundSchema.and(z.object({ type: z.literal("web_search_call") })),
65
73
  });
66
74
  export function outputItemsFromJSON(jsonString) {
@@ -0,0 +1,29 @@
1
+ import * as z from "zod/v4";
2
+ import { Result as SafeParseResult } from "../types/fp.js";
3
+ import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
+ import { ShellCallStatus } from "./shellcallstatus.js";
5
+ export type OutputShellCallItemAction = {
6
+ commands: Array<string>;
7
+ maxOutputLength: number | null;
8
+ timeoutMs: number | null;
9
+ };
10
+ /**
11
+ * A native `shell_call` output item matching OpenAI's Responses API shape. Emitted for the sandbox-backed `shell` tool.
12
+ */
13
+ export type OutputShellCallItem = {
14
+ action?: OutputShellCallItemAction | undefined;
15
+ callId: string;
16
+ id: string;
17
+ /**
18
+ * Status of a shell call or its output.
19
+ */
20
+ status: ShellCallStatus;
21
+ type: "shell_call";
22
+ };
23
+ /** @internal */
24
+ export declare const OutputShellCallItemAction$inboundSchema: z.ZodType<OutputShellCallItemAction, unknown>;
25
+ export declare function outputShellCallItemActionFromJSON(jsonString: string): SafeParseResult<OutputShellCallItemAction, SDKValidationError>;
26
+ /** @internal */
27
+ export declare const OutputShellCallItem$inboundSchema: z.ZodType<OutputShellCallItem, unknown>;
28
+ export declare function outputShellCallItemFromJSON(jsonString: string): SafeParseResult<OutputShellCallItem, SDKValidationError>;
29
+ //# sourceMappingURL=outputshellcallitem.d.ts.map