@mistralai/mistralai 2.0.0-alpha.1 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (383) hide show
  1. package/README.md +51 -37
  2. package/RUNTIMES.md +1 -1
  3. package/esm/extra/structChat.d.ts.map +1 -1
  4. package/esm/extra/structChat.js +72 -5
  5. package/esm/extra/structChat.js.map +1 -1
  6. package/esm/funcs/audioSpeechComplete.d.ts +22 -0
  7. package/esm/funcs/audioSpeechComplete.d.ts.map +1 -0
  8. package/esm/funcs/audioSpeechComplete.js +88 -0
  9. package/esm/funcs/audioSpeechComplete.js.map +1 -0
  10. package/esm/funcs/audioVoicesCreate.d.ts +18 -0
  11. package/esm/funcs/audioVoicesCreate.d.ts.map +1 -0
  12. package/esm/funcs/audioVoicesCreate.js +83 -0
  13. package/esm/funcs/audioVoicesCreate.js.map +1 -0
  14. package/esm/funcs/audioVoicesDelete.d.ts +19 -0
  15. package/esm/funcs/audioVoicesDelete.d.ts.map +1 -0
  16. package/esm/funcs/audioVoicesDelete.js +90 -0
  17. package/esm/funcs/audioVoicesDelete.js.map +1 -0
  18. package/esm/funcs/audioVoicesGet.d.ts +19 -0
  19. package/esm/funcs/audioVoicesGet.d.ts.map +1 -0
  20. package/esm/funcs/audioVoicesGet.js +89 -0
  21. package/esm/funcs/audioVoicesGet.js.map +1 -0
  22. package/esm/funcs/audioVoicesGetSampleAudio.d.ts +18 -0
  23. package/esm/funcs/audioVoicesGetSampleAudio.d.ts.map +1 -0
  24. package/esm/funcs/audioVoicesGetSampleAudio.js +91 -0
  25. package/esm/funcs/audioVoicesGetSampleAudio.js.map +1 -0
  26. package/esm/funcs/audioVoicesList.d.ts +19 -0
  27. package/esm/funcs/audioVoicesList.d.ts.map +1 -0
  28. package/esm/funcs/audioVoicesList.js +89 -0
  29. package/esm/funcs/audioVoicesList.js.map +1 -0
  30. package/esm/funcs/audioVoicesUpdate.d.ts +19 -0
  31. package/esm/funcs/audioVoicesUpdate.d.ts.map +1 -0
  32. package/esm/funcs/audioVoicesUpdate.js +93 -0
  33. package/esm/funcs/audioVoicesUpdate.js.map +1 -0
  34. package/esm/funcs/betaConnectorsGetAuthUrl.d.ts +19 -0
  35. package/esm/funcs/betaConnectorsGetAuthUrl.d.ts.map +1 -0
  36. package/esm/funcs/betaConnectorsGetAuthUrl.js +90 -0
  37. package/esm/funcs/betaConnectorsGetAuthUrl.js.map +1 -0
  38. package/esm/funcs/betaObservabilityJudgesJudgeConversation.d.ts +16 -0
  39. package/esm/funcs/betaObservabilityJudgesJudgeConversation.d.ts.map +1 -0
  40. package/esm/funcs/betaObservabilityJudgesJudgeConversation.js +91 -0
  41. package/esm/funcs/betaObservabilityJudgesJudgeConversation.js.map +1 -0
  42. package/esm/lib/config.d.ts +2 -2
  43. package/esm/lib/config.js +2 -2
  44. package/esm/lib/config.js.map +1 -1
  45. package/esm/models/components/agent.d.ts +28 -5
  46. package/esm/models/components/agent.d.ts.map +1 -1
  47. package/esm/models/components/agent.js +14 -13
  48. package/esm/models/components/agent.js.map +1 -1
  49. package/esm/models/components/agentconversation.d.ts +2 -3
  50. package/esm/models/components/agentconversation.d.ts.map +1 -1
  51. package/esm/models/components/agentconversation.js +2 -1
  52. package/esm/models/components/agentconversation.js.map +1 -1
  53. package/esm/models/components/agentscompletionrequest.d.ts +28 -2
  54. package/esm/models/components/agentscompletionrequest.d.ts.map +1 -1
  55. package/esm/models/components/agentscompletionrequest.js +66 -13
  56. package/esm/models/components/agentscompletionrequest.js.map +1 -1
  57. package/esm/models/components/agentscompletionstreamrequest.d.ts +28 -2
  58. package/esm/models/components/agentscompletionstreamrequest.d.ts.map +1 -1
  59. package/esm/models/components/agentscompletionstreamrequest.js +66 -13
  60. package/esm/models/components/agentscompletionstreamrequest.js.map +1 -1
  61. package/esm/models/components/authurlresponse.d.ts +11 -0
  62. package/esm/models/components/authurlresponse.d.ts.map +1 -0
  63. package/esm/models/components/authurlresponse.js +20 -0
  64. package/esm/models/components/authurlresponse.js.map +1 -0
  65. package/esm/models/components/basefielddefinition.d.ts +4 -4
  66. package/esm/models/components/basefielddefinition.d.ts.map +1 -1
  67. package/esm/models/components/basefielddefinition.js +3 -4
  68. package/esm/models/components/basefielddefinition.js.map +1 -1
  69. package/esm/models/components/basemodelcard.d.ts +6 -0
  70. package/esm/models/components/basemodelcard.d.ts.map +1 -1
  71. package/esm/models/components/basemodelcard.js.map +1 -1
  72. package/esm/models/components/chatcompletionrequest.d.ts +31 -2
  73. package/esm/models/components/chatcompletionrequest.d.ts.map +1 -1
  74. package/esm/models/components/chatcompletionrequest.js +67 -14
  75. package/esm/models/components/chatcompletionrequest.js.map +1 -1
  76. package/esm/models/components/chatcompletionstreamrequest.d.ts +31 -2
  77. package/esm/models/components/chatcompletionstreamrequest.d.ts.map +1 -1
  78. package/esm/models/components/chatcompletionstreamrequest.js +67 -14
  79. package/esm/models/components/chatcompletionstreamrequest.js.map +1 -1
  80. package/esm/models/components/codeinterpretertool.d.ts +11 -2
  81. package/esm/models/components/codeinterpretertool.d.ts.map +1 -1
  82. package/esm/models/components/codeinterpretertool.js +9 -2
  83. package/esm/models/components/codeinterpretertool.js.map +1 -1
  84. package/esm/models/components/completionargs.d.ts +3 -0
  85. package/esm/models/components/completionargs.d.ts.map +1 -1
  86. package/esm/models/components/completionargs.js +5 -0
  87. package/esm/models/components/completionargs.js.map +1 -1
  88. package/esm/models/components/conversationrequest.d.ts +55 -10
  89. package/esm/models/components/conversationrequest.d.ts.map +1 -1
  90. package/esm/models/components/conversationrequest.js +14 -13
  91. package/esm/models/components/conversationrequest.js.map +1 -1
  92. package/esm/models/components/conversationresponse.d.ts +3 -5
  93. package/esm/models/components/conversationresponse.d.ts.map +1 -1
  94. package/esm/models/components/conversationresponse.js +1 -7
  95. package/esm/models/components/conversationresponse.js.map +1 -1
  96. package/esm/models/components/conversationrestartrequest.d.ts +3 -6
  97. package/esm/models/components/conversationrestartrequest.d.ts.map +1 -1
  98. package/esm/models/components/conversationrestartrequest.js +2 -1
  99. package/esm/models/components/conversationrestartrequest.js.map +1 -1
  100. package/esm/models/components/conversationrestartstreamrequest.d.ts +3 -6
  101. package/esm/models/components/conversationrestartstreamrequest.d.ts.map +1 -1
  102. package/esm/models/components/conversationrestartstreamrequest.js +2 -1
  103. package/esm/models/components/conversationrestartstreamrequest.js.map +1 -1
  104. package/esm/models/components/conversationstreamrequest.d.ts +55 -10
  105. package/esm/models/components/conversationstreamrequest.d.ts.map +1 -1
  106. package/esm/models/components/conversationstreamrequest.js +14 -13
  107. package/esm/models/components/conversationstreamrequest.js.map +1 -1
  108. package/esm/models/components/createagentrequest.d.ts +55 -10
  109. package/esm/models/components/createagentrequest.d.ts.map +1 -1
  110. package/esm/models/components/createagentrequest.js +14 -13
  111. package/esm/models/components/createagentrequest.js.map +1 -1
  112. package/esm/models/components/customconnector.d.ts +11 -2
  113. package/esm/models/components/customconnector.d.ts.map +1 -1
  114. package/esm/models/components/customconnector.js +9 -2
  115. package/esm/models/components/customconnector.js.map +1 -1
  116. package/esm/models/components/documentlibrarytool.d.ts +11 -2
  117. package/esm/models/components/documentlibrarytool.d.ts.map +1 -1
  118. package/esm/models/components/documentlibrarytool.js +9 -2
  119. package/esm/models/components/documentlibrarytool.js.map +1 -1
  120. package/esm/models/components/ftmodelcard.d.ts +6 -0
  121. package/esm/models/components/ftmodelcard.d.ts.map +1 -1
  122. package/esm/models/components/ftmodelcard.js.map +1 -1
  123. package/esm/models/components/imagegenerationtool.d.ts +11 -2
  124. package/esm/models/components/imagegenerationtool.d.ts.map +1 -1
  125. package/esm/models/components/imagegenerationtool.js +9 -2
  126. package/esm/models/components/imagegenerationtool.js.map +1 -1
  127. package/esm/models/components/imageurlchunk.d.ts +1 -1
  128. package/esm/models/components/index.d.ts +20 -0
  129. package/esm/models/components/index.d.ts.map +1 -1
  130. package/esm/models/components/index.js +20 -0
  131. package/esm/models/components/index.js.map +1 -1
  132. package/esm/models/components/instructrequest.d.ts +3 -0
  133. package/esm/models/components/instructrequest.d.ts.map +1 -1
  134. package/esm/models/components/instructrequest.js.map +1 -1
  135. package/esm/models/components/internalmetadata.d.ts +42 -0
  136. package/esm/models/components/internalmetadata.d.ts.map +1 -0
  137. package/esm/models/components/internalmetadata.js +56 -0
  138. package/esm/models/components/internalmetadata.js.map +1 -0
  139. package/esm/models/components/judgeconversationrequest.d.ts +22 -0
  140. package/esm/models/components/judgeconversationrequest.d.ts.map +1 -0
  141. package/esm/models/components/judgeconversationrequest.js +14 -0
  142. package/esm/models/components/judgeconversationrequest.js.map +1 -0
  143. package/esm/models/components/messagetokens.d.ts +17 -0
  144. package/esm/models/components/messagetokens.d.ts.map +1 -0
  145. package/esm/models/components/messagetokens.js +25 -0
  146. package/esm/models/components/messagetokens.js.map +1 -0
  147. package/esm/models/components/metadatadict.d.ts +23 -0
  148. package/esm/models/components/metadatadict.d.ts.map +1 -0
  149. package/esm/models/components/metadatadict.js +23 -0
  150. package/esm/models/components/metadatadict.js.map +1 -0
  151. package/esm/models/components/mirrorconfig.d.ts +24 -0
  152. package/esm/models/components/mirrorconfig.d.ts.map +1 -0
  153. package/esm/models/components/mirrorconfig.js +32 -0
  154. package/esm/models/components/mirrorconfig.js.map +1 -0
  155. package/esm/models/components/mirrorsource.d.ts +28 -0
  156. package/esm/models/components/mirrorsource.d.ts.map +1 -0
  157. package/esm/models/components/mirrorsource.js +43 -0
  158. package/esm/models/components/mirrorsource.js.map +1 -0
  159. package/esm/models/components/modelcapabilities.d.ts +9 -0
  160. package/esm/models/components/modelcapabilities.d.ts.map +1 -1
  161. package/esm/models/components/modelcapabilities.js +5 -0
  162. package/esm/models/components/modelcapabilities.js.map +1 -1
  163. package/esm/models/components/modelconversation.d.ts +28 -5
  164. package/esm/models/components/modelconversation.d.ts.map +1 -1
  165. package/esm/models/components/modelconversation.js +14 -13
  166. package/esm/models/components/modelconversation.js.map +1 -1
  167. package/esm/models/components/prompttokensdetails.d.ts +15 -0
  168. package/esm/models/components/prompttokensdetails.d.ts.map +1 -0
  169. package/esm/models/components/prompttokensdetails.js +21 -0
  170. package/esm/models/components/prompttokensdetails.js.map +1 -0
  171. package/esm/models/components/reasoningeffort.d.ts +12 -0
  172. package/esm/models/components/reasoningeffort.d.ts.map +1 -0
  173. package/esm/models/components/reasoningeffort.js +14 -0
  174. package/esm/models/components/reasoningeffort.js.map +1 -0
  175. package/esm/models/components/referencechunk.d.ts +11 -2
  176. package/esm/models/components/referencechunk.d.ts.map +1 -1
  177. package/esm/models/components/referencechunk.js +13 -2
  178. package/esm/models/components/referencechunk.js.map +1 -1
  179. package/esm/models/components/roles.d.ts +12 -0
  180. package/esm/models/components/roles.d.ts.map +1 -0
  181. package/esm/models/components/roles.js +15 -0
  182. package/esm/models/components/roles.js.map +1 -0
  183. package/esm/models/components/speechoutputformat.d.ts +13 -0
  184. package/esm/models/components/speechoutputformat.d.ts.map +1 -0
  185. package/esm/models/components/speechoutputformat.js +15 -0
  186. package/esm/models/components/speechoutputformat.js.map +1 -0
  187. package/esm/models/components/speechrequest.d.ts +37 -0
  188. package/esm/models/components/speechrequest.d.ts.map +1 -0
  189. package/esm/models/components/speechrequest.js +30 -0
  190. package/esm/models/components/speechrequest.js.map +1 -0
  191. package/esm/models/components/speechstreamaudiodelta.d.ts +11 -0
  192. package/esm/models/components/speechstreamaudiodelta.d.ts.map +1 -0
  193. package/esm/models/components/speechstreamaudiodelta.js +20 -0
  194. package/esm/models/components/speechstreamaudiodelta.js.map +1 -0
  195. package/esm/models/components/speechstreamdone.d.ts +12 -0
  196. package/esm/models/components/speechstreamdone.d.ts.map +1 -0
  197. package/esm/models/components/speechstreamdone.js +16 -0
  198. package/esm/models/components/speechstreamdone.js.map +1 -0
  199. package/esm/models/components/speechstreameventtypes.d.ts +10 -0
  200. package/esm/models/components/speechstreameventtypes.d.ts.map +1 -0
  201. package/esm/models/components/speechstreameventtypes.js +12 -0
  202. package/esm/models/components/speechstreameventtypes.js.map +1 -0
  203. package/esm/models/components/updateagentrequest.d.ts +55 -10
  204. package/esm/models/components/updateagentrequest.d.ts.map +1 -1
  205. package/esm/models/components/updateagentrequest.js +14 -13
  206. package/esm/models/components/updateagentrequest.js.map +1 -1
  207. package/esm/models/components/usageinfodollardefs.d.ts +18 -0
  208. package/esm/models/components/usageinfodollardefs.d.ts.map +1 -0
  209. package/esm/models/components/usageinfodollardefs.js +36 -0
  210. package/esm/models/components/usageinfodollardefs.js.map +1 -0
  211. package/esm/models/components/voicecreaterequest.d.ts +39 -0
  212. package/esm/models/components/voicecreaterequest.d.ts.map +1 -0
  213. package/esm/models/components/voicecreaterequest.js +29 -0
  214. package/esm/models/components/voicecreaterequest.js.map +1 -0
  215. package/esm/models/components/voicelistresponse.d.ts +18 -0
  216. package/esm/models/components/voicelistresponse.d.ts.map +1 -0
  217. package/esm/models/components/voicelistresponse.js +25 -0
  218. package/esm/models/components/voicelistresponse.js.map +1 -0
  219. package/esm/models/components/voiceresponse.d.ts +23 -0
  220. package/esm/models/components/voiceresponse.d.ts.map +1 -0
  221. package/esm/models/components/voiceresponse.js +32 -0
  222. package/esm/models/components/voiceresponse.js.map +1 -0
  223. package/esm/models/components/voiceupdaterequest.d.ts +23 -0
  224. package/esm/models/components/voiceupdaterequest.d.ts.map +1 -0
  225. package/esm/models/components/voiceupdaterequest.js +17 -0
  226. package/esm/models/components/voiceupdaterequest.js.map +1 -0
  227. package/esm/models/components/websearchpremiumtool.d.ts +11 -2
  228. package/esm/models/components/websearchpremiumtool.d.ts.map +1 -1
  229. package/esm/models/components/websearchpremiumtool.js +9 -2
  230. package/esm/models/components/websearchpremiumtool.js.map +1 -1
  231. package/esm/models/components/websearchtool.d.ts +11 -2
  232. package/esm/models/components/websearchtool.d.ts.map +1 -1
  233. package/esm/models/components/websearchtool.js +9 -2
  234. package/esm/models/components/websearchtool.js.map +1 -1
  235. package/esm/models/operations/connectorgetauthurlv1.d.ts +14 -0
  236. package/esm/models/operations/connectorgetauthurlv1.d.ts.map +1 -0
  237. package/esm/models/operations/connectorgetauthurlv1.js +20 -0
  238. package/esm/models/operations/connectorgetauthurlv1.js.map +1 -0
  239. package/esm/models/operations/deletevoicev1audiovoicesvoiceiddelete.d.ts +12 -0
  240. package/esm/models/operations/deletevoicev1audiovoicesvoiceiddelete.d.ts.map +1 -0
  241. package/esm/models/operations/deletevoicev1audiovoicesvoiceiddelete.js +18 -0
  242. package/esm/models/operations/deletevoicev1audiovoicesvoiceiddelete.js.map +1 -0
  243. package/esm/models/operations/getvoicesampleaudiov1audiovoicesvoiceidsampleget.d.ts +12 -0
  244. package/esm/models/operations/getvoicesampleaudiov1audiovoicesvoiceidsampleget.d.ts.map +1 -0
  245. package/esm/models/operations/getvoicesampleaudiov1audiovoicesvoiceidsampleget.js +19 -0
  246. package/esm/models/operations/getvoicesampleaudiov1audiovoicesvoiceidsampleget.js.map +1 -0
  247. package/esm/models/operations/getvoicev1audiovoicesvoiceidget.d.ts +12 -0
  248. package/esm/models/operations/getvoicev1audiovoicesvoiceidget.d.ts.map +1 -0
  249. package/esm/models/operations/getvoicev1audiovoicesvoiceidget.js +18 -0
  250. package/esm/models/operations/getvoicev1audiovoicesvoiceidget.js.map +1 -0
  251. package/esm/models/operations/index.d.ts +8 -0
  252. package/esm/models/operations/index.d.ts.map +1 -1
  253. package/esm/models/operations/index.js +8 -0
  254. package/esm/models/operations/index.js.map +1 -1
  255. package/esm/models/operations/judgeconversationv1observabilityjudgesjudgeidlivejudgingpost.d.ts +15 -0
  256. package/esm/models/operations/judgeconversationv1observabilityjudgesjudgeidlivejudgingpost.d.ts.map +1 -0
  257. package/esm/models/operations/judgeconversationv1observabilityjudgesjudgeidlivejudgingpost.js +22 -0
  258. package/esm/models/operations/judgeconversationv1observabilityjudgesjudgeidlivejudgingpost.js.map +1 -0
  259. package/esm/models/operations/listvoicesv1audiovoicesget.d.ts +20 -0
  260. package/esm/models/operations/listvoicesv1audiovoicesget.d.ts.map +1 -0
  261. package/esm/models/operations/listvoicesv1audiovoicesget.js +14 -0
  262. package/esm/models/operations/listvoicesv1audiovoicesget.js.map +1 -0
  263. package/esm/models/operations/speechv1audiospeechpost.d.ts +37 -0
  264. package/esm/models/operations/speechv1audiospeechpost.d.ts.map +1 -0
  265. package/esm/models/operations/speechv1audiospeechpost.js +70 -0
  266. package/esm/models/operations/speechv1audiospeechpost.js.map +1 -0
  267. package/esm/models/operations/updatevoicev1audiovoicesvoiceidpatch.d.ts +15 -0
  268. package/esm/models/operations/updatevoicev1audiovoicesvoiceidpatch.d.ts.map +1 -0
  269. package/esm/models/operations/updatevoicev1audiovoicesvoiceidpatch.js +21 -0
  270. package/esm/models/operations/updatevoicev1audiovoicesvoiceidpatch.js.map +1 -0
  271. package/esm/sdk/audio.d.ts +6 -0
  272. package/esm/sdk/audio.d.ts.map +1 -1
  273. package/esm/sdk/audio.js +10 -0
  274. package/esm/sdk/audio.js.map +1 -1
  275. package/esm/sdk/connectors.d.ts +7 -0
  276. package/esm/sdk/connectors.d.ts.map +1 -1
  277. package/esm/sdk/connectors.js +10 -0
  278. package/esm/sdk/connectors.js.map +1 -1
  279. package/esm/sdk/judges.d.ts +4 -0
  280. package/esm/sdk/judges.d.ts.map +1 -1
  281. package/esm/sdk/judges.js +7 -0
  282. package/esm/sdk/judges.js.map +1 -1
  283. package/esm/sdk/sdk.d.ts +2 -2
  284. package/esm/sdk/sdk.d.ts.map +1 -1
  285. package/esm/sdk/sdk.js +4 -4
  286. package/esm/sdk/sdk.js.map +1 -1
  287. package/esm/sdk/speech.d.ts +14 -0
  288. package/esm/sdk/speech.d.ts.map +1 -0
  289. package/esm/sdk/speech.js +17 -0
  290. package/esm/sdk/speech.js.map +1 -0
  291. package/esm/sdk/voices.d.ts +48 -0
  292. package/esm/sdk/voices.d.ts.map +1 -0
  293. package/esm/sdk/voices.js +69 -0
  294. package/esm/sdk/voices.js.map +1 -0
  295. package/examples/src/gcp/async_chat_no_streaming.ts +2 -2
  296. package/jsr.json +1 -1
  297. package/package.json +8 -3
  298. package/packages/mistralai-gcp/examples/chatComplete.example.ts +3 -3
  299. package/packages/mistralai-gcp/src/core.ts +1 -1
  300. package/packages/mistralai-gcp/src/funcs/chatComplete.ts +7 -7
  301. package/packages/mistralai-gcp/src/funcs/chatStream.ts +7 -7
  302. package/packages/mistralai-gcp/src/funcs/fimComplete.ts +7 -7
  303. package/packages/mistralai-gcp/src/funcs/fimStream.ts +7 -7
  304. package/packages/mistralai-gcp/src/models/errors/httpvalidationerror.ts +2 -2
  305. package/packages/mistralai-gcp/src/models/errors/mistralgoogleclouderror.ts +2 -2
  306. package/packages/mistralai-gcp/src/models/errors/responsevalidationerror.ts +2 -2
  307. package/packages/mistralai-gcp/src/models/errors/sdkerror.ts +2 -2
  308. package/packages/mistralai-gcp/src/sdk/sdk.ts +6 -5
  309. package/src/extra/structChat.ts +71 -5
  310. package/src/funcs/audioSpeechComplete.ts +175 -0
  311. package/src/funcs/audioVoicesCreate.ts +170 -0
  312. package/src/funcs/audioVoicesDelete.ts +179 -0
  313. package/src/funcs/audioVoicesGet.ts +180 -0
  314. package/src/funcs/audioVoicesGetSampleAudio.ts +180 -0
  315. package/src/funcs/audioVoicesList.ts +178 -0
  316. package/src/funcs/audioVoicesUpdate.ts +182 -0
  317. package/src/funcs/betaConnectorsGetAuthUrl.ts +186 -0
  318. package/src/funcs/betaObservabilityJudgesJudgeConversation.ts +188 -0
  319. package/src/lib/config.ts +2 -2
  320. package/src/models/components/agent.ts +51 -26
  321. package/src/models/components/agentconversation.ts +3 -2
  322. package/src/models/components/agentscompletionrequest.ts +201 -15
  323. package/src/models/components/agentscompletionstreamrequest.ts +201 -15
  324. package/src/models/components/authurlresponse.ts +38 -0
  325. package/src/models/components/basefielddefinition.ts +8 -6
  326. package/src/models/components/basemodelcard.ts +6 -0
  327. package/src/models/components/chatcompletionrequest.ts +205 -16
  328. package/src/models/components/chatcompletionstreamrequest.ts +205 -16
  329. package/src/models/components/codeinterpretertool.ts +21 -4
  330. package/src/models/components/completionargs.ts +11 -0
  331. package/src/models/components/conversationrequest.ts +66 -39
  332. package/src/models/components/conversationresponse.ts +2 -20
  333. package/src/models/components/conversationrestartrequest.ts +8 -3
  334. package/src/models/components/conversationrestartstreamrequest.ts +8 -3
  335. package/src/models/components/conversationstreamrequest.ts +66 -39
  336. package/src/models/components/createagentrequest.ts +66 -39
  337. package/src/models/components/customconnector.ts +19 -4
  338. package/src/models/components/documentlibrarytool.ts +21 -4
  339. package/src/models/components/ftmodelcard.ts +6 -0
  340. package/src/models/components/imagegenerationtool.ts +21 -4
  341. package/src/models/components/imageurlchunk.ts +1 -1
  342. package/src/models/components/index.ts +20 -0
  343. package/src/models/components/instructrequest.ts +3 -0
  344. package/src/models/components/internalmetadata.ts +126 -0
  345. package/src/models/components/judgeconversationrequest.ts +34 -0
  346. package/src/models/components/messagetokens.ts +45 -0
  347. package/src/models/components/metadatadict.ts +55 -0
  348. package/src/models/components/mirrorconfig.ts +65 -0
  349. package/src/models/components/mirrorsource.ts +76 -0
  350. package/src/models/components/modelcapabilities.ts +14 -0
  351. package/src/models/components/modelconversation.ts +51 -26
  352. package/src/models/components/prompttokensdetails.ts +42 -0
  353. package/src/models/components/reasoningeffort.ts +25 -0
  354. package/src/models/components/referencechunk.ts +32 -4
  355. package/src/models/components/roles.ts +20 -0
  356. package/src/models/components/speechoutputformat.ts +21 -0
  357. package/src/models/components/speechrequest.ts +74 -0
  358. package/src/models/components/speechstreamaudiodelta.ts +38 -0
  359. package/src/models/components/speechstreamdone.ts +37 -0
  360. package/src/models/components/speechstreameventtypes.ts +20 -0
  361. package/src/models/components/updateagentrequest.ts +66 -39
  362. package/src/models/components/usageinfodollardefs.ts +63 -0
  363. package/src/models/components/voicecreaterequest.ts +74 -0
  364. package/src/models/components/voicelistresponse.ts +49 -0
  365. package/src/models/components/voiceresponse.ts +59 -0
  366. package/src/models/components/voiceupdaterequest.ts +46 -0
  367. package/src/models/components/websearchpremiumtool.ts +21 -4
  368. package/src/models/components/websearchtool.ts +19 -4
  369. package/src/models/operations/connectorgetauthurlv1.ts +42 -0
  370. package/src/models/operations/deletevoicev1audiovoicesvoiceiddelete.ts +40 -0
  371. package/src/models/operations/getvoicesampleaudiov1audiovoicesvoiceidsampleget.ts +39 -0
  372. package/src/models/operations/getvoicev1audiovoicesvoiceidget.ts +39 -0
  373. package/src/models/operations/index.ts +8 -0
  374. package/src/models/operations/judgeconversationv1observabilityjudgesjudgeidlivejudgingpost.ts +49 -0
  375. package/src/models/operations/listvoicesv1audiovoicesget.ts +42 -0
  376. package/src/models/operations/speechv1audiospeechpost.ts +146 -0
  377. package/src/models/operations/updatevoicev1audiovoicesvoiceidpatch.ts +45 -0
  378. package/src/sdk/audio.ts +12 -0
  379. package/src/sdk/connectors.ts +18 -0
  380. package/src/sdk/judges.ts +16 -0
  381. package/src/sdk/sdk.ts +5 -5
  382. package/src/sdk/speech.ts +31 -0
  383. package/src/sdk/voices.ts +119 -0
