@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
@@ -0,0 +1,25 @@
1
+ import * as z from "zod/v4";
2
+ /**
3
+ * A tool made available to the subagent. Only OpenRouter server tools (e.g. openrouter:web_search) are supported; function tools are rejected because the worker has no way to execute them. The subagent tool may not list itself.
4
+ */
5
+ export type SubagentNestedTool = {
6
+ parameters?: {
7
+ [k: string]: any | null;
8
+ } | undefined;
9
+ type: string;
10
+ additionalProperties?: {
11
+ [k: string]: any | null;
12
+ } | undefined;
13
+ };
14
+ /** @internal */
15
+ export type SubagentNestedTool$Outbound = {
16
+ parameters?: {
17
+ [k: string]: any | null;
18
+ } | undefined;
19
+ type: string;
20
+ [additionalProperties: string]: unknown;
21
+ };
22
+ /** @internal */
23
+ export declare const SubagentNestedTool$outboundSchema: z.ZodType<SubagentNestedTool$Outbound, SubagentNestedTool>;
24
+ export declare function subagentNestedToolToJSON(subagentNestedTool: SubagentNestedTool): string;
25
+ //# sourceMappingURL=subagentnestedtool.d.ts.map
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 9d5ec7df4bc2
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ /** @internal */
8
+ export const SubagentNestedTool$outboundSchema = z.object({
9
+ parameters: z.record(z.string(), z.nullable(z.any())).optional(),
10
+ type: z.string(),
11
+ additionalProperties: z.record(z.string(), z.nullable(z.any())).optional(),
12
+ }).transform((v) => {
13
+ return {
14
+ ...v.additionalProperties,
15
+ ...remap$(v, {
16
+ additionalProperties: null,
17
+ }),
18
+ };
19
+ });
20
+ export function subagentNestedToolToJSON(subagentNestedTool) {
21
+ return JSON.stringify(SubagentNestedTool$outboundSchema.parse(subagentNestedTool));
22
+ }
23
+ //# sourceMappingURL=subagentnestedtool.js.map
@@ -0,0 +1,41 @@
1
+ import * as z from "zod/v4";
2
+ import { OpenEnum } from "../types/enums.js";
3
+ /**
4
+ * Reasoning effort level for the subagent call.
5
+ */
6
+ export declare const SubagentReasoningEffort: {
7
+ readonly Xhigh: "xhigh";
8
+ readonly High: "high";
9
+ readonly Medium: "medium";
10
+ readonly Low: "low";
11
+ readonly Minimal: "minimal";
12
+ readonly None: "none";
13
+ };
14
+ /**
15
+ * Reasoning effort level for the subagent call.
16
+ */
17
+ export type SubagentReasoningEffort = OpenEnum<typeof SubagentReasoningEffort>;
18
+ /**
19
+ * Reasoning configuration forwarded to the subagent call. Use this to control reasoning effort and token budget for models that support extended thinking.
20
+ */
21
+ export type SubagentReasoning = {
22
+ /**
23
+ * Reasoning effort level for the subagent call.
24
+ */
25
+ effort?: SubagentReasoningEffort | undefined;
26
+ /**
27
+ * Maximum number of reasoning tokens the subagent may use. Accepted and validated but not yet forwarded to the subagent call.
28
+ */
29
+ maxTokens?: number | undefined;
30
+ };
31
+ /** @internal */
32
+ export declare const SubagentReasoningEffort$outboundSchema: z.ZodType<string, SubagentReasoningEffort>;
33
+ /** @internal */
34
+ export type SubagentReasoning$Outbound = {
35
+ effort?: string | undefined;
36
+ max_tokens?: number | undefined;
37
+ };
38
+ /** @internal */
39
+ export declare const SubagentReasoning$outboundSchema: z.ZodType<SubagentReasoning$Outbound, SubagentReasoning>;
40
+ export declare function subagentReasoningToJSON(subagentReasoning: SubagentReasoning): string;
41
+ //# sourceMappingURL=subagentreasoning.d.ts.map
@@ -0,0 +1,33 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 916aba5c0712
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import * as openEnums from "../types/enums.js";
8
+ /**
9
+ * Reasoning effort level for the subagent call.
10
+ */
11
+ export const SubagentReasoningEffort = {
12
+ Xhigh: "xhigh",
13
+ High: "high",
14
+ Medium: "medium",
15
+ Low: "low",
16
+ Minimal: "minimal",
17
+ None: "none",
18
+ };
19
+ /** @internal */
20
+ export const SubagentReasoningEffort$outboundSchema = openEnums.outboundSchema(SubagentReasoningEffort);
21
+ /** @internal */
22
+ export const SubagentReasoning$outboundSchema = z.object({
23
+ effort: SubagentReasoningEffort$outboundSchema.optional(),
24
+ maxTokens: z.int().optional(),
25
+ }).transform((v) => {
26
+ return remap$(v, {
27
+ maxTokens: "max_tokens",
28
+ });
29
+ });
30
+ export function subagentReasoningToJSON(subagentReasoning) {
31
+ return JSON.stringify(SubagentReasoning$outboundSchema.parse(subagentReasoning));
32
+ }
33
+ //# sourceMappingURL=subagentreasoning.js.map
@@ -0,0 +1,50 @@
1
+ import * as z from "zod/v4";
2
+ import { SubagentNestedTool, SubagentNestedTool$Outbound } from "./subagentnestedtool.js";
3
+ import { SubagentReasoning, SubagentReasoning$Outbound } from "./subagentreasoning.js";
4
+ /**
5
+ * Configuration for the openrouter:subagent server tool.
6
+ */
7
+ export type SubagentServerToolConfig = {
8
+ /**
9
+ * System instructions for the subagent. When omitted, the subagent responds with no system prompt of its own.
10
+ */
11
+ instructions?: string | undefined;
12
+ /**
13
+ * Maximum number of output tokens (including reasoning) the subagent may produce. When omitted, the provider's default applies.
14
+ */
15
+ maxCompletionTokens?: number | undefined;
16
+ /**
17
+ * Maximum number of tool-calling steps the subagent may take during its agentic loop. Capped at 25. Only relevant when the subagent is given tools. Accepted and validated but not yet enforced on the subagent call.
18
+ */
19
+ maxToolCalls?: number | undefined;
20
+ /**
21
+ * Slug of the model that executes delegated tasks (any OpenRouter model). Typically a smaller, cheaper, faster model than the one delegating. When omitted, the model from the outer API request is used. The subagent tool itself cannot be the subagent model.
22
+ */
23
+ model?: string | undefined;
24
+ /**
25
+ * Reasoning configuration forwarded to the subagent call. Use this to control reasoning effort and token budget for models that support extended thinking.
26
+ */
27
+ reasoning?: SubagentReasoning | undefined;
28
+ /**
29
+ * Sampling temperature forwarded to the subagent call. When omitted, the provider's default applies.
30
+ */
31
+ temperature?: number | undefined;
32
+ /**
33
+ * Tools the subagent may use while executing a delegated task. The subagent runs as an agentic sub-agent over these tools, then returns its outcome. Only OpenRouter server tools are supported — function tools are rejected — and the list must not include the subagent tool itself.
34
+ */
35
+ tools?: Array<SubagentNestedTool> | undefined;
36
+ };
37
+ /** @internal */
38
+ export type SubagentServerToolConfig$Outbound = {
39
+ instructions?: string | undefined;
40
+ max_completion_tokens?: number | undefined;
41
+ max_tool_calls?: number | undefined;
42
+ model?: string | undefined;
43
+ reasoning?: SubagentReasoning$Outbound | undefined;
44
+ temperature?: number | undefined;
45
+ tools?: Array<SubagentNestedTool$Outbound> | undefined;
46
+ };
47
+ /** @internal */
48
+ export declare const SubagentServerToolConfig$outboundSchema: z.ZodType<SubagentServerToolConfig$Outbound, SubagentServerToolConfig>;
49
+ export declare function subagentServerToolConfigToJSON(subagentServerToolConfig: SubagentServerToolConfig): string;
50
+ //# sourceMappingURL=subagentservertoolconfig.d.ts.map
@@ -0,0 +1,27 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: 6f8ec51577e6
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { remap as remap$ } from "../lib/primitives.js";
7
+ import { SubagentNestedTool$outboundSchema, } from "./subagentnestedtool.js";
8
+ import { SubagentReasoning$outboundSchema, } from "./subagentreasoning.js";
9
+ /** @internal */
10
+ export const SubagentServerToolConfig$outboundSchema = z.object({
11
+ instructions: z.string().optional(),
12
+ maxCompletionTokens: z.int().optional(),
13
+ maxToolCalls: z.int().optional(),
14
+ model: z.string().optional(),
15
+ reasoning: SubagentReasoning$outboundSchema.optional(),
16
+ temperature: z.number().optional(),
17
+ tools: z.array(SubagentNestedTool$outboundSchema).optional(),
18
+ }).transform((v) => {
19
+ return remap$(v, {
20
+ maxCompletionTokens: "max_completion_tokens",
21
+ maxToolCalls: "max_tool_calls",
22
+ });
23
+ });
24
+ export function subagentServerToolConfigToJSON(subagentServerToolConfig) {
25
+ return JSON.stringify(SubagentServerToolConfig$outboundSchema.parse(subagentServerToolConfig));
26
+ }
27
+ //# sourceMappingURL=subagentservertoolconfig.js.map
@@ -0,0 +1,28 @@
1
+ import * as z from "zod/v4";
2
+ import { ClosedEnum } from "../types/enums.js";
3
+ import { SubagentServerToolConfig, SubagentServerToolConfig$Outbound } from "./subagentservertoolconfig.js";
4
+ export declare const SubagentServerToolOpenRouterType: {
5
+ readonly OpenrouterSubagent: "openrouter:subagent";
6
+ };
7
+ export type SubagentServerToolOpenRouterType = ClosedEnum<typeof SubagentServerToolOpenRouterType>;
8
+ /**
9
+ * OpenRouter built-in server tool: delegates self-contained tasks to a smaller, cheaper, faster worker model (any OpenRouter model) mid-generation and returns its outcome. The worker may run as a sub-agent with its own tools.
10
+ */
11
+ export type SubagentServerToolOpenRouter = {
12
+ /**
13
+ * Configuration for the openrouter:subagent server tool.
14
+ */
15
+ parameters?: SubagentServerToolConfig | undefined;
16
+ type: SubagentServerToolOpenRouterType;
17
+ };
18
+ /** @internal */
19
+ export declare const SubagentServerToolOpenRouterType$outboundSchema: z.ZodEnum<typeof SubagentServerToolOpenRouterType>;
20
+ /** @internal */
21
+ export type SubagentServerToolOpenRouter$Outbound = {
22
+ parameters?: SubagentServerToolConfig$Outbound | undefined;
23
+ type: string;
24
+ };
25
+ /** @internal */
26
+ export declare const SubagentServerToolOpenRouter$outboundSchema: z.ZodType<SubagentServerToolOpenRouter$Outbound, SubagentServerToolOpenRouter>;
27
+ export declare function subagentServerToolOpenRouterToJSON(subagentServerToolOpenRouter: SubagentServerToolOpenRouter): string;
28
+ //# sourceMappingURL=subagentservertoolopenrouter.d.ts.map
@@ -0,0 +1,20 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ * @generated-id: fe81bd2eaa91
4
+ */
5
+ import * as z from "zod/v4";
6
+ import { SubagentServerToolConfig$outboundSchema, } from "./subagentservertoolconfig.js";
7
+ export const SubagentServerToolOpenRouterType = {
8
+ OpenrouterSubagent: "openrouter:subagent",
9
+ };
10
+ /** @internal */
11
+ export const SubagentServerToolOpenRouterType$outboundSchema = z.enum(SubagentServerToolOpenRouterType);
12
+ /** @internal */
13
+ export const SubagentServerToolOpenRouter$outboundSchema = z.object({
14
+ parameters: SubagentServerToolConfig$outboundSchema.optional(),
15
+ type: SubagentServerToolOpenRouterType$outboundSchema,
16
+ });
17
+ export function subagentServerToolOpenRouterToJSON(subagentServerToolOpenRouter) {
18
+ return JSON.stringify(SubagentServerToolOpenRouter$outboundSchema.parse(subagentServerToolOpenRouter));
19
+ }
20
+ //# sourceMappingURL=subagentservertoolopenrouter.js.map
@@ -25,7 +25,7 @@ export type UpdateObservabilityDestinationRequest = {
25
25
  */
26
26
  privacyMode?: boolean | undefined;
27
27
  /**
28
- * Sampling rate between 0 and 1 (1 = 100%).
28
+ * Sampling rate between 0.0001 and 1 (1 = 100%).
29
29
  */
30
30
  samplingRate?: number | undefined;
31
31
  };
