@orq-ai/node 4.4.2 → 4.5.0-rc.1

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 (456) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +3 -3
  3. package/lib/config.js +3 -3
  4. package/lib/config.js.map +1 -1
  5. package/lib/event-streams.d.ts +3 -3
  6. package/lib/event-streams.d.ts.map +1 -1
  7. package/models/components/partdoneevent.js +1 -1
  8. package/models/components/reasoningpart.js +1 -1
  9. package/models/operations/createcontact.js +1 -1
  10. package/models/operations/createdataset.js +1 -1
  11. package/models/operations/createdatasetitem.js +4 -4
  12. package/models/operations/createdatasource.js +1 -1
  13. package/models/operations/createeval.js +16 -16
  14. package/models/operations/createidentity.js +1 -1
  15. package/models/operations/createtool.js +6 -6
  16. package/models/operations/fileget.js +1 -1
  17. package/models/operations/filelist.js +1 -1
  18. package/models/operations/fileupload.js +1 -1
  19. package/models/operations/getalltools.js +6 -6
  20. package/models/operations/getevals.js +16 -16
  21. package/models/operations/listdatasetdatapoints.js +4 -4
  22. package/models/operations/listdatasets.js +1 -1
  23. package/models/operations/listdatasources.js +1 -1
  24. package/models/operations/listidentities.js +1 -1
  25. package/models/operations/retrievedatapoint.js +4 -4
  26. package/models/operations/retrievedataset.js +1 -1
  27. package/models/operations/retrievedatasource.js +1 -1
  28. package/models/operations/retrieveidentity.js +1 -1
  29. package/models/operations/retrievetool.js +6 -6
  30. package/models/operations/runagent.js +1 -1
  31. package/models/operations/streamrunagent.js +1 -1
  32. package/models/operations/updatedatapoint.js +4 -4
  33. package/models/operations/updatedataset.js +1 -1
  34. package/models/operations/updatedatasource.js +1 -1
  35. package/models/operations/updateeval.js +16 -16
  36. package/models/operations/updateidentity.js +1 -1
  37. package/models/operations/updatetool.js +7 -7
  38. package/package.json +4 -3
  39. package/src/lib/config.ts +3 -3
  40. package/src/lib/event-streams.ts +3 -3
  41. package/src/models/components/partdoneevent.ts +1 -1
  42. package/src/models/components/reasoningpart.ts +1 -1
  43. package/src/models/operations/createcontact.ts +1 -1
  44. package/src/models/operations/createdataset.ts +1 -1
  45. package/src/models/operations/createdatasetitem.ts +4 -4
  46. package/src/models/operations/createdatasource.ts +1 -1
  47. package/src/models/operations/createeval.ts +16 -16
  48. package/src/models/operations/createidentity.ts +1 -1
  49. package/src/models/operations/createtool.ts +6 -6
  50. package/src/models/operations/fileget.ts +1 -1
  51. package/src/models/operations/filelist.ts +1 -1
  52. package/src/models/operations/fileupload.ts +1 -1
  53. package/src/models/operations/getalltools.ts +6 -6
  54. package/src/models/operations/getevals.ts +16 -16
  55. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  56. package/src/models/operations/listdatasets.ts +1 -1
  57. package/src/models/operations/listdatasources.ts +1 -1
  58. package/src/models/operations/listidentities.ts +1 -1
  59. package/src/models/operations/retrievedatapoint.ts +4 -4
  60. package/src/models/operations/retrievedataset.ts +1 -1
  61. package/src/models/operations/retrievedatasource.ts +1 -1
  62. package/src/models/operations/retrieveidentity.ts +1 -1
  63. package/src/models/operations/retrievetool.ts +6 -6
  64. package/src/models/operations/runagent.ts +1 -1
  65. package/src/models/operations/streamrunagent.ts +1 -1
  66. package/src/models/operations/updatedatapoint.ts +4 -4
  67. package/src/models/operations/updatedataset.ts +1 -1
  68. package/src/models/operations/updatedatasource.ts +1 -1
  69. package/src/models/operations/updateeval.ts +16 -16
  70. package/src/models/operations/updateidentity.ts +1 -1
  71. package/src/models/operations/updatetool.ts +7 -7
  72. package/_speakeasy/.github/action-inputs-config.json +0 -53
  73. package/_speakeasy/.github/action-security-config.json +0 -88
  74. package/examples/package-lock.json +0 -613
  75. package/examples/package.json +0 -18
  76. package/packages/orq-rc/examples/contactsCreate.example.ts +0 -42
  77. package/packages/orq-rc/examples/package-lock.json +0 -610
  78. package/packages/orq-rc/examples/package.json +0 -18
  79. package/packages/orq-rc/jsr.json +0 -28
  80. package/packages/orq-rc/package-lock.json +0 -1740
  81. package/packages/orq-rc/package.json +0 -30
  82. package/packages/orq-rc/src/core.ts +0 -13
  83. package/packages/orq-rc/src/funcs/agentsCreate.ts +0 -161
  84. package/packages/orq-rc/src/funcs/agentsDelete.ts +0 -180
  85. package/packages/orq-rc/src/funcs/agentsInvoke.ts +0 -177
  86. package/packages/orq-rc/src/funcs/agentsList.ts +0 -179
  87. package/packages/orq-rc/src/funcs/agentsResponsesCreate.ts +0 -183
  88. package/packages/orq-rc/src/funcs/agentsRetrieve.ts +0 -180
  89. package/packages/orq-rc/src/funcs/agentsRun.ts +0 -162
  90. package/packages/orq-rc/src/funcs/agentsStream.ts +0 -201
  91. package/packages/orq-rc/src/funcs/agentsStreamRun.ts +0 -186
  92. package/packages/orq-rc/src/funcs/agentsUpdate.ts +0 -184
  93. package/packages/orq-rc/src/funcs/annotationsCreate.ts +0 -171
  94. package/packages/orq-rc/src/funcs/annotationsDelete.ts +0 -171
  95. package/packages/orq-rc/src/funcs/chunkingParse.ts +0 -160
  96. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -160
  97. package/packages/orq-rc/src/funcs/datasetsClear.ts +0 -167
  98. package/packages/orq-rc/src/funcs/datasetsCreate.ts +0 -165
  99. package/packages/orq-rc/src/funcs/datasetsCreateDatapoint.ts +0 -171
  100. package/packages/orq-rc/src/funcs/datasetsDelete.ts +0 -167
  101. package/packages/orq-rc/src/funcs/datasetsDeleteDatapoint.ts +0 -182
  102. package/packages/orq-rc/src/funcs/datasetsList.ts +0 -167
  103. package/packages/orq-rc/src/funcs/datasetsListDatapoints.ts +0 -174
  104. package/packages/orq-rc/src/funcs/datasetsRetrieve.ts +0 -175
  105. package/packages/orq-rc/src/funcs/datasetsRetrieveDatapoint.ts +0 -181
  106. package/packages/orq-rc/src/funcs/datasetsUpdate.ts +0 -176
  107. package/packages/orq-rc/src/funcs/datasetsUpdateDatapoint.ts +0 -179
  108. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -168
  109. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -176
  110. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -176
  111. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -168
  112. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -183
  113. package/packages/orq-rc/src/funcs/evalsAll.ts +0 -173
  114. package/packages/orq-rc/src/funcs/evalsCreate.ts +0 -169
  115. package/packages/orq-rc/src/funcs/evalsDelete.ts +0 -173
  116. package/packages/orq-rc/src/funcs/evalsInvoke.ts +0 -181
  117. package/packages/orq-rc/src/funcs/evalsUpdate.ts +0 -173
  118. package/packages/orq-rc/src/funcs/evaluatorsGetV2EvaluatorsIdVersions.ts +0 -183
  119. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -160
  120. package/packages/orq-rc/src/funcs/filesCreate.ts +0 -187
  121. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -164
  122. package/packages/orq-rc/src/funcs/filesGet.ts +0 -166
  123. package/packages/orq-rc/src/funcs/filesList.ts +0 -167
  124. package/packages/orq-rc/src/funcs/identitiesCreate.ts +0 -165
  125. package/packages/orq-rc/src/funcs/identitiesDelete.ts +0 -176
  126. package/packages/orq-rc/src/funcs/identitiesList.ts +0 -170
  127. package/packages/orq-rc/src/funcs/identitiesRetrieve.ts +0 -175
  128. package/packages/orq-rc/src/funcs/identitiesUpdate.ts +0 -176
  129. package/packages/orq-rc/src/funcs/knowledgeCreate.ts +0 -158
  130. package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +0 -171
  131. package/packages/orq-rc/src/funcs/knowledgeCreateDatasource.ts +0 -166
  132. package/packages/orq-rc/src/funcs/knowledgeDelete.ts +0 -167
  133. package/packages/orq-rc/src/funcs/knowledgeDeleteChunk.ts +0 -174
  134. package/packages/orq-rc/src/funcs/knowledgeDeleteChunks.ts +0 -170
  135. package/packages/orq-rc/src/funcs/knowledgeDeleteDatasource.ts +0 -173
  136. package/packages/orq-rc/src/funcs/knowledgeGetChunksCount.ts +0 -170
  137. package/packages/orq-rc/src/funcs/knowledgeList.ts +0 -169
  138. package/packages/orq-rc/src/funcs/knowledgeListChunks.ts +0 -178
  139. package/packages/orq-rc/src/funcs/knowledgeListChunksPaginated.ts +0 -171
  140. package/packages/orq-rc/src/funcs/knowledgeListDatasources.ts +0 -174
  141. package/packages/orq-rc/src/funcs/knowledgeRetrieve.ts +0 -166
  142. package/packages/orq-rc/src/funcs/knowledgeRetrieveChunk.ts +0 -173
  143. package/packages/orq-rc/src/funcs/knowledgeRetrieveDatasource.ts +0 -169
  144. package/packages/orq-rc/src/funcs/knowledgeSearch.ts +0 -167
  145. package/packages/orq-rc/src/funcs/knowledgeUpdate.ts +0 -164
  146. package/packages/orq-rc/src/funcs/knowledgeUpdateChunk.ts +0 -174
  147. package/packages/orq-rc/src/funcs/knowledgeUpdateDatasource.ts +0 -170
  148. package/packages/orq-rc/src/funcs/memoryStoresCreate.ts +0 -162
  149. package/packages/orq-rc/src/funcs/memoryStoresCreateDocument.ts +0 -176
  150. package/packages/orq-rc/src/funcs/memoryStoresCreateMemory.ts +0 -170
  151. package/packages/orq-rc/src/funcs/memoryStoresDelete.ts +0 -168
  152. package/packages/orq-rc/src/funcs/memoryStoresDeleteDocument.ts +0 -185
  153. package/packages/orq-rc/src/funcs/memoryStoresDeleteMemory.ts +0 -180
  154. package/packages/orq-rc/src/funcs/memoryStoresList.ts +0 -178
  155. package/packages/orq-rc/src/funcs/memoryStoresListDocuments.ts +0 -184
  156. package/packages/orq-rc/src/funcs/memoryStoresListMemories.ts +0 -177
  157. package/packages/orq-rc/src/funcs/memoryStoresRetrieve.ts +0 -177
  158. package/packages/orq-rc/src/funcs/memoryStoresRetrieveDocument.ts +0 -179
  159. package/packages/orq-rc/src/funcs/memoryStoresRetrieveMemory.ts +0 -174
  160. package/packages/orq-rc/src/funcs/memoryStoresUpdate.ts +0 -168
  161. package/packages/orq-rc/src/funcs/memoryStoresUpdateDocument.ts +0 -180
  162. package/packages/orq-rc/src/funcs/memoryStoresUpdateMemory.ts +0 -175
  163. package/packages/orq-rc/src/funcs/modelsList.ts +0 -142
  164. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -160
  165. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -173
  166. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -181
  167. package/packages/orq-rc/src/funcs/promptsList.ts +0 -167
  168. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -173
  169. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -166
  170. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -173
  171. package/packages/orq-rc/src/funcs/remoteconfigsRetrieve.ts +0 -161
  172. package/packages/orq-rc/src/funcs/routerAudioSpeechCreate.ts +0 -161
  173. package/packages/orq-rc/src/funcs/routerAudioTranscriptionsCreate.ts +0 -262
  174. package/packages/orq-rc/src/funcs/routerAudioTranslationsCreate.ts +0 -252
  175. package/packages/orq-rc/src/funcs/routerChatCompletionsCreate.ts +0 -168
  176. package/packages/orq-rc/src/funcs/routerCompletionsCreate.ts +0 -168
  177. package/packages/orq-rc/src/funcs/routerEmbeddingsCreate.ts +0 -161
  178. package/packages/orq-rc/src/funcs/routerImagesEditsCreate.ts +0 -222
  179. package/packages/orq-rc/src/funcs/routerImagesGenerationsCreate.ts +0 -160
  180. package/packages/orq-rc/src/funcs/routerImagesVariationsCreate.ts +0 -218
  181. package/packages/orq-rc/src/funcs/routerModerationsCreate.ts +0 -167
  182. package/packages/orq-rc/src/funcs/routerOcr.ts +0 -158
  183. package/packages/orq-rc/src/funcs/routerRerankCreate.ts +0 -160
  184. package/packages/orq-rc/src/funcs/routerResponsesCreate.ts +0 -167
  185. package/packages/orq-rc/src/funcs/toolsCreate.ts +0 -163
  186. package/packages/orq-rc/src/funcs/toolsDelete.ts +0 -167
  187. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersions.ts +0 -183
  188. package/packages/orq-rc/src/funcs/toolsGetV2ToolsToolIdVersionsVersionId.ts +0 -190
  189. package/packages/orq-rc/src/funcs/toolsList.ts +0 -176
  190. package/packages/orq-rc/src/funcs/toolsRetrieve.ts +0 -166
  191. package/packages/orq-rc/src/funcs/toolsUpdate.ts +0 -176
  192. package/packages/orq-rc/src/hooks/global.ts +0 -44
  193. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  194. package/packages/orq-rc/src/hooks/index.ts +0 -6
  195. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  196. package/packages/orq-rc/src/hooks/types.ts +0 -112
  197. package/packages/orq-rc/src/index.ts +0 -9
  198. package/packages/orq-rc/src/lib/base64.ts +0 -37
  199. package/packages/orq-rc/src/lib/config.ts +0 -74
  200. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  201. package/packages/orq-rc/src/lib/encodings.ts +0 -497
  202. package/packages/orq-rc/src/lib/env.ts +0 -89
  203. package/packages/orq-rc/src/lib/event-streams.ts +0 -152
  204. package/packages/orq-rc/src/lib/files.ts +0 -82
  205. package/packages/orq-rc/src/lib/http.ts +0 -323
  206. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  207. package/packages/orq-rc/src/lib/logger.ts +0 -9
  208. package/packages/orq-rc/src/lib/matchers.ts +0 -345
  209. package/packages/orq-rc/src/lib/primitives.ts +0 -150
  210. package/packages/orq-rc/src/lib/retries.ts +0 -218
  211. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  212. package/packages/orq-rc/src/lib/sdks.ts +0 -407
  213. package/packages/orq-rc/src/lib/security.ts +0 -264
  214. package/packages/orq-rc/src/lib/url.ts +0 -33
  215. package/packages/orq-rc/src/models/components/actionreviewedstreamingevent.ts +0 -99
  216. package/packages/orq-rc/src/models/components/actionreviewrequestedstreamingevent.ts +0 -185
  217. package/packages/orq-rc/src/models/components/agenterroredstreamingevent.ts +0 -73
  218. package/packages/orq-rc/src/models/components/agentexecutionstartedstreamingevent.ts +0 -91
  219. package/packages/orq-rc/src/models/components/agenthandedoffstreamingevent.ts +0 -71
  220. package/packages/orq-rc/src/models/components/agentinactivestreamingevent.ts +0 -507
  221. package/packages/orq-rc/src/models/components/agentmessagecreatedstreamingevent.ts +0 -165
  222. package/packages/orq-rc/src/models/components/agentresponsemessage.ts +0 -103
  223. package/packages/orq-rc/src/models/components/agentstartedstreamingevent.ts +0 -517
  224. package/packages/orq-rc/src/models/components/agentthoughtstreamingevent.ts +0 -807
  225. package/packages/orq-rc/src/models/components/audiocontentpartschema.ts +0 -136
  226. package/packages/orq-rc/src/models/components/createagentresponse.ts +0 -299
  227. package/packages/orq-rc/src/models/components/datapart.ts +0 -38
  228. package/packages/orq-rc/src/models/components/errorpart.ts +0 -58
  229. package/packages/orq-rc/src/models/components/errorstreamingevent.ts +0 -66
  230. package/packages/orq-rc/src/models/components/executionnamedstreamingevent.ts +0 -71
  231. package/packages/orq-rc/src/models/components/executionreviewedstreamingevent.ts +0 -61
  232. package/packages/orq-rc/src/models/components/executionreviewrequiredstreamingevent.ts +0 -67
  233. package/packages/orq-rc/src/models/components/filecontentpartschema.ts +0 -87
  234. package/packages/orq-rc/src/models/components/filepart.ts +0 -218
  235. package/packages/orq-rc/src/models/components/imagecontentpartschema.ts +0 -268
  236. package/packages/orq-rc/src/models/components/index.ts +0 -56
  237. package/packages/orq-rc/src/models/components/invokedeploymentrequest.ts +0 -3450
  238. package/packages/orq-rc/src/models/components/partdelta.ts +0 -39
  239. package/packages/orq-rc/src/models/components/partdeltaevent.ts +0 -73
  240. package/packages/orq-rc/src/models/components/partdoneevent.ts +0 -139
  241. package/packages/orq-rc/src/models/components/publiccontact.ts +0 -71
  242. package/packages/orq-rc/src/models/components/publicidentity.ts +0 -69
  243. package/packages/orq-rc/src/models/components/reasoningpart.ts +0 -62
  244. package/packages/orq-rc/src/models/components/reasoningpartschema.ts +0 -71
  245. package/packages/orq-rc/src/models/components/redactedreasoningpartschema.ts +0 -66
  246. package/packages/orq-rc/src/models/components/refusalpartschema.ts +0 -64
  247. package/packages/orq-rc/src/models/components/responsedoneevent.ts +0 -318
  248. package/packages/orq-rc/src/models/components/responsefailedevent.ts +0 -72
  249. package/packages/orq-rc/src/models/components/responsestartedevent.ts +0 -91
  250. package/packages/orq-rc/src/models/components/responsestreamingevent.ts +0 -85
  251. package/packages/orq-rc/src/models/components/reviewoutcome.ts +0 -23
  252. package/packages/orq-rc/src/models/components/security.ts +0 -32
  253. package/packages/orq-rc/src/models/components/textcontentpartschema.ts +0 -207
  254. package/packages/orq-rc/src/models/components/textpart.ts +0 -54
  255. package/packages/orq-rc/src/models/components/thinkingconfigdisabledschema.ts +0 -59
  256. package/packages/orq-rc/src/models/components/thinkingconfigenabledschema.ts +0 -106
  257. package/packages/orq-rc/src/models/components/timeoutstreamingevent.ts +0 -64
  258. package/packages/orq-rc/src/models/components/toolcallpart.ts +0 -51
  259. package/packages/orq-rc/src/models/components/tooldoneevent.ts +0 -77
  260. package/packages/orq-rc/src/models/components/toolexecutionfailedstreamingevent.ts +0 -230
  261. package/packages/orq-rc/src/models/components/toolexecutionfinishedstreamingevent.ts +0 -214
  262. package/packages/orq-rc/src/models/components/toolexecutionstartedstreamingevent.ts +0 -200
  263. package/packages/orq-rc/src/models/components/toolfailedevent.ts +0 -77
  264. package/packages/orq-rc/src/models/components/toolresultpart.ts +0 -71
  265. package/packages/orq-rc/src/models/components/toolreviewdoneevent.ts +0 -78
  266. package/packages/orq-rc/src/models/components/toolreviewrequestedevent.ts +0 -87
  267. package/packages/orq-rc/src/models/components/toolstartedevent.ts +0 -82
  268. package/packages/orq-rc/src/models/errors/apierror.ts +0 -40
  269. package/packages/orq-rc/src/models/errors/createeval.ts +0 -51
  270. package/packages/orq-rc/src/models/errors/createmoderation.ts +0 -84
  271. package/packages/orq-rc/src/models/errors/createtranscription.ts +0 -87
  272. package/packages/orq-rc/src/models/errors/createtranslation.ts +0 -87
  273. package/packages/orq-rc/src/models/errors/deleteagent.ts +0 -51
  274. package/packages/orq-rc/src/models/errors/deleteeval.ts +0 -51
  275. package/packages/orq-rc/src/models/errors/deleteidentity.ts +0 -62
  276. package/packages/orq-rc/src/models/errors/deleteprompt.ts +0 -51
  277. package/packages/orq-rc/src/models/errors/getevals.ts +0 -51
  278. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -51
  279. package/packages/orq-rc/src/models/errors/getv2evaluatorsidversions.ts +0 -51
  280. package/packages/orq-rc/src/models/errors/getv2toolstoolidversions.ts +0 -51
  281. package/packages/orq-rc/src/models/errors/getv2toolstoolidversionsversionid.ts +0 -52
  282. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -59
  283. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  284. package/packages/orq-rc/src/models/errors/index.ts +0 -33
  285. package/packages/orq-rc/src/models/errors/invokeeval.ts +0 -141
  286. package/packages/orq-rc/src/models/errors/orqerror.ts +0 -35
  287. package/packages/orq-rc/src/models/errors/responsevalidationerror.ts +0 -50
  288. package/packages/orq-rc/src/models/errors/retrieveagentrequest.ts +0 -51
  289. package/packages/orq-rc/src/models/errors/retrieveidentity.ts +0 -62
  290. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -109
  291. package/packages/orq-rc/src/models/errors/streamagent.ts +0 -51
  292. package/packages/orq-rc/src/models/errors/streamrunagent.ts +0 -51
  293. package/packages/orq-rc/src/models/errors/updateagent.ts +0 -51
  294. package/packages/orq-rc/src/models/errors/updateeval.ts +0 -51
  295. package/packages/orq-rc/src/models/errors/updateidentity.ts +0 -54
  296. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -51
  297. package/packages/orq-rc/src/models/errors/updatetool.ts +0 -62
  298. package/packages/orq-rc/src/models/operations/cleardataset.ts +0 -39
  299. package/packages/orq-rc/src/models/operations/createagentrequest.ts +0 -7093
  300. package/packages/orq-rc/src/models/operations/createagentresponserequest.ts +0 -609
  301. package/packages/orq-rc/src/models/operations/createannotation.ts +0 -162
  302. package/packages/orq-rc/src/models/operations/createchatcompletion.ts +0 -6381
  303. package/packages/orq-rc/src/models/operations/createchunk.ts +0 -222
  304. package/packages/orq-rc/src/models/operations/createcompletion.ts +0 -3413
  305. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -156
  306. package/packages/orq-rc/src/models/operations/createdataset.ts +0 -162
  307. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +0 -2551
  308. package/packages/orq-rc/src/models/operations/createdatasource.ts +0 -437
  309. package/packages/orq-rc/src/models/operations/createembedding.ts +0 -947
  310. package/packages/orq-rc/src/models/operations/createeval.ts +0 -4170
  311. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -144
  312. package/packages/orq-rc/src/models/operations/createidentity.ts +0 -162
  313. package/packages/orq-rc/src/models/operations/createimage.ts +0 -1028
  314. package/packages/orq-rc/src/models/operations/createimageedit.ts +0 -1045
  315. package/packages/orq-rc/src/models/operations/createimagevariation.ts +0 -1067
  316. package/packages/orq-rc/src/models/operations/createknowledge.ts +0 -944
  317. package/packages/orq-rc/src/models/operations/creatememory.ts +0 -142
  318. package/packages/orq-rc/src/models/operations/creatememorydocument.ts +0 -152
  319. package/packages/orq-rc/src/models/operations/creatememorystore.ts +0 -199
  320. package/packages/orq-rc/src/models/operations/createmoderation.ts +0 -664
  321. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -5401
  322. package/packages/orq-rc/src/models/operations/creatererank.ts +0 -890
  323. package/packages/orq-rc/src/models/operations/createresponse.ts +0 -3324
  324. package/packages/orq-rc/src/models/operations/createspeech.ts +0 -700
  325. package/packages/orq-rc/src/models/operations/createtool.ts +0 -2499
  326. package/packages/orq-rc/src/models/operations/createtranscription.ts +0 -955
  327. package/packages/orq-rc/src/models/operations/createtranslation.ts +0 -930
  328. package/packages/orq-rc/src/models/operations/deleteagent.ts +0 -39
  329. package/packages/orq-rc/src/models/operations/deleteannotation.ts +0 -79
  330. package/packages/orq-rc/src/models/operations/deletechunk.ts +0 -53
  331. package/packages/orq-rc/src/models/operations/deletechunks.ts +0 -125
  332. package/packages/orq-rc/src/models/operations/deletedatapoint.ts +0 -46
  333. package/packages/orq-rc/src/models/operations/deletedataset.ts +0 -39
  334. package/packages/orq-rc/src/models/operations/deletedatasource.ts +0 -46
  335. package/packages/orq-rc/src/models/operations/deleteeval.ts +0 -31
  336. package/packages/orq-rc/src/models/operations/deleteidentity.ts +0 -34
  337. package/packages/orq-rc/src/models/operations/deleteknowledge.ts +0 -39
  338. package/packages/orq-rc/src/models/operations/deletememory.ts +0 -46
  339. package/packages/orq-rc/src/models/operations/deletememorydocument.ts +0 -55
  340. package/packages/orq-rc/src/models/operations/deletememorystore.ts +0 -39
  341. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -34
  342. package/packages/orq-rc/src/models/operations/deletetool.ts +0 -36
  343. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -2370
  344. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -4525
  345. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -690
  346. package/packages/orq-rc/src/models/operations/deployments.ts +0 -1268
  347. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -4614
  348. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -39
  349. package/packages/orq-rc/src/models/operations/fileget.ts +0 -116
  350. package/packages/orq-rc/src/models/operations/filelist.ts +0 -172
  351. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -170
  352. package/packages/orq-rc/src/models/operations/getallmemories.ts +0 -173
  353. package/packages/orq-rc/src/models/operations/getallmemorydocuments.ts +0 -188
  354. package/packages/orq-rc/src/models/operations/getallmemorystores.ts +0 -200
  355. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -3164
  356. package/packages/orq-rc/src/models/operations/getalltools.ts +0 -1398
  357. package/packages/orq-rc/src/models/operations/getchunkscount.ts +0 -121
  358. package/packages/orq-rc/src/models/operations/getevals.ts +0 -2842
  359. package/packages/orq-rc/src/models/operations/getonechunk.ts +0 -171
  360. package/packages/orq-rc/src/models/operations/getoneknowledge.ts +0 -652
  361. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -3089
  362. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -3134
  363. package/packages/orq-rc/src/models/operations/getv2evaluatorsidversions.ts +0 -162
  364. package/packages/orq-rc/src/models/operations/getv2toolstoolidversions.ts +0 -163
  365. package/packages/orq-rc/src/models/operations/getv2toolstoolidversionsversionid.ts +0 -110
  366. package/packages/orq-rc/src/models/operations/index.ts +0 -113
  367. package/packages/orq-rc/src/models/operations/invokeagent.ts +0 -733
  368. package/packages/orq-rc/src/models/operations/invokeeval.ts +0 -1253
  369. package/packages/orq-rc/src/models/operations/listagents.ts +0 -3018
  370. package/packages/orq-rc/src/models/operations/listchunks.ts +0 -260
  371. package/packages/orq-rc/src/models/operations/listchunkspaginated.ts +0 -263
  372. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +0 -1498
  373. package/packages/orq-rc/src/models/operations/listdatasets.ts +0 -205
  374. package/packages/orq-rc/src/models/operations/listdatasources.ts +0 -235
  375. package/packages/orq-rc/src/models/operations/listidentities.ts +0 -275
  376. package/packages/orq-rc/src/models/operations/listknowledgebases.ts +0 -642
  377. package/packages/orq-rc/src/models/operations/listmodels.ts +0 -143
  378. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -3209
  379. package/packages/orq-rc/src/models/operations/parse.ts +0 -777
  380. package/packages/orq-rc/src/models/operations/postv2routerocr.ts +0 -478
  381. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -108
  382. package/packages/orq-rc/src/models/operations/retrieveagentrequest.ts +0 -3104
  383. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +0 -1402
  384. package/packages/orq-rc/src/models/operations/retrievedataset.ts +0 -150
  385. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +0 -152
  386. package/packages/orq-rc/src/models/operations/retrieveidentity.ts +0 -117
  387. package/packages/orq-rc/src/models/operations/retrievememory.ts +0 -112
  388. package/packages/orq-rc/src/models/operations/retrievememorydocument.ts +0 -118
  389. package/packages/orq-rc/src/models/operations/retrievememorystore.ts +0 -144
  390. package/packages/orq-rc/src/models/operations/retrievetool.ts +0 -1379
  391. package/packages/orq-rc/src/models/operations/runagent.ts +0 -5351
  392. package/packages/orq-rc/src/models/operations/searchknowledge.ts +0 -1762
  393. package/packages/orq-rc/src/models/operations/streamagent.ts +0 -629
  394. package/packages/orq-rc/src/models/operations/streamrunagent.ts +0 -5546
  395. package/packages/orq-rc/src/models/operations/updateagent.ts +0 -7447
  396. package/packages/orq-rc/src/models/operations/updatechunk.ts +0 -236
  397. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +0 -2555
  398. package/packages/orq-rc/src/models/operations/updatedataset.ts +0 -206
  399. package/packages/orq-rc/src/models/operations/updatedatasource.ts +0 -186
  400. package/packages/orq-rc/src/models/operations/updateeval.ts +0 -4066
  401. package/packages/orq-rc/src/models/operations/updateidentity.ts +0 -189
  402. package/packages/orq-rc/src/models/operations/updateknowledge.ts +0 -1231
  403. package/packages/orq-rc/src/models/operations/updatememory.ts +0 -142
  404. package/packages/orq-rc/src/models/operations/updatememorydocument.ts +0 -159
  405. package/packages/orq-rc/src/models/operations/updatememorystore.ts +0 -246
  406. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -5472
  407. package/packages/orq-rc/src/models/operations/updatetool.ts +0 -2696
  408. package/packages/orq-rc/src/sdk/agents.ts +0 -196
  409. package/packages/orq-rc/src/sdk/annotations.ts +0 -39
  410. package/packages/orq-rc/src/sdk/audio.ts +0 -25
  411. package/packages/orq-rc/src/sdk/chat.ts +0 -13
  412. package/packages/orq-rc/src/sdk/chunking.ts +0 -27
  413. package/packages/orq-rc/src/sdk/completions.ts +0 -32
  414. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  415. package/packages/orq-rc/src/sdk/datasets.ts +0 -204
  416. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  417. package/packages/orq-rc/src/sdk/edits.ts +0 -27
  418. package/packages/orq-rc/src/sdk/embeddings.ts +0 -27
  419. package/packages/orq-rc/src/sdk/evals.ts +0 -84
  420. package/packages/orq-rc/src/sdk/evaluators.ts +0 -27
  421. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  422. package/packages/orq-rc/src/sdk/files.ts +0 -78
  423. package/packages/orq-rc/src/sdk/generations.ts +0 -27
  424. package/packages/orq-rc/src/sdk/identities.ts +0 -99
  425. package/packages/orq-rc/src/sdk/images.ts +0 -25
  426. package/packages/orq-rc/src/sdk/index.ts +0 -5
  427. package/packages/orq-rc/src/sdk/knowledge.ts +0 -309
  428. package/packages/orq-rc/src/sdk/memorystores.ts +0 -286
  429. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  430. package/packages/orq-rc/src/sdk/models.ts +0 -25
  431. package/packages/orq-rc/src/sdk/moderations.ts +0 -24
  432. package/packages/orq-rc/src/sdk/orqcompletions.ts +0 -32
  433. package/packages/orq-rc/src/sdk/orqresponses.ts +0 -32
  434. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  435. package/packages/orq-rc/src/sdk/remoteconfigs.ts +0 -24
  436. package/packages/orq-rc/src/sdk/rerank.ts +0 -27
  437. package/packages/orq-rc/src/sdk/responses.ts +0 -34
  438. package/packages/orq-rc/src/sdk/router.ts +0 -72
  439. package/packages/orq-rc/src/sdk/sdk.ts +0 -115
  440. package/packages/orq-rc/src/sdk/speech.ts +0 -27
  441. package/packages/orq-rc/src/sdk/tools.ts +0 -135
  442. package/packages/orq-rc/src/sdk/transcriptions.ts +0 -24
  443. package/packages/orq-rc/src/sdk/translations.ts +0 -24
  444. package/packages/orq-rc/src/sdk/variations.ts +0 -27
  445. package/packages/orq-rc/src/types/async.ts +0 -68
  446. package/packages/orq-rc/src/types/blobs.ts +0 -32
  447. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  448. package/packages/orq-rc/src/types/enums.ts +0 -45
  449. package/packages/orq-rc/src/types/fp.ts +0 -50
  450. package/packages/orq-rc/src/types/index.ts +0 -11
  451. package/packages/orq-rc/src/types/operations.ts +0 -105
  452. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  453. package/packages/orq-rc/src/types/streams.ts +0 -21
  454. package/packages/orq-rc/src/types/unrecognized.ts +0 -35
  455. package/packages/orq-rc/tsconfig.json +0 -40
  456. package/tsconfig.json +0 -40