@@ -11,6 +11,31 @@ import {
11
11
  AssistantMessage$Outbound,
12
12
  AssistantMessage$outboundSchema,
13
13
  } from "./assistantmessage.js";
14
+ import {
15
+ CodeInterpreterTool,
16
+ CodeInterpreterTool$Outbound,
17
+ CodeInterpreterTool$outboundSchema,
18
+ } from "./codeinterpretertool.js";
19
+ import {
20
+ CustomConnector,
21
+ CustomConnector$Outbound,
22
+ CustomConnector$outboundSchema,
23
+ } from "./customconnector.js";
24
+ import {
25
+ DocumentLibraryTool,
26
+ DocumentLibraryTool$Outbound,
27
+ DocumentLibraryTool$outboundSchema,
28
+ } from "./documentlibrarytool.js";
29
+ import {
30
+ GuardrailConfig,
31
+ GuardrailConfig$Outbound,
32
+ GuardrailConfig$outboundSchema,
33
+ } from "./guardrailconfig.js";
34
+ import {
35
+ ImageGenerationTool,
36
+ ImageGenerationTool$Outbound,
37
+ ImageGenerationTool$outboundSchema,
38
+ } from "./imagegenerationtool.js";
14
39
  import {
15
40
  MistralPromptMode,
16
41
  MistralPromptMode$outboundSchema,
@@ -20,6 +45,10 @@ import {
20
45
  Prediction$Outbound,
21
46
  Prediction$outboundSchema,
22
47
  } from "./prediction.js";
48
+ import {
49
+ ReasoningEffort,
50
+ ReasoningEffort$outboundSchema,
51
+ } from "./reasoningeffort.js";
23
52
  import {
24
53
  ResponseFormat,
25
54
  ResponseFormat$Outbound,
@@ -50,6 +79,16 @@ import {
50
79
  UserMessage$Outbound,
51
80
  UserMessage$outboundSchema,
52
81
  } from "./usermessage.js";
82
+ import {
83
+ WebSearchPremiumTool,
84
+ WebSearchPremiumTool$Outbound,
85
+ WebSearchPremiumTool$outboundSchema,
86
+ } from "./websearchpremiumtool.js";
87
+ import {
88
+ WebSearchTool,
89
+ WebSearchTool$Outbound,
90
+ WebSearchTool$outboundSchema,
91
+ } from "./websearchtool.js";
53
92
 
54
93
  /**
55
94
  * Stop generation if this token is detected. Or if one of these tokens is detected when providing an array
@@ -62,6 +101,30 @@ export type ChatCompletionRequestMessage =
62
101
  | ToolMessage
63
102
  | UserMessage;
64
103
 
104
+ export type ChatCompletionRequestTools1 =
105
+ | DocumentLibraryTool
106
+ | CustomConnector
107
+ | Tool
108
+ | WebSearchTool
109
+ | WebSearchPremiumTool
110
+ | CodeInterpreterTool
111
+ | ImageGenerationTool;
112
+
113
+ /**
114
+ * A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
115
+ */
116
+ export type ChatCompletionRequestTools2 =
117
+ | Array<
118
+ | DocumentLibraryTool
119
+ | CustomConnector
120
+ | Tool
121
+ | WebSearchTool
122
+ | WebSearchPremiumTool
123
+ | CodeInterpreterTool
124
+ | ImageGenerationTool
125
+ >
126
+ | Array<string>;
127
+
65
128
  /**
66
129
  * Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
67
130
  */
@@ -113,7 +176,19 @@ export type ChatCompletionRequest = {
113
176
  /**
114
177
  * A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
115
178
  */
116
- tools?: Array<Tool> | null | undefined;
179
+ tools?:
180
+ | Array<
181
+ | DocumentLibraryTool
182
+ | CustomConnector
183
+ | Tool
184
+ | WebSearchTool
185
+ | WebSearchPremiumTool
186
+ | CodeInterpreterTool
187
+ | ImageGenerationTool
188
+ >
189
+ | Array<string>
190
+ | null
191
+ | undefined;
117
192
  /**
118
193
  * Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
119
194
  */
@@ -138,14 +213,17 @@ export type ChatCompletionRequest = {
138
213
  * Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.
139
214
  */
140
215
  parallelToolCalls?: boolean | undefined;
216
+ reasoningEffort?: ReasoningEffort | null | undefined;
141
217
  /**
142
218
  * Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
143
219
  */
144
220
  promptMode?: MistralPromptMode | null | undefined;
221
+ guardrails?: Array<GuardrailConfig> | null | undefined;
145
222
  /**
146
223
  * Whether to inject a safety prompt before all conversations.
147
224
  */
148
225
  safePrompt?: boolean | undefined;
226
+ [additionalProperties: string]: unknown;
149
227
  };
150
228
 
151
229
  /** @internal */
@@ -195,6 +273,82 @@ export function chatCompletionRequestMessageToJSON(
195
273
  );
196
274
  }
197
275
 
276
+ /** @internal */
277
+ export type ChatCompletionRequestTools1$Outbound =
278
+ | DocumentLibraryTool$Outbound
279
+ | CustomConnector$Outbound
280
+ | Tool$Outbound
281
+ | WebSearchTool$Outbound
282
+ | WebSearchPremiumTool$Outbound
283
+ | CodeInterpreterTool$Outbound
284
+ | ImageGenerationTool$Outbound;
285
+
286
+ /** @internal */
287
+ export const ChatCompletionRequestTools1$outboundSchema: z.ZodType<
288
+ ChatCompletionRequestTools1$Outbound,
289
+ ChatCompletionRequestTools1
290
+ > = smartUnion([
291
+ DocumentLibraryTool$outboundSchema,
292
+ CustomConnector$outboundSchema,
293
+ Tool$outboundSchema,
294
+ WebSearchTool$outboundSchema,
295
+ WebSearchPremiumTool$outboundSchema,
296
+ CodeInterpreterTool$outboundSchema,
297
+ ImageGenerationTool$outboundSchema,
298
+ ]);
299
+
300
+ export function chatCompletionRequestTools1ToJSON(
301
+ chatCompletionRequestTools1: ChatCompletionRequestTools1,
302
+ ): string {
303
+ return JSON.stringify(
304
+ ChatCompletionRequestTools1$outboundSchema.parse(
305
+ chatCompletionRequestTools1,
306
+ ),
307
+ );
308
+ }
309
+
310
+ /** @internal */
311
+ export type ChatCompletionRequestTools2$Outbound =
312
+ | Array<
313
+ | DocumentLibraryTool$Outbound
314
+ | CustomConnector$Outbound
315
+ | Tool$Outbound
316
+ | WebSearchTool$Outbound
317
+ | WebSearchPremiumTool$Outbound
318
+ | CodeInterpreterTool$Outbound
319
+ | ImageGenerationTool$Outbound
320
+ >
321
+ | Array<string>;
322
+
323
+ /** @internal */
324
+ export const ChatCompletionRequestTools2$outboundSchema: z.ZodType<
325
+ ChatCompletionRequestTools2$Outbound,
326
+ ChatCompletionRequestTools2
327
+ > = smartUnion([
328
+ z.array(
329
+ smartUnion([
330
+ DocumentLibraryTool$outboundSchema,
331
+ CustomConnector$outboundSchema,
332
+ Tool$outboundSchema,
333
+ WebSearchTool$outboundSchema,
334
+ WebSearchPremiumTool$outboundSchema,
335
+ CodeInterpreterTool$outboundSchema,
336
+ ImageGenerationTool$outboundSchema,
337
+ ]),
338
+ ),
339
+ z.array(z.string()),
340
+ ]);
341
+
342
+ export function chatCompletionRequestTools2ToJSON(
343
+ chatCompletionRequestTools2: ChatCompletionRequestTools2,
344
+ ): string {
345
+ return JSON.stringify(
346
+ ChatCompletionRequestTools2$outboundSchema.parse(
347
+ chatCompletionRequestTools2,
348
+ ),
349
+ );
350
+ }
351
+
198
352
  /** @internal */
199
353
  export type ChatCompletionRequestToolChoice$Outbound =
200
354
  | ToolChoice$Outbound
@@ -233,15 +387,30 @@ export type ChatCompletionRequest$Outbound = {
233
387
  | UserMessage$Outbound
234
388
  >;
235
389
  response_format?: ResponseFormat$Outbound | undefined;
236
- tools?: Array<Tool$Outbound> | null | undefined;
390
+ tools?:
391
+ | Array<
392
+ | DocumentLibraryTool$Outbound
393
+ | CustomConnector$Outbound
394
+ | Tool$Outbound
395
+ | WebSearchTool$Outbound
396
+ | WebSearchPremiumTool$Outbound
397
+ | CodeInterpreterTool$Outbound
398
+ | ImageGenerationTool$Outbound
399
+ >
400
+ | Array<string>
401
+ | null
402
+ | undefined;
237
403
  tool_choice?: ToolChoice$Outbound | string | undefined;
238
404
  presence_penalty?: number | undefined;
239
405
  frequency_penalty?: number | undefined;
240
406
  n?: number | null | undefined;
241
407
  prediction?: Prediction$Outbound | undefined;
242
408
  parallel_tool_calls?: boolean | undefined;
409
+ reasoning_effort?: string | null | undefined;
243
410
  prompt_mode?: string | null | undefined;
411
+ guardrails?: Array<GuardrailConfig$Outbound> | null | undefined;
244
412
  safe_prompt?: boolean | undefined;
413
+ [additionalProperties: string]: unknown;
245
414
  };
246
415
 
247
416
  /** @internal */
@@ -268,7 +437,22 @@ export const ChatCompletionRequest$outboundSchema: z.ZodType<
268
437
  ]),