@@ -2,6 +2,7 @@ import * as z from "zod/v4";
2
2
  import { Result as SafeParseResult } from "../types/fp.js";
3
3
  import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
4
  export type URLCitation = {
5
+ content?: string | undefined;
5
6
  endIndex: number;
6
7
  startIndex: number;
7
8
  title: string;
@@ -12,6 +13,7 @@ export type URLCitation = {
12
13
  export declare const URLCitation$inboundSchema: z.ZodType<URLCitation, unknown>;
13
14
  /** @internal */
14
15
  export type URLCitation$Outbound = {
16
+ content?: string | undefined;
15
17
  end_index: number;
16
18
  start_index: number;
17
19
  title: string;
@@ -8,6 +8,7 @@ import { safeParse } from "../lib/schemas.js";
8
8
  /** @internal */
9
9
  export const URLCitation$inboundSchema = z
10
10
  .object({
11
+ content: z.string().optional(),
11
12
  end_index: z.int(),
12
13
  start_index: z.int(),
13
14
  title: z.string(),
@@ -21,6 +22,7 @@ export const URLCitation$inboundSchema = z
21
22
  });
22
23
  /** @internal */
23
24
  export const URLCitation$outboundSchema = z.object({
25
+ content: z.string().optional(),
24
26
  endIndex: z.int(),
25
27
  startIndex: z.int(),
26
28
  title: z.string(),
@@ -1,7 +1,7 @@
1
1
  import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../types/enums.js";
3
- import { ContentPartImage, ContentPartImage$Outbound } from "./contentpartimage.js";
4
3
  import { FrameImage, FrameImage$Outbound } from "./frameimage.js";
4
+ import { InputReference, InputReference$Outbound } from "./inputreference.js";
5
5
  /**
6
6
  * Aspect ratio of the generated video
7
7
  */
@@ -114,6 +114,9 @@ export type Options = {
114
114
  darkbloom?: {
115
115
  [k: string]: any | null;
116
116
  } | undefined;
117
+ decart?: {
118
+ [k: string]: any | null;
119
+ } | undefined;
117
120
  deepinfra?: {
118
121
  [k: string]: any | null;
119
122
  } | undefined;
@@ -351,6 +354,9 @@ export type Options = {
351
354
  venice?: {
352
355
  [k: string]: any | null;
353
356
  } | undefined;
357
+ wafer?: {
358
+ [k: string]: any | null;
359
+ } | undefined;
354
360
  wandb?: {
355
361
  [k: string]: any | null;
356
362
  } | undefined;
@@ -407,9 +413,9 @@ export type VideoGenerationRequest = {
407
413
  */
408
414
  generateAudio?: boolean | undefined;
409
415
  /**
410
- * Reference images to guide video generation
416
+ * Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest.
411
417
  */
412
- inputReferences?: Array<ContentPartImage> | undefined;
418
+ inputReferences?: Array<InputReference> | undefined;
413
419
  model: string;
414
420
  prompt: string;
415
421
  /**
@@ -523,6 +529,9 @@ export type Options$Outbound = {
523
529
  darkbloom?: {
524
530
  [k: string]: any | null;
525
531
  } | undefined;
532
+ decart?: {
533
+ [k: string]: any | null;
534
+ } | undefined;
526
535
  deepinfra?: {
527
536
  [k: string]: any | null;
528
537
  } | undefined;
@@ -760,6 +769,9 @@ export type Options$Outbound = {
760
769
  venice?: {
761
770
  [k: string]: any | null;
762
771
  } | undefined;
772
+ wafer?: {
773
+ [k: string]: any | null;
774
+ } | undefined;
763
775
  wandb?: {
764
776
  [k: string]: any | null;
765
777
  } | undefined;
@@ -792,7 +804,7 @@ export type VideoGenerationRequest$Outbound = {
792
804
  duration?: number | undefined;
793
805
  frame_images?: Array<FrameImage$Outbound> | undefined;
794
806
  generate_audio?: boolean | undefined;
795
- input_references?: Array<ContentPartImage$Outbound> | undefined;
807
+ input_references?: Array<InputReference$Outbound> | undefined;
796
808
  model: string;
797
809
  prompt: string;
798
810
  provider?: VideoGenerationRequestProvider$Outbound | undefined;
@@ -5,8 +5,8 @@
5
5
  import * as z from "zod/v4";
6
6
  import { remap as remap$ } from "../lib/primitives.js";
7
7
  import * as openEnums from "../types/enums.js";
8
- import { ContentPartImage$outboundSchema, } from "./contentpartimage.js";
9
8
  import { FrameImage$outboundSchema, } from "./frameimage.js";
9
+ import { InputReference$outboundSchema, } from "./inputreference.js";
10
10
  /**
11
11
  * Aspect ratio of the generated video
12
12
  */
@@ -67,6 +67,7 @@ export const Options$outboundSchema = z
67
67
  crucible: z.record(z.string(), z.nullable(z.any())).optional(),
68
68
  crusoe: z.record(z.string(), z.nullable(z.any())).optional(),
69
69
  darkbloom: z.record(z.string(), z.nullable(z.any())).optional(),
70
+ decart: z.record(z.string(), z.nullable(z.any())).optional(),
70
71
  deepinfra: z.record(z.string(), z.nullable(z.any())).optional(),
71
72
  deepseek: z.record(z.string(), z.nullable(z.any())).optional(),
72
73
  dekallm: z.record(z.string(), z.nullable(z.any())).optional(),
@@ -146,6 +147,7 @@ export const Options$outboundSchema = z
146
147
  ubicloud: z.record(z.string(), z.nullable(z.any())).optional(),
147
148
  upstage: z.record(z.string(), z.nullable(z.any())).optional(),
148
149
  venice: z.record(z.string(), z.nullable(z.any())).optional(),
150
+ wafer: z.record(z.string(), z.nullable(z.any())).optional(),
149
151
  wandb: z.record(z.string(), z.nullable(z.any())).optional(),
150
152
  xai: z.record(z.string(), z.nullable(z.any())).optional(),
151
153
  xiaomi: z.record(z.string(), z.nullable(z.any())).optional(),
@@ -194,7 +196,7 @@ export const VideoGenerationRequest$outboundSchema = z.object({
194
196
  duration: z.int().optional(),
195
197
  frameImages: z.array(FrameImage$outboundSchema).optional(),
196
198
  generateAudio: z.boolean().optional(),
197
- inputReferences: z.array(ContentPartImage$outboundSchema).optional(),
199
+ inputReferences: z.array(InputReference$outboundSchema).optional(),
198
200
  model: z.string(),
199
201
  prompt: z.string(),
200
202
  provider: z.lazy(() => VideoGenerationRequestProvider$outboundSchema)
@@ -4,19 +4,23 @@ import { WebSearchEngineEnum } from "./websearchengineenum.js";
4
4
  import { WebSearchUserLocationServerTool, WebSearchUserLocationServerTool$Outbound } from "./websearchuserlocationservertool.js";
5
5
  export type WebSearchConfig = {
6
6
  /**
7
- * Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains.
7
+ * Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, xAI). Cannot be used with excluded_domains.
8
8
  */
9
9
  allowedDomains?: Array<string> | undefined;
10
10
  /**
11
- * 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.
11
+ * 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).
12
12
  */
13
13
  engine?: WebSearchEngineEnum | undefined;
14
14
  /**
15
- * Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains.
15
+ * Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, and xAI. Not supported with OpenAI (silently ignored). Cannot be used with allowed_domains.
16
16
  */
17
17
  excludedDomains?: Array<string> | undefined;
18
18
  /**
19
- * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.
19
+ * Exact maximum number of characters of content per search result. Applies to the Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). For Perplexity, maps to the native `max_tokens_per_page` parameter (converted from characters to tokens) and trims the response to the exact character cap. When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel, Perplexity).
20
+ */
21
+ maxCharacters?: number | undefined;
22
+ /**
23
+ * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search.
20
24
  */
21
25
  maxResults?: number | undefined;
22
26
  /**
@@ -24,7 +28,7 @@ export type WebSearchConfig = {
24
28
  */
25
29
  maxTotalResults?: number | undefined;
26
30
  /**
27
- * How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.
31
+ * How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set.
28
32
  */
29
33
  searchContextSize?: SearchQualityLevel | undefined;
30
34
  /**
@@ -37,6 +41,7 @@ export type WebSearchConfig$Outbound = {
37
41
  allowed_domains?: Array<string> | undefined;
38
42
  engine?: string | undefined;
39
43
  excluded_domains?: Array<string> | undefined;
44
+ max_characters?: number | undefined;
40
45
  max_results?: number | undefined;
41
46
  max_total_results?: number | undefined;
42
47
  search_context_size?: string | undefined;
@@ -12,6 +12,7 @@ export const WebSearchConfig$outboundSchema = z.object({
12
12
  allowedDomains: z.array(z.string()).optional(),
13
13
  engine: WebSearchEngineEnum$outboundSchema.optional(),
14
14
  excludedDomains: z.array(z.string()).optional(),
15
+ maxCharacters: z.int().optional(),
15
16
  maxResults: z.int().optional(),
16
17
  maxTotalResults: z.int().optional(),
17
18
  searchContextSize: SearchQualityLevel$outboundSchema.optional(),
@@ -20,6 +21,7 @@ export const WebSearchConfig$outboundSchema = z.object({
20
21
  return remap$(v, {
21
22
  allowedDomains: "allowed_domains",
22
23
  excludedDomains: "excluded_domains",
24
+ maxCharacters: "max_characters",
23
25
  maxResults: "max_results",
24
26
  maxTotalResults: "max_total_results",
25
27
  searchContextSize: "search_context_size",
@@ -8,6 +8,7 @@ export declare const WebSearchEngine: {
8
8
  readonly Exa: "exa";
9
9
  readonly Firecrawl: "firecrawl";
10
10
  readonly Parallel: "parallel";
11
+ readonly Perplexity: "perplexity";
11
12
  };
12
13
  /**
13
14
  * The search engine to use for web search.
@@ -11,6 +11,7 @@ export const WebSearchEngine = {
11
11
  Exa: "exa",
12
12
  Firecrawl: "firecrawl",
13
13
  Parallel: "parallel",
14
+ Perplexity: "perplexity",
14
15
  };
15
16
  /** @internal */
16
17
  export const WebSearchEngine$outboundSchema = openEnums.outboundSchema(WebSearchEngine);
@@ -1,17 +1,18 @@
1
1
  import * as z from "zod/v4";
2
2
  import { OpenEnum } from "../types/enums.js";
3
3
  /**
4
- * 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.
4
+ * 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).
5
5
  */
6
6
  export declare const WebSearchEngineEnum: {
7
- readonly Auto: "auto";
8
7
  readonly Native: "native";
9
8
  readonly Exa: "exa";
10
9
  readonly Parallel: "parallel";
11
10
  readonly Firecrawl: "firecrawl";
11
+ readonly Perplexity: "perplexity";
12
+ readonly Auto: "auto";
12
13
  };
13
14
  /**
14
- * 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.
15
+ * 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).
15
16
  */
16
17
  export type WebSearchEngineEnum = OpenEnum<typeof WebSearchEngineEnum>;
17
18
  /** @internal */
@@ -4,14 +4,15 @@
4
4
  */
5
5
  import * as openEnums from "../types/enums.js";
6
6
  /**
7
- * 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.
7
+ * 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).
8
8
  */
9
9
  export const WebSearchEngineEnum = {
10
- Auto: "auto",
11
10
  Native: "native",
12
11
  Exa: "exa",
13
12
  Parallel: "parallel",
14
13
  Firecrawl: "firecrawl",
14
+ Perplexity: "perplexity",
15
+ Auto: "auto",
15
16
  };
16
17
  /** @internal */
17
18
  export const WebSearchEngineEnum$inboundSchema = openEnums.inboundSchema(WebSearchEngineEnum);
@@ -10,12 +10,12 @@ import { WebSearchUserLocation, WebSearchUserLocation$Outbound } from "./websear
10
10
  */
11
11
  export type WebSearchServerTool = {
12
12
  /**
13
- * 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.
13
+ * 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).
14
14
  */
15
15
  engine?: WebSearchEngineEnum | undefined;
16
16
  filters?: WebSearchDomainFilter | null | undefined;
17
17
  /**
18
- * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.
18
+ * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search.
19
19
  */
20
20
  maxResults?: number | undefined;
21
21
  /**
@@ -7,19 +7,23 @@ import { WebSearchUserLocationServerTool, WebSearchUserLocationServerTool$Outbou
7
7
  */
8
8
  export type WebSearchServerToolConfig = {
9
9
  /**
10
- * Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, and most native providers (Anthropic, OpenAI, xAI). Not supported with Perplexity. Cannot be used with excluded_domains.
10
+ * Limit search results to these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, and most native providers (Anthropic, OpenAI, xAI). Cannot be used with excluded_domains.
11
11
  */
12
12
  allowedDomains?: Array<string> | undefined;
13
13
  /**
14
- * 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.
14
+ * 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).
15
15
  */
16
16
  engine?: WebSearchEngineEnum | undefined;
17
17
  /**
18
- * Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Anthropic, and xAI. Not supported with OpenAI (silently ignored) or Perplexity. Cannot be used with allowed_domains.
18
+ * Exclude search results from these domains. Supported by Exa, Firecrawl, Parallel, Perplexity, Anthropic, and xAI. Not supported with OpenAI (silently ignored). Cannot be used with allowed_domains.
19
19
  */
20
20
  excludedDomains?: Array<string> | undefined;
21
21
  /**
22
- * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, and Parallel engines; ignored with native provider search.
22
+ * Exact maximum number of characters of content per search result. Applies to the Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, caps highlight content per result. For Parallel, caps excerpt content per result (default 1,500 when omitted). For Perplexity, maps to the native `max_tokens_per_page` parameter (converted from characters to tokens) and trims the response to the exact character cap. When both `max_characters` and `search_context_size` are set, `max_characters` takes precedence. When omitted, falls back to `search_context_size` mapping (Exa) or engine defaults (Parallel, Perplexity).
23
+ */
24
+ maxCharacters?: number | undefined;
25
+ /**
26
+ * Maximum number of search results to return per search call. Defaults to 5. Applies to Exa, Firecrawl, Parallel, and Perplexity engines; ignored with native provider search.
23
27
  */
24
28
  maxResults?: number | undefined;
25
29
  /**
@@ -27,7 +31,7 @@ export type WebSearchServerToolConfig = {
27
31
  */
28
32
  maxTotalResults?: number | undefined;
29
33
  /**
30
- * How much context to retrieve per result. Applies to Exa and Parallel engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size.
34
+ * How much context to retrieve per result. Applies to Exa, Parallel, and Perplexity engines; ignored with native provider search and Firecrawl. For Exa, pins a fixed per-result character cap (low=5,000, medium=15,000, high=30,000); when omitted, Exa picks an adaptive size per query and document (typically ~2,000–4,000 characters per result). For Parallel, controls the total characters across all results; when omitted, Parallel uses its own default size. For Perplexity, maps directly to the Search API's native search_context_size parameter. Overridden by `max_characters` when both are set.
31
35
  */
32
36
  searchContextSize?: SearchQualityLevel | undefined;
33
37
  /**
@@ -40,6 +44,7 @@ export type WebSearchServerToolConfig$Outbound = {
40
44
  allowed_domains?: Array<string> | undefined;
41
45
  engine?: string | undefined;
42
46
  excluded_domains?: Array<string> | undefined;
47
+ max_characters?: number | undefined;
43
48
  max_results?: number | undefined;
44
49
  max_total_results?: number | undefined;
45
50
  search_context_size?: string | undefined;
@@ -12,6 +12,7 @@ export const WebSearchServerToolConfig$outboundSchema = z.object({
12
12
  allowedDomains: z.array(z.string()).optional(),
13
13
  engine: WebSearchEngineEnum$outboundSchema.optional(),
14
14
  excludedDomains: z.array(z.string()).optional(),
15
+ maxCharacters: z.int().optional(),
15
16
  maxResults: z.int().optional(),
16
17
  maxTotalResults: z.int().optional(),
17
18
  searchContextSize: SearchQualityLevel$outboundSchema.optional(),
@@ -20,6 +21,7 @@ export const WebSearchServerToolConfig$outboundSchema = z.object({
20
21
  return remap$(v, {
21
22
  allowedDomains: "allowed_domains",
22
23
  excludedDomains: "excluded_domains",
24
+ maxCharacters: "max_characters",
23
25
  maxResults: "max_results",
24
26
  maxTotalResults: "max_total_results",
25
27
  searchContextSize: "search_context_size",
package/esm/sdk/beta.d.ts CHANGED
@@ -1,6 +1,9 @@
1
1
  import { ClientSDK } from "../lib/sdks.js";
2
+ import { BetaAnalytics } from "./betaanalytics.js";
2
3
  import { Responses } from "./responses.js";
3
4
  export declare class Beta extends ClientSDK {
5
+ private _analytics?;
6
+ get analytics(): BetaAnalytics;
4
7
  private _responses?;
5
8
  get responses(): Responses;
6
9
  }
package/esm/sdk/beta.js CHANGED
@@ -3,8 +3,12 @@
3
3
  * @generated-id: afeac65e28f8
4
4
  */
5
5
  import { ClientSDK } from "../lib/sdks.js";
6
+ import { BetaAnalytics } from "./betaanalytics.js";
6
7
  import { Responses } from "./responses.js";
7
8
  export class Beta extends ClientSDK {
9
+ get analytics() {
10
+ return (this._analytics ?? (this._analytics = new BetaAnalytics(this._options)));
11
+ }
8
12
  get responses() {
9
13
  return (this._responses ?? (this._responses = new Responses(this._options)));
10
14
  }