@@ -1,3104 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod/v3";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { safeParse } from "../../lib/schemas.js";
8
- import { ClosedEnum } from "../../types/enums.js";
9
- import { Result as SafeParseResult } from "../../types/fp.js";
10
- import * as components from "../components/index.js";
11
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
-
13
- export type RetrieveAgentRequestRequest = {
14
- /**
15
- * The unique key of the agent to retrieve
16
- */
17
- agentKey: string;
18
- };
19
-
20
- /**
21
- * The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
22
- */
23
- export const RetrieveAgentRequestStatus = {
24
- Live: "live",
25
- Draft: "draft",
26
- Pending: "pending",
27
- Published: "published",
28
- } as const;
29
- /**
30
- * The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
31
- */
32
- export type RetrieveAgentRequestStatus = ClosedEnum<
33
- typeof RetrieveAgentRequestStatus
34
- >;
35
-
36
- /**
37
- * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
38
- */
39
- export const RetrieveAgentRequestToolApprovalRequired = {
40
- All: "all",
41
- RespectTool: "respect_tool",
42
- None: "none",
43
- } as const;
44
- /**
45
- * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
46
- */
47
- export type RetrieveAgentRequestToolApprovalRequired = ClosedEnum<
48
- typeof RetrieveAgentRequestToolApprovalRequired
49
- >;
50
-
51
- export type RetrieveAgentRequestConditions = {
52
- /**
53
- * The argument of the tool call to evaluate
54
- */
55
- condition: string;
56
- /**
57
- * The operator to use
58
- */
59
- operator: string;
60
- /**
61
- * The value to compare against
62
- */
63
- value: string;
64
- };
65
-
66
- export type RetrieveAgentRequestTools = {
67
- /**
68
- * The id of the resource
69
- */
70
- id: string;
71
- /**
72
- * Optional tool key for custom tools
73
- */
74
- key?: string | undefined;
75
- actionType: string;
76
- displayName?: string | undefined;
77
- /**
78
- * Optional tool description
79
- */
80
- description?: string | undefined;
81
- requiresApproval: boolean;
82
- /**
83
- * Nested tool ID for MCP tools (identifies specific tool within MCP server)
84
- */
85
- toolId?: string | undefined;
86
- conditions?: Array<RetrieveAgentRequestConditions> | undefined;
87
- /**
88
- * Tool execution timeout in seconds (default: 2 minutes, max: 10 minutes)
89
- */
90
- timeout: number;
91
- };
92
-
93
- /**
94
- * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
95
- */
96
- export const RetrieveAgentRequestExecuteOn = {
97
- Input: "input",
98
- Output: "output",
99
- } as const;
100
- /**
101
- * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
102
- */
103
- export type RetrieveAgentRequestExecuteOn = ClosedEnum<
104
- typeof RetrieveAgentRequestExecuteOn
105
- >;
106
-
107
- export type RetrieveAgentRequestEvaluators = {
108
- /**
109
- * Unique key or identifier of the evaluator
110
- */
111
- id: string;
112
- /**
113
- * The percentage of executions to evaluate with this evaluator (1-100). For example, a value of 50 means the evaluator will run on approximately half of the executions.
114
- */
115
- sampleRate: number;
116
- /**
117
- * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
118
- */
119
- executeOn: RetrieveAgentRequestExecuteOn;
120
- };
121
-
122
- /**
123
- * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
124
- */
125
- export const RetrieveAgentRequestAgentsExecuteOn = {
126
- Input: "input",
127
- Output: "output",
128
- } as const;
129
- /**
130
- * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
131
- */
132
- export type RetrieveAgentRequestAgentsExecuteOn = ClosedEnum<
133
- typeof RetrieveAgentRequestAgentsExecuteOn
134
- >;
135
-
136
- export type RetrieveAgentRequestGuardrails = {
137
- /**
138
- * Unique key or identifier of the evaluator
139
- */
140
- id: string;
141
- /**
142
- * The percentage of executions to evaluate with this evaluator (1-100). For example, a value of 50 means the evaluator will run on approximately half of the executions.
143
- */
144
- sampleRate: number;
145
- /**
146
- * Determines whether the evaluator runs on the agent input (user message) or output (agent response).
147
- */
148
- executeOn: RetrieveAgentRequestAgentsExecuteOn;
149
- };
150
-
151
- export type RetrieveAgentRequestSettings = {
152
- /**
153
- * Maximum iterations(llm calls) before the agent will stop executing.
154
- */
155
- maxIterations: number;
156
- /**
157
- * Maximum time (in seconds) for the agent thinking process. This does not include the time for tool calls and sub agent calls. It will be loosely enforced, the in progress LLM calls will not be terminated and the last assistant message will be returned.
158
- */
159
- maxExecutionTime: number;
160
- /**
161
- * Maximum cost in USD for the agent execution. When the accumulated cost exceeds this limit, the agent will stop executing. Set to 0 for unlimited. Only supported in v3 responses
162
- */
163
- maxCost: number;
164
- /**
165
- * If all, the agent will require approval for all tools. If respect_tool, the agent will require approval for tools that have the requires_approval flag set to true. If none, the agent will not require approval for any tools.
166
- */
167
- toolApprovalRequired: RetrieveAgentRequestToolApprovalRequired;
168
- tools?: Array<RetrieveAgentRequestTools> | undefined;
169
- /**
170
- * Configuration for an evaluator applied to the agent
171
- */
172
- evaluators?: Array<RetrieveAgentRequestEvaluators> | undefined;
173
- /**
174
- * Configuration for a guardrail applied to the agent
175
- */
176
- guardrails?: Array<RetrieveAgentRequestGuardrails> | undefined;
177
- };
178
-
179
- /**
180
- * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
181
- */
182
- export const RetrieveAgentRequestVoice = {
183
- Alloy: "alloy",
184
- Echo: "echo",
185
- Fable: "fable",
186
- Onyx: "onyx",
187
- Nova: "nova",
188
- Shimmer: "shimmer",
189
- } as const;
190
- /**
191
- * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
192
- */
193
- export type RetrieveAgentRequestVoice = ClosedEnum<
194
- typeof RetrieveAgentRequestVoice
195
- >;
196
-
197
- /**
198
- * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
199
- */
200
- export const RetrieveAgentRequestFormat = {
201
- Wav: "wav",
202
- Mp3: "mp3",
203
- Flac: "flac",
204
- Opus: "opus",
205
- Pcm16: "pcm16",
206
- } as const;
207
- /**
208
- * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
209
- */
210
- export type RetrieveAgentRequestFormat = ClosedEnum<
211
- typeof RetrieveAgentRequestFormat
212
- >;
213
-
214
- /**
215
- * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
216
- */
217
- export type RetrieveAgentRequestAudio = {
218
- /**
219
- * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
220
- */
221
- voice: RetrieveAgentRequestVoice;
222
- /**
223
- * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
224
- */
225
- format: RetrieveAgentRequestFormat;
226
- };
227
-
228
- export type RetrieveAgentRequestResponseFormatJsonSchema = {
229
- /**
230
- * A description of what the response format is for, used by the model to determine how to respond in the format.
231
- */
232
- description?: string | undefined;
233
- /**
234
- * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
235
- */
236
- name: string;
237
- /**
238
- * The schema for the response format, described as a JSON Schema object.
239
- */
240
- schema?: any | undefined;
241
- /**
242
- * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true.
243
- */
244
- strict: boolean;
245
- };
246
-
247
- /**
248
- * @remarks
249
- *
250
- * JSON Schema response format. Used to generate structured JSON responses
251
- */
252
- export type RetrieveAgentRequestResponseFormatAgentsJSONSchema = {
253
- type: "json_schema";
254
- jsonSchema: RetrieveAgentRequestResponseFormatJsonSchema;
255
- };
256
-
257
- /**
258
- * @remarks
259
- *
260
- * JSON object response format. An older method of generating JSON responses. Using `json_schema` is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
261
- */
262
- export type RetrieveAgentRequestResponseFormatJSONObject = {
263
- type: "json_object";
264
- };
265
-
266
- /**
267
- * @remarks
268
- *
269
- * Default response format. Used to generate text responses
270
- */
271
- export type RetrieveAgentRequestResponseFormatText = {
272
- type: "text";
273
- };
274
-
275
- /**
276
- * An object specifying the format that the model must output
277
- */
278
- export type RetrieveAgentRequestResponseFormat =
279
- | RetrieveAgentRequestResponseFormatText
280
- | RetrieveAgentRequestResponseFormatJSONObject
281
- | RetrieveAgentRequestResponseFormatAgentsJSONSchema;
282
-
283
- /**
284
- * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
285
- *
286
- * @remarks
287
- *
288
- * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
289
- * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
290
- * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
291
- * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
292
- *
293
- * Any of "none", "minimal", "low", "medium", "high", "xhigh".
294
- */
295
- export const RetrieveAgentRequestReasoningEffort = {
296
- None: "none",
297
- Minimal: "minimal",
298
- Low: "low",
299
- Medium: "medium",
300
- High: "high",
301
- Xhigh: "xhigh",
302
- } as const;
303
- /**
304
- * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
305
- *
306
- * @remarks
307
- *
308
- * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
309
- * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
310
- * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
311
- * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
312
- *
313
- * Any of "none", "minimal", "low", "medium", "high", "xhigh".
314
- */
315
- export type RetrieveAgentRequestReasoningEffort = ClosedEnum<
316
- typeof RetrieveAgentRequestReasoningEffort
317
- >;
318
-
319
- /**
320
- * Up to 4 sequences where the API will stop generating further tokens.
321
- */
322
- export type RetrieveAgentRequestStop = string | Array<string>;
323
-
324
- /**
325
- * Options for streaming response. Only set this when you set stream: true.
326
- */
327
- export type RetrieveAgentRequestStreamOptions = {
328
- /**
329
- * If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
330
- */
331
- includeUsage?: boolean | undefined;
332
- };
333
-
334
- export type RetrieveAgentRequestThinking =
335
- | components.ThinkingConfigDisabledSchema
336
- | components.ThinkingConfigEnabledSchema;
337
-
338
- /**
339
- * The type of the tool. Currently, only function is supported.
340
- */
341
- export const RetrieveAgentRequestToolChoiceType = {
342
- Function: "function",
343
- } as const;
344
- /**
345
- * The type of the tool. Currently, only function is supported.
346
- */
347
- export type RetrieveAgentRequestToolChoiceType = ClosedEnum<
348
- typeof RetrieveAgentRequestToolChoiceType
349
- >;
350
-
351
- export type RetrieveAgentRequestToolChoiceFunction = {
352
- /**
353
- * The name of the function to call.
354
- */
355
- name: string;
356
- };
357
-
358
- export type RetrieveAgentRequestToolChoice2 = {
359
- /**
360
- * The type of the tool. Currently, only function is supported.
361
- */
362
- type?: RetrieveAgentRequestToolChoiceType | undefined;
363
- function: RetrieveAgentRequestToolChoiceFunction;
364
- };
365
-
366
- export const RetrieveAgentRequestToolChoice1 = {
367
- None: "none",
368
- Auto: "auto",
369
- Required: "required",
370
- } as const;
371
- export type RetrieveAgentRequestToolChoice1 = ClosedEnum<
372
- typeof RetrieveAgentRequestToolChoice1
373
- >;
374
-
375
- /**
376
- * Controls which (if any) tool is called by the model.
377
- */
378
- export type RetrieveAgentRequestToolChoice =
379
- | RetrieveAgentRequestToolChoice2
380
- | RetrieveAgentRequestToolChoice1;
381
-
382
- export const RetrieveAgentRequestModalities = {
383
- Text: "text",
384
- Audio: "audio",
385
- } as const;
386
- export type RetrieveAgentRequestModalities = ClosedEnum<
387
- typeof RetrieveAgentRequestModalities
388
- >;
389
-
390
- /**
391
- * The key of the guardrail.
392
- */
393
- export const RetrieveAgentRequestId1 = {
394
- OrqPiiDetection: "orq_pii_detection",
395
- OrqSexualModeration: "orq_sexual_moderation",
396
- OrqHarmfulModeration: "orq_harmful_moderation",
397
- } as const;
398
- /**
399
- * The key of the guardrail.
400
- */
401
- export type RetrieveAgentRequestId1 = ClosedEnum<
402
- typeof RetrieveAgentRequestId1
403
- >;
404
-
405
- export type RetrieveAgentRequestId = RetrieveAgentRequestId1 | string;
406
-
407
- /**
408
- * Determines whether the guardrail runs on the input (user message) or output (model response).
409
- */
410
- export const RetrieveAgentRequestAgentsResponseExecuteOn = {
411
- Input: "input",
412
- Output: "output",
413
- } as const;
414
- /**
415
- * Determines whether the guardrail runs on the input (user message) or output (model response).
416
- */
417
- export type RetrieveAgentRequestAgentsResponseExecuteOn = ClosedEnum<
418
- typeof RetrieveAgentRequestAgentsResponseExecuteOn
419
- >;
420
-
421
- export type RetrieveAgentRequestAgentsGuardrails = {
422
- id: RetrieveAgentRequestId1 | string;
423
- /**
424
- * Determines whether the guardrail runs on the input (user message) or output (model response).
425
- */
426
- executeOn: RetrieveAgentRequestAgentsResponseExecuteOn;
427
- };
428
-
429
- export type RetrieveAgentRequestFallbacks = {
430
- /**
431
- * Fallback model identifier
432
- */
433
- model: string;
434
- };
435
-
436
- /**
437
- * Retry configuration for the request
438
- */
439
- export type RetrieveAgentRequestAgentsRetry = {
440
- /**
441
- * Number of retry attempts (1-5)
442
- */
443
- count: number;
444
- /**
445
- * HTTP status codes that trigger retry logic
446
- */
447
- onCodes?: Array<number> | undefined;
448
- };
449
-
450
- export const RetrieveAgentRequestType = {
451
- ExactMatch: "exact_match",
452
- } as const;
453
- export type RetrieveAgentRequestType = ClosedEnum<
454
- typeof RetrieveAgentRequestType
455
- >;
456
-
457
- /**
458
- * Cache configuration for the request.
459
- */
460
- export type RetrieveAgentRequestCache = {
461
- /**
462
- * Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
463
- */
464
- ttl: number;
465
- type: RetrieveAgentRequestType;
466
- };
467
-
468
- export const RetrieveAgentRequestLoadBalancerType = {
469
- WeightBased: "weight_based",
470
- } as const;
471
- export type RetrieveAgentRequestLoadBalancerType = ClosedEnum<
472
- typeof RetrieveAgentRequestLoadBalancerType
473
- >;
474
-
475
- export type RetrieveAgentRequestLoadBalancerModels = {
476
- /**
477
- * Model identifier for load balancing
478
- */
479
- model: string;
480
- /**
481
- * Weight assigned to this model for load balancing
482
- */
483
- weight: number;
484
- };
485
-
486
- export type RetrieveAgentRequestLoadBalancer1 = {
487
- type: RetrieveAgentRequestLoadBalancerType;
488
- models: Array<RetrieveAgentRequestLoadBalancerModels>;
489
- };
490
-
491
- /**
492
- * Load balancer configuration for the request.
493
- */
494
- export type RetrieveAgentRequestLoadBalancer =
495
- RetrieveAgentRequestLoadBalancer1;
496
-
497
- /**
498
- * Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
499
- */
500
- export type RetrieveAgentRequestTimeout = {
501
- /**
502
- * Timeout value in milliseconds
503
- */
504
- callTimeout: number;
505
- };
506
-
507
- /**
508
- * Model behavior parameters (snake_case) stored as part of the agent configuration. These become the default parameters used when the agent is executed. Commonly used: temperature (0-1, controls randomness), max_completion_tokens (response length), top_p (nucleus sampling). Advanced: frequency_penalty, presence_penalty, response_format (JSON/structured output), reasoning_effort (for o1/thinking models), seed (reproducibility), stop sequences. Model-specific support varies. Runtime parameters in agent execution requests can override these defaults.
509
- */
510
- export type RetrieveAgentRequestParameters = {
511
- /**
512
- * The name to display on the trace. If not specified, the default system name will be used.
513
- */
514
- name?: string | undefined;
515
- /**
516
- * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
517
- */
518
- audio?: RetrieveAgentRequestAudio | null | undefined;
519
- /**
520
- * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
521
- */
522
- frequencyPenalty?: number | null | undefined;
523
- /**
524
- * `[Deprecated]`. The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.
525
- *
526
- * @remarks
527
- *
528
- * This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
529
- */
530
- maxTokens?: number | null | undefined;
531
- /**
532
- * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
533
- */
534
- maxCompletionTokens?: number | null | undefined;
535
- /**
536
- * Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
537
- */
538
- logprobs?: boolean | null | undefined;
539
- /**
540
- * An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
541
- */
542
- topLogprobs?: number | null | undefined;
543
- /**
544
- * How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
545
- */
546
- n?: number | null | undefined;
547
- /**
548
- * Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
549
- */
550
- presencePenalty?: number | null | undefined;
551
- /**
552
- * An object specifying the format that the model must output
553
- */
554
- responseFormat?:
555
- | RetrieveAgentRequestResponseFormatText
556
- | RetrieveAgentRequestResponseFormatJSONObject
557
- | RetrieveAgentRequestResponseFormatAgentsJSONSchema
558
- | undefined;
559
- /**
560
- * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
561
- *
562
- * @remarks
563
- *
564
- * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
565
- * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
566
- * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
567
- * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
568
- *
569
- * Any of "none", "minimal", "low", "medium", "high", "xhigh".
570
- */
571
- reasoningEffort?: RetrieveAgentRequestReasoningEffort | undefined;
572
- /**
573
- * Adjusts response verbosity. Lower levels yield shorter answers.
574
- */
575
- verbosity?: string | undefined;
576
- /**
577
- * If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.
578
- */
579
- seed?: number | null | undefined;
580
- /**
581
- * Up to 4 sequences where the API will stop generating further tokens.
582
- */
583
- stop?: string | Array<string> | null | undefined;
584
- /**
585
- * Options for streaming response. Only set this when you set stream: true.
586
- */
587
- streamOptions?: RetrieveAgentRequestStreamOptions | null | undefined;
588
- thinking?:
589
- | components.ThinkingConfigDisabledSchema
590
- | components.ThinkingConfigEnabledSchema
591
- | undefined;
592
- /**
593
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
594
- */
595
- temperature?: number | null | undefined;
596
- /**
597
- * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
598
- */
599
- topP?: number | null | undefined;
600
- /**
601
- * Limits the model to consider only the top k most likely tokens at each step.
602
- */
603
- topK?: number | null | undefined;
604
- /**
605
- * Controls which (if any) tool is called by the model.
606
- */
607
- toolChoice?:
608
- | RetrieveAgentRequestToolChoice2
609
- | RetrieveAgentRequestToolChoice1
610
- | undefined;
611
- /**
612
- * Whether to enable parallel function calling during tool use.
613
- */
614
- parallelToolCalls?: boolean | undefined;
615
- /**
616
- * Output types that you would like the model to generate. Most models are capable of generating text, which is the default: ["text"]. The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"].
617
- */
618
- modalities?: Array<RetrieveAgentRequestModalities> | null | undefined;
619
- /**
620
- * A list of guardrails to apply to the request.
621
- */
622
- guardrails?: Array<RetrieveAgentRequestAgentsGuardrails> | undefined;
623
- /**
624
- * Array of fallback models to use if primary model fails
625
- */
626
- fallbacks?: Array<RetrieveAgentRequestFallbacks> | undefined;
627
- /**
628
- * Retry configuration for the request
629
- */
630
- retry?: RetrieveAgentRequestAgentsRetry | undefined;
631
- /**
632
- * Cache configuration for the request.
633
- */
634
- cache?: RetrieveAgentRequestCache | undefined;
635
- /**
636
- * Load balancer configuration for the request.
637
- */
638
- loadBalancer?: RetrieveAgentRequestLoadBalancer1 | undefined;
639
- /**
640
- * Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
641
- */
642
- timeout?: RetrieveAgentRequestTimeout | undefined;
643
- };
644
-
645
- /**
646
- * Retry configuration for model requests. Allows customizing retry count (1-5) and HTTP status codes that trigger retries. Default codes: [429]. Common codes: 500 (internal error), 429 (rate limit), 502/503/504 (gateway errors).
647
- */
648
- export type RetrieveAgentRequestRetry = {
649
- /**
650
- * Number of retry attempts (1-5)
651
- */
652
- count: number;
653
- /**
654
- * HTTP status codes that trigger retry logic
655
- */
656
- onCodes?: Array<number> | undefined;
657
- };
658
-
659
- /**
660
- * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
661
- */
662
- export const RetrieveAgentRequestFallbackModelConfigurationVoice = {
663
- Alloy: "alloy",
664
- Echo: "echo",
665
- Fable: "fable",
666
- Onyx: "onyx",
667
- Nova: "nova",
668
- Shimmer: "shimmer",
669
- } as const;
670
- /**
671
- * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
672
- */
673
- export type RetrieveAgentRequestFallbackModelConfigurationVoice = ClosedEnum<
674
- typeof RetrieveAgentRequestFallbackModelConfigurationVoice
675
- >;
676
-
677
- /**
678
- * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
679
- */
680
- export const RetrieveAgentRequestFallbackModelConfigurationFormat = {
681
- Wav: "wav",
682
- Mp3: "mp3",
683
- Flac: "flac",
684
- Opus: "opus",
685
- Pcm16: "pcm16",
686
- } as const;
687
- /**
688
- * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
689
- */
690
- export type RetrieveAgentRequestFallbackModelConfigurationFormat = ClosedEnum<
691
- typeof RetrieveAgentRequestFallbackModelConfigurationFormat
692
- >;
693
-
694
- /**
695
- * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
696
- */
697
- export type RetrieveAgentRequestFallbackModelConfigurationAudio = {
698
- /**
699
- * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
700
- */
701
- voice: RetrieveAgentRequestFallbackModelConfigurationVoice;
702
- /**
703
- * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
704
- */
705
- format: RetrieveAgentRequestFallbackModelConfigurationFormat;
706
- };
707
-
708
- export type RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema = {
709
- /**
710
- * A description of what the response format is for, used by the model to determine how to respond in the format.
711
- */
712
- description?: string | undefined;
713
- /**
714
- * The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
715
- */
716
- name: string;
717
- /**
718
- * The schema for the response format, described as a JSON Schema object.
719
- */
720
- schema?: any | undefined;
721
- /**
722
- * Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true.
723
- */
724
- strict: boolean;
725
- };
726
-
727
- /**
728
- * @remarks
729
- *
730
- * JSON Schema response format. Used to generate structured JSON responses
731
- */
732
- export type RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema = {
733
- type: "json_schema";
734
- jsonSchema: RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema;
735
- };
736
-
737
- /**
738
- * @remarks
739
- *
740
- * JSON object response format. An older method of generating JSON responses. Using `json_schema` is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.
741
- */
742
- export type RetrieveAgentRequestResponseFormatAgentsJSONObject = {
743
- type: "json_object";
744
- };
745
-
746
- /**
747
- * @remarks
748
- *
749
- * Default response format. Used to generate text responses
750
- */
751
- export type RetrieveAgentRequestResponseFormatAgentsText = {
752
- type: "text";
753
- };
754
-
755
- /**
756
- * An object specifying the format that the model must output
757
- */
758
- export type RetrieveAgentRequestFallbackModelConfigurationResponseFormat =
759
- | RetrieveAgentRequestResponseFormatAgentsText
760
- | RetrieveAgentRequestResponseFormatAgentsJSONObject
761
- | RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema;
762
-
763
- /**
764
- * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
765
- *
766
- * @remarks
767
- *
768
- * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
769
- * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
770
- * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
771
- * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
772
- *
773
- * Any of "none", "minimal", "low", "medium", "high", "xhigh".
774
- */
775
- export const RetrieveAgentRequestFallbackModelConfigurationReasoningEffort = {
776
- None: "none",
777
- Minimal: "minimal",
778
- Low: "low",
779
- Medium: "medium",
780
- High: "high",
781
- Xhigh: "xhigh",
782
- } as const;
783
- /**
784
- * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
785
- *
786
- * @remarks
787
- *
788
- * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
789
- * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
790
- * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
791
- * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
792
- *
793
- * Any of "none", "minimal", "low", "medium", "high", "xhigh".
794
- */
795
- export type RetrieveAgentRequestFallbackModelConfigurationReasoningEffort =
796
- ClosedEnum<
797
- typeof RetrieveAgentRequestFallbackModelConfigurationReasoningEffort
798
- >;
799
-
800
- /**
801
- * Up to 4 sequences where the API will stop generating further tokens.
802
- */
803
- export type RetrieveAgentRequestFallbackModelConfigurationStop =
804
- | string
805
- | Array<string>;
806
-
807
- /**
808
- * Options for streaming response. Only set this when you set stream: true.
809
- */
810
- export type RetrieveAgentRequestFallbackModelConfigurationStreamOptions = {
811
- /**
812
- * If set, an additional chunk will be streamed before the data: [DONE] message. The usage field on this chunk shows the token usage statistics for the entire request, and the choices field will always be an empty array. All other chunks will also include a usage field, but with a null value.
813
- */
814
- includeUsage?: boolean | undefined;
815
- };
816
-
817
- export type RetrieveAgentRequestFallbackModelConfigurationThinking =
818
- | components.ThinkingConfigDisabledSchema
819
- | components.ThinkingConfigEnabledSchema;
820
-
821
- /**
822
- * The type of the tool. Currently, only function is supported.
823
- */
824
- export const RetrieveAgentRequestToolChoiceAgentsType = {
825
- Function: "function",
826
- } as const;
827
- /**
828
- * The type of the tool. Currently, only function is supported.
829
- */
830
- export type RetrieveAgentRequestToolChoiceAgentsType = ClosedEnum<
831
- typeof RetrieveAgentRequestToolChoiceAgentsType
832
- >;
833
-
834
- export type RetrieveAgentRequestToolChoiceAgentsFunction = {
835
- /**
836
- * The name of the function to call.
837
- */
838
- name: string;
839
- };
840
-
841
- export type RetrieveAgentRequestToolChoiceAgents2 = {
842
- /**
843
- * The type of the tool. Currently, only function is supported.
844
- */
845
- type?: RetrieveAgentRequestToolChoiceAgentsType | undefined;
846
- function: RetrieveAgentRequestToolChoiceAgentsFunction;
847
- };
848
-
849
- export const RetrieveAgentRequestToolChoiceAgents1 = {
850
- None: "none",
851
- Auto: "auto",
852
- Required: "required",
853
- } as const;
854
- export type RetrieveAgentRequestToolChoiceAgents1 = ClosedEnum<
855
- typeof RetrieveAgentRequestToolChoiceAgents1
856
- >;
857
-
858
- /**
859
- * Controls which (if any) tool is called by the model.
860
- */
861
- export type RetrieveAgentRequestFallbackModelConfigurationToolChoice =
862
- | RetrieveAgentRequestToolChoiceAgents2
863
- | RetrieveAgentRequestToolChoiceAgents1;
864
-
865
- export const RetrieveAgentRequestFallbackModelConfigurationModalities = {
866
- Text: "text",
867
- Audio: "audio",
868
- } as const;
869
- export type RetrieveAgentRequestFallbackModelConfigurationModalities =
870
- ClosedEnum<typeof RetrieveAgentRequestFallbackModelConfigurationModalities>;
871
-
872
- /**
873
- * The key of the guardrail.
874
- */
875
- export const RetrieveAgentRequestIdAgents1 = {
876
- OrqPiiDetection: "orq_pii_detection",
877
- OrqSexualModeration: "orq_sexual_moderation",
878
- OrqHarmfulModeration: "orq_harmful_moderation",
879
- } as const;
880
- /**
881
- * The key of the guardrail.
882
- */
883
- export type RetrieveAgentRequestIdAgents1 = ClosedEnum<
884
- typeof RetrieveAgentRequestIdAgents1
885
- >;
886
-
887
- export type RetrieveAgentRequestFallbackModelConfigurationId =
888
- | RetrieveAgentRequestIdAgents1
889
- | string;
890
-
891
- /**
892
- * Determines whether the guardrail runs on the input (user message) or output (model response).
893
- */
894
- export const RetrieveAgentRequestFallbackModelConfigurationExecuteOn = {
895
- Input: "input",
896
- Output: "output",
897
- } as const;
898
- /**
899
- * Determines whether the guardrail runs on the input (user message) or output (model response).
900
- */
901
- export type RetrieveAgentRequestFallbackModelConfigurationExecuteOn =
902
- ClosedEnum<typeof RetrieveAgentRequestFallbackModelConfigurationExecuteOn>;
903
-
904
- export type RetrieveAgentRequestFallbackModelConfigurationGuardrails = {
905
- id: RetrieveAgentRequestIdAgents1 | string;
906
- /**
907
- * Determines whether the guardrail runs on the input (user message) or output (model response).
908
- */
909
- executeOn: RetrieveAgentRequestFallbackModelConfigurationExecuteOn;
910
- };
911
-
912
- export type RetrieveAgentRequestFallbackModelConfigurationFallbacks = {
913
- /**
914
- * Fallback model identifier
915
- */
916
- model: string;
917
- };
918
-
919
- /**
920
- * Retry configuration for the request
921
- */
922
- export type RetrieveAgentRequestFallbackModelConfigurationAgentsRetry = {
923
- /**
924
- * Number of retry attempts (1-5)
925
- */
926
- count: number;
927
- /**
928
- * HTTP status codes that trigger retry logic
929
- */
930
- onCodes?: Array<number> | undefined;
931
- };
932
-
933
- export const RetrieveAgentRequestFallbackModelConfigurationType = {
934
- ExactMatch: "exact_match",
935
- } as const;
936
- export type RetrieveAgentRequestFallbackModelConfigurationType = ClosedEnum<
937
- typeof RetrieveAgentRequestFallbackModelConfigurationType
938
- >;
939
-
940
- /**
941
- * Cache configuration for the request.
942
- */
943
- export type RetrieveAgentRequestFallbackModelConfigurationCache = {
944
- /**
945
- * Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
946
- */
947
- ttl: number;
948
- type: RetrieveAgentRequestFallbackModelConfigurationType;
949
- };
950
-
951
- export const RetrieveAgentRequestLoadBalancerAgentsType = {
952
- WeightBased: "weight_based",
953
- } as const;
954
- export type RetrieveAgentRequestLoadBalancerAgentsType = ClosedEnum<
955
- typeof RetrieveAgentRequestLoadBalancerAgentsType
956
- >;
957
-
958
- export type RetrieveAgentRequestLoadBalancerAgentsModels = {
959
- /**
960
- * Model identifier for load balancing
961
- */
962
- model: string;
963
- /**
964
- * Weight assigned to this model for load balancing
965
- */
966
- weight: number;
967
- };
968
-
969
- export type RetrieveAgentRequestLoadBalancerAgents1 = {
970
- type: RetrieveAgentRequestLoadBalancerAgentsType;
971
- models: Array<RetrieveAgentRequestLoadBalancerAgentsModels>;
972
- };
973
-
974
- /**
975
- * Load balancer configuration for the request.
976
- */
977
- export type RetrieveAgentRequestFallbackModelConfigurationLoadBalancer =
978
- RetrieveAgentRequestLoadBalancerAgents1;
979
-
980
- /**
981
- * Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
982
- */
983
- export type RetrieveAgentRequestFallbackModelConfigurationTimeout = {
984
- /**
985
- * Timeout value in milliseconds
986
- */
987
- callTimeout: number;
988
- };
989
-
990
- /**
991
- * Optional model parameters specific to this fallback model. Overrides primary model parameters if this fallback is used.
992
- */
993
- export type RetrieveAgentRequestFallbackModelConfigurationParameters = {
994
- /**
995
- * The name to display on the trace. If not specified, the default system name will be used.
996
- */
997
- name?: string | undefined;
998
- /**
999
- * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
1000
- */
1001
- audio?:
1002
- | RetrieveAgentRequestFallbackModelConfigurationAudio
1003
- | null
1004
- | undefined;
1005
- /**
1006
- * Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
1007
- */
1008
- frequencyPenalty?: number | null | undefined;
1009
- /**
1010
- * `[Deprecated]`. The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API.
1011
- *
1012
- * @remarks
1013
- *
1014
- * This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
1015
- */
1016
- maxTokens?: number | null | undefined;
1017
- /**
1018
- * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
1019
- */
1020
- maxCompletionTokens?: number | null | undefined;
1021
- /**
1022
- * Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the content of message.
1023
- */
1024
- logprobs?: boolean | null | undefined;
1025
- /**
1026
- * An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to true if this parameter is used.
1027
- */
1028
- topLogprobs?: number | null | undefined;
1029
- /**
1030
- * How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs.
1031
- */
1032
- n?: number | null | undefined;
1033
- /**
1034
- * Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
1035
- */
1036
- presencePenalty?: number | null | undefined;
1037
- /**
1038
- * An object specifying the format that the model must output
1039
- */
1040
- responseFormat?:
1041
- | RetrieveAgentRequestResponseFormatAgentsText
1042
- | RetrieveAgentRequestResponseFormatAgentsJSONObject
1043
- | RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema
1044
- | undefined;
1045
- /**
1046
- * Constrains effort on reasoning for [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
1047
- *
1048
- * @remarks
1049
- *
1050
- * - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
1051
- * - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
1052
- * - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1053
- * - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
1054
- *
1055
- * Any of "none", "minimal", "low", "medium", "high", "xhigh".
1056
- */
1057
- reasoningEffort?:
1058
- | RetrieveAgentRequestFallbackModelConfigurationReasoningEffort
1059
- | undefined;
1060
- /**
1061
- * Adjusts response verbosity. Lower levels yield shorter answers.
1062
- */
1063
- verbosity?: string | undefined;
1064
- /**
1065
- * If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result.
1066
- */
1067
- seed?: number | null | undefined;
1068
- /**
1069
- * Up to 4 sequences where the API will stop generating further tokens.
1070
- */
1071
- stop?: string | Array<string> | null | undefined;
1072
- /**
1073
- * Options for streaming response. Only set this when you set stream: true.
1074
- */
1075
- streamOptions?:
1076
- | RetrieveAgentRequestFallbackModelConfigurationStreamOptions
1077
- | null
1078
- | undefined;
1079
- thinking?:
1080
- | components.ThinkingConfigDisabledSchema
1081
- | components.ThinkingConfigEnabledSchema
1082
- | undefined;
1083
- /**
1084
- * What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.
1085
- */
1086
- temperature?: number | null | undefined;
1087
- /**
1088
- * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
1089
- */
1090
- topP?: number | null | undefined;
1091
- /**
1092
- * Limits the model to consider only the top k most likely tokens at each step.
1093
- */
1094
- topK?: number | null | undefined;
1095
- /**
1096
- * Controls which (if any) tool is called by the model.
1097
- */
1098
- toolChoice?:
1099
- | RetrieveAgentRequestToolChoiceAgents2
1100
- | RetrieveAgentRequestToolChoiceAgents1
1101
- | undefined;
1102
- /**
1103
- * Whether to enable parallel function calling during tool use.
1104
- */
1105
- parallelToolCalls?: boolean | undefined;
1106
- /**
1107
- * Output types that you would like the model to generate. Most models are capable of generating text, which is the default: ["text"]. The gpt-4o-audio-preview model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"].
1108
- */
1109
- modalities?:
1110
- | Array<RetrieveAgentRequestFallbackModelConfigurationModalities>
1111
- | null
1112
- | undefined;
1113
- /**
1114
- * A list of guardrails to apply to the request.
1115
- */
1116
- guardrails?:
1117
- | Array<RetrieveAgentRequestFallbackModelConfigurationGuardrails>
1118
- | undefined;
1119
- /**
1120
- * Array of fallback models to use if primary model fails
1121
- */
1122
- fallbacks?:
1123
- | Array<RetrieveAgentRequestFallbackModelConfigurationFallbacks>
1124
- | undefined;
1125
- /**
1126
- * Retry configuration for the request
1127
- */
1128
- retry?: RetrieveAgentRequestFallbackModelConfigurationAgentsRetry | undefined;
1129
- /**
1130
- * Cache configuration for the request.
1131
- */
1132
- cache?: RetrieveAgentRequestFallbackModelConfigurationCache | undefined;
1133
- /**
1134
- * Load balancer configuration for the request.
1135
- */
1136
- loadBalancer?: RetrieveAgentRequestLoadBalancerAgents1 | undefined;
1137
- /**
1138
- * Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured.
1139
- */
1140
- timeout?: RetrieveAgentRequestFallbackModelConfigurationTimeout | undefined;
1141
- };
1142
-
1143
- /**
1144
- * Retry configuration for this fallback model. Allows customizing retry count (1-5) and HTTP status codes that trigger retries.
1145
- */
1146
- export type RetrieveAgentRequestFallbackModelConfigurationRetry = {
1147
- /**
1148
- * Number of retry attempts (1-5)
1149
- */
1150
- count: number;
1151
- /**
1152
- * HTTP status codes that trigger retry logic
1153
- */
1154
- onCodes?: Array<number> | undefined;
1155
- };
1156
-
1157
- /**
1158
- * Fallback model configuration with optional parameters and retry settings.
1159
- */
1160
- export type RetrieveAgentRequestFallbackModelConfiguration2 = {
1161
- /**
1162
- * A fallback model ID string. Must support tool calling.
1163
- */
1164
- id: string;
1165
- /**
1166
- * Optional model parameters specific to this fallback model. Overrides primary model parameters if this fallback is used.
1167
- */
1168
- parameters?:
1169
- | RetrieveAgentRequestFallbackModelConfigurationParameters
1170
- | undefined;
1171
- /**
1172
- * Retry configuration for this fallback model. Allows customizing retry count (1-5) and HTTP status codes that trigger retries.
1173
- */
1174
- retry?: RetrieveAgentRequestFallbackModelConfigurationRetry | undefined;
1175
- };
1176
-
1177
- /**
1178
- * Fallback model for automatic failover when primary model request fails. Supports optional parameter overrides. Can be a simple model ID string or a configuration object with model-specific parameters. Fallbacks are tried in order.
1179
- */
1180
- export type RetrieveAgentRequestFallbackModelConfiguration =
1181
- | RetrieveAgentRequestFallbackModelConfiguration2
1182
- | string;
1183
-
1184
- export type RetrieveAgentRequestModel = {
1185
- /**
1186
- * The database ID of the primary model
1187
- */
1188
- id: string;
1189
- /**
1190
- * Optional integration ID for custom model configurations
1191
- */
1192
- integrationId?: string | null | undefined;
1193
- /**
1194
- * Model behavior parameters (snake_case) stored as part of the agent configuration. These become the default parameters used when the agent is executed. Commonly used: temperature (0-1, controls randomness), max_completion_tokens (response length), top_p (nucleus sampling). Advanced: frequency_penalty, presence_penalty, response_format (JSON/structured output), reasoning_effort (for o1/thinking models), seed (reproducibility), stop sequences. Model-specific support varies. Runtime parameters in agent execution requests can override these defaults.
1195
- */
1196
- parameters?: RetrieveAgentRequestParameters | undefined;
1197
- /**
1198
- * Retry configuration for model requests. Allows customizing retry count (1-5) and HTTP status codes that trigger retries. Default codes: [429]. Common codes: 500 (internal error), 429 (rate limit), 502/503/504 (gateway errors).
1199
- */
1200
- retry?: RetrieveAgentRequestRetry | undefined;
1201
- /**
1202
- * Optional array of fallback models (string IDs or config objects) that will be used automatically in order if the primary model fails
1203
- */
1204
- fallbackModels?:
1205
- | Array<RetrieveAgentRequestFallbackModelConfiguration2 | string>
1206
- | null
1207
- | undefined;
1208
- };
1209
-
1210
- export type RetrieveAgentRequestTeamOfAgents = {
1211
- /**
1212
- * The unique key of the agent within the workspace
1213
- */
1214
- key: string;
1215
- /**
1216
- * The role of the agent in this context. This is used to give extra information to the leader to help it decide which agent to hand off to.
1217
- */
1218
- role?: string | undefined;
1219
- };
1220
-
1221
- export type RetrieveAgentRequestMetrics = {
1222
- totalCost: number;
1223
- };
1224
-
1225
- export type RetrieveAgentRequestKnowledgeBases = {
1226
- /**
1227
- * Unique identifier of the knowledge base to search
1228
- */
1229
- knowledgeId: string;
1230
- };
1231
-
1232
- export const RetrieveAgentRequestSource = {
1233
- Internal: "internal",
1234
- External: "external",
1235
- Experiment: "experiment",
1236
- } as const;
1237
- export type RetrieveAgentRequestSource = ClosedEnum<
1238
- typeof RetrieveAgentRequestSource
1239
- >;
1240
-
1241
- /**
1242
- * Agent successfully retrieved. Returns the complete agent manifest with all configuration details, including models, tools, knowledge bases, and execution settings.
1243
- */
1244
- export type RetrieveAgentRequestResponseBody = {
1245
- id: string;
1246
- /**
1247
- * Unique identifier for the agent within the workspace
1248
- */
1249
- key: string;
1250
- displayName?: string | undefined;
1251
- workspaceId: string;
1252
- projectId: string;
1253
- createdById?: string | null | undefined;
1254
- updatedById?: string | null | undefined;
1255
- created?: string | undefined;
1256
- updated?: string | undefined;
1257
- role: string;
1258
- description: string;
1259
- systemPrompt?: string | undefined;
1260
- instructions: string;
1261
- /**
1262
- * The status of the agent. `Live` is the latest version of the agent. `Draft` is a version that is not yet published. `Pending` is a version that is pending approval. `Published` is a version that was live and has been replaced by a new version.
1263
- */
1264
- status: RetrieveAgentRequestStatus;
1265
- settings?: RetrieveAgentRequestSettings | undefined;
1266
- model: RetrieveAgentRequestModel;
1267
- versionHash?: string | undefined;
1268
- /**
1269
- * Entity storage path in the format: `project/folder/subfolder/...`
1270
- *
1271
- * @remarks
1272
- *
1273
- * The first element identifies the project, followed by nested folders (auto-created as needed).
1274
- *
1275
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
1276
- */
1277
- path: string;
1278
- /**
1279
- * Array of memory store identifiers. Accepts both memory store IDs and keys.
1280
- */
1281
- memoryStores: Array<string>;
1282
- /**
1283
- * The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
1284
- */
1285
- teamOfAgents: Array<RetrieveAgentRequestTeamOfAgents>;
1286
- metrics?: RetrieveAgentRequestMetrics | undefined;
1287
- /**
1288
- * Extracted variables from agent instructions
1289
- */
1290
- variables?: { [k: string]: any } | undefined;
1291
- /**
1292
- * Agent knowledge bases reference
1293
- */
1294
- knowledgeBases?: Array<RetrieveAgentRequestKnowledgeBases> | undefined;
1295
- source?: RetrieveAgentRequestSource | undefined;
1296
- };
1297
-
1298
- /** @internal */
1299
- export type RetrieveAgentRequestRequest$Outbound = {
1300
- agent_key: string;
1301
- };
1302
-
1303
- /** @internal */
1304
- export const RetrieveAgentRequestRequest$outboundSchema: z.ZodType<
1305
- RetrieveAgentRequestRequest$Outbound,
1306
- z.ZodTypeDef,
1307
- RetrieveAgentRequestRequest
1308
- > = z.object({
1309
- agentKey: z.string(),
1310
- }).transform((v) => {
1311
- return remap$(v, {
1312
- agentKey: "agent_key",
1313
- });
1314
- });
1315
-
1316
- export function retrieveAgentRequestRequestToJSON(
1317
- retrieveAgentRequestRequest: RetrieveAgentRequestRequest,
1318
- ): string {
1319
- return JSON.stringify(
1320
- RetrieveAgentRequestRequest$outboundSchema.parse(
1321
- retrieveAgentRequestRequest,
1322
- ),
1323
- );
1324
- }
1325
-
1326
- /** @internal */
1327
- export const RetrieveAgentRequestStatus$inboundSchema: z.ZodNativeEnum<
1328
- typeof RetrieveAgentRequestStatus
1329
- > = z.nativeEnum(RetrieveAgentRequestStatus);
1330
-
1331
- /** @internal */
1332
- export const RetrieveAgentRequestToolApprovalRequired$inboundSchema:
1333
- z.ZodNativeEnum<typeof RetrieveAgentRequestToolApprovalRequired> = z
1334
- .nativeEnum(RetrieveAgentRequestToolApprovalRequired);
1335
-
1336
- /** @internal */
1337
- export const RetrieveAgentRequestConditions$inboundSchema: z.ZodType<
1338
- RetrieveAgentRequestConditions,
1339
- z.ZodTypeDef,
1340
- unknown
1341
- > = z.object({
1342
- condition: z.string(),
1343
- operator: z.string(),
1344
- value: z.string(),
1345
- });
1346
-
1347
- export function retrieveAgentRequestConditionsFromJSON(
1348
- jsonString: string,
1349
- ): SafeParseResult<RetrieveAgentRequestConditions, SDKValidationError> {
1350
- return safeParse(
1351
- jsonString,
1352
- (x) => RetrieveAgentRequestConditions$inboundSchema.parse(JSON.parse(x)),
1353
- `Failed to parse 'RetrieveAgentRequestConditions' from JSON`,
1354
- );
1355
- }
1356
-
1357
- /** @internal */
1358
- export const RetrieveAgentRequestTools$inboundSchema: z.ZodType<
1359
- RetrieveAgentRequestTools,
1360
- z.ZodTypeDef,
1361
- unknown
1362
- > = z.object({
1363
- id: z.string(),
1364
- key: z.string().optional(),
1365
- action_type: z.string(),
1366
- display_name: z.string().optional(),
1367
- description: z.string().optional(),
1368
- requires_approval: z.boolean().default(false),
1369
- tool_id: z.string().optional(),
1370
- conditions: z.array(
1371
- z.lazy(() => RetrieveAgentRequestConditions$inboundSchema),
1372
- ).optional(),
1373
- timeout: z.number().default(120),
1374
- }).transform((v) => {
1375
- return remap$(v, {
1376
- "action_type": "actionType",
1377
- "display_name": "displayName",
1378
- "requires_approval": "requiresApproval",
1379
- "tool_id": "toolId",
1380
- });
1381
- });
1382
-
1383
- export function retrieveAgentRequestToolsFromJSON(
1384
- jsonString: string,
1385
- ): SafeParseResult<RetrieveAgentRequestTools, SDKValidationError> {
1386
- return safeParse(
1387
- jsonString,
1388
- (x) => RetrieveAgentRequestTools$inboundSchema.parse(JSON.parse(x)),
1389
- `Failed to parse 'RetrieveAgentRequestTools' from JSON`,
1390
- );
1391
- }
1392
-
1393
- /** @internal */
1394
- export const RetrieveAgentRequestExecuteOn$inboundSchema: z.ZodNativeEnum<
1395
- typeof RetrieveAgentRequestExecuteOn
1396
- > = z.nativeEnum(RetrieveAgentRequestExecuteOn);
1397
-
1398
- /** @internal */
1399
- export const RetrieveAgentRequestEvaluators$inboundSchema: z.ZodType<
1400
- RetrieveAgentRequestEvaluators,
1401
- z.ZodTypeDef,
1402
- unknown
1403
- > = z.object({
1404
- id: z.string(),
1405
- sample_rate: z.number().default(50),
1406
- execute_on: RetrieveAgentRequestExecuteOn$inboundSchema,
1407
- }).transform((v) => {
1408
- return remap$(v, {
1409
- "sample_rate": "sampleRate",
1410
- "execute_on": "executeOn",
1411
- });
1412
- });
1413
-
1414
- export function retrieveAgentRequestEvaluatorsFromJSON(
1415
- jsonString: string,
1416
- ): SafeParseResult<RetrieveAgentRequestEvaluators, SDKValidationError> {
1417
- return safeParse(
1418
- jsonString,
1419
- (x) => RetrieveAgentRequestEvaluators$inboundSchema.parse(JSON.parse(x)),
1420
- `Failed to parse 'RetrieveAgentRequestEvaluators' from JSON`,
1421
- );
1422
- }
1423
-
1424
- /** @internal */
1425
- export const RetrieveAgentRequestAgentsExecuteOn$inboundSchema: z.ZodNativeEnum<
1426
- typeof RetrieveAgentRequestAgentsExecuteOn
1427
- > = z.nativeEnum(RetrieveAgentRequestAgentsExecuteOn);
1428
-
1429
- /** @internal */
1430
- export const RetrieveAgentRequestGuardrails$inboundSchema: z.ZodType<
1431
- RetrieveAgentRequestGuardrails,
1432
- z.ZodTypeDef,
1433
- unknown
1434
- > = z.object({
1435
- id: z.string(),
1436
- sample_rate: z.number().default(50),
1437
- execute_on: RetrieveAgentRequestAgentsExecuteOn$inboundSchema,
1438
- }).transform((v) => {
1439
- return remap$(v, {
1440
- "sample_rate": "sampleRate",
1441
- "execute_on": "executeOn",
1442
- });
1443
- });
1444
-
1445
- export function retrieveAgentRequestGuardrailsFromJSON(
1446
- jsonString: string,
1447
- ): SafeParseResult<RetrieveAgentRequestGuardrails, SDKValidationError> {
1448
- return safeParse(
1449
- jsonString,
1450
- (x) => RetrieveAgentRequestGuardrails$inboundSchema.parse(JSON.parse(x)),
1451
- `Failed to parse 'RetrieveAgentRequestGuardrails' from JSON`,
1452
- );
1453
- }
1454
-
1455
- /** @internal */
1456
- export const RetrieveAgentRequestSettings$inboundSchema: z.ZodType<
1457
- RetrieveAgentRequestSettings,
1458
- z.ZodTypeDef,
1459
- unknown
1460
- > = z.object({
1461
- max_iterations: z.number().int().default(100),
1462
- max_execution_time: z.number().int().default(600),
1463
- max_cost: z.number().default(0),
1464
- tool_approval_required: RetrieveAgentRequestToolApprovalRequired$inboundSchema
1465
- .default("respect_tool"),
1466
- tools: z.array(z.lazy(() => RetrieveAgentRequestTools$inboundSchema))
1467
- .optional(),
1468
- evaluators: z.array(
1469
- z.lazy(() => RetrieveAgentRequestEvaluators$inboundSchema),
1470
- ).optional(),
1471
- guardrails: z.array(
1472
- z.lazy(() => RetrieveAgentRequestGuardrails$inboundSchema),
1473
- ).optional(),
1474
- }).transform((v) => {
1475
- return remap$(v, {
1476
- "max_iterations": "maxIterations",
1477
- "max_execution_time": "maxExecutionTime",
1478
- "max_cost": "maxCost",
1479
- "tool_approval_required": "toolApprovalRequired",
1480
- });
1481
- });
1482
-
1483
- export function retrieveAgentRequestSettingsFromJSON(
1484
- jsonString: string,
1485
- ): SafeParseResult<RetrieveAgentRequestSettings, SDKValidationError> {
1486
- return safeParse(
1487
- jsonString,
1488
- (x) => RetrieveAgentRequestSettings$inboundSchema.parse(JSON.parse(x)),
1489
- `Failed to parse 'RetrieveAgentRequestSettings' from JSON`,
1490
- );
1491
- }
1492
-
1493
- /** @internal */
1494
- export const RetrieveAgentRequestVoice$inboundSchema: z.ZodNativeEnum<
1495
- typeof RetrieveAgentRequestVoice
1496
- > = z.nativeEnum(RetrieveAgentRequestVoice);
1497
-
1498
- /** @internal */
1499
- export const RetrieveAgentRequestFormat$inboundSchema: z.ZodNativeEnum<
1500
- typeof RetrieveAgentRequestFormat
1501
- > = z.nativeEnum(RetrieveAgentRequestFormat);
1502
-
1503
- /** @internal */
1504
- export const RetrieveAgentRequestAudio$inboundSchema: z.ZodType<
1505
- RetrieveAgentRequestAudio,
1506
- z.ZodTypeDef,
1507
- unknown
1508
- > = z.object({
1509
- voice: RetrieveAgentRequestVoice$inboundSchema,
1510
- format: RetrieveAgentRequestFormat$inboundSchema,
1511
- });
1512
-
1513
- export function retrieveAgentRequestAudioFromJSON(
1514
- jsonString: string,
1515
- ): SafeParseResult<RetrieveAgentRequestAudio, SDKValidationError> {
1516
- return safeParse(
1517
- jsonString,
1518
- (x) => RetrieveAgentRequestAudio$inboundSchema.parse(JSON.parse(x)),
1519
- `Failed to parse 'RetrieveAgentRequestAudio' from JSON`,
1520
- );
1521
- }
1522
-
1523
- /** @internal */
1524
- export const RetrieveAgentRequestResponseFormatJsonSchema$inboundSchema:
1525
- z.ZodType<
1526
- RetrieveAgentRequestResponseFormatJsonSchema,
1527
- z.ZodTypeDef,
1528
- unknown
1529
- > = z.object({
1530
- description: z.string().optional(),
1531
- name: z.string(),
1532
- schema: z.any().optional(),
1533
- strict: z.boolean().default(false),
1534
- });
1535
-
1536
- export function retrieveAgentRequestResponseFormatJsonSchemaFromJSON(
1537
- jsonString: string,
1538
- ): SafeParseResult<
1539
- RetrieveAgentRequestResponseFormatJsonSchema,
1540
- SDKValidationError
1541
- > {
1542
- return safeParse(
1543
- jsonString,
1544
- (x) =>
1545
- RetrieveAgentRequestResponseFormatJsonSchema$inboundSchema.parse(
1546
- JSON.parse(x),
1547
- ),
1548
- `Failed to parse 'RetrieveAgentRequestResponseFormatJsonSchema' from JSON`,
1549
- );
1550
- }
1551
-
1552
- /** @internal */
1553
- export const RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema:
1554
- z.ZodType<
1555
- RetrieveAgentRequestResponseFormatAgentsJSONSchema,
1556
- z.ZodTypeDef,
1557
- unknown
1558
- > = z.object({
1559
- type: z.literal("json_schema"),
1560
- json_schema: z.lazy(() =>
1561
- RetrieveAgentRequestResponseFormatJsonSchema$inboundSchema
1562
- ),
1563
- }).transform((v) => {
1564
- return remap$(v, {
1565
- "json_schema": "jsonSchema",
1566
- });
1567
- });
1568
-
1569
- export function retrieveAgentRequestResponseFormatAgentsJSONSchemaFromJSON(
1570
- jsonString: string,
1571
- ): SafeParseResult<
1572
- RetrieveAgentRequestResponseFormatAgentsJSONSchema,
1573
- SDKValidationError
1574
- > {
1575
- return safeParse(
1576
- jsonString,
1577
- (x) =>
1578
- RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema.parse(
1579
- JSON.parse(x),
1580
- ),
1581
- `Failed to parse 'RetrieveAgentRequestResponseFormatAgentsJSONSchema' from JSON`,
1582
- );
1583
- }
1584
-
1585
- /** @internal */
1586
- export const RetrieveAgentRequestResponseFormatJSONObject$inboundSchema:
1587
- z.ZodType<
1588
- RetrieveAgentRequestResponseFormatJSONObject,
1589
- z.ZodTypeDef,
1590
- unknown
1591
- > = z.object({
1592
- type: z.literal("json_object"),
1593
- });
1594
-
1595
- export function retrieveAgentRequestResponseFormatJSONObjectFromJSON(
1596
- jsonString: string,
1597
- ): SafeParseResult<
1598
- RetrieveAgentRequestResponseFormatJSONObject,
1599
- SDKValidationError
1600
- > {
1601
- return safeParse(
1602
- jsonString,
1603
- (x) =>
1604
- RetrieveAgentRequestResponseFormatJSONObject$inboundSchema.parse(
1605
- JSON.parse(x),
1606
- ),
1607
- `Failed to parse 'RetrieveAgentRequestResponseFormatJSONObject' from JSON`,
1608
- );
1609
- }
1610
-
1611
- /** @internal */
1612
- export const RetrieveAgentRequestResponseFormatText$inboundSchema: z.ZodType<
1613
- RetrieveAgentRequestResponseFormatText,
1614
- z.ZodTypeDef,
1615
- unknown
1616
- > = z.object({
1617
- type: z.literal("text"),
1618
- });
1619
-
1620
- export function retrieveAgentRequestResponseFormatTextFromJSON(
1621
- jsonString: string,
1622
- ): SafeParseResult<RetrieveAgentRequestResponseFormatText, SDKValidationError> {
1623
- return safeParse(
1624
- jsonString,
1625
- (x) =>
1626
- RetrieveAgentRequestResponseFormatText$inboundSchema.parse(JSON.parse(x)),
1627
- `Failed to parse 'RetrieveAgentRequestResponseFormatText' from JSON`,
1628
- );
1629
- }
1630
-
1631
- /** @internal */
1632
- export const RetrieveAgentRequestResponseFormat$inboundSchema: z.ZodType<
1633
- RetrieveAgentRequestResponseFormat,
1634
- z.ZodTypeDef,
1635
- unknown
1636
- > = z.union([
1637
- z.lazy(() => RetrieveAgentRequestResponseFormatText$inboundSchema),
1638
- z.lazy(() => RetrieveAgentRequestResponseFormatJSONObject$inboundSchema),
1639
- z.lazy(() =>
1640
- RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema
1641
- ),
1642
- ]);
1643
-
1644
- export function retrieveAgentRequestResponseFormatFromJSON(
1645
- jsonString: string,
1646
- ): SafeParseResult<RetrieveAgentRequestResponseFormat, SDKValidationError> {
1647
- return safeParse(
1648
- jsonString,
1649
- (x) =>
1650
- RetrieveAgentRequestResponseFormat$inboundSchema.parse(JSON.parse(x)),
1651
- `Failed to parse 'RetrieveAgentRequestResponseFormat' from JSON`,
1652
- );
1653
- }
1654
-
1655
- /** @internal */
1656
- export const RetrieveAgentRequestReasoningEffort$inboundSchema: z.ZodNativeEnum<
1657
- typeof RetrieveAgentRequestReasoningEffort
1658
- > = z.nativeEnum(RetrieveAgentRequestReasoningEffort);
1659
-
1660
- /** @internal */
1661
- export const RetrieveAgentRequestStop$inboundSchema: z.ZodType<
1662
- RetrieveAgentRequestStop,
1663
- z.ZodTypeDef,
1664
- unknown
1665
- > = z.union([z.string(), z.array(z.string())]);
1666
-
1667
- export function retrieveAgentRequestStopFromJSON(
1668
- jsonString: string,
1669
- ): SafeParseResult<RetrieveAgentRequestStop, SDKValidationError> {
1670
- return safeParse(
1671
- jsonString,
1672
- (x) => RetrieveAgentRequestStop$inboundSchema.parse(JSON.parse(x)),
1673
- `Failed to parse 'RetrieveAgentRequestStop' from JSON`,
1674
- );
1675
- }
1676
-
1677
- /** @internal */
1678
- export const RetrieveAgentRequestStreamOptions$inboundSchema: z.ZodType<
1679
- RetrieveAgentRequestStreamOptions,
1680
- z.ZodTypeDef,
1681
- unknown
1682
- > = z.object({
1683
- include_usage: z.boolean().optional(),
1684
- }).transform((v) => {
1685
- return remap$(v, {
1686
- "include_usage": "includeUsage",
1687
- });
1688
- });
1689
-
1690
- export function retrieveAgentRequestStreamOptionsFromJSON(
1691
- jsonString: string,
1692
- ): SafeParseResult<RetrieveAgentRequestStreamOptions, SDKValidationError> {
1693
- return safeParse(
1694
- jsonString,
1695
- (x) => RetrieveAgentRequestStreamOptions$inboundSchema.parse(JSON.parse(x)),
1696
- `Failed to parse 'RetrieveAgentRequestStreamOptions' from JSON`,
1697
- );
1698
- }
1699
-
1700
- /** @internal */
1701
- export const RetrieveAgentRequestThinking$inboundSchema: z.ZodType<
1702
- RetrieveAgentRequestThinking,
1703
- z.ZodTypeDef,
1704
- unknown
1705
- > = z.union([
1706
- components.ThinkingConfigDisabledSchema$inboundSchema,
1707
- components.ThinkingConfigEnabledSchema$inboundSchema,
1708
- ]);
1709
-
1710
- export function retrieveAgentRequestThinkingFromJSON(
1711
- jsonString: string,
1712
- ): SafeParseResult<RetrieveAgentRequestThinking, SDKValidationError> {
1713
- return safeParse(
1714
- jsonString,
1715
- (x) => RetrieveAgentRequestThinking$inboundSchema.parse(JSON.parse(x)),
1716
- `Failed to parse 'RetrieveAgentRequestThinking' from JSON`,
1717
- );
1718
- }
1719
-
1720
- /** @internal */
1721
- export const RetrieveAgentRequestToolChoiceType$inboundSchema: z.ZodNativeEnum<
1722
- typeof RetrieveAgentRequestToolChoiceType
1723
- > = z.nativeEnum(RetrieveAgentRequestToolChoiceType);
1724
-
1725
- /** @internal */
1726
- export const RetrieveAgentRequestToolChoiceFunction$inboundSchema: z.ZodType<
1727
- RetrieveAgentRequestToolChoiceFunction,
1728
- z.ZodTypeDef,
1729
- unknown
1730
- > = z.object({
1731
- name: z.string(),
1732
- });
1733
-
1734
- export function retrieveAgentRequestToolChoiceFunctionFromJSON(
1735
- jsonString: string,
1736
- ): SafeParseResult<RetrieveAgentRequestToolChoiceFunction, SDKValidationError> {
1737
- return safeParse(
1738
- jsonString,
1739
- (x) =>
1740
- RetrieveAgentRequestToolChoiceFunction$inboundSchema.parse(JSON.parse(x)),
1741
- `Failed to parse 'RetrieveAgentRequestToolChoiceFunction' from JSON`,
1742
- );
1743
- }
1744
-
1745
- /** @internal */
1746
- export const RetrieveAgentRequestToolChoice2$inboundSchema: z.ZodType<
1747
- RetrieveAgentRequestToolChoice2,
1748
- z.ZodTypeDef,
1749
- unknown
1750
- > = z.object({
1751
- type: RetrieveAgentRequestToolChoiceType$inboundSchema.optional(),
1752
- function: z.lazy(() => RetrieveAgentRequestToolChoiceFunction$inboundSchema),
1753
- });
1754
-
1755
- export function retrieveAgentRequestToolChoice2FromJSON(
1756
- jsonString: string,
1757
- ): SafeParseResult<RetrieveAgentRequestToolChoice2, SDKValidationError> {
1758
- return safeParse(
1759
- jsonString,
1760
- (x) => RetrieveAgentRequestToolChoice2$inboundSchema.parse(JSON.parse(x)),
1761
- `Failed to parse 'RetrieveAgentRequestToolChoice2' from JSON`,
1762
- );
1763
- }
1764
-
1765
- /** @internal */
1766
- export const RetrieveAgentRequestToolChoice1$inboundSchema: z.ZodNativeEnum<
1767
- typeof RetrieveAgentRequestToolChoice1
1768
- > = z.nativeEnum(RetrieveAgentRequestToolChoice1);
1769
-
1770
- /** @internal */
1771
- export const RetrieveAgentRequestToolChoice$inboundSchema: z.ZodType<
1772
- RetrieveAgentRequestToolChoice,
1773
- z.ZodTypeDef,
1774
- unknown
1775
- > = z.union([
1776
- z.lazy(() => RetrieveAgentRequestToolChoice2$inboundSchema),
1777
- RetrieveAgentRequestToolChoice1$inboundSchema,
1778
- ]);
1779
-
1780
- export function retrieveAgentRequestToolChoiceFromJSON(
1781
- jsonString: string,
1782
- ): SafeParseResult<RetrieveAgentRequestToolChoice, SDKValidationError> {
1783
- return safeParse(
1784
- jsonString,
1785
- (x) => RetrieveAgentRequestToolChoice$inboundSchema.parse(JSON.parse(x)),
1786
- `Failed to parse 'RetrieveAgentRequestToolChoice' from JSON`,
1787
- );
1788
- }
1789
-
1790
- /** @internal */
1791
- export const RetrieveAgentRequestModalities$inboundSchema: z.ZodNativeEnum<
1792
- typeof RetrieveAgentRequestModalities
1793
- > = z.nativeEnum(RetrieveAgentRequestModalities);
1794
-
1795
- /** @internal */
1796
- export const RetrieveAgentRequestId1$inboundSchema: z.ZodNativeEnum<
1797
- typeof RetrieveAgentRequestId1
1798
- > = z.nativeEnum(RetrieveAgentRequestId1);
1799
-
1800
- /** @internal */
1801
- export const RetrieveAgentRequestId$inboundSchema: z.ZodType<
1802
- RetrieveAgentRequestId,
1803
- z.ZodTypeDef,
1804
- unknown
1805
- > = z.union([RetrieveAgentRequestId1$inboundSchema, z.string()]);
1806
-
1807
- export function retrieveAgentRequestIdFromJSON(
1808
- jsonString: string,
1809
- ): SafeParseResult<RetrieveAgentRequestId, SDKValidationError> {
1810
- return safeParse(
1811
- jsonString,
1812
- (x) => RetrieveAgentRequestId$inboundSchema.parse(JSON.parse(x)),
1813
- `Failed to parse 'RetrieveAgentRequestId' from JSON`,
1814
- );
1815
- }
1816
-
1817
- /** @internal */
1818
- export const RetrieveAgentRequestAgentsResponseExecuteOn$inboundSchema:
1819
- z.ZodNativeEnum<typeof RetrieveAgentRequestAgentsResponseExecuteOn> = z
1820
- .nativeEnum(RetrieveAgentRequestAgentsResponseExecuteOn);
1821
-
1822
- /** @internal */
1823
- export const RetrieveAgentRequestAgentsGuardrails$inboundSchema: z.ZodType<
1824
- RetrieveAgentRequestAgentsGuardrails,
1825
- z.ZodTypeDef,
1826
- unknown
1827
- > = z.object({
1828
- id: z.union([RetrieveAgentRequestId1$inboundSchema, z.string()]),
1829
- execute_on: RetrieveAgentRequestAgentsResponseExecuteOn$inboundSchema,
1830
- }).transform((v) => {
1831
- return remap$(v, {
1832
- "execute_on": "executeOn",
1833
- });
1834
- });
1835
-
1836
- export function retrieveAgentRequestAgentsGuardrailsFromJSON(
1837
- jsonString: string,
1838
- ): SafeParseResult<RetrieveAgentRequestAgentsGuardrails, SDKValidationError> {
1839
- return safeParse(
1840
- jsonString,
1841
- (x) =>
1842
- RetrieveAgentRequestAgentsGuardrails$inboundSchema.parse(JSON.parse(x)),
1843
- `Failed to parse 'RetrieveAgentRequestAgentsGuardrails' from JSON`,
1844
- );
1845
- }
1846
-
1847
- /** @internal */
1848
- export const RetrieveAgentRequestFallbacks$inboundSchema: z.ZodType<
1849
- RetrieveAgentRequestFallbacks,
1850
- z.ZodTypeDef,
1851
- unknown
1852
- > = z.object({
1853
- model: z.string(),
1854
- });
1855
-
1856
- export function retrieveAgentRequestFallbacksFromJSON(
1857
- jsonString: string,
1858
- ): SafeParseResult<RetrieveAgentRequestFallbacks, SDKValidationError> {
1859
- return safeParse(
1860
- jsonString,
1861
- (x) => RetrieveAgentRequestFallbacks$inboundSchema.parse(JSON.parse(x)),
1862
- `Failed to parse 'RetrieveAgentRequestFallbacks' from JSON`,
1863
- );
1864
- }
1865
-
1866
- /** @internal */
1867
- export const RetrieveAgentRequestAgentsRetry$inboundSchema: z.ZodType<
1868
- RetrieveAgentRequestAgentsRetry,
1869
- z.ZodTypeDef,
1870
- unknown
1871
- > = z.object({
1872
- count: z.number().default(3),
1873
- on_codes: z.array(z.number()).optional(),
1874
- }).transform((v) => {
1875
- return remap$(v, {
1876
- "on_codes": "onCodes",
1877
- });
1878
- });
1879
-
1880
- export function retrieveAgentRequestAgentsRetryFromJSON(
1881
- jsonString: string,
1882
- ): SafeParseResult<RetrieveAgentRequestAgentsRetry, SDKValidationError> {
1883
- return safeParse(
1884
- jsonString,
1885
- (x) => RetrieveAgentRequestAgentsRetry$inboundSchema.parse(JSON.parse(x)),
1886
- `Failed to parse 'RetrieveAgentRequestAgentsRetry' from JSON`,
1887
- );
1888
- }
1889
-
1890
- /** @internal */
1891
- export const RetrieveAgentRequestType$inboundSchema: z.ZodNativeEnum<
1892
- typeof RetrieveAgentRequestType
1893
- > = z.nativeEnum(RetrieveAgentRequestType);
1894
-
1895
- /** @internal */
1896
- export const RetrieveAgentRequestCache$inboundSchema: z.ZodType<
1897
- RetrieveAgentRequestCache,
1898
- z.ZodTypeDef,
1899
- unknown
1900
- > = z.object({
1901
- ttl: z.number().default(1800),
1902
- type: RetrieveAgentRequestType$inboundSchema,
1903
- });
1904
-
1905
- export function retrieveAgentRequestCacheFromJSON(
1906
- jsonString: string,
1907
- ): SafeParseResult<RetrieveAgentRequestCache, SDKValidationError> {
1908
- return safeParse(
1909
- jsonString,
1910
- (x) => RetrieveAgentRequestCache$inboundSchema.parse(JSON.parse(x)),
1911
- `Failed to parse 'RetrieveAgentRequestCache' from JSON`,
1912
- );
1913
- }
1914
-
1915
- /** @internal */
1916
- export const RetrieveAgentRequestLoadBalancerType$inboundSchema:
1917
- z.ZodNativeEnum<typeof RetrieveAgentRequestLoadBalancerType> = z.nativeEnum(
1918
- RetrieveAgentRequestLoadBalancerType,
1919
- );
1920
-
1921
- /** @internal */
1922
- export const RetrieveAgentRequestLoadBalancerModels$inboundSchema: z.ZodType<
1923
- RetrieveAgentRequestLoadBalancerModels,
1924
- z.ZodTypeDef,
1925
- unknown
1926
- > = z.object({
1927
- model: z.string(),
1928
- weight: z.number().default(0.5),
1929
- });
1930
-
1931
- export function retrieveAgentRequestLoadBalancerModelsFromJSON(
1932
- jsonString: string,
1933
- ): SafeParseResult<RetrieveAgentRequestLoadBalancerModels, SDKValidationError> {
1934
- return safeParse(
1935
- jsonString,
1936
- (x) =>
1937
- RetrieveAgentRequestLoadBalancerModels$inboundSchema.parse(JSON.parse(x)),
1938
- `Failed to parse 'RetrieveAgentRequestLoadBalancerModels' from JSON`,
1939
- );
1940
- }
1941
-
1942
- /** @internal */
1943
- export const RetrieveAgentRequestLoadBalancer1$inboundSchema: z.ZodType<
1944
- RetrieveAgentRequestLoadBalancer1,
1945
- z.ZodTypeDef,
1946
- unknown
1947
- > = z.object({
1948
- type: RetrieveAgentRequestLoadBalancerType$inboundSchema,
1949
- models: z.array(
1950
- z.lazy(() => RetrieveAgentRequestLoadBalancerModels$inboundSchema),
1951
- ),
1952
- });
1953
-
1954
- export function retrieveAgentRequestLoadBalancer1FromJSON(
1955
- jsonString: string,
1956
- ): SafeParseResult<RetrieveAgentRequestLoadBalancer1, SDKValidationError> {
1957
- return safeParse(
1958
- jsonString,
1959
- (x) => RetrieveAgentRequestLoadBalancer1$inboundSchema.parse(JSON.parse(x)),
1960
- `Failed to parse 'RetrieveAgentRequestLoadBalancer1' from JSON`,
1961
- );
1962
- }
1963
-
1964
- /** @internal */
1965
- export const RetrieveAgentRequestLoadBalancer$inboundSchema: z.ZodType<
1966
- RetrieveAgentRequestLoadBalancer,
1967
- z.ZodTypeDef,
1968
- unknown
1969
- > = z.lazy(() => RetrieveAgentRequestLoadBalancer1$inboundSchema);
1970
-
1971
- export function retrieveAgentRequestLoadBalancerFromJSON(
1972
- jsonString: string,
1973
- ): SafeParseResult<RetrieveAgentRequestLoadBalancer, SDKValidationError> {
1974
- return safeParse(
1975
- jsonString,
1976
- (x) => RetrieveAgentRequestLoadBalancer$inboundSchema.parse(JSON.parse(x)),
1977
- `Failed to parse 'RetrieveAgentRequestLoadBalancer' from JSON`,
1978
- );
1979
- }
1980
-
1981
- /** @internal */
1982
- export const RetrieveAgentRequestTimeout$inboundSchema: z.ZodType<
1983
- RetrieveAgentRequestTimeout,
1984
- z.ZodTypeDef,
1985
- unknown
1986
- > = z.object({
1987
- call_timeout: z.number(),
1988
- }).transform((v) => {
1989
- return remap$(v, {
1990
- "call_timeout": "callTimeout",
1991
- });
1992
- });
1993
-
1994
- export function retrieveAgentRequestTimeoutFromJSON(
1995
- jsonString: string,
1996
- ): SafeParseResult<RetrieveAgentRequestTimeout, SDKValidationError> {
1997
- return safeParse(
1998
- jsonString,
1999
- (x) => RetrieveAgentRequestTimeout$inboundSchema.parse(JSON.parse(x)),
2000
- `Failed to parse 'RetrieveAgentRequestTimeout' from JSON`,
2001
- );
2002
- }
2003
-
2004
- /** @internal */
2005
- export const RetrieveAgentRequestParameters$inboundSchema: z.ZodType<
2006
- RetrieveAgentRequestParameters,
2007
- z.ZodTypeDef,
2008
- unknown
2009
- > = z.object({
2010
- name: z.string().optional(),
2011
- audio: z.nullable(z.lazy(() => RetrieveAgentRequestAudio$inboundSchema))
2012
- .optional(),
2013
- frequency_penalty: z.nullable(z.number()).optional(),
2014
- max_tokens: z.nullable(z.number().int()).optional(),
2015
- max_completion_tokens: z.nullable(z.number().int()).optional(),
2016
- logprobs: z.nullable(z.boolean()).optional(),
2017
- top_logprobs: z.nullable(z.number().int()).optional(),
2018
- n: z.nullable(z.number().int()).optional(),
2019
- presence_penalty: z.nullable(z.number()).optional(),
2020
- response_format: z.union([
2021
- z.lazy(() => RetrieveAgentRequestResponseFormatText$inboundSchema),
2022
- z.lazy(() => RetrieveAgentRequestResponseFormatJSONObject$inboundSchema),
2023
- z.lazy(() =>
2024
- RetrieveAgentRequestResponseFormatAgentsJSONSchema$inboundSchema
2025
- ),
2026
- ]).optional(),
2027
- reasoning_effort: RetrieveAgentRequestReasoningEffort$inboundSchema
2028
- .optional(),
2029
- verbosity: z.string().optional(),
2030
- seed: z.nullable(z.number()).optional(),
2031
- stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
2032
- stream_options: z.nullable(
2033
- z.lazy(() => RetrieveAgentRequestStreamOptions$inboundSchema),
2034
- ).optional(),
2035
- thinking: z.union([
2036
- components.ThinkingConfigDisabledSchema$inboundSchema,
2037
- components.ThinkingConfigEnabledSchema$inboundSchema,
2038
- ]).optional(),
2039
- temperature: z.nullable(z.number()).optional(),
2040
- top_p: z.nullable(z.number()).optional(),
2041
- top_k: z.nullable(z.number()).optional(),
2042
- tool_choice: z.union([
2043
- z.lazy(() => RetrieveAgentRequestToolChoice2$inboundSchema),
2044
- RetrieveAgentRequestToolChoice1$inboundSchema,
2045
- ]).optional(),
2046
- parallel_tool_calls: z.boolean().optional(),
2047
- modalities: z.nullable(z.array(RetrieveAgentRequestModalities$inboundSchema))
2048
- .optional(),
2049
- guardrails: z.array(
2050
- z.lazy(() => RetrieveAgentRequestAgentsGuardrails$inboundSchema),
2051
- ).optional(),
2052
- fallbacks: z.array(z.lazy(() => RetrieveAgentRequestFallbacks$inboundSchema))
2053
- .optional(),
2054
- retry: z.lazy(() => RetrieveAgentRequestAgentsRetry$inboundSchema).optional(),
2055
- cache: z.lazy(() => RetrieveAgentRequestCache$inboundSchema).optional(),
2056
- load_balancer: z.lazy(() => RetrieveAgentRequestLoadBalancer1$inboundSchema)
2057
- .optional(),
2058
- timeout: z.lazy(() => RetrieveAgentRequestTimeout$inboundSchema).optional(),
2059
- }).transform((v) => {
2060
- return remap$(v, {
2061
- "frequency_penalty": "frequencyPenalty",
2062
- "max_tokens": "maxTokens",
2063
- "max_completion_tokens": "maxCompletionTokens",
2064
- "top_logprobs": "topLogprobs",
2065
- "presence_penalty": "presencePenalty",
2066
- "response_format": "responseFormat",
2067
- "reasoning_effort": "reasoningEffort",
2068
- "stream_options": "streamOptions",
2069
- "top_p": "topP",
2070
- "top_k": "topK",
2071
- "tool_choice": "toolChoice",
2072
- "parallel_tool_calls": "parallelToolCalls",
2073
- "load_balancer": "loadBalancer",
2074
- });
2075
- });
2076
-
2077
- export function retrieveAgentRequestParametersFromJSON(
2078
- jsonString: string,
2079
- ): SafeParseResult<RetrieveAgentRequestParameters, SDKValidationError> {
2080
- return safeParse(
2081
- jsonString,
2082
- (x) => RetrieveAgentRequestParameters$inboundSchema.parse(JSON.parse(x)),
2083
- `Failed to parse 'RetrieveAgentRequestParameters' from JSON`,
2084
- );
2085
- }
2086
-
2087
- /** @internal */
2088
- export const RetrieveAgentRequestRetry$inboundSchema: z.ZodType<
2089
- RetrieveAgentRequestRetry,
2090
- z.ZodTypeDef,
2091
- unknown
2092
- > = z.object({
2093
- count: z.number().default(3),
2094
- on_codes: z.array(z.number()).optional(),
2095
- }).transform((v) => {
2096
- return remap$(v, {
2097
- "on_codes": "onCodes",
2098
- });
2099
- });
2100
-
2101
- export function retrieveAgentRequestRetryFromJSON(
2102
- jsonString: string,
2103
- ): SafeParseResult<RetrieveAgentRequestRetry, SDKValidationError> {
2104
- return safeParse(
2105
- jsonString,
2106
- (x) => RetrieveAgentRequestRetry$inboundSchema.parse(JSON.parse(x)),
2107
- `Failed to parse 'RetrieveAgentRequestRetry' from JSON`,
2108
- );
2109
- }
2110
-
2111
- /** @internal */
2112
- export const RetrieveAgentRequestFallbackModelConfigurationVoice$inboundSchema:
2113
- z.ZodNativeEnum<typeof RetrieveAgentRequestFallbackModelConfigurationVoice> =
2114
- z.nativeEnum(RetrieveAgentRequestFallbackModelConfigurationVoice);
2115
-
2116
- /** @internal */
2117
- export const RetrieveAgentRequestFallbackModelConfigurationFormat$inboundSchema:
2118
- z.ZodNativeEnum<typeof RetrieveAgentRequestFallbackModelConfigurationFormat> =
2119
- z.nativeEnum(RetrieveAgentRequestFallbackModelConfigurationFormat);
2120
-
2121
- /** @internal */
2122
- export const RetrieveAgentRequestFallbackModelConfigurationAudio$inboundSchema:
2123
- z.ZodType<
2124
- RetrieveAgentRequestFallbackModelConfigurationAudio,
2125
- z.ZodTypeDef,
2126
- unknown
2127
- > = z.object({
2128
- voice: RetrieveAgentRequestFallbackModelConfigurationVoice$inboundSchema,
2129
- format: RetrieveAgentRequestFallbackModelConfigurationFormat$inboundSchema,
2130
- });
2131
-
2132
- export function retrieveAgentRequestFallbackModelConfigurationAudioFromJSON(
2133
- jsonString: string,
2134
- ): SafeParseResult<
2135
- RetrieveAgentRequestFallbackModelConfigurationAudio,
2136
- SDKValidationError
2137
- > {
2138
- return safeParse(
2139
- jsonString,
2140
- (x) =>
2141
- RetrieveAgentRequestFallbackModelConfigurationAudio$inboundSchema.parse(
2142
- JSON.parse(x),
2143
- ),
2144
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationAudio' from JSON`,
2145
- );
2146
- }
2147
-
2148
- /** @internal */
2149
- export const RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$inboundSchema:
2150
- z.ZodType<
2151
- RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema,
2152
- z.ZodTypeDef,
2153
- unknown
2154
- > = z.object({
2155
- description: z.string().optional(),
2156
- name: z.string(),
2157
- schema: z.any().optional(),
2158
- strict: z.boolean().default(false),
2159
- });
2160
-
2161
- export function retrieveAgentRequestResponseFormatAgentsResponseJsonSchemaFromJSON(
2162
- jsonString: string,
2163
- ): SafeParseResult<
2164
- RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema,
2165
- SDKValidationError
2166
- > {
2167
- return safeParse(
2168
- jsonString,
2169
- (x) =>
2170
- RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$inboundSchema
2171
- .parse(JSON.parse(x)),
2172
- `Failed to parse 'RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema' from JSON`,
2173
- );
2174
- }
2175
-
2176
- /** @internal */
2177
- export const RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema:
2178
- z.ZodType<
2179
- RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema,
2180
- z.ZodTypeDef,
2181
- unknown
2182
- > = z.object({
2183
- type: z.literal("json_schema"),
2184
- json_schema: z.lazy(() =>
2185
- RetrieveAgentRequestResponseFormatAgentsResponseJsonSchema$inboundSchema
2186
- ),
2187
- }).transform((v) => {
2188
- return remap$(v, {
2189
- "json_schema": "jsonSchema",
2190
- });
2191
- });
2192
-
2193
- export function retrieveAgentRequestResponseFormatAgentsResponse200JSONSchemaFromJSON(
2194
- jsonString: string,
2195
- ): SafeParseResult<
2196
- RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema,
2197
- SDKValidationError
2198
- > {
2199
- return safeParse(
2200
- jsonString,
2201
- (x) =>
2202
- RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema
2203
- .parse(JSON.parse(x)),
2204
- `Failed to parse 'RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema' from JSON`,
2205
- );
2206
- }
2207
-
2208
- /** @internal */
2209
- export const RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema:
2210
- z.ZodType<
2211
- RetrieveAgentRequestResponseFormatAgentsJSONObject,
2212
- z.ZodTypeDef,
2213
- unknown
2214
- > = z.object({
2215
- type: z.literal("json_object"),
2216
- });
2217
-
2218
- export function retrieveAgentRequestResponseFormatAgentsJSONObjectFromJSON(
2219
- jsonString: string,
2220
- ): SafeParseResult<
2221
- RetrieveAgentRequestResponseFormatAgentsJSONObject,
2222
- SDKValidationError
2223
- > {
2224
- return safeParse(
2225
- jsonString,
2226
- (x) =>
2227
- RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema.parse(
2228
- JSON.parse(x),
2229
- ),
2230
- `Failed to parse 'RetrieveAgentRequestResponseFormatAgentsJSONObject' from JSON`,
2231
- );
2232
- }
2233
-
2234
- /** @internal */
2235
- export const RetrieveAgentRequestResponseFormatAgentsText$inboundSchema:
2236
- z.ZodType<
2237
- RetrieveAgentRequestResponseFormatAgentsText,
2238
- z.ZodTypeDef,
2239
- unknown
2240
- > = z.object({
2241
- type: z.literal("text"),
2242
- });
2243
-
2244
- export function retrieveAgentRequestResponseFormatAgentsTextFromJSON(
2245
- jsonString: string,
2246
- ): SafeParseResult<
2247
- RetrieveAgentRequestResponseFormatAgentsText,
2248
- SDKValidationError
2249
- > {
2250
- return safeParse(
2251
- jsonString,
2252
- (x) =>
2253
- RetrieveAgentRequestResponseFormatAgentsText$inboundSchema.parse(
2254
- JSON.parse(x),
2255
- ),
2256
- `Failed to parse 'RetrieveAgentRequestResponseFormatAgentsText' from JSON`,
2257
- );
2258
- }
2259
-
2260
- /** @internal */
2261
- export const RetrieveAgentRequestFallbackModelConfigurationResponseFormat$inboundSchema:
2262
- z.ZodType<
2263
- RetrieveAgentRequestFallbackModelConfigurationResponseFormat,
2264
- z.ZodTypeDef,
2265
- unknown
2266
- > = z.union([
2267
- z.lazy(() => RetrieveAgentRequestResponseFormatAgentsText$inboundSchema),
2268
- z.lazy(() =>
2269
- RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema
2270
- ),
2271
- z.lazy(() =>
2272
- RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema
2273
- ),
2274
- ]);
2275
-
2276
- export function retrieveAgentRequestFallbackModelConfigurationResponseFormatFromJSON(
2277
- jsonString: string,
2278
- ): SafeParseResult<
2279
- RetrieveAgentRequestFallbackModelConfigurationResponseFormat,
2280
- SDKValidationError
2281
- > {
2282
- return safeParse(
2283
- jsonString,
2284
- (x) =>
2285
- RetrieveAgentRequestFallbackModelConfigurationResponseFormat$inboundSchema
2286
- .parse(JSON.parse(x)),
2287
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationResponseFormat' from JSON`,
2288
- );
2289
- }
2290
-
2291
- /** @internal */
2292
- export const RetrieveAgentRequestFallbackModelConfigurationReasoningEffort$inboundSchema:
2293
- z.ZodNativeEnum<
2294
- typeof RetrieveAgentRequestFallbackModelConfigurationReasoningEffort
2295
- > = z.nativeEnum(
2296
- RetrieveAgentRequestFallbackModelConfigurationReasoningEffort,
2297
- );
2298
-
2299
- /** @internal */
2300
- export const RetrieveAgentRequestFallbackModelConfigurationStop$inboundSchema:
2301
- z.ZodType<
2302
- RetrieveAgentRequestFallbackModelConfigurationStop,
2303
- z.ZodTypeDef,
2304
- unknown
2305
- > = z.union([z.string(), z.array(z.string())]);
2306
-
2307
- export function retrieveAgentRequestFallbackModelConfigurationStopFromJSON(
2308
- jsonString: string,
2309
- ): SafeParseResult<
2310
- RetrieveAgentRequestFallbackModelConfigurationStop,
2311
- SDKValidationError
2312
- > {
2313
- return safeParse(
2314
- jsonString,
2315
- (x) =>
2316
- RetrieveAgentRequestFallbackModelConfigurationStop$inboundSchema.parse(
2317
- JSON.parse(x),
2318
- ),
2319
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationStop' from JSON`,
2320
- );
2321
- }
2322
-
2323
- /** @internal */
2324
- export const RetrieveAgentRequestFallbackModelConfigurationStreamOptions$inboundSchema:
2325
- z.ZodType<
2326
- RetrieveAgentRequestFallbackModelConfigurationStreamOptions,
2327
- z.ZodTypeDef,
2328
- unknown
2329
- > = z.object({
2330
- include_usage: z.boolean().optional(),
2331
- }).transform((v) => {
2332
- return remap$(v, {
2333
- "include_usage": "includeUsage",
2334
- });
2335
- });
2336
-
2337
- export function retrieveAgentRequestFallbackModelConfigurationStreamOptionsFromJSON(
2338
- jsonString: string,
2339
- ): SafeParseResult<
2340
- RetrieveAgentRequestFallbackModelConfigurationStreamOptions,
2341
- SDKValidationError
2342
- > {
2343
- return safeParse(
2344
- jsonString,
2345
- (x) =>
2346
- RetrieveAgentRequestFallbackModelConfigurationStreamOptions$inboundSchema
2347
- .parse(JSON.parse(x)),
2348
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationStreamOptions' from JSON`,
2349
- );
2350
- }
2351
-
2352
- /** @internal */
2353
- export const RetrieveAgentRequestFallbackModelConfigurationThinking$inboundSchema:
2354
- z.ZodType<
2355
- RetrieveAgentRequestFallbackModelConfigurationThinking,
2356
- z.ZodTypeDef,
2357
- unknown
2358
- > = z.union([
2359
- components.ThinkingConfigDisabledSchema$inboundSchema,
2360
- components.ThinkingConfigEnabledSchema$inboundSchema,
2361
- ]);
2362
-
2363
- export function retrieveAgentRequestFallbackModelConfigurationThinkingFromJSON(
2364
- jsonString: string,
2365
- ): SafeParseResult<
2366
- RetrieveAgentRequestFallbackModelConfigurationThinking,
2367
- SDKValidationError
2368
- > {
2369
- return safeParse(
2370
- jsonString,
2371
- (x) =>
2372
- RetrieveAgentRequestFallbackModelConfigurationThinking$inboundSchema
2373
- .parse(JSON.parse(x)),
2374
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationThinking' from JSON`,
2375
- );
2376
- }
2377
-
2378
- /** @internal */
2379
- export const RetrieveAgentRequestToolChoiceAgentsType$inboundSchema:
2380
- z.ZodNativeEnum<typeof RetrieveAgentRequestToolChoiceAgentsType> = z
2381
- .nativeEnum(RetrieveAgentRequestToolChoiceAgentsType);
2382
-
2383
- /** @internal */
2384
- export const RetrieveAgentRequestToolChoiceAgentsFunction$inboundSchema:
2385
- z.ZodType<
2386
- RetrieveAgentRequestToolChoiceAgentsFunction,
2387
- z.ZodTypeDef,
2388
- unknown
2389
- > = z.object({
2390
- name: z.string(),
2391
- });
2392
-
2393
- export function retrieveAgentRequestToolChoiceAgentsFunctionFromJSON(
2394
- jsonString: string,
2395
- ): SafeParseResult<
2396
- RetrieveAgentRequestToolChoiceAgentsFunction,
2397
- SDKValidationError
2398
- > {
2399
- return safeParse(
2400
- jsonString,
2401
- (x) =>
2402
- RetrieveAgentRequestToolChoiceAgentsFunction$inboundSchema.parse(
2403
- JSON.parse(x),
2404
- ),
2405
- `Failed to parse 'RetrieveAgentRequestToolChoiceAgentsFunction' from JSON`,
2406
- );
2407
- }
2408
-
2409
- /** @internal */
2410
- export const RetrieveAgentRequestToolChoiceAgents2$inboundSchema: z.ZodType<
2411
- RetrieveAgentRequestToolChoiceAgents2,
2412
- z.ZodTypeDef,
2413
- unknown
2414
- > = z.object({
2415
- type: RetrieveAgentRequestToolChoiceAgentsType$inboundSchema.optional(),
2416
- function: z.lazy(() =>
2417
- RetrieveAgentRequestToolChoiceAgentsFunction$inboundSchema
2418
- ),
2419
- });
2420
-
2421
- export function retrieveAgentRequestToolChoiceAgents2FromJSON(
2422
- jsonString: string,
2423
- ): SafeParseResult<RetrieveAgentRequestToolChoiceAgents2, SDKValidationError> {
2424
- return safeParse(
2425
- jsonString,
2426
- (x) =>
2427
- RetrieveAgentRequestToolChoiceAgents2$inboundSchema.parse(JSON.parse(x)),
2428
- `Failed to parse 'RetrieveAgentRequestToolChoiceAgents2' from JSON`,
2429
- );
2430
- }
2431
-
2432
- /** @internal */
2433
- export const RetrieveAgentRequestToolChoiceAgents1$inboundSchema:
2434
- z.ZodNativeEnum<typeof RetrieveAgentRequestToolChoiceAgents1> = z.nativeEnum(
2435
- RetrieveAgentRequestToolChoiceAgents1,
2436
- );
2437
-
2438
- /** @internal */
2439
- export const RetrieveAgentRequestFallbackModelConfigurationToolChoice$inboundSchema:
2440
- z.ZodType<
2441
- RetrieveAgentRequestFallbackModelConfigurationToolChoice,
2442
- z.ZodTypeDef,
2443
- unknown
2444
- > = z.union([
2445
- z.lazy(() => RetrieveAgentRequestToolChoiceAgents2$inboundSchema),
2446
- RetrieveAgentRequestToolChoiceAgents1$inboundSchema,
2447
- ]);
2448
-
2449
- export function retrieveAgentRequestFallbackModelConfigurationToolChoiceFromJSON(
2450
- jsonString: string,
2451
- ): SafeParseResult<
2452
- RetrieveAgentRequestFallbackModelConfigurationToolChoice,
2453
- SDKValidationError
2454
- > {
2455
- return safeParse(
2456
- jsonString,
2457
- (x) =>
2458
- RetrieveAgentRequestFallbackModelConfigurationToolChoice$inboundSchema
2459
- .parse(JSON.parse(x)),
2460
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationToolChoice' from JSON`,
2461
- );
2462
- }
2463
-
2464
- /** @internal */
2465
- export const RetrieveAgentRequestFallbackModelConfigurationModalities$inboundSchema:
2466
- z.ZodNativeEnum<
2467
- typeof RetrieveAgentRequestFallbackModelConfigurationModalities
2468
- > = z.nativeEnum(RetrieveAgentRequestFallbackModelConfigurationModalities);
2469
-
2470
- /** @internal */
2471
- export const RetrieveAgentRequestIdAgents1$inboundSchema: z.ZodNativeEnum<
2472
- typeof RetrieveAgentRequestIdAgents1
2473
- > = z.nativeEnum(RetrieveAgentRequestIdAgents1);
2474
-
2475
- /** @internal */
2476
- export const RetrieveAgentRequestFallbackModelConfigurationId$inboundSchema:
2477
- z.ZodType<
2478
- RetrieveAgentRequestFallbackModelConfigurationId,
2479
- z.ZodTypeDef,
2480
- unknown
2481
- > = z.union([RetrieveAgentRequestIdAgents1$inboundSchema, z.string()]);
2482
-
2483
- export function retrieveAgentRequestFallbackModelConfigurationIdFromJSON(
2484
- jsonString: string,
2485
- ): SafeParseResult<
2486
- RetrieveAgentRequestFallbackModelConfigurationId,
2487
- SDKValidationError
2488
- > {
2489
- return safeParse(
2490
- jsonString,
2491
- (x) =>
2492
- RetrieveAgentRequestFallbackModelConfigurationId$inboundSchema.parse(
2493
- JSON.parse(x),
2494
- ),
2495
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationId' from JSON`,
2496
- );
2497
- }
2498
-
2499
- /** @internal */
2500
- export const RetrieveAgentRequestFallbackModelConfigurationExecuteOn$inboundSchema:
2501
- z.ZodNativeEnum<
2502
- typeof RetrieveAgentRequestFallbackModelConfigurationExecuteOn
2503
- > = z.nativeEnum(RetrieveAgentRequestFallbackModelConfigurationExecuteOn);
2504
-
2505
- /** @internal */
2506
- export const RetrieveAgentRequestFallbackModelConfigurationGuardrails$inboundSchema:
2507
- z.ZodType<
2508
- RetrieveAgentRequestFallbackModelConfigurationGuardrails,
2509
- z.ZodTypeDef,
2510
- unknown
2511
- > = z.object({
2512
- id: z.union([RetrieveAgentRequestIdAgents1$inboundSchema, z.string()]),
2513
- execute_on:
2514
- RetrieveAgentRequestFallbackModelConfigurationExecuteOn$inboundSchema,
2515
- }).transform((v) => {
2516
- return remap$(v, {
2517
- "execute_on": "executeOn",
2518
- });
2519
- });
2520
-
2521
- export function retrieveAgentRequestFallbackModelConfigurationGuardrailsFromJSON(
2522
- jsonString: string,
2523
- ): SafeParseResult<
2524
- RetrieveAgentRequestFallbackModelConfigurationGuardrails,
2525
- SDKValidationError
2526
- > {
2527
- return safeParse(
2528
- jsonString,
2529
- (x) =>
2530
- RetrieveAgentRequestFallbackModelConfigurationGuardrails$inboundSchema
2531
- .parse(JSON.parse(x)),
2532
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationGuardrails' from JSON`,
2533
- );
2534
- }
2535
-
2536
- /** @internal */
2537
- export const RetrieveAgentRequestFallbackModelConfigurationFallbacks$inboundSchema:
2538
- z.ZodType<
2539
- RetrieveAgentRequestFallbackModelConfigurationFallbacks,
2540
- z.ZodTypeDef,
2541
- unknown
2542
- > = z.object({
2543
- model: z.string(),
2544
- });
2545
-
2546
- export function retrieveAgentRequestFallbackModelConfigurationFallbacksFromJSON(
2547
- jsonString: string,
2548
- ): SafeParseResult<
2549
- RetrieveAgentRequestFallbackModelConfigurationFallbacks,
2550
- SDKValidationError
2551
- > {
2552
- return safeParse(
2553
- jsonString,
2554
- (x) =>
2555
- RetrieveAgentRequestFallbackModelConfigurationFallbacks$inboundSchema
2556
- .parse(JSON.parse(x)),
2557
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationFallbacks' from JSON`,
2558
- );
2559
- }
2560
-
2561
- /** @internal */
2562
- export const RetrieveAgentRequestFallbackModelConfigurationAgentsRetry$inboundSchema:
2563
- z.ZodType<
2564
- RetrieveAgentRequestFallbackModelConfigurationAgentsRetry,
2565
- z.ZodTypeDef,
2566
- unknown
2567
- > = z.object({
2568
- count: z.number().default(3),
2569
- on_codes: z.array(z.number()).optional(),
2570
- }).transform((v) => {
2571
- return remap$(v, {
2572
- "on_codes": "onCodes",
2573
- });
2574
- });
2575
-
2576
- export function retrieveAgentRequestFallbackModelConfigurationAgentsRetryFromJSON(
2577
- jsonString: string,
2578
- ): SafeParseResult<
2579
- RetrieveAgentRequestFallbackModelConfigurationAgentsRetry,
2580
- SDKValidationError
2581
- > {
2582
- return safeParse(
2583
- jsonString,
2584
- (x) =>
2585
- RetrieveAgentRequestFallbackModelConfigurationAgentsRetry$inboundSchema
2586
- .parse(JSON.parse(x)),
2587
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationAgentsRetry' from JSON`,
2588
- );
2589
- }
2590
-
2591
- /** @internal */
2592
- export const RetrieveAgentRequestFallbackModelConfigurationType$inboundSchema:
2593
- z.ZodNativeEnum<typeof RetrieveAgentRequestFallbackModelConfigurationType> = z
2594
- .nativeEnum(RetrieveAgentRequestFallbackModelConfigurationType);
2595
-
2596
- /** @internal */
2597
- export const RetrieveAgentRequestFallbackModelConfigurationCache$inboundSchema:
2598
- z.ZodType<
2599
- RetrieveAgentRequestFallbackModelConfigurationCache,
2600
- z.ZodTypeDef,
2601
- unknown
2602
- > = z.object({
2603
- ttl: z.number().default(1800),
2604
- type: RetrieveAgentRequestFallbackModelConfigurationType$inboundSchema,
2605
- });
2606
-
2607
- export function retrieveAgentRequestFallbackModelConfigurationCacheFromJSON(
2608
- jsonString: string,
2609
- ): SafeParseResult<
2610
- RetrieveAgentRequestFallbackModelConfigurationCache,
2611
- SDKValidationError
2612
- > {
2613
- return safeParse(
2614
- jsonString,
2615
- (x) =>
2616
- RetrieveAgentRequestFallbackModelConfigurationCache$inboundSchema.parse(
2617
- JSON.parse(x),
2618
- ),
2619
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationCache' from JSON`,
2620
- );
2621
- }
2622
-
2623
- /** @internal */
2624
- export const RetrieveAgentRequestLoadBalancerAgentsType$inboundSchema:
2625
- z.ZodNativeEnum<typeof RetrieveAgentRequestLoadBalancerAgentsType> = z
2626
- .nativeEnum(RetrieveAgentRequestLoadBalancerAgentsType);
2627
-
2628
- /** @internal */
2629
- export const RetrieveAgentRequestLoadBalancerAgentsModels$inboundSchema:
2630
- z.ZodType<
2631
- RetrieveAgentRequestLoadBalancerAgentsModels,
2632
- z.ZodTypeDef,
2633
- unknown
2634
- > = z.object({
2635
- model: z.string(),
2636
- weight: z.number().default(0.5),
2637
- });
2638
-
2639
- export function retrieveAgentRequestLoadBalancerAgentsModelsFromJSON(
2640
- jsonString: string,
2641
- ): SafeParseResult<
2642
- RetrieveAgentRequestLoadBalancerAgentsModels,
2643
- SDKValidationError
2644
- > {
2645
- return safeParse(
2646
- jsonString,
2647
- (x) =>
2648
- RetrieveAgentRequestLoadBalancerAgentsModels$inboundSchema.parse(
2649
- JSON.parse(x),
2650
- ),
2651
- `Failed to parse 'RetrieveAgentRequestLoadBalancerAgentsModels' from JSON`,
2652
- );
2653
- }
2654
-
2655
- /** @internal */
2656
- export const RetrieveAgentRequestLoadBalancerAgents1$inboundSchema: z.ZodType<
2657
- RetrieveAgentRequestLoadBalancerAgents1,
2658
- z.ZodTypeDef,
2659
- unknown
2660
- > = z.object({
2661
- type: RetrieveAgentRequestLoadBalancerAgentsType$inboundSchema,
2662
- models: z.array(
2663
- z.lazy(() => RetrieveAgentRequestLoadBalancerAgentsModels$inboundSchema),
2664
- ),
2665
- });
2666
-
2667
- export function retrieveAgentRequestLoadBalancerAgents1FromJSON(
2668
- jsonString: string,
2669
- ): SafeParseResult<
2670
- RetrieveAgentRequestLoadBalancerAgents1,
2671
- SDKValidationError
2672
- > {
2673
- return safeParse(
2674
- jsonString,
2675
- (x) =>
2676
- RetrieveAgentRequestLoadBalancerAgents1$inboundSchema.parse(
2677
- JSON.parse(x),
2678
- ),
2679
- `Failed to parse 'RetrieveAgentRequestLoadBalancerAgents1' from JSON`,
2680
- );
2681
- }
2682
-
2683
- /** @internal */
2684
- export const RetrieveAgentRequestFallbackModelConfigurationLoadBalancer$inboundSchema:
2685
- z.ZodType<
2686
- RetrieveAgentRequestFallbackModelConfigurationLoadBalancer,
2687
- z.ZodTypeDef,
2688
- unknown
2689
- > = z.lazy(() => RetrieveAgentRequestLoadBalancerAgents1$inboundSchema);
2690
-
2691
- export function retrieveAgentRequestFallbackModelConfigurationLoadBalancerFromJSON(
2692
- jsonString: string,
2693
- ): SafeParseResult<
2694
- RetrieveAgentRequestFallbackModelConfigurationLoadBalancer,
2695
- SDKValidationError
2696
- > {
2697
- return safeParse(
2698
- jsonString,
2699
- (x) =>
2700
- RetrieveAgentRequestFallbackModelConfigurationLoadBalancer$inboundSchema
2701
- .parse(JSON.parse(x)),
2702
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationLoadBalancer' from JSON`,
2703
- );
2704
- }
2705
-
2706
- /** @internal */
2707
- export const RetrieveAgentRequestFallbackModelConfigurationTimeout$inboundSchema:
2708
- z.ZodType<
2709
- RetrieveAgentRequestFallbackModelConfigurationTimeout,
2710
- z.ZodTypeDef,
2711
- unknown
2712
- > = z.object({
2713
- call_timeout: z.number(),
2714
- }).transform((v) => {
2715
- return remap$(v, {
2716
- "call_timeout": "callTimeout",
2717
- });
2718
- });
2719
-
2720
- export function retrieveAgentRequestFallbackModelConfigurationTimeoutFromJSON(
2721
- jsonString: string,
2722
- ): SafeParseResult<
2723
- RetrieveAgentRequestFallbackModelConfigurationTimeout,
2724
- SDKValidationError
2725
- > {
2726
- return safeParse(
2727
- jsonString,
2728
- (x) =>
2729
- RetrieveAgentRequestFallbackModelConfigurationTimeout$inboundSchema.parse(
2730
- JSON.parse(x),
2731
- ),
2732
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationTimeout' from JSON`,
2733
- );
2734
- }
2735
-
2736
- /** @internal */
2737
- export const RetrieveAgentRequestFallbackModelConfigurationParameters$inboundSchema:
2738
- z.ZodType<
2739
- RetrieveAgentRequestFallbackModelConfigurationParameters,
2740
- z.ZodTypeDef,
2741
- unknown
2742
- > = z.object({
2743
- name: z.string().optional(),
2744
- audio: z.nullable(
2745
- z.lazy(() =>
2746
- RetrieveAgentRequestFallbackModelConfigurationAudio$inboundSchema
2747
- ),
2748
- ).optional(),
2749
- frequency_penalty: z.nullable(z.number()).optional(),
2750
- max_tokens: z.nullable(z.number().int()).optional(),
2751
- max_completion_tokens: z.nullable(z.number().int()).optional(),
2752
- logprobs: z.nullable(z.boolean()).optional(),
2753
- top_logprobs: z.nullable(z.number().int()).optional(),
2754
- n: z.nullable(z.number().int()).optional(),
2755
- presence_penalty: z.nullable(z.number()).optional(),
2756
- response_format: z.union([
2757
- z.lazy(() => RetrieveAgentRequestResponseFormatAgentsText$inboundSchema),
2758
- z.lazy(() =>
2759
- RetrieveAgentRequestResponseFormatAgentsJSONObject$inboundSchema
2760
- ),
2761
- z.lazy(() =>
2762
- RetrieveAgentRequestResponseFormatAgentsResponse200JSONSchema$inboundSchema
2763
- ),
2764
- ]).optional(),
2765
- reasoning_effort:
2766
- RetrieveAgentRequestFallbackModelConfigurationReasoningEffort$inboundSchema
2767
- .optional(),
2768
- verbosity: z.string().optional(),
2769
- seed: z.nullable(z.number()).optional(),
2770
- stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
2771
- stream_options: z.nullable(
2772
- z.lazy(() =>
2773
- RetrieveAgentRequestFallbackModelConfigurationStreamOptions$inboundSchema
2774
- ),
2775
- ).optional(),
2776
- thinking: z.union([
2777
- components.ThinkingConfigDisabledSchema$inboundSchema,
2778
- components.ThinkingConfigEnabledSchema$inboundSchema,
2779
- ]).optional(),
2780
- temperature: z.nullable(z.number()).optional(),
2781
- top_p: z.nullable(z.number()).optional(),
2782
- top_k: z.nullable(z.number()).optional(),
2783
- tool_choice: z.union([
2784
- z.lazy(() => RetrieveAgentRequestToolChoiceAgents2$inboundSchema),
2785
- RetrieveAgentRequestToolChoiceAgents1$inboundSchema,
2786
- ]).optional(),
2787
- parallel_tool_calls: z.boolean().optional(),
2788
- modalities: z.nullable(
2789
- z.array(
2790
- RetrieveAgentRequestFallbackModelConfigurationModalities$inboundSchema,
2791
- ),
2792
- ).optional(),
2793
- guardrails: z.array(
2794
- z.lazy(() =>
2795
- RetrieveAgentRequestFallbackModelConfigurationGuardrails$inboundSchema
2796
- ),
2797
- ).optional(),
2798
- fallbacks: z.array(
2799
- z.lazy(() =>
2800
- RetrieveAgentRequestFallbackModelConfigurationFallbacks$inboundSchema
2801
- ),
2802
- ).optional(),
2803
- retry: z.lazy(() =>
2804
- RetrieveAgentRequestFallbackModelConfigurationAgentsRetry$inboundSchema
2805
- ).optional(),
2806
- cache: z.lazy(() =>
2807
- RetrieveAgentRequestFallbackModelConfigurationCache$inboundSchema
2808
- ).optional(),
2809
- load_balancer: z.lazy(() =>
2810
- RetrieveAgentRequestLoadBalancerAgents1$inboundSchema
2811
- ).optional(),
2812
- timeout: z.lazy(() =>
2813
- RetrieveAgentRequestFallbackModelConfigurationTimeout$inboundSchema
2814
- ).optional(),
2815
- }).transform((v) => {
2816
- return remap$(v, {
2817
- "frequency_penalty": "frequencyPenalty",
2818
- "max_tokens": "maxTokens",
2819
- "max_completion_tokens": "maxCompletionTokens",
2820
- "top_logprobs": "topLogprobs",
2821
- "presence_penalty": "presencePenalty",
2822
- "response_format": "responseFormat",
2823
- "reasoning_effort": "reasoningEffort",
2824
- "stream_options": "streamOptions",
2825
- "top_p": "topP",
2826
- "top_k": "topK",
2827
- "tool_choice": "toolChoice",
2828
- "parallel_tool_calls": "parallelToolCalls",
2829
- "load_balancer": "loadBalancer",
2830
- });
2831
- });
2832
-
2833
- export function retrieveAgentRequestFallbackModelConfigurationParametersFromJSON(
2834
- jsonString: string,
2835
- ): SafeParseResult<
2836
- RetrieveAgentRequestFallbackModelConfigurationParameters,
2837
- SDKValidationError
2838
- > {
2839
- return safeParse(
2840
- jsonString,
2841
- (x) =>
2842
- RetrieveAgentRequestFallbackModelConfigurationParameters$inboundSchema
2843
- .parse(JSON.parse(x)),
2844
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationParameters' from JSON`,
2845
- );
2846
- }
2847
-
2848
- /** @internal */
2849
- export const RetrieveAgentRequestFallbackModelConfigurationRetry$inboundSchema:
2850
- z.ZodType<
2851
- RetrieveAgentRequestFallbackModelConfigurationRetry,
2852
- z.ZodTypeDef,
2853
- unknown
2854
- > = z.object({
2855
- count: z.number().default(3),
2856
- on_codes: z.array(z.number()).optional(),
2857
- }).transform((v) => {
2858
- return remap$(v, {
2859
- "on_codes": "onCodes",
2860
- });
2861
- });
2862
-
2863
- export function retrieveAgentRequestFallbackModelConfigurationRetryFromJSON(
2864
- jsonString: string,
2865
- ): SafeParseResult<
2866
- RetrieveAgentRequestFallbackModelConfigurationRetry,
2867
- SDKValidationError
2868
- > {
2869
- return safeParse(
2870
- jsonString,
2871
- (x) =>
2872
- RetrieveAgentRequestFallbackModelConfigurationRetry$inboundSchema.parse(
2873
- JSON.parse(x),
2874
- ),
2875
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfigurationRetry' from JSON`,
2876
- );
2877
- }
2878
-
2879
- /** @internal */
2880
- export const RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema:
2881
- z.ZodType<
2882
- RetrieveAgentRequestFallbackModelConfiguration2,
2883
- z.ZodTypeDef,
2884
- unknown
2885
- > = z.object({
2886
- id: z.string(),
2887
- parameters: z.lazy(() =>
2888
- RetrieveAgentRequestFallbackModelConfigurationParameters$inboundSchema
2889
- ).optional(),
2890
- retry: z.lazy(() =>
2891
- RetrieveAgentRequestFallbackModelConfigurationRetry$inboundSchema
2892
- ).optional(),
2893
- });
2894
-
2895
- export function retrieveAgentRequestFallbackModelConfiguration2FromJSON(
2896
- jsonString: string,
2897
- ): SafeParseResult<
2898
- RetrieveAgentRequestFallbackModelConfiguration2,
2899
- SDKValidationError
2900
- > {
2901
- return safeParse(
2902
- jsonString,
2903
- (x) =>
2904
- RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema.parse(
2905
- JSON.parse(x),
2906
- ),
2907
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfiguration2' from JSON`,
2908
- );
2909
- }
2910
-
2911
- /** @internal */
2912
- export const RetrieveAgentRequestFallbackModelConfiguration$inboundSchema:
2913
- z.ZodType<
2914
- RetrieveAgentRequestFallbackModelConfiguration,
2915
- z.ZodTypeDef,
2916
- unknown
2917
- > = z.union([
2918
- z.lazy(() => RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema),
2919
- z.string(),
2920
- ]);
2921
-
2922
- export function retrieveAgentRequestFallbackModelConfigurationFromJSON(
2923
- jsonString: string,
2924
- ): SafeParseResult<
2925
- RetrieveAgentRequestFallbackModelConfiguration,
2926
- SDKValidationError
2927
- > {
2928
- return safeParse(
2929
- jsonString,
2930
- (x) =>
2931
- RetrieveAgentRequestFallbackModelConfiguration$inboundSchema.parse(
2932
- JSON.parse(x),
2933
- ),
2934
- `Failed to parse 'RetrieveAgentRequestFallbackModelConfiguration' from JSON`,
2935
- );
2936
- }
2937
-
2938
- /** @internal */
2939
- export const RetrieveAgentRequestModel$inboundSchema: z.ZodType<
2940
- RetrieveAgentRequestModel,
2941
- z.ZodTypeDef,
2942
- unknown
2943
- > = z.object({
2944
- id: z.string(),
2945
- integration_id: z.nullable(z.string()).optional(),
2946
- parameters: z.lazy(() => RetrieveAgentRequestParameters$inboundSchema)
2947
- .optional(),
2948
- retry: z.lazy(() => RetrieveAgentRequestRetry$inboundSchema).optional(),
2949
- fallback_models: z.nullable(
2950
- z.array(z.union([
2951
- z.lazy(() =>
2952
- RetrieveAgentRequestFallbackModelConfiguration2$inboundSchema
2953
- ),
2954
- z.string(),
2955
- ])),
2956
- ).optional(),
2957
- }).transform((v) => {
2958
- return remap$(v, {
2959
- "integration_id": "integrationId",
2960
- "fallback_models": "fallbackModels",
2961
- });
2962
- });
2963
-
2964
- export function retrieveAgentRequestModelFromJSON(
2965
- jsonString: string,
2966
- ): SafeParseResult<RetrieveAgentRequestModel, SDKValidationError> {
2967
- return safeParse(
2968
- jsonString,
2969
- (x) => RetrieveAgentRequestModel$inboundSchema.parse(JSON.parse(x)),
2970
- `Failed to parse 'RetrieveAgentRequestModel' from JSON`,
2971
- );
2972
- }
2973
-
2974
- /** @internal */
2975
- export const RetrieveAgentRequestTeamOfAgents$inboundSchema: z.ZodType<
2976
- RetrieveAgentRequestTeamOfAgents,
2977
- z.ZodTypeDef,
2978
- unknown
2979
- > = z.object({
2980
- key: z.string(),
2981
- role: z.string().optional(),
2982
- });
2983
-
2984
- export function retrieveAgentRequestTeamOfAgentsFromJSON(
2985
- jsonString: string,
2986
- ): SafeParseResult<RetrieveAgentRequestTeamOfAgents, SDKValidationError> {
2987
- return safeParse(
2988
- jsonString,
2989
- (x) => RetrieveAgentRequestTeamOfAgents$inboundSchema.parse(JSON.parse(x)),
2990
- `Failed to parse 'RetrieveAgentRequestTeamOfAgents' from JSON`,
2991
- );
2992
- }
2993
-
2994
- /** @internal */
2995
- export const RetrieveAgentRequestMetrics$inboundSchema: z.ZodType<
2996
- RetrieveAgentRequestMetrics,
2997
- z.ZodTypeDef,
2998
- unknown
2999
- > = z.object({
3000
- total_cost: z.number().default(0),
3001
- }).transform((v) => {
3002
- return remap$(v, {
3003
- "total_cost": "totalCost",
3004
- });
3005
- });
3006
-
3007
- export function retrieveAgentRequestMetricsFromJSON(
3008
- jsonString: string,
3009
- ): SafeParseResult<RetrieveAgentRequestMetrics, SDKValidationError> {
3010
- return safeParse(
3011
- jsonString,
3012
- (x) => RetrieveAgentRequestMetrics$inboundSchema.parse(JSON.parse(x)),
3013
- `Failed to parse 'RetrieveAgentRequestMetrics' from JSON`,
3014
- );
3015
- }
3016
-
3017
- /** @internal */
3018
- export const RetrieveAgentRequestKnowledgeBases$inboundSchema: z.ZodType<
3019
- RetrieveAgentRequestKnowledgeBases,
3020
- z.ZodTypeDef,
3021
- unknown
3022
- > = z.object({
3023
- knowledge_id: z.string(),
3024
- }).transform((v) => {
3025
- return remap$(v, {
3026
- "knowledge_id": "knowledgeId",
3027
- });
3028
- });
3029
-
3030
- export function retrieveAgentRequestKnowledgeBasesFromJSON(
3031
- jsonString: string,
3032
- ): SafeParseResult<RetrieveAgentRequestKnowledgeBases, SDKValidationError> {
3033
- return safeParse(
3034
- jsonString,
3035
- (x) =>
3036
- RetrieveAgentRequestKnowledgeBases$inboundSchema.parse(JSON.parse(x)),
3037
- `Failed to parse 'RetrieveAgentRequestKnowledgeBases' from JSON`,
3038
- );
3039
- }
3040
-
3041
- /** @internal */
3042
- export const RetrieveAgentRequestSource$inboundSchema: z.ZodNativeEnum<
3043
- typeof RetrieveAgentRequestSource
3044
- > = z.nativeEnum(RetrieveAgentRequestSource);
3045
-
3046
- /** @internal */
3047
- export const RetrieveAgentRequestResponseBody$inboundSchema: z.ZodType<
3048
- RetrieveAgentRequestResponseBody,
3049
- z.ZodTypeDef,
3050
- unknown
3051
- > = z.object({
3052
- _id: z.string(),
3053
- key: z.string(),
3054
- display_name: z.string().optional(),
3055
- workspace_id: z.string(),
3056
- project_id: z.string(),
3057
- created_by_id: z.nullable(z.string()).optional(),
3058
- updated_by_id: z.nullable(z.string()).optional(),
3059
- created: z.string().optional(),
3060
- updated: z.string().optional(),
3061
- role: z.string(),
3062
- description: z.string(),
3063
- system_prompt: z.string().optional(),
3064
- instructions: z.string(),
3065
- status: RetrieveAgentRequestStatus$inboundSchema,
3066
- settings: z.lazy(() => RetrieveAgentRequestSettings$inboundSchema).optional(),
3067
- model: z.lazy(() => RetrieveAgentRequestModel$inboundSchema),
3068
- version_hash: z.string().optional(),
3069
- path: z.string(),
3070
- memory_stores: z.array(z.string()),
3071
- team_of_agents: z.array(
3072
- z.lazy(() => RetrieveAgentRequestTeamOfAgents$inboundSchema),
3073
- ),
3074
- metrics: z.lazy(() => RetrieveAgentRequestMetrics$inboundSchema).optional(),
3075
- variables: z.record(z.any()).optional(),
3076
- knowledge_bases: z.array(
3077
- z.lazy(() => RetrieveAgentRequestKnowledgeBases$inboundSchema),
3078
- ).optional(),
3079
- source: RetrieveAgentRequestSource$inboundSchema.optional(),
3080
- }).transform((v) => {
3081
- return remap$(v, {
3082
- "_id": "id",
3083
- "display_name": "displayName",
3084
- "workspace_id": "workspaceId",
3085
- "project_id": "projectId",
3086
- "created_by_id": "createdById",
3087
- "updated_by_id": "updatedById",
3088
- "system_prompt": "systemPrompt",
3089
- "version_hash": "versionHash",
3090
- "memory_stores": "memoryStores",
3091
- "team_of_agents": "teamOfAgents",
3092
- "knowledge_bases": "knowledgeBases",
3093
- });
3094
- });
3095
-
3096
- export function retrieveAgentRequestResponseBodyFromJSON(
3097
- jsonString: string,
3098
- ): SafeParseResult<RetrieveAgentRequestResponseBody, SDKValidationError> {
3099
- return safeParse(
3100
- jsonString,
3101
- (x) => RetrieveAgentRequestResponseBody$inboundSchema.parse(JSON.parse(x)),
3102
- `Failed to parse 'RetrieveAgentRequestResponseBody' from JSON`,
3103
- );
3104
- }