269
438
  ),
270
439
  responseFormat: ResponseFormat$outboundSchema.optional(),
271
- tools: z.nullable(z.array(Tool$outboundSchema)).optional(),
440
+ tools: z.nullable(
441
+ smartUnion([
442
+ z.array(
443
+ smartUnion([
444
+ DocumentLibraryTool$outboundSchema,
445
+ CustomConnector$outboundSchema,
446
+ Tool$outboundSchema,
447
+ WebSearchTool$outboundSchema,
448
+ WebSearchPremiumTool$outboundSchema,
449
+ CodeInterpreterTool$outboundSchema,
450
+ ImageGenerationTool$outboundSchema,
451
+ ]),
452
+ ),
453
+ z.array(z.string()),
454
+ ]),
455
+ ).optional(),
272
456
  toolChoice: smartUnion([
273
457
  ToolChoice$outboundSchema,
274
458
  ToolChoiceEnum$outboundSchema,
@@ -278,21 +462,26 @@ export const ChatCompletionRequest$outboundSchema: z.ZodType<
278
462
  n: z.nullable(z.int()).optional(),
279
463
  prediction: Prediction$outboundSchema.optional(),
280
464
  parallelToolCalls: z.boolean().optional(),
465
+ reasoningEffort: z.nullable(ReasoningEffort$outboundSchema).optional(),
281
466
  promptMode: z.nullable(MistralPromptMode$outboundSchema).optional(),
467
+ guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
282
468
  safePrompt: z.boolean().optional(),
283
- }).transform((v) => {
284
- return remap$(v, {
285
- topP: "top_p",
286
- maxTokens: "max_tokens",
287
- randomSeed: "random_seed",
288
- responseFormat: "response_format",
289
- toolChoice: "tool_choice",
290
- presencePenalty: "presence_penalty",
291
- frequencyPenalty: "frequency_penalty",
292
- parallelToolCalls: "parallel_tool_calls",
293
- promptMode: "prompt_mode",
294
- safePrompt: "safe_prompt",
295
- });
469
+ }).catchall(z.any()).transform((v) => {
470
+ return {
471
+ ...remap$(v, {
472
+ topP: "top_p",
473
+ maxTokens: "max_tokens",
474
+ randomSeed: "random_seed",
475
+ responseFormat: "response_format",
476
+ toolChoice: "tool_choice",
477
+ presencePenalty: "presence_penalty",
478
+ frequencyPenalty: "frequency_penalty",
479
+ parallelToolCalls: "parallel_tool_calls",
480
+ reasoningEffort: "reasoning_effort",
481
+ promptMode: "prompt_mode",
482
+ safePrompt: "safe_prompt",
483
+ }),
484
+ };
296
485
  });
297
486
 
298
487
  export function chatCompletionRequestToJSON(
@@ -11,6 +11,31 @@ import {
11
11
  AssistantMessage$Outbound,
12
12
  AssistantMessage$outboundSchema,
13
13
  } from "./assistantmessage.js";
14
+ import {
15
+ CodeInterpreterTool,
16
+ CodeInterpreterTool$Outbound,
17
+ CodeInterpreterTool$outboundSchema,
18
+ } from "./codeinterpretertool.js";
19
+ import {
20
+ CustomConnector,
21
+ CustomConnector$Outbound,
22
+ CustomConnector$outboundSchema,
23
+ } from "./customconnector.js";
24
+ import {
25
+ DocumentLibraryTool,
26
+ DocumentLibraryTool$Outbound,
27
+ DocumentLibraryTool$outboundSchema,
28
+ } from "./documentlibrarytool.js";
29
+ import {
30
+ GuardrailConfig,
31
+ GuardrailConfig$Outbound,
32
+ GuardrailConfig$outboundSchema,
33
+ } from "./guardrailconfig.js";
34
+ import {
35
+ ImageGenerationTool,
36
+ ImageGenerationTool$Outbound,
37
+ ImageGenerationTool$outboundSchema,
38
+ } from "./imagegenerationtool.js";
14
39
  import {
15
40
  MistralPromptMode,
16
41
  MistralPromptMode$outboundSchema,
@@ -20,6 +45,10 @@ import {
20
45
  Prediction$Outbound,
21
46
  Prediction$outboundSchema,
22
47
  } from "./prediction.js";
48
+ import {
49
+ ReasoningEffort,
50
+ ReasoningEffort$outboundSchema,
51
+ } from "./reasoningeffort.js";
23
52
  import {
24
53
  ResponseFormat,
25
54
  ResponseFormat$Outbound,
@@ -50,6 +79,16 @@ import {
50
79
  UserMessage$Outbound,
51
80
  UserMessage$outboundSchema,
52
81
  } from "./usermessage.js";
82
+ import {
83
+ WebSearchPremiumTool,
84
+ WebSearchPremiumTool$Outbound,
85
+ WebSearchPremiumTool$outboundSchema,
86
+ } from "./websearchpremiumtool.js";
87
+ import {
88
+ WebSearchTool,
89
+ WebSearchTool$Outbound,
90
+ WebSearchTool$outboundSchema,
91
+ } from "./websearchtool.js";
53
92
 
54
93
  /**
55
94
  * Stop generation if this token is detected. Or if one of these tokens is detected when providing an array
@@ -62,6 +101,30 @@ export type ChatCompletionStreamRequestMessage =
62
101
  | ToolMessage
63
102
  | UserMessage;
64
103
 
104
+ export type ChatCompletionStreamRequestTools1 =
105
+ | DocumentLibraryTool
106
+ | CustomConnector
107
+ | Tool
108
+ | WebSearchTool
109
+ | WebSearchPremiumTool
110
+ | CodeInterpreterTool
111
+ | ImageGenerationTool;
112
+
113
+ /**
114
+ * A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
115
+ */
116
+ export type ChatCompletionStreamRequestTools2 =
117
+ | Array<
118
+ | DocumentLibraryTool
119
+ | CustomConnector
120
+ | Tool
121
+ | WebSearchTool
122
+ | WebSearchPremiumTool
123
+ | CodeInterpreterTool
124
+ | ImageGenerationTool
125
+ >
126
+ | Array<string>;
127
+
65
128
  /**
66
129
  * Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
67
130
  */
@@ -110,7 +173,19 @@ export type ChatCompletionStreamRequest = {
110
173
  /**
111
174
  * A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
112
175
  */
113
- tools?: Array<Tool> | null | undefined;
176
+ tools?:
177
+ | Array<
178
+ | DocumentLibraryTool
179
+ | CustomConnector
180
+ | Tool
181
+ | WebSearchTool
182
+ | WebSearchPremiumTool
183
+ | CodeInterpreterTool
184
+ | ImageGenerationTool
185
+ >
186
+ | Array<string>
187
+ | null
188
+ | undefined;
114
189
  /**
115
190
  * Controls which (if any) tool is called by the model. `none` means the model will not call any tool and instead generates a message. `auto` means the model can pick between generating a message or calling one or more tools. `any` or `required` means the model must call one or more tools. Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
116
191
  */
@@ -135,14 +210,17 @@ export type ChatCompletionStreamRequest = {
135
210
  * Whether to enable parallel function calling during tool use, when enabled the model can call multiple tools in parallel.
136
211
  */
137
212
  parallelToolCalls?: boolean | undefined;
213
+ reasoningEffort?: ReasoningEffort | null | undefined;
138
214
  /**
139
215
  * Allows toggling between the reasoning mode and no system prompt. When set to `reasoning` the system prompt for reasoning models will be used.
140
216
  */
141
217
  promptMode?: MistralPromptMode | null | undefined;
218
+ guardrails?: Array<GuardrailConfig> | null | undefined;
142
219
  /**
143
220
  * Whether to inject a safety prompt before all conversations.
144
221
  */
145
222
  safePrompt?: boolean | undefined;
223
+ [additionalProperties: string]: unknown;
146
224
  };
147
225
 
148
226
  /** @internal */
@@ -194,6 +272,82 @@ export function chatCompletionStreamRequestMessageToJSON(
194
272
  );
195
273
  }
196
274
 
275
+ /** @internal */
276
+ export type ChatCompletionStreamRequestTools1$Outbound =
277
+ | DocumentLibraryTool$Outbound
278
+ | CustomConnector$Outbound
279
+ | Tool$Outbound
280
+ | WebSearchTool$Outbound
281
+ | WebSearchPremiumTool$Outbound
282
+ | CodeInterpreterTool$Outbound
283
+ | ImageGenerationTool$Outbound;
284
+
285
+ /** @internal */
286
+ export const ChatCompletionStreamRequestTools1$outboundSchema: z.ZodType<
287
+ ChatCompletionStreamRequestTools1$Outbound,
288
+ ChatCompletionStreamRequestTools1
289
+ > = smartUnion([
290
+ DocumentLibraryTool$outboundSchema,
291
+ CustomConnector$outboundSchema,
292
+ Tool$outboundSchema,
293
+ WebSearchTool$outboundSchema,
294
+ WebSearchPremiumTool$outboundSchema,
295
+ CodeInterpreterTool$outboundSchema,
296
+ ImageGenerationTool$outboundSchema,
297
+ ]);
298
+
299
+ export function chatCompletionStreamRequestTools1ToJSON(
300
+ chatCompletionStreamRequestTools1: ChatCompletionStreamRequestTools1,
301
+ ): string {
302
+ return JSON.stringify(
303
+ ChatCompletionStreamRequestTools1$outboundSchema.parse(
304
+ chatCompletionStreamRequestTools1,
305
+ ),
306
+ );
307
+ }
308
+
309
+ /** @internal */
310
+ export type ChatCompletionStreamRequestTools2$Outbound =
311
+ | Array<
312
+ | DocumentLibraryTool$Outbound
313
+ | CustomConnector$Outbound
314
+ | Tool$Outbound
315
+ | WebSearchTool$Outbound
316
+ | WebSearchPremiumTool$Outbound
317
+ | CodeInterpreterTool$Outbound
318
+ | ImageGenerationTool$Outbound
319
+ >
320
+ | Array<string>;
321
+
322
+ /** @internal */
323
+ export const ChatCompletionStreamRequestTools2$outboundSchema: z.ZodType<
324
+ ChatCompletionStreamRequestTools2$Outbound,
325
+ ChatCompletionStreamRequestTools2
326
+ > = smartUnion([
327
+ z.array(
328
+ smartUnion([
329
+ DocumentLibraryTool$outboundSchema,
330
+ CustomConnector$outboundSchema,
331
+ Tool$outboundSchema,
332
+ WebSearchTool$outboundSchema,
333
+ WebSearchPremiumTool$outboundSchema,
334
+ CodeInterpreterTool$outboundSchema,
335
+ ImageGenerationTool$outboundSchema,
336
+ ]),
337
+ ),
338
+ z.array(z.string()),
339
+ ]);
340
+
341
+ export function chatCompletionStreamRequestTools2ToJSON(
342
+ chatCompletionStreamRequestTools2: ChatCompletionStreamRequestTools2,
343
+ ): string {
344
+ return JSON.stringify(
345
+ ChatCompletionStreamRequestTools2$outboundSchema.parse(
346
+ chatCompletionStreamRequestTools2,
347
+ ),
348
+ );
349
+ }
350
+
197
351
  /** @internal */
198
352
  export type ChatCompletionStreamRequestToolChoice$Outbound =
199
353
  | ToolChoice$Outbound
@@ -232,15 +386,30 @@ export type ChatCompletionStreamRequest$Outbound = {
232
386
  | UserMessage$Outbound
233
387
  >;
234
388
  response_format?: ResponseFormat$Outbound | undefined;
235
- tools?: Array<Tool$Outbound> | null | undefined;
389
+ tools?:
390
+ | Array<
391
+ | DocumentLibraryTool$Outbound
392
+ | CustomConnector$Outbound
393
+ | Tool$Outbound
394
+ | WebSearchTool$Outbound
395
+ | WebSearchPremiumTool$Outbound
396
+ | CodeInterpreterTool$Outbound
397
+ | ImageGenerationTool$Outbound
398
+ >
399
+ | Array<string>
400
+ | null
401
+ | undefined;
236
402
  tool_choice?: ToolChoice$Outbound | string | undefined;
237
403
  presence_penalty?: number | undefined;
238
404
  frequency_penalty?: number | undefined;
239
405
  n?: number | null | undefined;
240
406
  prediction?: Prediction$Outbound | undefined;
241
407
  parallel_tool_calls?: boolean | undefined;
408
+ reasoning_effort?: string | null | undefined;
242
409
  prompt_mode?: string | null | undefined;
410
+ guardrails?: Array<GuardrailConfig$Outbound> | null | undefined;
243
411
  safe_prompt?: boolean | undefined;
412
+ [additionalProperties: string]: unknown;
244
413
  };
245
414
 
246
415
  /** @internal */
@@ -267,7 +436,22 @@ export const ChatCompletionStreamRequest$outboundSchema: z.ZodType<
267
436
  ]),
268
437
  ),
269
438
  responseFormat: ResponseFormat$outboundSchema.optional(),
270
- tools: z.nullable(z.array(Tool$outboundSchema)).optional(),
439
+ tools: z.nullable(
440
+ smartUnion([
441
+ z.array(
442
+ smartUnion([
443
+ DocumentLibraryTool$outboundSchema,
444
+ CustomConnector$outboundSchema,
445
+ Tool$outboundSchema,
446
+ WebSearchTool$outboundSchema,
447
+ WebSearchPremiumTool$outboundSchema,
448
+ CodeInterpreterTool$outboundSchema,
449
+ ImageGenerationTool$outboundSchema,
450
+ ]),
451
+ ),
452
+ z.array(z.string()),
453
+ ]),
454
+ ).optional(),
271
455
  toolChoice: smartUnion([
272
456
  ToolChoice$outboundSchema,
273
457
  ToolChoiceEnum$outboundSchema,
@@ -277,21 +461,26 @@ export const ChatCompletionStreamRequest$outboundSchema: z.ZodType<
277
461
  n: z.nullable(z.int()).optional(),
278
462
  prediction: Prediction$outboundSchema.optional(),
279
463
  parallelToolCalls: z.boolean().optional(),
464
+ reasoningEffort: z.nullable(ReasoningEffort$outboundSchema).optional(),
280
465
  promptMode: z.nullable(MistralPromptMode$outboundSchema).optional(),
466
+ guardrails: z.nullable(z.array(GuardrailConfig$outboundSchema)).optional(),
281
467
  safePrompt: z.boolean().optional(),
282
- }).transform((v) => {
283
- return remap$(v, {
284
- topP: "top_p",
285
- maxTokens: "max_tokens",
286
- randomSeed: "random_seed",
287
- responseFormat: "response_format",
288
- toolChoice: "tool_choice",
289
- presencePenalty: "presence_penalty",
290
- frequencyPenalty: "frequency_penalty",
291
- parallelToolCalls: "parallel_tool_calls",
292
- promptMode: "prompt_mode",
293
- safePrompt: "safe_prompt",
294
- });
468
+ }).catchall(z.any()).transform((v) => {
469
+ return {
470
+ ...remap$(v, {
471
+ topP: "top_p",
472
+ maxTokens: "max_tokens",
473
+ randomSeed: "random_seed",
474
+ responseFormat: "response_format",
475
+ toolChoice: "tool_choice",
476
+ presencePenalty: "presence_penalty",
477
+ frequencyPenalty: "frequency_penalty",
478
+ parallelToolCalls: "parallel_tool_calls",
479
+ reasoningEffort: "reasoning_effort",
480
+ promptMode: "prompt_mode",
481
+ safePrompt: "safe_prompt",
482
+ }),
483
+ };
295
484
  });
296
485
 
297
486
  export function chatCompletionStreamRequestToJSON(
@@ -6,6 +6,7 @@
6
6
  import * as z from "zod/v4";
7
7
  import { remap as remap$ } from "../../lib/primitives.js";
8
8
  import { safeParse } from "../../lib/schemas.js";
9
+ import { ClosedEnum } from "../../types/enums.js";
9
10
  import { Result as SafeParseResult } from "../../types/fp.js";
10
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
12
  import {
@@ -15,18 +16,34 @@ import {
15
16
  ToolConfiguration$outboundSchema,
16
17
  } from "./toolconfiguration.js";
17
18
 
19
+ export const CodeInterpreterToolType = {
20
+ CodeInterpreter: "code_interpreter",
21
+ } as const;
22
+ export type CodeInterpreterToolType = ClosedEnum<
23
+ typeof CodeInterpreterToolType
24
+ >;
25
+
18
26
  export type CodeInterpreterTool = {
19
27
  toolConfiguration?: ToolConfiguration | null | undefined;
20
- type: "code_interpreter";
28
+ type?: CodeInterpreterToolType | undefined;
21
29
  };
22
30
 
31
+ /** @internal */
32
+ export const CodeInterpreterToolType$inboundSchema: z.ZodEnum<
33
+ typeof CodeInterpreterToolType
34
+ > = z.enum(CodeInterpreterToolType);
35
+ /** @internal */
36
+ export const CodeInterpreterToolType$outboundSchema: z.ZodEnum<
37
+ typeof CodeInterpreterToolType
38
+ > = CodeInterpreterToolType$inboundSchema;
39
+
23
40
  /** @internal */
24
41
  export const CodeInterpreterTool$inboundSchema: z.ZodType<
25
42
  CodeInterpreterTool,
26
43
  unknown
27
44
  > = z.object({
28
45
  tool_configuration: z.nullable(ToolConfiguration$inboundSchema).optional(),
29
- type: z.literal("code_interpreter"),
46
+ type: CodeInterpreterToolType$inboundSchema.default("code_interpreter"),
30
47
  }).transform((v) => {
31
48
  return remap$(v, {
32
49
  "tool_configuration": "toolConfiguration",
@@ -35,7 +52,7 @@ export const CodeInterpreterTool$inboundSchema: z.ZodType<
35
52
  /** @internal */
36
53
  export type CodeInterpreterTool$Outbound = {
37
54
  tool_configuration?: ToolConfiguration$Outbound | null | undefined;
38
- type: "code_interpreter";
55
+ type: string;
39
56
  };
40
57
 
41
58
  /** @internal */
@@ -44,7 +61,7 @@ export const CodeInterpreterTool$outboundSchema: z.ZodType<
44
61
  CodeInterpreterTool
45
62
  > = z.object({
46
63
  toolConfiguration: z.nullable(ToolConfiguration$outboundSchema).optional(),
47
- type: z.literal("code_interpreter"),
64
+ type: CodeInterpreterToolType$outboundSchema.default("code_interpreter"),
48
65
  }).transform((v) => {
49
66
  return remap$(v, {
50
67
  toolConfiguration: "tool_configuration",