@orq-ai/node 4.0.0-rc.5 → 4.0.0-rc.8

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 (154) hide show
  1. package/bin/mcp-server.js +7488 -544
  2. package/bin/mcp-server.js.map +52 -52
  3. package/examples/package-lock.json +1 -1
  4. package/jsr.json +1 -1
  5. package/lib/config.d.ts +3 -3
  6. package/lib/config.js +3 -3
  7. package/mcp-server/mcp-server.js +1 -1
  8. package/mcp-server/server.js +1 -1
  9. package/models/operations/createagent.d.ts +4141 -865
  10. package/models/operations/createagent.d.ts.map +1 -1
  11. package/models/operations/createagent.js +3767 -768
  12. package/models/operations/createagent.js.map +1 -1
  13. package/models/operations/createbudget.js +2 -2
  14. package/models/operations/createcontact.js +2 -2
  15. package/models/operations/createdataset.js +2 -2
  16. package/models/operations/createdatasetitem.js +8 -8
  17. package/models/operations/createdatasource.js +2 -2
  18. package/models/operations/createeval.js +28 -28
  19. package/models/operations/creatememorystore.d.ts +42 -42
  20. package/models/operations/creatememorystore.d.ts.map +1 -1
  21. package/models/operations/creatememorystore.js +61 -63
  22. package/models/operations/creatememorystore.js.map +1 -1
  23. package/models/operations/createprompt.d.ts +263 -263
  24. package/models/operations/createprompt.d.ts.map +1 -1
  25. package/models/operations/createprompt.js +345 -345
  26. package/models/operations/createprompt.js.map +1 -1
  27. package/models/operations/createtool.js +10 -10
  28. package/models/operations/deploymentgetconfig.d.ts +19 -19
  29. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  30. package/models/operations/deploymentgetconfig.js +22 -22
  31. package/models/operations/deploymentgetconfig.js.map +1 -1
  32. package/models/operations/deployments.d.ts +4 -4
  33. package/models/operations/deployments.d.ts.map +1 -1
  34. package/models/operations/deployments.js +4 -4
  35. package/models/operations/deployments.js.map +1 -1
  36. package/models/operations/duplicatetool.js +10 -10
  37. package/models/operations/fileget.js +2 -2
  38. package/models/operations/filelist.js +2 -2
  39. package/models/operations/fileupload.js +2 -2
  40. package/models/operations/getagent.d.ts +1614 -11
  41. package/models/operations/getagent.d.ts.map +1 -1
  42. package/models/operations/getagent.js +1475 -9
  43. package/models/operations/getagent.js.map +1 -1
  44. package/models/operations/getallprompts.d.ts +4 -4
  45. package/models/operations/getallprompts.d.ts.map +1 -1
  46. package/models/operations/getallprompts.js +4 -4
  47. package/models/operations/getallprompts.js.map +1 -1
  48. package/models/operations/getalltools.js +10 -10
  49. package/models/operations/getbudget.js +2 -2
  50. package/models/operations/getevals.js +28 -28
  51. package/models/operations/getoneprompt.d.ts +4 -4
  52. package/models/operations/getoneprompt.d.ts.map +1 -1
  53. package/models/operations/getoneprompt.js +4 -4
  54. package/models/operations/getoneprompt.js.map +1 -1
  55. package/models/operations/getpromptversion.d.ts +4 -4
  56. package/models/operations/getpromptversion.d.ts.map +1 -1
  57. package/models/operations/getpromptversion.js +4 -4
  58. package/models/operations/getpromptversion.js.map +1 -1
  59. package/models/operations/listagents.d.ts +1614 -11
  60. package/models/operations/listagents.d.ts.map +1 -1
  61. package/models/operations/listagents.js +1481 -9
  62. package/models/operations/listagents.js.map +1 -1
  63. package/models/operations/listagenttasks.d.ts +1614 -11
  64. package/models/operations/listagenttasks.d.ts.map +1 -1
  65. package/models/operations/listagenttasks.js +1479 -9
  66. package/models/operations/listagenttasks.js.map +1 -1
  67. package/models/operations/listbudgets.js +2 -2
  68. package/models/operations/listcontacts.js +2 -2
  69. package/models/operations/listdatasetdatapoints.js +8 -8
  70. package/models/operations/listdatasets.js +2 -2
  71. package/models/operations/listdatasources.js +2 -2
  72. package/models/operations/listpromptversions.d.ts +4 -4
  73. package/models/operations/listpromptversions.d.ts.map +1 -1
  74. package/models/operations/listpromptversions.js +4 -4
  75. package/models/operations/listpromptversions.js.map +1 -1
  76. package/models/operations/retrievecontact.js +2 -2
  77. package/models/operations/retrievedatapoint.js +8 -8
  78. package/models/operations/retrievedataset.js +2 -2
  79. package/models/operations/retrievedatasource.js +2 -2
  80. package/models/operations/retrievetool.js +10 -10
  81. package/models/operations/runagent.d.ts +2176 -503
  82. package/models/operations/runagent.d.ts.map +1 -1
  83. package/models/operations/runagent.js +1534 -9
  84. package/models/operations/runagent.js.map +1 -1
  85. package/models/operations/streamrunagent.d.ts +2128 -455
  86. package/models/operations/streamrunagent.d.ts.map +1 -1
  87. package/models/operations/streamrunagent.js +1630 -89
  88. package/models/operations/streamrunagent.js.map +1 -1
  89. package/models/operations/updateagent.d.ts +4129 -853
  90. package/models/operations/updateagent.d.ts.map +1 -1
  91. package/models/operations/updateagent.js +3837 -825
  92. package/models/operations/updateagent.js.map +1 -1
  93. package/models/operations/updatebudget.js +2 -2
  94. package/models/operations/updatecontact.js +2 -2
  95. package/models/operations/updatedatapoint.js +8 -8
  96. package/models/operations/updatedataset.js +2 -2
  97. package/models/operations/updatedatasource.js +2 -2
  98. package/models/operations/updateeval.js +28 -28
  99. package/models/operations/updateprompt.d.ts +8 -8
  100. package/models/operations/updateprompt.d.ts.map +1 -1
  101. package/models/operations/updateprompt.js +8 -8
  102. package/models/operations/updateprompt.js.map +1 -1
  103. package/models/operations/updatetool.js +10 -10
  104. package/package.json +1 -1
  105. package/src/lib/config.ts +3 -3
  106. package/src/mcp-server/mcp-server.ts +1 -1
  107. package/src/mcp-server/server.ts +1 -1
  108. package/src/models/operations/createagent.ts +7853 -1626
  109. package/src/models/operations/createbudget.ts +2 -2
  110. package/src/models/operations/createcontact.ts +2 -2
  111. package/src/models/operations/createdataset.ts +2 -2
  112. package/src/models/operations/createdatasetitem.ts +8 -8
  113. package/src/models/operations/createdatasource.ts +2 -2
  114. package/src/models/operations/createeval.ts +28 -28
  115. package/src/models/operations/creatememorystore.ts +120 -103
  116. package/src/models/operations/createprompt.ts +742 -621
  117. package/src/models/operations/createtool.ts +10 -10
  118. package/src/models/operations/deploymentgetconfig.ts +60 -44
  119. package/src/models/operations/deployments.ts +25 -20
  120. package/src/models/operations/duplicatetool.ts +10 -10
  121. package/src/models/operations/fileget.ts +2 -2
  122. package/src/models/operations/filelist.ts +2 -2
  123. package/src/models/operations/fileupload.ts +2 -2
  124. package/src/models/operations/getagent.ts +3274 -246
  125. package/src/models/operations/getallprompts.ts +30 -20
  126. package/src/models/operations/getalltools.ts +10 -10
  127. package/src/models/operations/getbudget.ts +2 -2
  128. package/src/models/operations/getevals.ts +28 -28
  129. package/src/models/operations/getoneprompt.ts +28 -20
  130. package/src/models/operations/getpromptversion.ts +30 -20
  131. package/src/models/operations/listagents.ts +3351 -270
  132. package/src/models/operations/listagenttasks.ts +3347 -180
  133. package/src/models/operations/listbudgets.ts +2 -2
  134. package/src/models/operations/listcontacts.ts +2 -2
  135. package/src/models/operations/listdatasetdatapoints.ts +8 -8
  136. package/src/models/operations/listdatasets.ts +2 -2
  137. package/src/models/operations/listdatasources.ts +2 -2
  138. package/src/models/operations/listpromptversions.ts +30 -20
  139. package/src/models/operations/retrievecontact.ts +2 -2
  140. package/src/models/operations/retrievedatapoint.ts +8 -8
  141. package/src/models/operations/retrievedataset.ts +2 -2
  142. package/src/models/operations/retrievedatasource.ts +2 -2
  143. package/src/models/operations/retrievetool.ts +10 -10
  144. package/src/models/operations/runagent.ts +3799 -610
  145. package/src/models/operations/streamrunagent.ts +3945 -605
  146. package/src/models/operations/updateagent.ts +8331 -1757
  147. package/src/models/operations/updatebudget.ts +2 -2
  148. package/src/models/operations/updatecontact.ts +2 -2
  149. package/src/models/operations/updatedatapoint.ts +8 -8
  150. package/src/models/operations/updatedataset.ts +2 -2
  151. package/src/models/operations/updatedatasource.ts +2 -2
  152. package/src/models/operations/updateeval.ts +28 -28
  153. package/src/models/operations/updateprompt.ts +58 -40
  154. package/src/models/operations/updatetool.ts +10 -10
@@ -112,367 +112,3387 @@ export type ListAgentsSettings = {
112
112
  tools?: Array<ListAgentsTools> | undefined;
113
113
  };
114
114
 
115
- export type ListAgentsModel = {
115
+ /**
116
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
117
+ */
118
+ export const ListAgentsVoice = {
119
+ Alloy: "alloy",
120
+ Echo: "echo",
121
+ Fable: "fable",
122
+ Onyx: "onyx",
123
+ Nova: "nova",
124
+ Shimmer: "shimmer",
125
+ } as const;
126
+ /**
127
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
128
+ */
129
+ export type ListAgentsVoice = ClosedEnum<typeof ListAgentsVoice>;
130
+
131
+ /**
132
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
133
+ */
134
+ export const ListAgentsFormat = {
135
+ Wav: "wav",
136
+ Mp3: "mp3",
137
+ Flac: "flac",
138
+ Opus: "opus",
139
+ Pcm16: "pcm16",
140
+ } as const;
141
+ /**
142
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
143
+ */
144
+ export type ListAgentsFormat = ClosedEnum<typeof ListAgentsFormat>;
145
+
146
+ /**
147
+ * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
148
+ */
149
+ export type ListAgentsAudio = {
116
150
  /**
117
- * The database ID of the primary model
151
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
118
152
  */
119
- id: string;
153
+ voice: ListAgentsVoice;
120
154
  /**
121
- * Optional integration ID for custom model configurations
155
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
122
156
  */
123
- integrationId?: string | null | undefined;
157
+ format: ListAgentsFormat;
158
+ };
159
+
160
+ export const ListAgentsResponseFormatAgentsResponseType = {
161
+ JsonSchema: "json_schema",
162
+ } as const;
163
+ export type ListAgentsResponseFormatAgentsResponseType = ClosedEnum<
164
+ typeof ListAgentsResponseFormatAgentsResponseType
165
+ >;
166
+
167
+ export type ListAgentsResponseFormatJsonSchema = {
124
168
  /**
125
- * Optional array of fallback model IDs that will be used automatically in order if the primary model fails
169
+ * A description of what the response format is for, used by the model to determine how to respond in the format.
126
170
  */
127
- fallbackModels?: Array<string> | null | undefined;
171
+ description?: string | undefined;
128
172
  /**
129
- * Maximum number of tokens for model responses
173
+ * 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.
130
174
  */
131
- maxTokens?: number | undefined;
175
+ name: string;
132
176
  /**
133
- * Temperature setting for model responses
177
+ * The schema for the response format, described as a JSON Schema object.
134
178
  */
135
- temperature?: number | undefined;
179
+ schema?: any | undefined;
180
+ /**
181
+ * 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.
182
+ */
183
+ strict?: boolean | undefined;
136
184
  };
137
185
 
138
- export type ListAgentsTeamOfAgents = {
186
+ export type ListAgentsResponseFormat3 = {
187
+ type: ListAgentsResponseFormatAgentsResponseType;
188
+ jsonSchema: ListAgentsResponseFormatJsonSchema;
189
+ };
190
+
191
+ export const ListAgentsResponseFormatAgentsType = {
192
+ JsonObject: "json_object",
193
+ } as const;
194
+ export type ListAgentsResponseFormatAgentsType = ClosedEnum<
195
+ typeof ListAgentsResponseFormatAgentsType
196
+ >;
197
+
198
+ export type ListAgentsResponseFormat2 = {
199
+ type: ListAgentsResponseFormatAgentsType;
200
+ };
201
+
202
+ export const ListAgentsResponseFormatType = {
203
+ Text: "text",
204
+ } as const;
205
+ export type ListAgentsResponseFormatType = ClosedEnum<
206
+ typeof ListAgentsResponseFormatType
207
+ >;
208
+
209
+ export type ListAgentsResponseFormat1 = {
210
+ type: ListAgentsResponseFormatType;
211
+ };
212
+
213
+ /**
214
+ * An object specifying the format that the model must output
215
+ */
216
+ export type ListAgentsResponseFormat =
217
+ | ListAgentsResponseFormat3
218
+ | ListAgentsResponseFormat1
219
+ | ListAgentsResponseFormat2;
220
+
221
+ /**
222
+ * Up to 4 sequences where the API will stop generating further tokens.
223
+ */
224
+ export type ListAgentsStop = string | Array<string>;
225
+
226
+ /**
227
+ * Options for streaming response. Only set this when you set stream: true.
228
+ */
229
+ export type ListAgentsStreamOptions = {
139
230
  /**
140
- * The unique key of the agent within the workspace
231
+ * 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.
141
232
  */
142
- key: string;
233
+ includeUsage?: boolean | undefined;
234
+ };
235
+
236
+ /**
237
+ * Enables or disables the thinking mode capability
238
+ */
239
+ export const ListAgentsType = {
240
+ Enabled: "enabled",
241
+ Disabled: "disabled",
242
+ } as const;
243
+ /**
244
+ * Enables or disables the thinking mode capability
245
+ */
246
+ export type ListAgentsType = ClosedEnum<typeof ListAgentsType>;
247
+
248
+ export type ListAgentsThinking = {
143
249
  /**
144
- * 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.
250
+ * Enables or disables the thinking mode capability
145
251
  */
146
- role?: string | undefined;
252
+ type: ListAgentsType;
253
+ /**
254
+ * Determines how many tokens the model can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality. Must be ≥1024 and less than `max_tokens`.
255
+ */
256
+ budgetTokens: number;
147
257
  };
148
258
 
149
- export type ListAgentsMetrics = {
150
- totalCost?: number | undefined;
259
+ /**
260
+ * The type of the tool. Currently, only function is supported.
261
+ */
262
+ export const ListAgentsToolChoiceType = {
263
+ Function: "function",
264
+ } as const;
265
+ /**
266
+ * The type of the tool. Currently, only function is supported.
267
+ */
268
+ export type ListAgentsToolChoiceType = ClosedEnum<
269
+ typeof ListAgentsToolChoiceType
270
+ >;
271
+
272
+ export type ListAgentsToolChoiceFunction = {
273
+ /**
274
+ * The name of the function to call.
275
+ */
276
+ name?: string | undefined;
151
277
  };
152
278
 
153
- export type ListAgentsKnowledgeBases = {
279
+ export type ListAgentsToolChoice2 = {
154
280
  /**
155
- * Unique identifier of the knowledge base to search
281
+ * The type of the tool. Currently, only function is supported.
156
282
  */
157
- knowledgeId: string;
283
+ type?: ListAgentsToolChoiceType | undefined;
284
+ function: ListAgentsToolChoiceFunction;
158
285
  };
159
286
 
160
- export const ListAgentsHiddenPanels = {
161
- Model: "model",
162
- Tools: "tools",
163
- KnowledgeBases: "knowledge_bases",
164
- Variables: "variables",
165
- RuntimeConstraints: "runtime_constraints",
287
+ export const ListAgentsToolChoice1 = {
288
+ None: "none",
289
+ Auto: "auto",
290
+ Required: "required",
166
291
  } as const;
167
- export type ListAgentsHiddenPanels = ClosedEnum<typeof ListAgentsHiddenPanels>;
292
+ export type ListAgentsToolChoice1 = ClosedEnum<typeof ListAgentsToolChoice1>;
168
293
 
169
- export type ListAgentsData = {
170
- id: string;
171
- key: string;
172
- workspaceId: string;
173
- projectId: string;
174
- createdById?: string | null | undefined;
175
- updatedById?: string | null | undefined;
176
- created?: string | undefined;
177
- updated?: string | undefined;
178
- role: string;
179
- description: string;
180
- systemPrompt?: string | undefined;
181
- instructions: string;
294
+ /**
295
+ * Controls which (if any) tool is called by the model.
296
+ */
297
+ export type ListAgentsToolChoice =
298
+ | ListAgentsToolChoice2
299
+ | ListAgentsToolChoice1;
300
+
301
+ export const ListAgentsModalities = {
302
+ Text: "text",
303
+ Audio: "audio",
304
+ } as const;
305
+ export type ListAgentsModalities = ClosedEnum<typeof ListAgentsModalities>;
306
+
307
+ /**
308
+ * This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
309
+ */
310
+ export type ListAgentsWebSearchOptions = {
182
311
  /**
183
- * 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.
312
+ * Whether to enable web search for this request.
184
313
  */
185
- status: ListAgentsStatus;
186
- settings?: ListAgentsSettings | undefined;
187
- model: ListAgentsModel;
188
- versionHash?: string | undefined;
314
+ enabled?: boolean | undefined;
315
+ };
316
+
317
+ /**
318
+ * Model parameters to customize behavior (snake_case). Common: temperature (0-1, controls randomness), max_tokens (response length). Advanced: top_p, frequency_penalty, presence_penalty, response_format (JSON mode), reasoning_effort, seed (determinism). Model-specific support varies.
319
+ */
320
+ export type ListAgentsParameters = {
189
321
  /**
190
- * Entity storage path in the format: `project/folder/subfolder/...`
322
+ * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
323
+ */
324
+ audio?: ListAgentsAudio | null | undefined;
325
+ /**
326
+ * 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.
327
+ */
328
+ frequencyPenalty?: number | null | undefined;
329
+ /**
330
+ * `[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.
191
331
  *
192
332
  * @remarks
193
333
  *
194
- * The first element identifies the project, followed by nested folders (auto-created as needed).
195
- *
196
- * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
334
+ * This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
197
335
  */
198
- path: string;
199
- memoryStores: Array<string>;
336
+ maxTokens?: number | null | undefined;
200
337
  /**
201
- * The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
338
+ * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
202
339
  */
203
- teamOfAgents: Array<ListAgentsTeamOfAgents>;
204
- metrics?: ListAgentsMetrics | undefined;
340
+ maxCompletionTokens?: number | null | undefined;
205
341
  /**
206
- * Extracted variables from agent instructions
342
+ * 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.
207
343
  */
208
- variables?: { [k: string]: any } | undefined;
344
+ logprobs?: boolean | null | undefined;
209
345
  /**
210
- * Agent knowledge bases reference
346
+ * 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.
211
347
  */
212
- knowledgeBases?: Array<ListAgentsKnowledgeBases> | undefined;
348
+ topLogprobs?: number | null | undefined;
213
349
  /**
214
- * List of hidden collapsed panels in configuration. Duplicates are not allowed.
350
+ * 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.
215
351
  */
216
- hiddenPanels?: Array<ListAgentsHiddenPanels> | undefined;
352
+ n?: number | null | undefined;
353
+ /**
354
+ * 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.
355
+ */
356
+ presencePenalty?: number | null | undefined;
357
+ /**
358
+ * An object specifying the format that the model must output
359
+ */
360
+ responseFormat?:
361
+ | ListAgentsResponseFormat3
362
+ | ListAgentsResponseFormat1
363
+ | ListAgentsResponseFormat2
364
+ | undefined;
365
+ /**
366
+ * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
367
+ */
368
+ reasoningEffort?: string | undefined;
369
+ /**
370
+ * Adjusts response verbosity. Lower levels yield shorter answers.
371
+ */
372
+ verbosity?: string | undefined;
373
+ /**
374
+ * 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.
375
+ */
376
+ seed?: number | null | undefined;
377
+ /**
378
+ * Up to 4 sequences where the API will stop generating further tokens.
379
+ */
380
+ stop?: string | Array<string> | null | undefined;
381
+ /**
382
+ * Options for streaming response. Only set this when you set stream: true.
383
+ */
384
+ streamOptions?: ListAgentsStreamOptions | null | undefined;
385
+ thinking?: ListAgentsThinking | undefined;
386
+ /**
387
+ * 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.
388
+ */
389
+ temperature?: number | null | undefined;
390
+ /**
391
+ * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
392
+ */
393
+ topP?: number | null | undefined;
394
+ /**
395
+ * Limits the model to consider only the top k most likely tokens at each step.
396
+ */
397
+ topK?: number | null | undefined;
398
+ /**
399
+ * Controls which (if any) tool is called by the model.
400
+ */
401
+ toolChoice?: ListAgentsToolChoice2 | ListAgentsToolChoice1 | undefined;
402
+ /**
403
+ * Whether to enable parallel function calling during tool use.
404
+ */
405
+ parallelToolCalls?: boolean | undefined;
406
+ /**
407
+ * 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"].
408
+ */
409
+ modalities?: Array<ListAgentsModalities> | null | undefined;
410
+ /**
411
+ * This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
412
+ */
413
+ webSearchOptions?: ListAgentsWebSearchOptions | undefined;
217
414
  };
218
415
 
219
416
  /**
220
- * List of agents with their configurations including fallback models
417
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
221
418
  */
222
- export type ListAgentsResponseBody = {
223
- object: ListAgentsObject;
224
- data: Array<ListAgentsData>;
225
- hasMore: boolean;
419
+ export const ListAgentsFallbackModelsVoice = {
420
+ Alloy: "alloy",
421
+ Echo: "echo",
422
+ Fable: "fable",
423
+ Onyx: "onyx",
424
+ Nova: "nova",
425
+ Shimmer: "shimmer",
426
+ } as const;
427
+ /**
428
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
429
+ */
430
+ export type ListAgentsFallbackModelsVoice = ClosedEnum<
431
+ typeof ListAgentsFallbackModelsVoice
432
+ >;
433
+
434
+ /**
435
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
436
+ */
437
+ export const ListAgentsFallbackModelsFormat = {
438
+ Wav: "wav",
439
+ Mp3: "mp3",
440
+ Flac: "flac",
441
+ Opus: "opus",
442
+ Pcm16: "pcm16",
443
+ } as const;
444
+ /**
445
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
446
+ */
447
+ export type ListAgentsFallbackModelsFormat = ClosedEnum<
448
+ typeof ListAgentsFallbackModelsFormat
449
+ >;
450
+
451
+ /**
452
+ * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
453
+ */
454
+ export type ListAgentsFallbackModelsAudio = {
455
+ /**
456
+ * The voice the model uses to respond. Supported voices are alloy, echo, fable, onyx, nova, and shimmer.
457
+ */
458
+ voice: ListAgentsFallbackModelsVoice;
459
+ /**
460
+ * Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16.
461
+ */
462
+ format: ListAgentsFallbackModelsFormat;
463
+ };
464
+
465
+ export const ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType =
466
+ {
467
+ JsonSchema: "json_schema",
468
+ } as const;
469
+ export type ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType =
470
+ ClosedEnum<
471
+ typeof ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType
472
+ >;
473
+
474
+ export type ListAgentsResponseFormatAgentsJsonSchema = {
475
+ /**
476
+ * A description of what the response format is for, used by the model to determine how to respond in the format.
477
+ */
478
+ description?: string | undefined;
479
+ /**
480
+ * 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.
481
+ */
482
+ name: string;
483
+ /**
484
+ * The schema for the response format, described as a JSON Schema object.
485
+ */
486
+ schema?: any | undefined;
487
+ /**
488
+ * 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.
489
+ */
490
+ strict?: boolean | undefined;
491
+ };
492
+
493
+ export type ListAgentsResponseFormatAgents3 = {
494
+ type:
495
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType;
496
+ jsonSchema: ListAgentsResponseFormatAgentsJsonSchema;
497
+ };
498
+
499
+ export const ListAgentsResponseFormatAgentsResponse200ApplicationJSONType = {
500
+ JsonObject: "json_object",
501
+ } as const;
502
+ export type ListAgentsResponseFormatAgentsResponse200ApplicationJSONType =
503
+ ClosedEnum<
504
+ typeof ListAgentsResponseFormatAgentsResponse200ApplicationJSONType
505
+ >;
506
+
507
+ export type ListAgentsResponseFormatAgents2 = {
508
+ type: ListAgentsResponseFormatAgentsResponse200ApplicationJSONType;
509
+ };
510
+
511
+ export const ListAgentsResponseFormatAgentsResponse200Type = {
512
+ Text: "text",
513
+ } as const;
514
+ export type ListAgentsResponseFormatAgentsResponse200Type = ClosedEnum<
515
+ typeof ListAgentsResponseFormatAgentsResponse200Type
516
+ >;
517
+
518
+ export type ListAgentsResponseFormatAgents1 = {
519
+ type: ListAgentsResponseFormatAgentsResponse200Type;
520
+ };
521
+
522
+ /**
523
+ * An object specifying the format that the model must output
524
+ */
525
+ export type ListAgentsFallbackModelsResponseFormat =
526
+ | ListAgentsResponseFormatAgents3
527
+ | ListAgentsResponseFormatAgents1
528
+ | ListAgentsResponseFormatAgents2;
529
+
530
+ /**
531
+ * Up to 4 sequences where the API will stop generating further tokens.
532
+ */
533
+ export type ListAgentsFallbackModelsStop = string | Array<string>;
534
+
535
+ /**
536
+ * Options for streaming response. Only set this when you set stream: true.
537
+ */
538
+ export type ListAgentsFallbackModelsStreamOptions = {
539
+ /**
540
+ * 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.
541
+ */
542
+ includeUsage?: boolean | undefined;
543
+ };
544
+
545
+ /**
546
+ * Enables or disables the thinking mode capability
547
+ */
548
+ export const ListAgentsFallbackModelsType = {
549
+ Enabled: "enabled",
550
+ Disabled: "disabled",
551
+ } as const;
552
+ /**
553
+ * Enables or disables the thinking mode capability
554
+ */
555
+ export type ListAgentsFallbackModelsType = ClosedEnum<
556
+ typeof ListAgentsFallbackModelsType
557
+ >;
558
+
559
+ export type ListAgentsFallbackModelsThinking = {
560
+ /**
561
+ * Enables or disables the thinking mode capability
562
+ */
563
+ type: ListAgentsFallbackModelsType;
564
+ /**
565
+ * Determines how many tokens the model can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality. Must be ≥1024 and less than `max_tokens`.
566
+ */
567
+ budgetTokens: number;
568
+ };
569
+
570
+ /**
571
+ * The type of the tool. Currently, only function is supported.
572
+ */
573
+ export const ListAgentsToolChoiceAgentsType = {
574
+ Function: "function",
575
+ } as const;
576
+ /**
577
+ * The type of the tool. Currently, only function is supported.
578
+ */
579
+ export type ListAgentsToolChoiceAgentsType = ClosedEnum<
580
+ typeof ListAgentsToolChoiceAgentsType
581
+ >;
582
+
583
+ export type ListAgentsToolChoiceAgentsFunction = {
584
+ /**
585
+ * The name of the function to call.
586
+ */
587
+ name?: string | undefined;
226
588
  };
227
589
 
590
+ export type ListAgentsToolChoiceAgents2 = {
591
+ /**
592
+ * The type of the tool. Currently, only function is supported.
593
+ */
594
+ type?: ListAgentsToolChoiceAgentsType | undefined;
595
+ function: ListAgentsToolChoiceAgentsFunction;
596
+ };
597
+
598
+ export const ListAgentsToolChoiceAgents1 = {
599
+ None: "none",
600
+ Auto: "auto",
601
+ Required: "required",
602
+ } as const;
603
+ export type ListAgentsToolChoiceAgents1 = ClosedEnum<
604
+ typeof ListAgentsToolChoiceAgents1
605
+ >;
606
+
607
+ /**
608
+ * Controls which (if any) tool is called by the model.
609
+ */
610
+ export type ListAgentsFallbackModelsToolChoice =
611
+ | ListAgentsToolChoiceAgents2
612
+ | ListAgentsToolChoiceAgents1;
613
+
614
+ export const ListAgentsFallbackModelsModalities = {
615
+ Text: "text",
616
+ Audio: "audio",
617
+ } as const;
618
+ export type ListAgentsFallbackModelsModalities = ClosedEnum<
619
+ typeof ListAgentsFallbackModelsModalities
620
+ >;
621
+
622
+ /**
623
+ * This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
624
+ */
625
+ export type ListAgentsFallbackModelsWebSearchOptions = {
626
+ /**
627
+ * Whether to enable web search for this request.
628
+ */
629
+ enabled?: boolean | undefined;
630
+ };
631
+
632
+ export type ListAgentsFallbackModelsParameters = {
633
+ /**
634
+ * Parameters for audio output. Required when audio output is requested with modalities: ["audio"]. Learn more.
635
+ */
636
+ audio?: ListAgentsFallbackModelsAudio | null | undefined;
637
+ /**
638
+ * 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.
639
+ */
640
+ frequencyPenalty?: number | null | undefined;
641
+ /**
642
+ * `[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.
643
+ *
644
+ * @remarks
645
+ *
646
+ * This value is now `deprecated` in favor of `max_completion_tokens`, and is not compatible with o1 series models.
647
+ */
648
+ maxTokens?: number | null | undefined;
649
+ /**
650
+ * An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens
651
+ */
652
+ maxCompletionTokens?: number | null | undefined;
653
+ /**
654
+ * 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.
655
+ */
656
+ logprobs?: boolean | null | undefined;
657
+ /**
658
+ * 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.
659
+ */
660
+ topLogprobs?: number | null | undefined;
661
+ /**
662
+ * 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.
663
+ */
664
+ n?: number | null | undefined;
665
+ /**
666
+ * 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.
667
+ */
668
+ presencePenalty?: number | null | undefined;
669
+ /**
670
+ * An object specifying the format that the model must output
671
+ */
672
+ responseFormat?:
673
+ | ListAgentsResponseFormatAgents3
674
+ | ListAgentsResponseFormatAgents1
675
+ | ListAgentsResponseFormatAgents2
676
+ | undefined;
677
+ /**
678
+ * Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.
679
+ */
680
+ reasoningEffort?: string | undefined;
681
+ /**
682
+ * Adjusts response verbosity. Lower levels yield shorter answers.
683
+ */
684
+ verbosity?: string | undefined;
685
+ /**
686
+ * 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.
687
+ */
688
+ seed?: number | null | undefined;
689
+ /**
690
+ * Up to 4 sequences where the API will stop generating further tokens.
691
+ */
692
+ stop?: string | Array<string> | null | undefined;
693
+ /**
694
+ * Options for streaming response. Only set this when you set stream: true.
695
+ */
696
+ streamOptions?: ListAgentsFallbackModelsStreamOptions | null | undefined;
697
+ thinking?: ListAgentsFallbackModelsThinking | undefined;
698
+ /**
699
+ * 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.
700
+ */
701
+ temperature?: number | null | undefined;
702
+ /**
703
+ * An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
704
+ */
705
+ topP?: number | null | undefined;
706
+ /**
707
+ * Limits the model to consider only the top k most likely tokens at each step.
708
+ */
709
+ topK?: number | null | undefined;
710
+ /**
711
+ * Controls which (if any) tool is called by the model.
712
+ */
713
+ toolChoice?:
714
+ | ListAgentsToolChoiceAgents2
715
+ | ListAgentsToolChoiceAgents1
716
+ | undefined;
717
+ /**
718
+ * Whether to enable parallel function calling during tool use.
719
+ */
720
+ parallelToolCalls?: boolean | undefined;
721
+ /**
722
+ * 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"].
723
+ */
724
+ modalities?: Array<ListAgentsFallbackModelsModalities> | null | undefined;
725
+ /**
726
+ * This tool searches the web for relevant results to use in a response. Learn more about the web search tool.
727
+ */
728
+ webSearchOptions?: ListAgentsFallbackModelsWebSearchOptions | undefined;
729
+ };
730
+
731
+ export type ListAgentsFallbackModels2 = {
732
+ /**
733
+ * Fallback model ID
734
+ */
735
+ id: string;
736
+ integrationId?: string | null | undefined;
737
+ parameters?: ListAgentsFallbackModelsParameters | undefined;
738
+ };
739
+
740
+ export type ListAgentsFallbackModels = ListAgentsFallbackModels2 | string;
741
+
742
+ export type ListAgentsModel = {
743
+ /**
744
+ * The database ID of the primary model
745
+ */
746
+ id: string;
747
+ /**
748
+ * Optional integration ID for custom model configurations
749
+ */
750
+ integrationId?: string | null | undefined;
751
+ /**
752
+ * Model parameters to customize behavior (snake_case). Common: temperature (0-1, controls randomness), max_tokens (response length). Advanced: top_p, frequency_penalty, presence_penalty, response_format (JSON mode), reasoning_effort, seed (determinism). Model-specific support varies.
753
+ */
754
+ parameters?: ListAgentsParameters | undefined;
755
+ /**
756
+ * Optional array of fallback models (string IDs or config objects) that will be used automatically in order if the primary model fails
757
+ */
758
+ fallbackModels?: Array<ListAgentsFallbackModels2 | string> | null | undefined;
759
+ };
760
+
761
+ export type ListAgentsTeamOfAgents = {
762
+ /**
763
+ * The unique key of the agent within the workspace
764
+ */
765
+ key: string;
766
+ /**
767
+ * 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.
768
+ */
769
+ role?: string | undefined;
770
+ };
771
+
772
+ export type ListAgentsMetrics = {
773
+ totalCost?: number | undefined;
774
+ };
775
+
776
+ export type ListAgentsKnowledgeBases = {
777
+ /**
778
+ * Unique identifier of the knowledge base to search
779
+ */
780
+ knowledgeId: string;
781
+ };
782
+
783
+ export const ListAgentsHiddenPanels = {
784
+ Model: "model",
785
+ Tools: "tools",
786
+ KnowledgeBases: "knowledge_bases",
787
+ Variables: "variables",
788
+ RuntimeConstraints: "runtime_constraints",
789
+ } as const;
790
+ export type ListAgentsHiddenPanels = ClosedEnum<typeof ListAgentsHiddenPanels>;
791
+
792
+ export type ListAgentsData = {
793
+ id: string;
794
+ key: string;
795
+ workspaceId: string;
796
+ projectId: string;
797
+ createdById?: string | null | undefined;
798
+ updatedById?: string | null | undefined;
799
+ created?: string | undefined;
800
+ updated?: string | undefined;
801
+ role: string;
802
+ description: string;
803
+ systemPrompt?: string | undefined;
804
+ instructions: string;
805
+ /**
806
+ * 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.
807
+ */
808
+ status: ListAgentsStatus;
809
+ settings?: ListAgentsSettings | undefined;
810
+ model: ListAgentsModel;
811
+ versionHash?: string | undefined;
812
+ /**
813
+ * Entity storage path in the format: `project/folder/subfolder/...`
814
+ *
815
+ * @remarks
816
+ *
817
+ * The first element identifies the project, followed by nested folders (auto-created as needed).
818
+ *
819
+ * With project-based API keys, the first element is treated as a folder name, as the project is predetermined by the API key.
820
+ */
821
+ path: string;
822
+ memoryStores: Array<string>;
823
+ /**
824
+ * The agents that are accessible to this orchestrator. The main agent can hand off to these agents to perform tasks.
825
+ */
826
+ teamOfAgents: Array<ListAgentsTeamOfAgents>;
827
+ metrics?: ListAgentsMetrics | undefined;
828
+ /**
829
+ * Extracted variables from agent instructions
830
+ */
831
+ variables?: { [k: string]: any } | undefined;
832
+ /**
833
+ * Agent knowledge bases reference
834
+ */
835
+ knowledgeBases?: Array<ListAgentsKnowledgeBases> | undefined;
836
+ /**
837
+ * List of hidden collapsed panels in configuration. Duplicates are not allowed.
838
+ */
839
+ hiddenPanels?: Array<ListAgentsHiddenPanels> | undefined;
840
+ };
841
+
842
+ /**
843
+ * List of agents with their configurations including fallback models
844
+ */
845
+ export type ListAgentsResponseBody = {
846
+ object: ListAgentsObject;
847
+ data: Array<ListAgentsData>;
848
+ hasMore: boolean;
849
+ };
850
+
851
+ /** @internal */
852
+ export const ListAgentsRequest$inboundSchema: z.ZodType<
853
+ ListAgentsRequest,
854
+ z.ZodTypeDef,
855
+ unknown
856
+ > = z.object({
857
+ limit: z.number().default(10),
858
+ starting_after: z.string().optional(),
859
+ ending_before: z.string().optional(),
860
+ }).transform((v) => {
861
+ return remap$(v, {
862
+ "starting_after": "startingAfter",
863
+ "ending_before": "endingBefore",
864
+ });
865
+ });
866
+
867
+ /** @internal */
868
+ export type ListAgentsRequest$Outbound = {
869
+ limit: number;
870
+ starting_after?: string | undefined;
871
+ ending_before?: string | undefined;
872
+ };
873
+
874
+ /** @internal */
875
+ export const ListAgentsRequest$outboundSchema: z.ZodType<
876
+ ListAgentsRequest$Outbound,
877
+ z.ZodTypeDef,
878
+ ListAgentsRequest
879
+ > = z.object({
880
+ limit: z.number().default(10),
881
+ startingAfter: z.string().optional(),
882
+ endingBefore: z.string().optional(),
883
+ }).transform((v) => {
884
+ return remap$(v, {
885
+ startingAfter: "starting_after",
886
+ endingBefore: "ending_before",
887
+ });
888
+ });
889
+
890
+ /**
891
+ * @internal
892
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
893
+ */
894
+ export namespace ListAgentsRequest$ {
895
+ /** @deprecated use `ListAgentsRequest$inboundSchema` instead. */
896
+ export const inboundSchema = ListAgentsRequest$inboundSchema;
897
+ /** @deprecated use `ListAgentsRequest$outboundSchema` instead. */
898
+ export const outboundSchema = ListAgentsRequest$outboundSchema;
899
+ /** @deprecated use `ListAgentsRequest$Outbound` instead. */
900
+ export type Outbound = ListAgentsRequest$Outbound;
901
+ }
902
+
903
+ export function listAgentsRequestToJSON(
904
+ listAgentsRequest: ListAgentsRequest,
905
+ ): string {
906
+ return JSON.stringify(
907
+ ListAgentsRequest$outboundSchema.parse(listAgentsRequest),
908
+ );
909
+ }
910
+
911
+ export function listAgentsRequestFromJSON(
912
+ jsonString: string,
913
+ ): SafeParseResult<ListAgentsRequest, SDKValidationError> {
914
+ return safeParse(
915
+ jsonString,
916
+ (x) => ListAgentsRequest$inboundSchema.parse(JSON.parse(x)),
917
+ `Failed to parse 'ListAgentsRequest' from JSON`,
918
+ );
919
+ }
920
+
921
+ /** @internal */
922
+ export const ListAgentsObject$inboundSchema: z.ZodNativeEnum<
923
+ typeof ListAgentsObject
924
+ > = z.nativeEnum(ListAgentsObject);
925
+
926
+ /** @internal */
927
+ export const ListAgentsObject$outboundSchema: z.ZodNativeEnum<
928
+ typeof ListAgentsObject
929
+ > = ListAgentsObject$inboundSchema;
930
+
931
+ /**
932
+ * @internal
933
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
934
+ */
935
+ export namespace ListAgentsObject$ {
936
+ /** @deprecated use `ListAgentsObject$inboundSchema` instead. */
937
+ export const inboundSchema = ListAgentsObject$inboundSchema;
938
+ /** @deprecated use `ListAgentsObject$outboundSchema` instead. */
939
+ export const outboundSchema = ListAgentsObject$outboundSchema;
940
+ }
941
+
942
+ /** @internal */
943
+ export const ListAgentsStatus$inboundSchema: z.ZodNativeEnum<
944
+ typeof ListAgentsStatus
945
+ > = z.nativeEnum(ListAgentsStatus);
946
+
947
+ /** @internal */
948
+ export const ListAgentsStatus$outboundSchema: z.ZodNativeEnum<
949
+ typeof ListAgentsStatus
950
+ > = ListAgentsStatus$inboundSchema;
951
+
952
+ /**
953
+ * @internal
954
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
955
+ */
956
+ export namespace ListAgentsStatus$ {
957
+ /** @deprecated use `ListAgentsStatus$inboundSchema` instead. */
958
+ export const inboundSchema = ListAgentsStatus$inboundSchema;
959
+ /** @deprecated use `ListAgentsStatus$outboundSchema` instead. */
960
+ export const outboundSchema = ListAgentsStatus$outboundSchema;
961
+ }
962
+
963
+ /** @internal */
964
+ export const ListAgentsToolApprovalRequired$inboundSchema: z.ZodNativeEnum<
965
+ typeof ListAgentsToolApprovalRequired
966
+ > = z.nativeEnum(ListAgentsToolApprovalRequired);
967
+
968
+ /** @internal */
969
+ export const ListAgentsToolApprovalRequired$outboundSchema: z.ZodNativeEnum<
970
+ typeof ListAgentsToolApprovalRequired
971
+ > = ListAgentsToolApprovalRequired$inboundSchema;
972
+
973
+ /**
974
+ * @internal
975
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
976
+ */
977
+ export namespace ListAgentsToolApprovalRequired$ {
978
+ /** @deprecated use `ListAgentsToolApprovalRequired$inboundSchema` instead. */
979
+ export const inboundSchema = ListAgentsToolApprovalRequired$inboundSchema;
980
+ /** @deprecated use `ListAgentsToolApprovalRequired$outboundSchema` instead. */
981
+ export const outboundSchema = ListAgentsToolApprovalRequired$outboundSchema;
982
+ }
983
+
984
+ /** @internal */
985
+ export const ListAgentsConditions$inboundSchema: z.ZodType<
986
+ ListAgentsConditions,
987
+ z.ZodTypeDef,
988
+ unknown
989
+ > = z.object({
990
+ condition: z.string(),
991
+ operator: z.string(),
992
+ value: z.string(),
993
+ });
994
+
995
+ /** @internal */
996
+ export type ListAgentsConditions$Outbound = {
997
+ condition: string;
998
+ operator: string;
999
+ value: string;
1000
+ };
1001
+
1002
+ /** @internal */
1003
+ export const ListAgentsConditions$outboundSchema: z.ZodType<
1004
+ ListAgentsConditions$Outbound,
1005
+ z.ZodTypeDef,
1006
+ ListAgentsConditions
1007
+ > = z.object({
1008
+ condition: z.string(),
1009
+ operator: z.string(),
1010
+ value: z.string(),
1011
+ });
1012
+
1013
+ /**
1014
+ * @internal
1015
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1016
+ */
1017
+ export namespace ListAgentsConditions$ {
1018
+ /** @deprecated use `ListAgentsConditions$inboundSchema` instead. */
1019
+ export const inboundSchema = ListAgentsConditions$inboundSchema;
1020
+ /** @deprecated use `ListAgentsConditions$outboundSchema` instead. */
1021
+ export const outboundSchema = ListAgentsConditions$outboundSchema;
1022
+ /** @deprecated use `ListAgentsConditions$Outbound` instead. */
1023
+ export type Outbound = ListAgentsConditions$Outbound;
1024
+ }
1025
+
1026
+ export function listAgentsConditionsToJSON(
1027
+ listAgentsConditions: ListAgentsConditions,
1028
+ ): string {
1029
+ return JSON.stringify(
1030
+ ListAgentsConditions$outboundSchema.parse(listAgentsConditions),
1031
+ );
1032
+ }
1033
+
1034
+ export function listAgentsConditionsFromJSON(
1035
+ jsonString: string,
1036
+ ): SafeParseResult<ListAgentsConditions, SDKValidationError> {
1037
+ return safeParse(
1038
+ jsonString,
1039
+ (x) => ListAgentsConditions$inboundSchema.parse(JSON.parse(x)),
1040
+ `Failed to parse 'ListAgentsConditions' from JSON`,
1041
+ );
1042
+ }
1043
+
1044
+ /** @internal */
1045
+ export const ListAgentsTools$inboundSchema: z.ZodType<
1046
+ ListAgentsTools,
1047
+ z.ZodTypeDef,
1048
+ unknown
1049
+ > = z.object({
1050
+ id: z.string(),
1051
+ key: z.string().optional(),
1052
+ action_type: z.string(),
1053
+ display_name: z.string().optional(),
1054
+ requires_approval: z.boolean().default(false),
1055
+ conditions: z.array(z.lazy(() => ListAgentsConditions$inboundSchema))
1056
+ .optional(),
1057
+ mcpServer: z.string().optional(),
1058
+ timeout: z.number().default(120),
1059
+ }).transform((v) => {
1060
+ return remap$(v, {
1061
+ "action_type": "actionType",
1062
+ "display_name": "displayName",
1063
+ "requires_approval": "requiresApproval",
1064
+ });
1065
+ });
1066
+
1067
+ /** @internal */
1068
+ export type ListAgentsTools$Outbound = {
1069
+ id: string;
1070
+ key?: string | undefined;
1071
+ action_type: string;
1072
+ display_name?: string | undefined;
1073
+ requires_approval: boolean;
1074
+ conditions?: Array<ListAgentsConditions$Outbound> | undefined;
1075
+ mcpServer?: string | undefined;
1076
+ timeout: number;
1077
+ };
1078
+
1079
+ /** @internal */
1080
+ export const ListAgentsTools$outboundSchema: z.ZodType<
1081
+ ListAgentsTools$Outbound,
1082
+ z.ZodTypeDef,
1083
+ ListAgentsTools
1084
+ > = z.object({
1085
+ id: z.string(),
1086
+ key: z.string().optional(),
1087
+ actionType: z.string(),
1088
+ displayName: z.string().optional(),
1089
+ requiresApproval: z.boolean().default(false),
1090
+ conditions: z.array(z.lazy(() => ListAgentsConditions$outboundSchema))
1091
+ .optional(),
1092
+ mcpServer: z.string().optional(),
1093
+ timeout: z.number().default(120),
1094
+ }).transform((v) => {
1095
+ return remap$(v, {
1096
+ actionType: "action_type",
1097
+ displayName: "display_name",
1098
+ requiresApproval: "requires_approval",
1099
+ });
1100
+ });
1101
+
1102
+ /**
1103
+ * @internal
1104
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1105
+ */
1106
+ export namespace ListAgentsTools$ {
1107
+ /** @deprecated use `ListAgentsTools$inboundSchema` instead. */
1108
+ export const inboundSchema = ListAgentsTools$inboundSchema;
1109
+ /** @deprecated use `ListAgentsTools$outboundSchema` instead. */
1110
+ export const outboundSchema = ListAgentsTools$outboundSchema;
1111
+ /** @deprecated use `ListAgentsTools$Outbound` instead. */
1112
+ export type Outbound = ListAgentsTools$Outbound;
1113
+ }
1114
+
1115
+ export function listAgentsToolsToJSON(
1116
+ listAgentsTools: ListAgentsTools,
1117
+ ): string {
1118
+ return JSON.stringify(ListAgentsTools$outboundSchema.parse(listAgentsTools));
1119
+ }
1120
+
1121
+ export function listAgentsToolsFromJSON(
1122
+ jsonString: string,
1123
+ ): SafeParseResult<ListAgentsTools, SDKValidationError> {
1124
+ return safeParse(
1125
+ jsonString,
1126
+ (x) => ListAgentsTools$inboundSchema.parse(JSON.parse(x)),
1127
+ `Failed to parse 'ListAgentsTools' from JSON`,
1128
+ );
1129
+ }
1130
+
1131
+ /** @internal */
1132
+ export const ListAgentsSettings$inboundSchema: z.ZodType<
1133
+ ListAgentsSettings,
1134
+ z.ZodTypeDef,
1135
+ unknown
1136
+ > = z.object({
1137
+ max_iterations: z.number().int().default(15),
1138
+ max_execution_time: z.number().int().default(300),
1139
+ tool_approval_required: ListAgentsToolApprovalRequired$inboundSchema.default(
1140
+ "respect_tool",
1141
+ ),
1142
+ tools: z.array(z.lazy(() => ListAgentsTools$inboundSchema)).optional(),
1143
+ }).transform((v) => {
1144
+ return remap$(v, {
1145
+ "max_iterations": "maxIterations",
1146
+ "max_execution_time": "maxExecutionTime",
1147
+ "tool_approval_required": "toolApprovalRequired",
1148
+ });
1149
+ });
1150
+
1151
+ /** @internal */
1152
+ export type ListAgentsSettings$Outbound = {
1153
+ max_iterations: number;
1154
+ max_execution_time: number;
1155
+ tool_approval_required: string;
1156
+ tools?: Array<ListAgentsTools$Outbound> | undefined;
1157
+ };
1158
+
1159
+ /** @internal */
1160
+ export const ListAgentsSettings$outboundSchema: z.ZodType<
1161
+ ListAgentsSettings$Outbound,
1162
+ z.ZodTypeDef,
1163
+ ListAgentsSettings
1164
+ > = z.object({
1165
+ maxIterations: z.number().int().default(15),
1166
+ maxExecutionTime: z.number().int().default(300),
1167
+ toolApprovalRequired: ListAgentsToolApprovalRequired$outboundSchema.default(
1168
+ "respect_tool",
1169
+ ),
1170
+ tools: z.array(z.lazy(() => ListAgentsTools$outboundSchema)).optional(),
1171
+ }).transform((v) => {
1172
+ return remap$(v, {
1173
+ maxIterations: "max_iterations",
1174
+ maxExecutionTime: "max_execution_time",
1175
+ toolApprovalRequired: "tool_approval_required",
1176
+ });
1177
+ });
1178
+
1179
+ /**
1180
+ * @internal
1181
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1182
+ */
1183
+ export namespace ListAgentsSettings$ {
1184
+ /** @deprecated use `ListAgentsSettings$inboundSchema` instead. */
1185
+ export const inboundSchema = ListAgentsSettings$inboundSchema;
1186
+ /** @deprecated use `ListAgentsSettings$outboundSchema` instead. */
1187
+ export const outboundSchema = ListAgentsSettings$outboundSchema;
1188
+ /** @deprecated use `ListAgentsSettings$Outbound` instead. */
1189
+ export type Outbound = ListAgentsSettings$Outbound;
1190
+ }
1191
+
1192
+ export function listAgentsSettingsToJSON(
1193
+ listAgentsSettings: ListAgentsSettings,
1194
+ ): string {
1195
+ return JSON.stringify(
1196
+ ListAgentsSettings$outboundSchema.parse(listAgentsSettings),
1197
+ );
1198
+ }
1199
+
1200
+ export function listAgentsSettingsFromJSON(
1201
+ jsonString: string,
1202
+ ): SafeParseResult<ListAgentsSettings, SDKValidationError> {
1203
+ return safeParse(
1204
+ jsonString,
1205
+ (x) => ListAgentsSettings$inboundSchema.parse(JSON.parse(x)),
1206
+ `Failed to parse 'ListAgentsSettings' from JSON`,
1207
+ );
1208
+ }
1209
+
1210
+ /** @internal */
1211
+ export const ListAgentsVoice$inboundSchema: z.ZodNativeEnum<
1212
+ typeof ListAgentsVoice
1213
+ > = z.nativeEnum(ListAgentsVoice);
1214
+
1215
+ /** @internal */
1216
+ export const ListAgentsVoice$outboundSchema: z.ZodNativeEnum<
1217
+ typeof ListAgentsVoice
1218
+ > = ListAgentsVoice$inboundSchema;
1219
+
1220
+ /**
1221
+ * @internal
1222
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1223
+ */
1224
+ export namespace ListAgentsVoice$ {
1225
+ /** @deprecated use `ListAgentsVoice$inboundSchema` instead. */
1226
+ export const inboundSchema = ListAgentsVoice$inboundSchema;
1227
+ /** @deprecated use `ListAgentsVoice$outboundSchema` instead. */
1228
+ export const outboundSchema = ListAgentsVoice$outboundSchema;
1229
+ }
1230
+
1231
+ /** @internal */
1232
+ export const ListAgentsFormat$inboundSchema: z.ZodNativeEnum<
1233
+ typeof ListAgentsFormat
1234
+ > = z.nativeEnum(ListAgentsFormat);
1235
+
1236
+ /** @internal */
1237
+ export const ListAgentsFormat$outboundSchema: z.ZodNativeEnum<
1238
+ typeof ListAgentsFormat
1239
+ > = ListAgentsFormat$inboundSchema;
1240
+
1241
+ /**
1242
+ * @internal
1243
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1244
+ */
1245
+ export namespace ListAgentsFormat$ {
1246
+ /** @deprecated use `ListAgentsFormat$inboundSchema` instead. */
1247
+ export const inboundSchema = ListAgentsFormat$inboundSchema;
1248
+ /** @deprecated use `ListAgentsFormat$outboundSchema` instead. */
1249
+ export const outboundSchema = ListAgentsFormat$outboundSchema;
1250
+ }
1251
+
1252
+ /** @internal */
1253
+ export const ListAgentsAudio$inboundSchema: z.ZodType<
1254
+ ListAgentsAudio,
1255
+ z.ZodTypeDef,
1256
+ unknown
1257
+ > = z.object({
1258
+ voice: ListAgentsVoice$inboundSchema,
1259
+ format: ListAgentsFormat$inboundSchema,
1260
+ });
1261
+
1262
+ /** @internal */
1263
+ export type ListAgentsAudio$Outbound = {
1264
+ voice: string;
1265
+ format: string;
1266
+ };
1267
+
1268
+ /** @internal */
1269
+ export const ListAgentsAudio$outboundSchema: z.ZodType<
1270
+ ListAgentsAudio$Outbound,
1271
+ z.ZodTypeDef,
1272
+ ListAgentsAudio
1273
+ > = z.object({
1274
+ voice: ListAgentsVoice$outboundSchema,
1275
+ format: ListAgentsFormat$outboundSchema,
1276
+ });
1277
+
1278
+ /**
1279
+ * @internal
1280
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1281
+ */
1282
+ export namespace ListAgentsAudio$ {
1283
+ /** @deprecated use `ListAgentsAudio$inboundSchema` instead. */
1284
+ export const inboundSchema = ListAgentsAudio$inboundSchema;
1285
+ /** @deprecated use `ListAgentsAudio$outboundSchema` instead. */
1286
+ export const outboundSchema = ListAgentsAudio$outboundSchema;
1287
+ /** @deprecated use `ListAgentsAudio$Outbound` instead. */
1288
+ export type Outbound = ListAgentsAudio$Outbound;
1289
+ }
1290
+
1291
+ export function listAgentsAudioToJSON(
1292
+ listAgentsAudio: ListAgentsAudio,
1293
+ ): string {
1294
+ return JSON.stringify(ListAgentsAudio$outboundSchema.parse(listAgentsAudio));
1295
+ }
1296
+
1297
+ export function listAgentsAudioFromJSON(
1298
+ jsonString: string,
1299
+ ): SafeParseResult<ListAgentsAudio, SDKValidationError> {
1300
+ return safeParse(
1301
+ jsonString,
1302
+ (x) => ListAgentsAudio$inboundSchema.parse(JSON.parse(x)),
1303
+ `Failed to parse 'ListAgentsAudio' from JSON`,
1304
+ );
1305
+ }
1306
+
1307
+ /** @internal */
1308
+ export const ListAgentsResponseFormatAgentsResponseType$inboundSchema:
1309
+ z.ZodNativeEnum<typeof ListAgentsResponseFormatAgentsResponseType> = z
1310
+ .nativeEnum(ListAgentsResponseFormatAgentsResponseType);
1311
+
1312
+ /** @internal */
1313
+ export const ListAgentsResponseFormatAgentsResponseType$outboundSchema:
1314
+ z.ZodNativeEnum<typeof ListAgentsResponseFormatAgentsResponseType> =
1315
+ ListAgentsResponseFormatAgentsResponseType$inboundSchema;
1316
+
1317
+ /**
1318
+ * @internal
1319
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1320
+ */
1321
+ export namespace ListAgentsResponseFormatAgentsResponseType$ {
1322
+ /** @deprecated use `ListAgentsResponseFormatAgentsResponseType$inboundSchema` instead. */
1323
+ export const inboundSchema =
1324
+ ListAgentsResponseFormatAgentsResponseType$inboundSchema;
1325
+ /** @deprecated use `ListAgentsResponseFormatAgentsResponseType$outboundSchema` instead. */
1326
+ export const outboundSchema =
1327
+ ListAgentsResponseFormatAgentsResponseType$outboundSchema;
1328
+ }
1329
+
1330
+ /** @internal */
1331
+ export const ListAgentsResponseFormatJsonSchema$inboundSchema: z.ZodType<
1332
+ ListAgentsResponseFormatJsonSchema,
1333
+ z.ZodTypeDef,
1334
+ unknown
1335
+ > = z.object({
1336
+ description: z.string().optional(),
1337
+ name: z.string(),
1338
+ schema: z.any().optional(),
1339
+ strict: z.boolean().optional(),
1340
+ });
1341
+
1342
+ /** @internal */
1343
+ export type ListAgentsResponseFormatJsonSchema$Outbound = {
1344
+ description?: string | undefined;
1345
+ name: string;
1346
+ schema?: any | undefined;
1347
+ strict?: boolean | undefined;
1348
+ };
1349
+
1350
+ /** @internal */
1351
+ export const ListAgentsResponseFormatJsonSchema$outboundSchema: z.ZodType<
1352
+ ListAgentsResponseFormatJsonSchema$Outbound,
1353
+ z.ZodTypeDef,
1354
+ ListAgentsResponseFormatJsonSchema
1355
+ > = z.object({
1356
+ description: z.string().optional(),
1357
+ name: z.string(),
1358
+ schema: z.any().optional(),
1359
+ strict: z.boolean().optional(),
1360
+ });
1361
+
1362
+ /**
1363
+ * @internal
1364
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1365
+ */
1366
+ export namespace ListAgentsResponseFormatJsonSchema$ {
1367
+ /** @deprecated use `ListAgentsResponseFormatJsonSchema$inboundSchema` instead. */
1368
+ export const inboundSchema = ListAgentsResponseFormatJsonSchema$inboundSchema;
1369
+ /** @deprecated use `ListAgentsResponseFormatJsonSchema$outboundSchema` instead. */
1370
+ export const outboundSchema =
1371
+ ListAgentsResponseFormatJsonSchema$outboundSchema;
1372
+ /** @deprecated use `ListAgentsResponseFormatJsonSchema$Outbound` instead. */
1373
+ export type Outbound = ListAgentsResponseFormatJsonSchema$Outbound;
1374
+ }
1375
+
1376
+ export function listAgentsResponseFormatJsonSchemaToJSON(
1377
+ listAgentsResponseFormatJsonSchema: ListAgentsResponseFormatJsonSchema,
1378
+ ): string {
1379
+ return JSON.stringify(
1380
+ ListAgentsResponseFormatJsonSchema$outboundSchema.parse(
1381
+ listAgentsResponseFormatJsonSchema,
1382
+ ),
1383
+ );
1384
+ }
1385
+
1386
+ export function listAgentsResponseFormatJsonSchemaFromJSON(
1387
+ jsonString: string,
1388
+ ): SafeParseResult<ListAgentsResponseFormatJsonSchema, SDKValidationError> {
1389
+ return safeParse(
1390
+ jsonString,
1391
+ (x) =>
1392
+ ListAgentsResponseFormatJsonSchema$inboundSchema.parse(JSON.parse(x)),
1393
+ `Failed to parse 'ListAgentsResponseFormatJsonSchema' from JSON`,
1394
+ );
1395
+ }
1396
+
1397
+ /** @internal */
1398
+ export const ListAgentsResponseFormat3$inboundSchema: z.ZodType<
1399
+ ListAgentsResponseFormat3,
1400
+ z.ZodTypeDef,
1401
+ unknown
1402
+ > = z.object({
1403
+ type: ListAgentsResponseFormatAgentsResponseType$inboundSchema,
1404
+ json_schema: z.lazy(() => ListAgentsResponseFormatJsonSchema$inboundSchema),
1405
+ }).transform((v) => {
1406
+ return remap$(v, {
1407
+ "json_schema": "jsonSchema",
1408
+ });
1409
+ });
1410
+
1411
+ /** @internal */
1412
+ export type ListAgentsResponseFormat3$Outbound = {
1413
+ type: string;
1414
+ json_schema: ListAgentsResponseFormatJsonSchema$Outbound;
1415
+ };
1416
+
1417
+ /** @internal */
1418
+ export const ListAgentsResponseFormat3$outboundSchema: z.ZodType<
1419
+ ListAgentsResponseFormat3$Outbound,
1420
+ z.ZodTypeDef,
1421
+ ListAgentsResponseFormat3
1422
+ > = z.object({
1423
+ type: ListAgentsResponseFormatAgentsResponseType$outboundSchema,
1424
+ jsonSchema: z.lazy(() => ListAgentsResponseFormatJsonSchema$outboundSchema),
1425
+ }).transform((v) => {
1426
+ return remap$(v, {
1427
+ jsonSchema: "json_schema",
1428
+ });
1429
+ });
1430
+
1431
+ /**
1432
+ * @internal
1433
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1434
+ */
1435
+ export namespace ListAgentsResponseFormat3$ {
1436
+ /** @deprecated use `ListAgentsResponseFormat3$inboundSchema` instead. */
1437
+ export const inboundSchema = ListAgentsResponseFormat3$inboundSchema;
1438
+ /** @deprecated use `ListAgentsResponseFormat3$outboundSchema` instead. */
1439
+ export const outboundSchema = ListAgentsResponseFormat3$outboundSchema;
1440
+ /** @deprecated use `ListAgentsResponseFormat3$Outbound` instead. */
1441
+ export type Outbound = ListAgentsResponseFormat3$Outbound;
1442
+ }
1443
+
1444
+ export function listAgentsResponseFormat3ToJSON(
1445
+ listAgentsResponseFormat3: ListAgentsResponseFormat3,
1446
+ ): string {
1447
+ return JSON.stringify(
1448
+ ListAgentsResponseFormat3$outboundSchema.parse(listAgentsResponseFormat3),
1449
+ );
1450
+ }
1451
+
1452
+ export function listAgentsResponseFormat3FromJSON(
1453
+ jsonString: string,
1454
+ ): SafeParseResult<ListAgentsResponseFormat3, SDKValidationError> {
1455
+ return safeParse(
1456
+ jsonString,
1457
+ (x) => ListAgentsResponseFormat3$inboundSchema.parse(JSON.parse(x)),
1458
+ `Failed to parse 'ListAgentsResponseFormat3' from JSON`,
1459
+ );
1460
+ }
1461
+
1462
+ /** @internal */
1463
+ export const ListAgentsResponseFormatAgentsType$inboundSchema: z.ZodNativeEnum<
1464
+ typeof ListAgentsResponseFormatAgentsType
1465
+ > = z.nativeEnum(ListAgentsResponseFormatAgentsType);
1466
+
1467
+ /** @internal */
1468
+ export const ListAgentsResponseFormatAgentsType$outboundSchema: z.ZodNativeEnum<
1469
+ typeof ListAgentsResponseFormatAgentsType
1470
+ > = ListAgentsResponseFormatAgentsType$inboundSchema;
1471
+
1472
+ /**
1473
+ * @internal
1474
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1475
+ */
1476
+ export namespace ListAgentsResponseFormatAgentsType$ {
1477
+ /** @deprecated use `ListAgentsResponseFormatAgentsType$inboundSchema` instead. */
1478
+ export const inboundSchema = ListAgentsResponseFormatAgentsType$inboundSchema;
1479
+ /** @deprecated use `ListAgentsResponseFormatAgentsType$outboundSchema` instead. */
1480
+ export const outboundSchema =
1481
+ ListAgentsResponseFormatAgentsType$outboundSchema;
1482
+ }
1483
+
1484
+ /** @internal */
1485
+ export const ListAgentsResponseFormat2$inboundSchema: z.ZodType<
1486
+ ListAgentsResponseFormat2,
1487
+ z.ZodTypeDef,
1488
+ unknown
1489
+ > = z.object({
1490
+ type: ListAgentsResponseFormatAgentsType$inboundSchema,
1491
+ });
1492
+
1493
+ /** @internal */
1494
+ export type ListAgentsResponseFormat2$Outbound = {
1495
+ type: string;
1496
+ };
1497
+
1498
+ /** @internal */
1499
+ export const ListAgentsResponseFormat2$outboundSchema: z.ZodType<
1500
+ ListAgentsResponseFormat2$Outbound,
1501
+ z.ZodTypeDef,
1502
+ ListAgentsResponseFormat2
1503
+ > = z.object({
1504
+ type: ListAgentsResponseFormatAgentsType$outboundSchema,
1505
+ });
1506
+
1507
+ /**
1508
+ * @internal
1509
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1510
+ */
1511
+ export namespace ListAgentsResponseFormat2$ {
1512
+ /** @deprecated use `ListAgentsResponseFormat2$inboundSchema` instead. */
1513
+ export const inboundSchema = ListAgentsResponseFormat2$inboundSchema;
1514
+ /** @deprecated use `ListAgentsResponseFormat2$outboundSchema` instead. */
1515
+ export const outboundSchema = ListAgentsResponseFormat2$outboundSchema;
1516
+ /** @deprecated use `ListAgentsResponseFormat2$Outbound` instead. */
1517
+ export type Outbound = ListAgentsResponseFormat2$Outbound;
1518
+ }
1519
+
1520
+ export function listAgentsResponseFormat2ToJSON(
1521
+ listAgentsResponseFormat2: ListAgentsResponseFormat2,
1522
+ ): string {
1523
+ return JSON.stringify(
1524
+ ListAgentsResponseFormat2$outboundSchema.parse(listAgentsResponseFormat2),
1525
+ );
1526
+ }
1527
+
1528
+ export function listAgentsResponseFormat2FromJSON(
1529
+ jsonString: string,
1530
+ ): SafeParseResult<ListAgentsResponseFormat2, SDKValidationError> {
1531
+ return safeParse(
1532
+ jsonString,
1533
+ (x) => ListAgentsResponseFormat2$inboundSchema.parse(JSON.parse(x)),
1534
+ `Failed to parse 'ListAgentsResponseFormat2' from JSON`,
1535
+ );
1536
+ }
1537
+
1538
+ /** @internal */
1539
+ export const ListAgentsResponseFormatType$inboundSchema: z.ZodNativeEnum<
1540
+ typeof ListAgentsResponseFormatType
1541
+ > = z.nativeEnum(ListAgentsResponseFormatType);
1542
+
1543
+ /** @internal */
1544
+ export const ListAgentsResponseFormatType$outboundSchema: z.ZodNativeEnum<
1545
+ typeof ListAgentsResponseFormatType
1546
+ > = ListAgentsResponseFormatType$inboundSchema;
1547
+
1548
+ /**
1549
+ * @internal
1550
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1551
+ */
1552
+ export namespace ListAgentsResponseFormatType$ {
1553
+ /** @deprecated use `ListAgentsResponseFormatType$inboundSchema` instead. */
1554
+ export const inboundSchema = ListAgentsResponseFormatType$inboundSchema;
1555
+ /** @deprecated use `ListAgentsResponseFormatType$outboundSchema` instead. */
1556
+ export const outboundSchema = ListAgentsResponseFormatType$outboundSchema;
1557
+ }
1558
+
1559
+ /** @internal */
1560
+ export const ListAgentsResponseFormat1$inboundSchema: z.ZodType<
1561
+ ListAgentsResponseFormat1,
1562
+ z.ZodTypeDef,
1563
+ unknown
1564
+ > = z.object({
1565
+ type: ListAgentsResponseFormatType$inboundSchema,
1566
+ });
1567
+
1568
+ /** @internal */
1569
+ export type ListAgentsResponseFormat1$Outbound = {
1570
+ type: string;
1571
+ };
1572
+
1573
+ /** @internal */
1574
+ export const ListAgentsResponseFormat1$outboundSchema: z.ZodType<
1575
+ ListAgentsResponseFormat1$Outbound,
1576
+ z.ZodTypeDef,
1577
+ ListAgentsResponseFormat1
1578
+ > = z.object({
1579
+ type: ListAgentsResponseFormatType$outboundSchema,
1580
+ });
1581
+
1582
+ /**
1583
+ * @internal
1584
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1585
+ */
1586
+ export namespace ListAgentsResponseFormat1$ {
1587
+ /** @deprecated use `ListAgentsResponseFormat1$inboundSchema` instead. */
1588
+ export const inboundSchema = ListAgentsResponseFormat1$inboundSchema;
1589
+ /** @deprecated use `ListAgentsResponseFormat1$outboundSchema` instead. */
1590
+ export const outboundSchema = ListAgentsResponseFormat1$outboundSchema;
1591
+ /** @deprecated use `ListAgentsResponseFormat1$Outbound` instead. */
1592
+ export type Outbound = ListAgentsResponseFormat1$Outbound;
1593
+ }
1594
+
1595
+ export function listAgentsResponseFormat1ToJSON(
1596
+ listAgentsResponseFormat1: ListAgentsResponseFormat1,
1597
+ ): string {
1598
+ return JSON.stringify(
1599
+ ListAgentsResponseFormat1$outboundSchema.parse(listAgentsResponseFormat1),
1600
+ );
1601
+ }
1602
+
1603
+ export function listAgentsResponseFormat1FromJSON(
1604
+ jsonString: string,
1605
+ ): SafeParseResult<ListAgentsResponseFormat1, SDKValidationError> {
1606
+ return safeParse(
1607
+ jsonString,
1608
+ (x) => ListAgentsResponseFormat1$inboundSchema.parse(JSON.parse(x)),
1609
+ `Failed to parse 'ListAgentsResponseFormat1' from JSON`,
1610
+ );
1611
+ }
1612
+
1613
+ /** @internal */
1614
+ export const ListAgentsResponseFormat$inboundSchema: z.ZodType<
1615
+ ListAgentsResponseFormat,
1616
+ z.ZodTypeDef,
1617
+ unknown
1618
+ > = z.union([
1619
+ z.lazy(() => ListAgentsResponseFormat3$inboundSchema),
1620
+ z.lazy(() => ListAgentsResponseFormat1$inboundSchema),
1621
+ z.lazy(() => ListAgentsResponseFormat2$inboundSchema),
1622
+ ]);
1623
+
1624
+ /** @internal */
1625
+ export type ListAgentsResponseFormat$Outbound =
1626
+ | ListAgentsResponseFormat3$Outbound
1627
+ | ListAgentsResponseFormat1$Outbound
1628
+ | ListAgentsResponseFormat2$Outbound;
1629
+
1630
+ /** @internal */
1631
+ export const ListAgentsResponseFormat$outboundSchema: z.ZodType<
1632
+ ListAgentsResponseFormat$Outbound,
1633
+ z.ZodTypeDef,
1634
+ ListAgentsResponseFormat
1635
+ > = z.union([
1636
+ z.lazy(() => ListAgentsResponseFormat3$outboundSchema),
1637
+ z.lazy(() => ListAgentsResponseFormat1$outboundSchema),
1638
+ z.lazy(() => ListAgentsResponseFormat2$outboundSchema),
1639
+ ]);
1640
+
1641
+ /**
1642
+ * @internal
1643
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1644
+ */
1645
+ export namespace ListAgentsResponseFormat$ {
1646
+ /** @deprecated use `ListAgentsResponseFormat$inboundSchema` instead. */
1647
+ export const inboundSchema = ListAgentsResponseFormat$inboundSchema;
1648
+ /** @deprecated use `ListAgentsResponseFormat$outboundSchema` instead. */
1649
+ export const outboundSchema = ListAgentsResponseFormat$outboundSchema;
1650
+ /** @deprecated use `ListAgentsResponseFormat$Outbound` instead. */
1651
+ export type Outbound = ListAgentsResponseFormat$Outbound;
1652
+ }
1653
+
1654
+ export function listAgentsResponseFormatToJSON(
1655
+ listAgentsResponseFormat: ListAgentsResponseFormat,
1656
+ ): string {
1657
+ return JSON.stringify(
1658
+ ListAgentsResponseFormat$outboundSchema.parse(listAgentsResponseFormat),
1659
+ );
1660
+ }
1661
+
1662
+ export function listAgentsResponseFormatFromJSON(
1663
+ jsonString: string,
1664
+ ): SafeParseResult<ListAgentsResponseFormat, SDKValidationError> {
1665
+ return safeParse(
1666
+ jsonString,
1667
+ (x) => ListAgentsResponseFormat$inboundSchema.parse(JSON.parse(x)),
1668
+ `Failed to parse 'ListAgentsResponseFormat' from JSON`,
1669
+ );
1670
+ }
1671
+
1672
+ /** @internal */
1673
+ export const ListAgentsStop$inboundSchema: z.ZodType<
1674
+ ListAgentsStop,
1675
+ z.ZodTypeDef,
1676
+ unknown
1677
+ > = z.union([z.string(), z.array(z.string())]);
1678
+
1679
+ /** @internal */
1680
+ export type ListAgentsStop$Outbound = string | Array<string>;
1681
+
1682
+ /** @internal */
1683
+ export const ListAgentsStop$outboundSchema: z.ZodType<
1684
+ ListAgentsStop$Outbound,
1685
+ z.ZodTypeDef,
1686
+ ListAgentsStop
1687
+ > = z.union([z.string(), z.array(z.string())]);
1688
+
1689
+ /**
1690
+ * @internal
1691
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1692
+ */
1693
+ export namespace ListAgentsStop$ {
1694
+ /** @deprecated use `ListAgentsStop$inboundSchema` instead. */
1695
+ export const inboundSchema = ListAgentsStop$inboundSchema;
1696
+ /** @deprecated use `ListAgentsStop$outboundSchema` instead. */
1697
+ export const outboundSchema = ListAgentsStop$outboundSchema;
1698
+ /** @deprecated use `ListAgentsStop$Outbound` instead. */
1699
+ export type Outbound = ListAgentsStop$Outbound;
1700
+ }
1701
+
1702
+ export function listAgentsStopToJSON(listAgentsStop: ListAgentsStop): string {
1703
+ return JSON.stringify(ListAgentsStop$outboundSchema.parse(listAgentsStop));
1704
+ }
1705
+
1706
+ export function listAgentsStopFromJSON(
1707
+ jsonString: string,
1708
+ ): SafeParseResult<ListAgentsStop, SDKValidationError> {
1709
+ return safeParse(
1710
+ jsonString,
1711
+ (x) => ListAgentsStop$inboundSchema.parse(JSON.parse(x)),
1712
+ `Failed to parse 'ListAgentsStop' from JSON`,
1713
+ );
1714
+ }
1715
+
1716
+ /** @internal */
1717
+ export const ListAgentsStreamOptions$inboundSchema: z.ZodType<
1718
+ ListAgentsStreamOptions,
1719
+ z.ZodTypeDef,
1720
+ unknown
1721
+ > = z.object({
1722
+ include_usage: z.boolean().optional(),
1723
+ }).transform((v) => {
1724
+ return remap$(v, {
1725
+ "include_usage": "includeUsage",
1726
+ });
1727
+ });
1728
+
1729
+ /** @internal */
1730
+ export type ListAgentsStreamOptions$Outbound = {
1731
+ include_usage?: boolean | undefined;
1732
+ };
1733
+
1734
+ /** @internal */
1735
+ export const ListAgentsStreamOptions$outboundSchema: z.ZodType<
1736
+ ListAgentsStreamOptions$Outbound,
1737
+ z.ZodTypeDef,
1738
+ ListAgentsStreamOptions
1739
+ > = z.object({
1740
+ includeUsage: z.boolean().optional(),
1741
+ }).transform((v) => {
1742
+ return remap$(v, {
1743
+ includeUsage: "include_usage",
1744
+ });
1745
+ });
1746
+
1747
+ /**
1748
+ * @internal
1749
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1750
+ */
1751
+ export namespace ListAgentsStreamOptions$ {
1752
+ /** @deprecated use `ListAgentsStreamOptions$inboundSchema` instead. */
1753
+ export const inboundSchema = ListAgentsStreamOptions$inboundSchema;
1754
+ /** @deprecated use `ListAgentsStreamOptions$outboundSchema` instead. */
1755
+ export const outboundSchema = ListAgentsStreamOptions$outboundSchema;
1756
+ /** @deprecated use `ListAgentsStreamOptions$Outbound` instead. */
1757
+ export type Outbound = ListAgentsStreamOptions$Outbound;
1758
+ }
1759
+
1760
+ export function listAgentsStreamOptionsToJSON(
1761
+ listAgentsStreamOptions: ListAgentsStreamOptions,
1762
+ ): string {
1763
+ return JSON.stringify(
1764
+ ListAgentsStreamOptions$outboundSchema.parse(listAgentsStreamOptions),
1765
+ );
1766
+ }
1767
+
1768
+ export function listAgentsStreamOptionsFromJSON(
1769
+ jsonString: string,
1770
+ ): SafeParseResult<ListAgentsStreamOptions, SDKValidationError> {
1771
+ return safeParse(
1772
+ jsonString,
1773
+ (x) => ListAgentsStreamOptions$inboundSchema.parse(JSON.parse(x)),
1774
+ `Failed to parse 'ListAgentsStreamOptions' from JSON`,
1775
+ );
1776
+ }
1777
+
1778
+ /** @internal */
1779
+ export const ListAgentsType$inboundSchema: z.ZodNativeEnum<
1780
+ typeof ListAgentsType
1781
+ > = z.nativeEnum(ListAgentsType);
1782
+
1783
+ /** @internal */
1784
+ export const ListAgentsType$outboundSchema: z.ZodNativeEnum<
1785
+ typeof ListAgentsType
1786
+ > = ListAgentsType$inboundSchema;
1787
+
1788
+ /**
1789
+ * @internal
1790
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1791
+ */
1792
+ export namespace ListAgentsType$ {
1793
+ /** @deprecated use `ListAgentsType$inboundSchema` instead. */
1794
+ export const inboundSchema = ListAgentsType$inboundSchema;
1795
+ /** @deprecated use `ListAgentsType$outboundSchema` instead. */
1796
+ export const outboundSchema = ListAgentsType$outboundSchema;
1797
+ }
1798
+
1799
+ /** @internal */
1800
+ export const ListAgentsThinking$inboundSchema: z.ZodType<
1801
+ ListAgentsThinking,
1802
+ z.ZodTypeDef,
1803
+ unknown
1804
+ > = z.object({
1805
+ type: ListAgentsType$inboundSchema,
1806
+ budget_tokens: z.number(),
1807
+ }).transform((v) => {
1808
+ return remap$(v, {
1809
+ "budget_tokens": "budgetTokens",
1810
+ });
1811
+ });
1812
+
1813
+ /** @internal */
1814
+ export type ListAgentsThinking$Outbound = {
1815
+ type: string;
1816
+ budget_tokens: number;
1817
+ };
1818
+
1819
+ /** @internal */
1820
+ export const ListAgentsThinking$outboundSchema: z.ZodType<
1821
+ ListAgentsThinking$Outbound,
1822
+ z.ZodTypeDef,
1823
+ ListAgentsThinking
1824
+ > = z.object({
1825
+ type: ListAgentsType$outboundSchema,
1826
+ budgetTokens: z.number(),
1827
+ }).transform((v) => {
1828
+ return remap$(v, {
1829
+ budgetTokens: "budget_tokens",
1830
+ });
1831
+ });
1832
+
1833
+ /**
1834
+ * @internal
1835
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1836
+ */
1837
+ export namespace ListAgentsThinking$ {
1838
+ /** @deprecated use `ListAgentsThinking$inboundSchema` instead. */
1839
+ export const inboundSchema = ListAgentsThinking$inboundSchema;
1840
+ /** @deprecated use `ListAgentsThinking$outboundSchema` instead. */
1841
+ export const outboundSchema = ListAgentsThinking$outboundSchema;
1842
+ /** @deprecated use `ListAgentsThinking$Outbound` instead. */
1843
+ export type Outbound = ListAgentsThinking$Outbound;
1844
+ }
1845
+
1846
+ export function listAgentsThinkingToJSON(
1847
+ listAgentsThinking: ListAgentsThinking,
1848
+ ): string {
1849
+ return JSON.stringify(
1850
+ ListAgentsThinking$outboundSchema.parse(listAgentsThinking),
1851
+ );
1852
+ }
1853
+
1854
+ export function listAgentsThinkingFromJSON(
1855
+ jsonString: string,
1856
+ ): SafeParseResult<ListAgentsThinking, SDKValidationError> {
1857
+ return safeParse(
1858
+ jsonString,
1859
+ (x) => ListAgentsThinking$inboundSchema.parse(JSON.parse(x)),
1860
+ `Failed to parse 'ListAgentsThinking' from JSON`,
1861
+ );
1862
+ }
1863
+
1864
+ /** @internal */
1865
+ export const ListAgentsToolChoiceType$inboundSchema: z.ZodNativeEnum<
1866
+ typeof ListAgentsToolChoiceType
1867
+ > = z.nativeEnum(ListAgentsToolChoiceType);
1868
+
1869
+ /** @internal */
1870
+ export const ListAgentsToolChoiceType$outboundSchema: z.ZodNativeEnum<
1871
+ typeof ListAgentsToolChoiceType
1872
+ > = ListAgentsToolChoiceType$inboundSchema;
1873
+
1874
+ /**
1875
+ * @internal
1876
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1877
+ */
1878
+ export namespace ListAgentsToolChoiceType$ {
1879
+ /** @deprecated use `ListAgentsToolChoiceType$inboundSchema` instead. */
1880
+ export const inboundSchema = ListAgentsToolChoiceType$inboundSchema;
1881
+ /** @deprecated use `ListAgentsToolChoiceType$outboundSchema` instead. */
1882
+ export const outboundSchema = ListAgentsToolChoiceType$outboundSchema;
1883
+ }
1884
+
1885
+ /** @internal */
1886
+ export const ListAgentsToolChoiceFunction$inboundSchema: z.ZodType<
1887
+ ListAgentsToolChoiceFunction,
1888
+ z.ZodTypeDef,
1889
+ unknown
1890
+ > = z.object({
1891
+ name: z.string().optional(),
1892
+ });
1893
+
1894
+ /** @internal */
1895
+ export type ListAgentsToolChoiceFunction$Outbound = {
1896
+ name?: string | undefined;
1897
+ };
1898
+
1899
+ /** @internal */
1900
+ export const ListAgentsToolChoiceFunction$outboundSchema: z.ZodType<
1901
+ ListAgentsToolChoiceFunction$Outbound,
1902
+ z.ZodTypeDef,
1903
+ ListAgentsToolChoiceFunction
1904
+ > = z.object({
1905
+ name: z.string().optional(),
1906
+ });
1907
+
1908
+ /**
1909
+ * @internal
1910
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1911
+ */
1912
+ export namespace ListAgentsToolChoiceFunction$ {
1913
+ /** @deprecated use `ListAgentsToolChoiceFunction$inboundSchema` instead. */
1914
+ export const inboundSchema = ListAgentsToolChoiceFunction$inboundSchema;
1915
+ /** @deprecated use `ListAgentsToolChoiceFunction$outboundSchema` instead. */
1916
+ export const outboundSchema = ListAgentsToolChoiceFunction$outboundSchema;
1917
+ /** @deprecated use `ListAgentsToolChoiceFunction$Outbound` instead. */
1918
+ export type Outbound = ListAgentsToolChoiceFunction$Outbound;
1919
+ }
1920
+
1921
+ export function listAgentsToolChoiceFunctionToJSON(
1922
+ listAgentsToolChoiceFunction: ListAgentsToolChoiceFunction,
1923
+ ): string {
1924
+ return JSON.stringify(
1925
+ ListAgentsToolChoiceFunction$outboundSchema.parse(
1926
+ listAgentsToolChoiceFunction,
1927
+ ),
1928
+ );
1929
+ }
1930
+
1931
+ export function listAgentsToolChoiceFunctionFromJSON(
1932
+ jsonString: string,
1933
+ ): SafeParseResult<ListAgentsToolChoiceFunction, SDKValidationError> {
1934
+ return safeParse(
1935
+ jsonString,
1936
+ (x) => ListAgentsToolChoiceFunction$inboundSchema.parse(JSON.parse(x)),
1937
+ `Failed to parse 'ListAgentsToolChoiceFunction' from JSON`,
1938
+ );
1939
+ }
1940
+
1941
+ /** @internal */
1942
+ export const ListAgentsToolChoice2$inboundSchema: z.ZodType<
1943
+ ListAgentsToolChoice2,
1944
+ z.ZodTypeDef,
1945
+ unknown
1946
+ > = z.object({
1947
+ type: ListAgentsToolChoiceType$inboundSchema.optional(),
1948
+ function: z.lazy(() => ListAgentsToolChoiceFunction$inboundSchema),
1949
+ });
1950
+
1951
+ /** @internal */
1952
+ export type ListAgentsToolChoice2$Outbound = {
1953
+ type?: string | undefined;
1954
+ function: ListAgentsToolChoiceFunction$Outbound;
1955
+ };
1956
+
1957
+ /** @internal */
1958
+ export const ListAgentsToolChoice2$outboundSchema: z.ZodType<
1959
+ ListAgentsToolChoice2$Outbound,
1960
+ z.ZodTypeDef,
1961
+ ListAgentsToolChoice2
1962
+ > = z.object({
1963
+ type: ListAgentsToolChoiceType$outboundSchema.optional(),
1964
+ function: z.lazy(() => ListAgentsToolChoiceFunction$outboundSchema),
1965
+ });
1966
+
1967
+ /**
1968
+ * @internal
1969
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
1970
+ */
1971
+ export namespace ListAgentsToolChoice2$ {
1972
+ /** @deprecated use `ListAgentsToolChoice2$inboundSchema` instead. */
1973
+ export const inboundSchema = ListAgentsToolChoice2$inboundSchema;
1974
+ /** @deprecated use `ListAgentsToolChoice2$outboundSchema` instead. */
1975
+ export const outboundSchema = ListAgentsToolChoice2$outboundSchema;
1976
+ /** @deprecated use `ListAgentsToolChoice2$Outbound` instead. */
1977
+ export type Outbound = ListAgentsToolChoice2$Outbound;
1978
+ }
1979
+
1980
+ export function listAgentsToolChoice2ToJSON(
1981
+ listAgentsToolChoice2: ListAgentsToolChoice2,
1982
+ ): string {
1983
+ return JSON.stringify(
1984
+ ListAgentsToolChoice2$outboundSchema.parse(listAgentsToolChoice2),
1985
+ );
1986
+ }
1987
+
1988
+ export function listAgentsToolChoice2FromJSON(
1989
+ jsonString: string,
1990
+ ): SafeParseResult<ListAgentsToolChoice2, SDKValidationError> {
1991
+ return safeParse(
1992
+ jsonString,
1993
+ (x) => ListAgentsToolChoice2$inboundSchema.parse(JSON.parse(x)),
1994
+ `Failed to parse 'ListAgentsToolChoice2' from JSON`,
1995
+ );
1996
+ }
1997
+
1998
+ /** @internal */
1999
+ export const ListAgentsToolChoice1$inboundSchema: z.ZodNativeEnum<
2000
+ typeof ListAgentsToolChoice1
2001
+ > = z.nativeEnum(ListAgentsToolChoice1);
2002
+
2003
+ /** @internal */
2004
+ export const ListAgentsToolChoice1$outboundSchema: z.ZodNativeEnum<
2005
+ typeof ListAgentsToolChoice1
2006
+ > = ListAgentsToolChoice1$inboundSchema;
2007
+
2008
+ /**
2009
+ * @internal
2010
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2011
+ */
2012
+ export namespace ListAgentsToolChoice1$ {
2013
+ /** @deprecated use `ListAgentsToolChoice1$inboundSchema` instead. */
2014
+ export const inboundSchema = ListAgentsToolChoice1$inboundSchema;
2015
+ /** @deprecated use `ListAgentsToolChoice1$outboundSchema` instead. */
2016
+ export const outboundSchema = ListAgentsToolChoice1$outboundSchema;
2017
+ }
2018
+
2019
+ /** @internal */
2020
+ export const ListAgentsToolChoice$inboundSchema: z.ZodType<
2021
+ ListAgentsToolChoice,
2022
+ z.ZodTypeDef,
2023
+ unknown
2024
+ > = z.union([
2025
+ z.lazy(() => ListAgentsToolChoice2$inboundSchema),
2026
+ ListAgentsToolChoice1$inboundSchema,
2027
+ ]);
2028
+
2029
+ /** @internal */
2030
+ export type ListAgentsToolChoice$Outbound =
2031
+ | ListAgentsToolChoice2$Outbound
2032
+ | string;
2033
+
2034
+ /** @internal */
2035
+ export const ListAgentsToolChoice$outboundSchema: z.ZodType<
2036
+ ListAgentsToolChoice$Outbound,
2037
+ z.ZodTypeDef,
2038
+ ListAgentsToolChoice
2039
+ > = z.union([
2040
+ z.lazy(() => ListAgentsToolChoice2$outboundSchema),
2041
+ ListAgentsToolChoice1$outboundSchema,
2042
+ ]);
2043
+
2044
+ /**
2045
+ * @internal
2046
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2047
+ */
2048
+ export namespace ListAgentsToolChoice$ {
2049
+ /** @deprecated use `ListAgentsToolChoice$inboundSchema` instead. */
2050
+ export const inboundSchema = ListAgentsToolChoice$inboundSchema;
2051
+ /** @deprecated use `ListAgentsToolChoice$outboundSchema` instead. */
2052
+ export const outboundSchema = ListAgentsToolChoice$outboundSchema;
2053
+ /** @deprecated use `ListAgentsToolChoice$Outbound` instead. */
2054
+ export type Outbound = ListAgentsToolChoice$Outbound;
2055
+ }
2056
+
2057
+ export function listAgentsToolChoiceToJSON(
2058
+ listAgentsToolChoice: ListAgentsToolChoice,
2059
+ ): string {
2060
+ return JSON.stringify(
2061
+ ListAgentsToolChoice$outboundSchema.parse(listAgentsToolChoice),
2062
+ );
2063
+ }
2064
+
2065
+ export function listAgentsToolChoiceFromJSON(
2066
+ jsonString: string,
2067
+ ): SafeParseResult<ListAgentsToolChoice, SDKValidationError> {
2068
+ return safeParse(
2069
+ jsonString,
2070
+ (x) => ListAgentsToolChoice$inboundSchema.parse(JSON.parse(x)),
2071
+ `Failed to parse 'ListAgentsToolChoice' from JSON`,
2072
+ );
2073
+ }
2074
+
2075
+ /** @internal */
2076
+ export const ListAgentsModalities$inboundSchema: z.ZodNativeEnum<
2077
+ typeof ListAgentsModalities
2078
+ > = z.nativeEnum(ListAgentsModalities);
2079
+
2080
+ /** @internal */
2081
+ export const ListAgentsModalities$outboundSchema: z.ZodNativeEnum<
2082
+ typeof ListAgentsModalities
2083
+ > = ListAgentsModalities$inboundSchema;
2084
+
2085
+ /**
2086
+ * @internal
2087
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2088
+ */
2089
+ export namespace ListAgentsModalities$ {
2090
+ /** @deprecated use `ListAgentsModalities$inboundSchema` instead. */
2091
+ export const inboundSchema = ListAgentsModalities$inboundSchema;
2092
+ /** @deprecated use `ListAgentsModalities$outboundSchema` instead. */
2093
+ export const outboundSchema = ListAgentsModalities$outboundSchema;
2094
+ }
2095
+
2096
+ /** @internal */
2097
+ export const ListAgentsWebSearchOptions$inboundSchema: z.ZodType<
2098
+ ListAgentsWebSearchOptions,
2099
+ z.ZodTypeDef,
2100
+ unknown
2101
+ > = z.object({
2102
+ enabled: z.boolean().optional(),
2103
+ });
2104
+
2105
+ /** @internal */
2106
+ export type ListAgentsWebSearchOptions$Outbound = {
2107
+ enabled?: boolean | undefined;
2108
+ };
2109
+
2110
+ /** @internal */
2111
+ export const ListAgentsWebSearchOptions$outboundSchema: z.ZodType<
2112
+ ListAgentsWebSearchOptions$Outbound,
2113
+ z.ZodTypeDef,
2114
+ ListAgentsWebSearchOptions
2115
+ > = z.object({
2116
+ enabled: z.boolean().optional(),
2117
+ });
2118
+
2119
+ /**
2120
+ * @internal
2121
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2122
+ */
2123
+ export namespace ListAgentsWebSearchOptions$ {
2124
+ /** @deprecated use `ListAgentsWebSearchOptions$inboundSchema` instead. */
2125
+ export const inboundSchema = ListAgentsWebSearchOptions$inboundSchema;
2126
+ /** @deprecated use `ListAgentsWebSearchOptions$outboundSchema` instead. */
2127
+ export const outboundSchema = ListAgentsWebSearchOptions$outboundSchema;
2128
+ /** @deprecated use `ListAgentsWebSearchOptions$Outbound` instead. */
2129
+ export type Outbound = ListAgentsWebSearchOptions$Outbound;
2130
+ }
2131
+
2132
+ export function listAgentsWebSearchOptionsToJSON(
2133
+ listAgentsWebSearchOptions: ListAgentsWebSearchOptions,
2134
+ ): string {
2135
+ return JSON.stringify(
2136
+ ListAgentsWebSearchOptions$outboundSchema.parse(listAgentsWebSearchOptions),
2137
+ );
2138
+ }
2139
+
2140
+ export function listAgentsWebSearchOptionsFromJSON(
2141
+ jsonString: string,
2142
+ ): SafeParseResult<ListAgentsWebSearchOptions, SDKValidationError> {
2143
+ return safeParse(
2144
+ jsonString,
2145
+ (x) => ListAgentsWebSearchOptions$inboundSchema.parse(JSON.parse(x)),
2146
+ `Failed to parse 'ListAgentsWebSearchOptions' from JSON`,
2147
+ );
2148
+ }
2149
+
2150
+ /** @internal */
2151
+ export const ListAgentsParameters$inboundSchema: z.ZodType<
2152
+ ListAgentsParameters,
2153
+ z.ZodTypeDef,
2154
+ unknown
2155
+ > = z.object({
2156
+ audio: z.nullable(z.lazy(() => ListAgentsAudio$inboundSchema)).optional(),
2157
+ frequency_penalty: z.nullable(z.number()).optional(),
2158
+ max_tokens: z.nullable(z.number().int()).optional(),
2159
+ max_completion_tokens: z.nullable(z.number().int()).optional(),
2160
+ logprobs: z.nullable(z.boolean()).optional(),
2161
+ top_logprobs: z.nullable(z.number().int()).optional(),
2162
+ n: z.nullable(z.number().int()).optional(),
2163
+ presence_penalty: z.nullable(z.number()).optional(),
2164
+ response_format: z.union([
2165
+ z.lazy(() => ListAgentsResponseFormat3$inboundSchema),
2166
+ z.lazy(() => ListAgentsResponseFormat1$inboundSchema),
2167
+ z.lazy(() => ListAgentsResponseFormat2$inboundSchema),
2168
+ ]).optional(),
2169
+ reasoning_effort: z.string().optional(),
2170
+ verbosity: z.string().optional(),
2171
+ seed: z.nullable(z.number()).optional(),
2172
+ stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
2173
+ stream_options: z.nullable(
2174
+ z.lazy(() => ListAgentsStreamOptions$inboundSchema),
2175
+ ).optional(),
2176
+ thinking: z.lazy(() => ListAgentsThinking$inboundSchema).optional(),
2177
+ temperature: z.nullable(z.number()).optional(),
2178
+ top_p: z.nullable(z.number()).optional(),
2179
+ top_k: z.nullable(z.number()).optional(),
2180
+ tool_choice: z.union([
2181
+ z.lazy(() => ListAgentsToolChoice2$inboundSchema),
2182
+ ListAgentsToolChoice1$inboundSchema,
2183
+ ]).optional(),
2184
+ parallel_tool_calls: z.boolean().optional(),
2185
+ modalities: z.nullable(z.array(ListAgentsModalities$inboundSchema))
2186
+ .optional(),
2187
+ web_search_options: z.lazy(() => ListAgentsWebSearchOptions$inboundSchema)
2188
+ .optional(),
2189
+ }).transform((v) => {
2190
+ return remap$(v, {
2191
+ "frequency_penalty": "frequencyPenalty",
2192
+ "max_tokens": "maxTokens",
2193
+ "max_completion_tokens": "maxCompletionTokens",
2194
+ "top_logprobs": "topLogprobs",
2195
+ "presence_penalty": "presencePenalty",
2196
+ "response_format": "responseFormat",
2197
+ "reasoning_effort": "reasoningEffort",
2198
+ "stream_options": "streamOptions",
2199
+ "top_p": "topP",
2200
+ "top_k": "topK",
2201
+ "tool_choice": "toolChoice",
2202
+ "parallel_tool_calls": "parallelToolCalls",
2203
+ "web_search_options": "webSearchOptions",
2204
+ });
2205
+ });
2206
+
2207
+ /** @internal */
2208
+ export type ListAgentsParameters$Outbound = {
2209
+ audio?: ListAgentsAudio$Outbound | null | undefined;
2210
+ frequency_penalty?: number | null | undefined;
2211
+ max_tokens?: number | null | undefined;
2212
+ max_completion_tokens?: number | null | undefined;
2213
+ logprobs?: boolean | null | undefined;
2214
+ top_logprobs?: number | null | undefined;
2215
+ n?: number | null | undefined;
2216
+ presence_penalty?: number | null | undefined;
2217
+ response_format?:
2218
+ | ListAgentsResponseFormat3$Outbound
2219
+ | ListAgentsResponseFormat1$Outbound
2220
+ | ListAgentsResponseFormat2$Outbound
2221
+ | undefined;
2222
+ reasoning_effort?: string | undefined;
2223
+ verbosity?: string | undefined;
2224
+ seed?: number | null | undefined;
2225
+ stop?: string | Array<string> | null | undefined;
2226
+ stream_options?: ListAgentsStreamOptions$Outbound | null | undefined;
2227
+ thinking?: ListAgentsThinking$Outbound | undefined;
2228
+ temperature?: number | null | undefined;
2229
+ top_p?: number | null | undefined;
2230
+ top_k?: number | null | undefined;
2231
+ tool_choice?: ListAgentsToolChoice2$Outbound | string | undefined;
2232
+ parallel_tool_calls?: boolean | undefined;
2233
+ modalities?: Array<string> | null | undefined;
2234
+ web_search_options?: ListAgentsWebSearchOptions$Outbound | undefined;
2235
+ };
2236
+
2237
+ /** @internal */
2238
+ export const ListAgentsParameters$outboundSchema: z.ZodType<
2239
+ ListAgentsParameters$Outbound,
2240
+ z.ZodTypeDef,
2241
+ ListAgentsParameters
2242
+ > = z.object({
2243
+ audio: z.nullable(z.lazy(() => ListAgentsAudio$outboundSchema)).optional(),
2244
+ frequencyPenalty: z.nullable(z.number()).optional(),
2245
+ maxTokens: z.nullable(z.number().int()).optional(),
2246
+ maxCompletionTokens: z.nullable(z.number().int()).optional(),
2247
+ logprobs: z.nullable(z.boolean()).optional(),
2248
+ topLogprobs: z.nullable(z.number().int()).optional(),
2249
+ n: z.nullable(z.number().int()).optional(),
2250
+ presencePenalty: z.nullable(z.number()).optional(),
2251
+ responseFormat: z.union([
2252
+ z.lazy(() => ListAgentsResponseFormat3$outboundSchema),
2253
+ z.lazy(() => ListAgentsResponseFormat1$outboundSchema),
2254
+ z.lazy(() => ListAgentsResponseFormat2$outboundSchema),
2255
+ ]).optional(),
2256
+ reasoningEffort: z.string().optional(),
2257
+ verbosity: z.string().optional(),
2258
+ seed: z.nullable(z.number()).optional(),
2259
+ stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
2260
+ streamOptions: z.nullable(
2261
+ z.lazy(() => ListAgentsStreamOptions$outboundSchema),
2262
+ ).optional(),
2263
+ thinking: z.lazy(() => ListAgentsThinking$outboundSchema).optional(),
2264
+ temperature: z.nullable(z.number()).optional(),
2265
+ topP: z.nullable(z.number()).optional(),
2266
+ topK: z.nullable(z.number()).optional(),
2267
+ toolChoice: z.union([
2268
+ z.lazy(() => ListAgentsToolChoice2$outboundSchema),
2269
+ ListAgentsToolChoice1$outboundSchema,
2270
+ ]).optional(),
2271
+ parallelToolCalls: z.boolean().optional(),
2272
+ modalities: z.nullable(z.array(ListAgentsModalities$outboundSchema))
2273
+ .optional(),
2274
+ webSearchOptions: z.lazy(() => ListAgentsWebSearchOptions$outboundSchema)
2275
+ .optional(),
2276
+ }).transform((v) => {
2277
+ return remap$(v, {
2278
+ frequencyPenalty: "frequency_penalty",
2279
+ maxTokens: "max_tokens",
2280
+ maxCompletionTokens: "max_completion_tokens",
2281
+ topLogprobs: "top_logprobs",
2282
+ presencePenalty: "presence_penalty",
2283
+ responseFormat: "response_format",
2284
+ reasoningEffort: "reasoning_effort",
2285
+ streamOptions: "stream_options",
2286
+ topP: "top_p",
2287
+ topK: "top_k",
2288
+ toolChoice: "tool_choice",
2289
+ parallelToolCalls: "parallel_tool_calls",
2290
+ webSearchOptions: "web_search_options",
2291
+ });
2292
+ });
2293
+
2294
+ /**
2295
+ * @internal
2296
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2297
+ */
2298
+ export namespace ListAgentsParameters$ {
2299
+ /** @deprecated use `ListAgentsParameters$inboundSchema` instead. */
2300
+ export const inboundSchema = ListAgentsParameters$inboundSchema;
2301
+ /** @deprecated use `ListAgentsParameters$outboundSchema` instead. */
2302
+ export const outboundSchema = ListAgentsParameters$outboundSchema;
2303
+ /** @deprecated use `ListAgentsParameters$Outbound` instead. */
2304
+ export type Outbound = ListAgentsParameters$Outbound;
2305
+ }
2306
+
2307
+ export function listAgentsParametersToJSON(
2308
+ listAgentsParameters: ListAgentsParameters,
2309
+ ): string {
2310
+ return JSON.stringify(
2311
+ ListAgentsParameters$outboundSchema.parse(listAgentsParameters),
2312
+ );
2313
+ }
2314
+
2315
+ export function listAgentsParametersFromJSON(
2316
+ jsonString: string,
2317
+ ): SafeParseResult<ListAgentsParameters, SDKValidationError> {
2318
+ return safeParse(
2319
+ jsonString,
2320
+ (x) => ListAgentsParameters$inboundSchema.parse(JSON.parse(x)),
2321
+ `Failed to parse 'ListAgentsParameters' from JSON`,
2322
+ );
2323
+ }
2324
+
2325
+ /** @internal */
2326
+ export const ListAgentsFallbackModelsVoice$inboundSchema: z.ZodNativeEnum<
2327
+ typeof ListAgentsFallbackModelsVoice
2328
+ > = z.nativeEnum(ListAgentsFallbackModelsVoice);
2329
+
2330
+ /** @internal */
2331
+ export const ListAgentsFallbackModelsVoice$outboundSchema: z.ZodNativeEnum<
2332
+ typeof ListAgentsFallbackModelsVoice
2333
+ > = ListAgentsFallbackModelsVoice$inboundSchema;
2334
+
2335
+ /**
2336
+ * @internal
2337
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2338
+ */
2339
+ export namespace ListAgentsFallbackModelsVoice$ {
2340
+ /** @deprecated use `ListAgentsFallbackModelsVoice$inboundSchema` instead. */
2341
+ export const inboundSchema = ListAgentsFallbackModelsVoice$inboundSchema;
2342
+ /** @deprecated use `ListAgentsFallbackModelsVoice$outboundSchema` instead. */
2343
+ export const outboundSchema = ListAgentsFallbackModelsVoice$outboundSchema;
2344
+ }
2345
+
2346
+ /** @internal */
2347
+ export const ListAgentsFallbackModelsFormat$inboundSchema: z.ZodNativeEnum<
2348
+ typeof ListAgentsFallbackModelsFormat
2349
+ > = z.nativeEnum(ListAgentsFallbackModelsFormat);
2350
+
2351
+ /** @internal */
2352
+ export const ListAgentsFallbackModelsFormat$outboundSchema: z.ZodNativeEnum<
2353
+ typeof ListAgentsFallbackModelsFormat
2354
+ > = ListAgentsFallbackModelsFormat$inboundSchema;
2355
+
2356
+ /**
2357
+ * @internal
2358
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2359
+ */
2360
+ export namespace ListAgentsFallbackModelsFormat$ {
2361
+ /** @deprecated use `ListAgentsFallbackModelsFormat$inboundSchema` instead. */
2362
+ export const inboundSchema = ListAgentsFallbackModelsFormat$inboundSchema;
2363
+ /** @deprecated use `ListAgentsFallbackModelsFormat$outboundSchema` instead. */
2364
+ export const outboundSchema = ListAgentsFallbackModelsFormat$outboundSchema;
2365
+ }
2366
+
2367
+ /** @internal */
2368
+ export const ListAgentsFallbackModelsAudio$inboundSchema: z.ZodType<
2369
+ ListAgentsFallbackModelsAudio,
2370
+ z.ZodTypeDef,
2371
+ unknown
2372
+ > = z.object({
2373
+ voice: ListAgentsFallbackModelsVoice$inboundSchema,
2374
+ format: ListAgentsFallbackModelsFormat$inboundSchema,
2375
+ });
2376
+
2377
+ /** @internal */
2378
+ export type ListAgentsFallbackModelsAudio$Outbound = {
2379
+ voice: string;
2380
+ format: string;
2381
+ };
2382
+
2383
+ /** @internal */
2384
+ export const ListAgentsFallbackModelsAudio$outboundSchema: z.ZodType<
2385
+ ListAgentsFallbackModelsAudio$Outbound,
2386
+ z.ZodTypeDef,
2387
+ ListAgentsFallbackModelsAudio
2388
+ > = z.object({
2389
+ voice: ListAgentsFallbackModelsVoice$outboundSchema,
2390
+ format: ListAgentsFallbackModelsFormat$outboundSchema,
2391
+ });
2392
+
2393
+ /**
2394
+ * @internal
2395
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2396
+ */
2397
+ export namespace ListAgentsFallbackModelsAudio$ {
2398
+ /** @deprecated use `ListAgentsFallbackModelsAudio$inboundSchema` instead. */
2399
+ export const inboundSchema = ListAgentsFallbackModelsAudio$inboundSchema;
2400
+ /** @deprecated use `ListAgentsFallbackModelsAudio$outboundSchema` instead. */
2401
+ export const outboundSchema = ListAgentsFallbackModelsAudio$outboundSchema;
2402
+ /** @deprecated use `ListAgentsFallbackModelsAudio$Outbound` instead. */
2403
+ export type Outbound = ListAgentsFallbackModelsAudio$Outbound;
2404
+ }
2405
+
2406
+ export function listAgentsFallbackModelsAudioToJSON(
2407
+ listAgentsFallbackModelsAudio: ListAgentsFallbackModelsAudio,
2408
+ ): string {
2409
+ return JSON.stringify(
2410
+ ListAgentsFallbackModelsAudio$outboundSchema.parse(
2411
+ listAgentsFallbackModelsAudio,
2412
+ ),
2413
+ );
2414
+ }
2415
+
2416
+ export function listAgentsFallbackModelsAudioFromJSON(
2417
+ jsonString: string,
2418
+ ): SafeParseResult<ListAgentsFallbackModelsAudio, SDKValidationError> {
2419
+ return safeParse(
2420
+ jsonString,
2421
+ (x) => ListAgentsFallbackModelsAudio$inboundSchema.parse(JSON.parse(x)),
2422
+ `Failed to parse 'ListAgentsFallbackModelsAudio' from JSON`,
2423
+ );
2424
+ }
2425
+
2426
+ /** @internal */
2427
+ export const ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema:
2428
+ z.ZodNativeEnum<
2429
+ typeof ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType
2430
+ > = z.nativeEnum(
2431
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType,
2432
+ );
2433
+
2434
+ /** @internal */
2435
+ export const ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$outboundSchema:
2436
+ z.ZodNativeEnum<
2437
+ typeof ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType
2438
+ > =
2439
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema;
2440
+
2441
+ /**
2442
+ * @internal
2443
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2444
+ */
2445
+ export namespace ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$ {
2446
+ /** @deprecated use `ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema` instead. */
2447
+ export const inboundSchema =
2448
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema;
2449
+ /** @deprecated use `ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$outboundSchema` instead. */
2450
+ export const outboundSchema =
2451
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$outboundSchema;
2452
+ }
2453
+
2454
+ /** @internal */
2455
+ export const ListAgentsResponseFormatAgentsJsonSchema$inboundSchema: z.ZodType<
2456
+ ListAgentsResponseFormatAgentsJsonSchema,
2457
+ z.ZodTypeDef,
2458
+ unknown
2459
+ > = z.object({
2460
+ description: z.string().optional(),
2461
+ name: z.string(),
2462
+ schema: z.any().optional(),
2463
+ strict: z.boolean().optional(),
2464
+ });
2465
+
2466
+ /** @internal */
2467
+ export type ListAgentsResponseFormatAgentsJsonSchema$Outbound = {
2468
+ description?: string | undefined;
2469
+ name: string;
2470
+ schema?: any | undefined;
2471
+ strict?: boolean | undefined;
2472
+ };
2473
+
2474
+ /** @internal */
2475
+ export const ListAgentsResponseFormatAgentsJsonSchema$outboundSchema: z.ZodType<
2476
+ ListAgentsResponseFormatAgentsJsonSchema$Outbound,
2477
+ z.ZodTypeDef,
2478
+ ListAgentsResponseFormatAgentsJsonSchema
2479
+ > = z.object({
2480
+ description: z.string().optional(),
2481
+ name: z.string(),
2482
+ schema: z.any().optional(),
2483
+ strict: z.boolean().optional(),
2484
+ });
2485
+
2486
+ /**
2487
+ * @internal
2488
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2489
+ */
2490
+ export namespace ListAgentsResponseFormatAgentsJsonSchema$ {
2491
+ /** @deprecated use `ListAgentsResponseFormatAgentsJsonSchema$inboundSchema` instead. */
2492
+ export const inboundSchema =
2493
+ ListAgentsResponseFormatAgentsJsonSchema$inboundSchema;
2494
+ /** @deprecated use `ListAgentsResponseFormatAgentsJsonSchema$outboundSchema` instead. */
2495
+ export const outboundSchema =
2496
+ ListAgentsResponseFormatAgentsJsonSchema$outboundSchema;
2497
+ /** @deprecated use `ListAgentsResponseFormatAgentsJsonSchema$Outbound` instead. */
2498
+ export type Outbound = ListAgentsResponseFormatAgentsJsonSchema$Outbound;
2499
+ }
2500
+
2501
+ export function listAgentsResponseFormatAgentsJsonSchemaToJSON(
2502
+ listAgentsResponseFormatAgentsJsonSchema:
2503
+ ListAgentsResponseFormatAgentsJsonSchema,
2504
+ ): string {
2505
+ return JSON.stringify(
2506
+ ListAgentsResponseFormatAgentsJsonSchema$outboundSchema.parse(
2507
+ listAgentsResponseFormatAgentsJsonSchema,
2508
+ ),
2509
+ );
2510
+ }
2511
+
2512
+ export function listAgentsResponseFormatAgentsJsonSchemaFromJSON(
2513
+ jsonString: string,
2514
+ ): SafeParseResult<
2515
+ ListAgentsResponseFormatAgentsJsonSchema,
2516
+ SDKValidationError
2517
+ > {
2518
+ return safeParse(
2519
+ jsonString,
2520
+ (x) =>
2521
+ ListAgentsResponseFormatAgentsJsonSchema$inboundSchema.parse(
2522
+ JSON.parse(x),
2523
+ ),
2524
+ `Failed to parse 'ListAgentsResponseFormatAgentsJsonSchema' from JSON`,
2525
+ );
2526
+ }
2527
+
2528
+ /** @internal */
2529
+ export const ListAgentsResponseFormatAgents3$inboundSchema: z.ZodType<
2530
+ ListAgentsResponseFormatAgents3,
2531
+ z.ZodTypeDef,
2532
+ unknown
2533
+ > = z.object({
2534
+ type:
2535
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$inboundSchema,
2536
+ json_schema: z.lazy(() =>
2537
+ ListAgentsResponseFormatAgentsJsonSchema$inboundSchema
2538
+ ),
2539
+ }).transform((v) => {
2540
+ return remap$(v, {
2541
+ "json_schema": "jsonSchema",
2542
+ });
2543
+ });
2544
+
2545
+ /** @internal */
2546
+ export type ListAgentsResponseFormatAgents3$Outbound = {
2547
+ type: string;
2548
+ json_schema: ListAgentsResponseFormatAgentsJsonSchema$Outbound;
2549
+ };
2550
+
2551
+ /** @internal */
2552
+ export const ListAgentsResponseFormatAgents3$outboundSchema: z.ZodType<
2553
+ ListAgentsResponseFormatAgents3$Outbound,
2554
+ z.ZodTypeDef,
2555
+ ListAgentsResponseFormatAgents3
2556
+ > = z.object({
2557
+ type:
2558
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONResponseBodyType$outboundSchema,
2559
+ jsonSchema: z.lazy(() =>
2560
+ ListAgentsResponseFormatAgentsJsonSchema$outboundSchema
2561
+ ),
2562
+ }).transform((v) => {
2563
+ return remap$(v, {
2564
+ jsonSchema: "json_schema",
2565
+ });
2566
+ });
2567
+
2568
+ /**
2569
+ * @internal
2570
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2571
+ */
2572
+ export namespace ListAgentsResponseFormatAgents3$ {
2573
+ /** @deprecated use `ListAgentsResponseFormatAgents3$inboundSchema` instead. */
2574
+ export const inboundSchema = ListAgentsResponseFormatAgents3$inboundSchema;
2575
+ /** @deprecated use `ListAgentsResponseFormatAgents3$outboundSchema` instead. */
2576
+ export const outboundSchema = ListAgentsResponseFormatAgents3$outboundSchema;
2577
+ /** @deprecated use `ListAgentsResponseFormatAgents3$Outbound` instead. */
2578
+ export type Outbound = ListAgentsResponseFormatAgents3$Outbound;
2579
+ }
2580
+
2581
+ export function listAgentsResponseFormatAgents3ToJSON(
2582
+ listAgentsResponseFormatAgents3: ListAgentsResponseFormatAgents3,
2583
+ ): string {
2584
+ return JSON.stringify(
2585
+ ListAgentsResponseFormatAgents3$outboundSchema.parse(
2586
+ listAgentsResponseFormatAgents3,
2587
+ ),
2588
+ );
2589
+ }
2590
+
2591
+ export function listAgentsResponseFormatAgents3FromJSON(
2592
+ jsonString: string,
2593
+ ): SafeParseResult<ListAgentsResponseFormatAgents3, SDKValidationError> {
2594
+ return safeParse(
2595
+ jsonString,
2596
+ (x) => ListAgentsResponseFormatAgents3$inboundSchema.parse(JSON.parse(x)),
2597
+ `Failed to parse 'ListAgentsResponseFormatAgents3' from JSON`,
2598
+ );
2599
+ }
2600
+
2601
+ /** @internal */
2602
+ export const ListAgentsResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema:
2603
+ z.ZodNativeEnum<
2604
+ typeof ListAgentsResponseFormatAgentsResponse200ApplicationJSONType
2605
+ > = z.nativeEnum(
2606
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONType,
2607
+ );
2608
+
2609
+ /** @internal */
2610
+ export const ListAgentsResponseFormatAgentsResponse200ApplicationJSONType$outboundSchema:
2611
+ z.ZodNativeEnum<
2612
+ typeof ListAgentsResponseFormatAgentsResponse200ApplicationJSONType
2613
+ > =
2614
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema;
2615
+
2616
+ /**
2617
+ * @internal
2618
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2619
+ */
2620
+ export namespace ListAgentsResponseFormatAgentsResponse200ApplicationJSONType$ {
2621
+ /** @deprecated use `ListAgentsResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema` instead. */
2622
+ export const inboundSchema =
2623
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema;
2624
+ /** @deprecated use `ListAgentsResponseFormatAgentsResponse200ApplicationJSONType$outboundSchema` instead. */
2625
+ export const outboundSchema =
2626
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONType$outboundSchema;
2627
+ }
2628
+
2629
+ /** @internal */
2630
+ export const ListAgentsResponseFormatAgents2$inboundSchema: z.ZodType<
2631
+ ListAgentsResponseFormatAgents2,
2632
+ z.ZodTypeDef,
2633
+ unknown
2634
+ > = z.object({
2635
+ type:
2636
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONType$inboundSchema,
2637
+ });
2638
+
2639
+ /** @internal */
2640
+ export type ListAgentsResponseFormatAgents2$Outbound = {
2641
+ type: string;
2642
+ };
2643
+
2644
+ /** @internal */
2645
+ export const ListAgentsResponseFormatAgents2$outboundSchema: z.ZodType<
2646
+ ListAgentsResponseFormatAgents2$Outbound,
2647
+ z.ZodTypeDef,
2648
+ ListAgentsResponseFormatAgents2
2649
+ > = z.object({
2650
+ type:
2651
+ ListAgentsResponseFormatAgentsResponse200ApplicationJSONType$outboundSchema,
2652
+ });
2653
+
2654
+ /**
2655
+ * @internal
2656
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2657
+ */
2658
+ export namespace ListAgentsResponseFormatAgents2$ {
2659
+ /** @deprecated use `ListAgentsResponseFormatAgents2$inboundSchema` instead. */
2660
+ export const inboundSchema = ListAgentsResponseFormatAgents2$inboundSchema;
2661
+ /** @deprecated use `ListAgentsResponseFormatAgents2$outboundSchema` instead. */
2662
+ export const outboundSchema = ListAgentsResponseFormatAgents2$outboundSchema;
2663
+ /** @deprecated use `ListAgentsResponseFormatAgents2$Outbound` instead. */
2664
+ export type Outbound = ListAgentsResponseFormatAgents2$Outbound;
2665
+ }
2666
+
2667
+ export function listAgentsResponseFormatAgents2ToJSON(
2668
+ listAgentsResponseFormatAgents2: ListAgentsResponseFormatAgents2,
2669
+ ): string {
2670
+ return JSON.stringify(
2671
+ ListAgentsResponseFormatAgents2$outboundSchema.parse(
2672
+ listAgentsResponseFormatAgents2,
2673
+ ),
2674
+ );
2675
+ }
2676
+
2677
+ export function listAgentsResponseFormatAgents2FromJSON(
2678
+ jsonString: string,
2679
+ ): SafeParseResult<ListAgentsResponseFormatAgents2, SDKValidationError> {
2680
+ return safeParse(
2681
+ jsonString,
2682
+ (x) => ListAgentsResponseFormatAgents2$inboundSchema.parse(JSON.parse(x)),
2683
+ `Failed to parse 'ListAgentsResponseFormatAgents2' from JSON`,
2684
+ );
2685
+ }
2686
+
2687
+ /** @internal */
2688
+ export const ListAgentsResponseFormatAgentsResponse200Type$inboundSchema:
2689
+ z.ZodNativeEnum<typeof ListAgentsResponseFormatAgentsResponse200Type> = z
2690
+ .nativeEnum(ListAgentsResponseFormatAgentsResponse200Type);
2691
+
2692
+ /** @internal */
2693
+ export const ListAgentsResponseFormatAgentsResponse200Type$outboundSchema:
2694
+ z.ZodNativeEnum<typeof ListAgentsResponseFormatAgentsResponse200Type> =
2695
+ ListAgentsResponseFormatAgentsResponse200Type$inboundSchema;
2696
+
2697
+ /**
2698
+ * @internal
2699
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2700
+ */
2701
+ export namespace ListAgentsResponseFormatAgentsResponse200Type$ {
2702
+ /** @deprecated use `ListAgentsResponseFormatAgentsResponse200Type$inboundSchema` instead. */
2703
+ export const inboundSchema =
2704
+ ListAgentsResponseFormatAgentsResponse200Type$inboundSchema;
2705
+ /** @deprecated use `ListAgentsResponseFormatAgentsResponse200Type$outboundSchema` instead. */
2706
+ export const outboundSchema =
2707
+ ListAgentsResponseFormatAgentsResponse200Type$outboundSchema;
2708
+ }
2709
+
2710
+ /** @internal */
2711
+ export const ListAgentsResponseFormatAgents1$inboundSchema: z.ZodType<
2712
+ ListAgentsResponseFormatAgents1,
2713
+ z.ZodTypeDef,
2714
+ unknown
2715
+ > = z.object({
2716
+ type: ListAgentsResponseFormatAgentsResponse200Type$inboundSchema,
2717
+ });
2718
+
2719
+ /** @internal */
2720
+ export type ListAgentsResponseFormatAgents1$Outbound = {
2721
+ type: string;
2722
+ };
2723
+
2724
+ /** @internal */
2725
+ export const ListAgentsResponseFormatAgents1$outboundSchema: z.ZodType<
2726
+ ListAgentsResponseFormatAgents1$Outbound,
2727
+ z.ZodTypeDef,
2728
+ ListAgentsResponseFormatAgents1
2729
+ > = z.object({
2730
+ type: ListAgentsResponseFormatAgentsResponse200Type$outboundSchema,
2731
+ });
2732
+
2733
+ /**
2734
+ * @internal
2735
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2736
+ */
2737
+ export namespace ListAgentsResponseFormatAgents1$ {
2738
+ /** @deprecated use `ListAgentsResponseFormatAgents1$inboundSchema` instead. */
2739
+ export const inboundSchema = ListAgentsResponseFormatAgents1$inboundSchema;
2740
+ /** @deprecated use `ListAgentsResponseFormatAgents1$outboundSchema` instead. */
2741
+ export const outboundSchema = ListAgentsResponseFormatAgents1$outboundSchema;
2742
+ /** @deprecated use `ListAgentsResponseFormatAgents1$Outbound` instead. */
2743
+ export type Outbound = ListAgentsResponseFormatAgents1$Outbound;
2744
+ }
2745
+
2746
+ export function listAgentsResponseFormatAgents1ToJSON(
2747
+ listAgentsResponseFormatAgents1: ListAgentsResponseFormatAgents1,
2748
+ ): string {
2749
+ return JSON.stringify(
2750
+ ListAgentsResponseFormatAgents1$outboundSchema.parse(
2751
+ listAgentsResponseFormatAgents1,
2752
+ ),
2753
+ );
2754
+ }
2755
+
2756
+ export function listAgentsResponseFormatAgents1FromJSON(
2757
+ jsonString: string,
2758
+ ): SafeParseResult<ListAgentsResponseFormatAgents1, SDKValidationError> {
2759
+ return safeParse(
2760
+ jsonString,
2761
+ (x) => ListAgentsResponseFormatAgents1$inboundSchema.parse(JSON.parse(x)),
2762
+ `Failed to parse 'ListAgentsResponseFormatAgents1' from JSON`,
2763
+ );
2764
+ }
2765
+
2766
+ /** @internal */
2767
+ export const ListAgentsFallbackModelsResponseFormat$inboundSchema: z.ZodType<
2768
+ ListAgentsFallbackModelsResponseFormat,
2769
+ z.ZodTypeDef,
2770
+ unknown
2771
+ > = z.union([
2772
+ z.lazy(() => ListAgentsResponseFormatAgents3$inboundSchema),
2773
+ z.lazy(() => ListAgentsResponseFormatAgents1$inboundSchema),
2774
+ z.lazy(() => ListAgentsResponseFormatAgents2$inboundSchema),
2775
+ ]);
2776
+
2777
+ /** @internal */
2778
+ export type ListAgentsFallbackModelsResponseFormat$Outbound =
2779
+ | ListAgentsResponseFormatAgents3$Outbound
2780
+ | ListAgentsResponseFormatAgents1$Outbound
2781
+ | ListAgentsResponseFormatAgents2$Outbound;
2782
+
2783
+ /** @internal */
2784
+ export const ListAgentsFallbackModelsResponseFormat$outboundSchema: z.ZodType<
2785
+ ListAgentsFallbackModelsResponseFormat$Outbound,
2786
+ z.ZodTypeDef,
2787
+ ListAgentsFallbackModelsResponseFormat
2788
+ > = z.union([
2789
+ z.lazy(() => ListAgentsResponseFormatAgents3$outboundSchema),
2790
+ z.lazy(() => ListAgentsResponseFormatAgents1$outboundSchema),
2791
+ z.lazy(() => ListAgentsResponseFormatAgents2$outboundSchema),
2792
+ ]);
2793
+
2794
+ /**
2795
+ * @internal
2796
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2797
+ */
2798
+ export namespace ListAgentsFallbackModelsResponseFormat$ {
2799
+ /** @deprecated use `ListAgentsFallbackModelsResponseFormat$inboundSchema` instead. */
2800
+ export const inboundSchema =
2801
+ ListAgentsFallbackModelsResponseFormat$inboundSchema;
2802
+ /** @deprecated use `ListAgentsFallbackModelsResponseFormat$outboundSchema` instead. */
2803
+ export const outboundSchema =
2804
+ ListAgentsFallbackModelsResponseFormat$outboundSchema;
2805
+ /** @deprecated use `ListAgentsFallbackModelsResponseFormat$Outbound` instead. */
2806
+ export type Outbound = ListAgentsFallbackModelsResponseFormat$Outbound;
2807
+ }
2808
+
2809
+ export function listAgentsFallbackModelsResponseFormatToJSON(
2810
+ listAgentsFallbackModelsResponseFormat:
2811
+ ListAgentsFallbackModelsResponseFormat,
2812
+ ): string {
2813
+ return JSON.stringify(
2814
+ ListAgentsFallbackModelsResponseFormat$outboundSchema.parse(
2815
+ listAgentsFallbackModelsResponseFormat,
2816
+ ),
2817
+ );
2818
+ }
2819
+
2820
+ export function listAgentsFallbackModelsResponseFormatFromJSON(
2821
+ jsonString: string,
2822
+ ): SafeParseResult<ListAgentsFallbackModelsResponseFormat, SDKValidationError> {
2823
+ return safeParse(
2824
+ jsonString,
2825
+ (x) =>
2826
+ ListAgentsFallbackModelsResponseFormat$inboundSchema.parse(JSON.parse(x)),
2827
+ `Failed to parse 'ListAgentsFallbackModelsResponseFormat' from JSON`,
2828
+ );
2829
+ }
2830
+
2831
+ /** @internal */
2832
+ export const ListAgentsFallbackModelsStop$inboundSchema: z.ZodType<
2833
+ ListAgentsFallbackModelsStop,
2834
+ z.ZodTypeDef,
2835
+ unknown
2836
+ > = z.union([z.string(), z.array(z.string())]);
2837
+
2838
+ /** @internal */
2839
+ export type ListAgentsFallbackModelsStop$Outbound = string | Array<string>;
2840
+
2841
+ /** @internal */
2842
+ export const ListAgentsFallbackModelsStop$outboundSchema: z.ZodType<
2843
+ ListAgentsFallbackModelsStop$Outbound,
2844
+ z.ZodTypeDef,
2845
+ ListAgentsFallbackModelsStop
2846
+ > = z.union([z.string(), z.array(z.string())]);
2847
+
2848
+ /**
2849
+ * @internal
2850
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2851
+ */
2852
+ export namespace ListAgentsFallbackModelsStop$ {
2853
+ /** @deprecated use `ListAgentsFallbackModelsStop$inboundSchema` instead. */
2854
+ export const inboundSchema = ListAgentsFallbackModelsStop$inboundSchema;
2855
+ /** @deprecated use `ListAgentsFallbackModelsStop$outboundSchema` instead. */
2856
+ export const outboundSchema = ListAgentsFallbackModelsStop$outboundSchema;
2857
+ /** @deprecated use `ListAgentsFallbackModelsStop$Outbound` instead. */
2858
+ export type Outbound = ListAgentsFallbackModelsStop$Outbound;
2859
+ }
2860
+
2861
+ export function listAgentsFallbackModelsStopToJSON(
2862
+ listAgentsFallbackModelsStop: ListAgentsFallbackModelsStop,
2863
+ ): string {
2864
+ return JSON.stringify(
2865
+ ListAgentsFallbackModelsStop$outboundSchema.parse(
2866
+ listAgentsFallbackModelsStop,
2867
+ ),
2868
+ );
2869
+ }
2870
+
2871
+ export function listAgentsFallbackModelsStopFromJSON(
2872
+ jsonString: string,
2873
+ ): SafeParseResult<ListAgentsFallbackModelsStop, SDKValidationError> {
2874
+ return safeParse(
2875
+ jsonString,
2876
+ (x) => ListAgentsFallbackModelsStop$inboundSchema.parse(JSON.parse(x)),
2877
+ `Failed to parse 'ListAgentsFallbackModelsStop' from JSON`,
2878
+ );
2879
+ }
2880
+
2881
+ /** @internal */
2882
+ export const ListAgentsFallbackModelsStreamOptions$inboundSchema: z.ZodType<
2883
+ ListAgentsFallbackModelsStreamOptions,
2884
+ z.ZodTypeDef,
2885
+ unknown
2886
+ > = z.object({
2887
+ include_usage: z.boolean().optional(),
2888
+ }).transform((v) => {
2889
+ return remap$(v, {
2890
+ "include_usage": "includeUsage",
2891
+ });
2892
+ });
2893
+
2894
+ /** @internal */
2895
+ export type ListAgentsFallbackModelsStreamOptions$Outbound = {
2896
+ include_usage?: boolean | undefined;
2897
+ };
2898
+
2899
+ /** @internal */
2900
+ export const ListAgentsFallbackModelsStreamOptions$outboundSchema: z.ZodType<
2901
+ ListAgentsFallbackModelsStreamOptions$Outbound,
2902
+ z.ZodTypeDef,
2903
+ ListAgentsFallbackModelsStreamOptions
2904
+ > = z.object({
2905
+ includeUsage: z.boolean().optional(),
2906
+ }).transform((v) => {
2907
+ return remap$(v, {
2908
+ includeUsage: "include_usage",
2909
+ });
2910
+ });
2911
+
2912
+ /**
2913
+ * @internal
2914
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2915
+ */
2916
+ export namespace ListAgentsFallbackModelsStreamOptions$ {
2917
+ /** @deprecated use `ListAgentsFallbackModelsStreamOptions$inboundSchema` instead. */
2918
+ export const inboundSchema =
2919
+ ListAgentsFallbackModelsStreamOptions$inboundSchema;
2920
+ /** @deprecated use `ListAgentsFallbackModelsStreamOptions$outboundSchema` instead. */
2921
+ export const outboundSchema =
2922
+ ListAgentsFallbackModelsStreamOptions$outboundSchema;
2923
+ /** @deprecated use `ListAgentsFallbackModelsStreamOptions$Outbound` instead. */
2924
+ export type Outbound = ListAgentsFallbackModelsStreamOptions$Outbound;
2925
+ }
2926
+
2927
+ export function listAgentsFallbackModelsStreamOptionsToJSON(
2928
+ listAgentsFallbackModelsStreamOptions: ListAgentsFallbackModelsStreamOptions,
2929
+ ): string {
2930
+ return JSON.stringify(
2931
+ ListAgentsFallbackModelsStreamOptions$outboundSchema.parse(
2932
+ listAgentsFallbackModelsStreamOptions,
2933
+ ),
2934
+ );
2935
+ }
2936
+
2937
+ export function listAgentsFallbackModelsStreamOptionsFromJSON(
2938
+ jsonString: string,
2939
+ ): SafeParseResult<ListAgentsFallbackModelsStreamOptions, SDKValidationError> {
2940
+ return safeParse(
2941
+ jsonString,
2942
+ (x) =>
2943
+ ListAgentsFallbackModelsStreamOptions$inboundSchema.parse(JSON.parse(x)),
2944
+ `Failed to parse 'ListAgentsFallbackModelsStreamOptions' from JSON`,
2945
+ );
2946
+ }
2947
+
2948
+ /** @internal */
2949
+ export const ListAgentsFallbackModelsType$inboundSchema: z.ZodNativeEnum<
2950
+ typeof ListAgentsFallbackModelsType
2951
+ > = z.nativeEnum(ListAgentsFallbackModelsType);
2952
+
2953
+ /** @internal */
2954
+ export const ListAgentsFallbackModelsType$outboundSchema: z.ZodNativeEnum<
2955
+ typeof ListAgentsFallbackModelsType
2956
+ > = ListAgentsFallbackModelsType$inboundSchema;
2957
+
2958
+ /**
2959
+ * @internal
2960
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
2961
+ */
2962
+ export namespace ListAgentsFallbackModelsType$ {
2963
+ /** @deprecated use `ListAgentsFallbackModelsType$inboundSchema` instead. */
2964
+ export const inboundSchema = ListAgentsFallbackModelsType$inboundSchema;
2965
+ /** @deprecated use `ListAgentsFallbackModelsType$outboundSchema` instead. */
2966
+ export const outboundSchema = ListAgentsFallbackModelsType$outboundSchema;
2967
+ }
2968
+
2969
+ /** @internal */
2970
+ export const ListAgentsFallbackModelsThinking$inboundSchema: z.ZodType<
2971
+ ListAgentsFallbackModelsThinking,
2972
+ z.ZodTypeDef,
2973
+ unknown
2974
+ > = z.object({
2975
+ type: ListAgentsFallbackModelsType$inboundSchema,
2976
+ budget_tokens: z.number(),
2977
+ }).transform((v) => {
2978
+ return remap$(v, {
2979
+ "budget_tokens": "budgetTokens",
2980
+ });
2981
+ });
2982
+
2983
+ /** @internal */
2984
+ export type ListAgentsFallbackModelsThinking$Outbound = {
2985
+ type: string;
2986
+ budget_tokens: number;
2987
+ };
2988
+
2989
+ /** @internal */
2990
+ export const ListAgentsFallbackModelsThinking$outboundSchema: z.ZodType<
2991
+ ListAgentsFallbackModelsThinking$Outbound,
2992
+ z.ZodTypeDef,
2993
+ ListAgentsFallbackModelsThinking
2994
+ > = z.object({
2995
+ type: ListAgentsFallbackModelsType$outboundSchema,
2996
+ budgetTokens: z.number(),
2997
+ }).transform((v) => {
2998
+ return remap$(v, {
2999
+ budgetTokens: "budget_tokens",
3000
+ });
3001
+ });
3002
+
3003
+ /**
3004
+ * @internal
3005
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3006
+ */
3007
+ export namespace ListAgentsFallbackModelsThinking$ {
3008
+ /** @deprecated use `ListAgentsFallbackModelsThinking$inboundSchema` instead. */
3009
+ export const inboundSchema = ListAgentsFallbackModelsThinking$inboundSchema;
3010
+ /** @deprecated use `ListAgentsFallbackModelsThinking$outboundSchema` instead. */
3011
+ export const outboundSchema = ListAgentsFallbackModelsThinking$outboundSchema;
3012
+ /** @deprecated use `ListAgentsFallbackModelsThinking$Outbound` instead. */
3013
+ export type Outbound = ListAgentsFallbackModelsThinking$Outbound;
3014
+ }
3015
+
3016
+ export function listAgentsFallbackModelsThinkingToJSON(
3017
+ listAgentsFallbackModelsThinking: ListAgentsFallbackModelsThinking,
3018
+ ): string {
3019
+ return JSON.stringify(
3020
+ ListAgentsFallbackModelsThinking$outboundSchema.parse(
3021
+ listAgentsFallbackModelsThinking,
3022
+ ),
3023
+ );
3024
+ }
3025
+
3026
+ export function listAgentsFallbackModelsThinkingFromJSON(
3027
+ jsonString: string,
3028
+ ): SafeParseResult<ListAgentsFallbackModelsThinking, SDKValidationError> {
3029
+ return safeParse(
3030
+ jsonString,
3031
+ (x) => ListAgentsFallbackModelsThinking$inboundSchema.parse(JSON.parse(x)),
3032
+ `Failed to parse 'ListAgentsFallbackModelsThinking' from JSON`,
3033
+ );
3034
+ }
3035
+
3036
+ /** @internal */
3037
+ export const ListAgentsToolChoiceAgentsType$inboundSchema: z.ZodNativeEnum<
3038
+ typeof ListAgentsToolChoiceAgentsType
3039
+ > = z.nativeEnum(ListAgentsToolChoiceAgentsType);
3040
+
3041
+ /** @internal */
3042
+ export const ListAgentsToolChoiceAgentsType$outboundSchema: z.ZodNativeEnum<
3043
+ typeof ListAgentsToolChoiceAgentsType
3044
+ > = ListAgentsToolChoiceAgentsType$inboundSchema;
3045
+
3046
+ /**
3047
+ * @internal
3048
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3049
+ */
3050
+ export namespace ListAgentsToolChoiceAgentsType$ {
3051
+ /** @deprecated use `ListAgentsToolChoiceAgentsType$inboundSchema` instead. */
3052
+ export const inboundSchema = ListAgentsToolChoiceAgentsType$inboundSchema;
3053
+ /** @deprecated use `ListAgentsToolChoiceAgentsType$outboundSchema` instead. */
3054
+ export const outboundSchema = ListAgentsToolChoiceAgentsType$outboundSchema;
3055
+ }
3056
+
3057
+ /** @internal */
3058
+ export const ListAgentsToolChoiceAgentsFunction$inboundSchema: z.ZodType<
3059
+ ListAgentsToolChoiceAgentsFunction,
3060
+ z.ZodTypeDef,
3061
+ unknown
3062
+ > = z.object({
3063
+ name: z.string().optional(),
3064
+ });
3065
+
3066
+ /** @internal */
3067
+ export type ListAgentsToolChoiceAgentsFunction$Outbound = {
3068
+ name?: string | undefined;
3069
+ };
3070
+
3071
+ /** @internal */
3072
+ export const ListAgentsToolChoiceAgentsFunction$outboundSchema: z.ZodType<
3073
+ ListAgentsToolChoiceAgentsFunction$Outbound,
3074
+ z.ZodTypeDef,
3075
+ ListAgentsToolChoiceAgentsFunction
3076
+ > = z.object({
3077
+ name: z.string().optional(),
3078
+ });
3079
+
3080
+ /**
3081
+ * @internal
3082
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3083
+ */
3084
+ export namespace ListAgentsToolChoiceAgentsFunction$ {
3085
+ /** @deprecated use `ListAgentsToolChoiceAgentsFunction$inboundSchema` instead. */
3086
+ export const inboundSchema = ListAgentsToolChoiceAgentsFunction$inboundSchema;
3087
+ /** @deprecated use `ListAgentsToolChoiceAgentsFunction$outboundSchema` instead. */
3088
+ export const outboundSchema =
3089
+ ListAgentsToolChoiceAgentsFunction$outboundSchema;
3090
+ /** @deprecated use `ListAgentsToolChoiceAgentsFunction$Outbound` instead. */
3091
+ export type Outbound = ListAgentsToolChoiceAgentsFunction$Outbound;
3092
+ }
3093
+
3094
+ export function listAgentsToolChoiceAgentsFunctionToJSON(
3095
+ listAgentsToolChoiceAgentsFunction: ListAgentsToolChoiceAgentsFunction,
3096
+ ): string {
3097
+ return JSON.stringify(
3098
+ ListAgentsToolChoiceAgentsFunction$outboundSchema.parse(
3099
+ listAgentsToolChoiceAgentsFunction,
3100
+ ),
3101
+ );
3102
+ }
3103
+
3104
+ export function listAgentsToolChoiceAgentsFunctionFromJSON(
3105
+ jsonString: string,
3106
+ ): SafeParseResult<ListAgentsToolChoiceAgentsFunction, SDKValidationError> {
3107
+ return safeParse(
3108
+ jsonString,
3109
+ (x) =>
3110
+ ListAgentsToolChoiceAgentsFunction$inboundSchema.parse(JSON.parse(x)),
3111
+ `Failed to parse 'ListAgentsToolChoiceAgentsFunction' from JSON`,
3112
+ );
3113
+ }
3114
+
228
3115
  /** @internal */
229
- export const ListAgentsRequest$inboundSchema: z.ZodType<
230
- ListAgentsRequest,
3116
+ export const ListAgentsToolChoiceAgents2$inboundSchema: z.ZodType<
3117
+ ListAgentsToolChoiceAgents2,
231
3118
  z.ZodTypeDef,
232
3119
  unknown
233
3120
  > = z.object({
234
- limit: z.number().default(10),
235
- starting_after: z.string().optional(),
236
- ending_before: z.string().optional(),
237
- }).transform((v) => {
238
- return remap$(v, {
239
- "starting_after": "startingAfter",
240
- "ending_before": "endingBefore",
241
- });
3121
+ type: ListAgentsToolChoiceAgentsType$inboundSchema.optional(),
3122
+ function: z.lazy(() => ListAgentsToolChoiceAgentsFunction$inboundSchema),
242
3123
  });
243
3124
 
244
3125
  /** @internal */
245
- export type ListAgentsRequest$Outbound = {
246
- limit: number;
247
- starting_after?: string | undefined;
248
- ending_before?: string | undefined;
3126
+ export type ListAgentsToolChoiceAgents2$Outbound = {
3127
+ type?: string | undefined;
3128
+ function: ListAgentsToolChoiceAgentsFunction$Outbound;
249
3129
  };
250
3130
 
251
3131
  /** @internal */
252
- export const ListAgentsRequest$outboundSchema: z.ZodType<
253
- ListAgentsRequest$Outbound,
3132
+ export const ListAgentsToolChoiceAgents2$outboundSchema: z.ZodType<
3133
+ ListAgentsToolChoiceAgents2$Outbound,
254
3134
  z.ZodTypeDef,
255
- ListAgentsRequest
3135
+ ListAgentsToolChoiceAgents2
256
3136
  > = z.object({
257
- limit: z.number().default(10),
258
- startingAfter: z.string().optional(),
259
- endingBefore: z.string().optional(),
260
- }).transform((v) => {
261
- return remap$(v, {
262
- startingAfter: "starting_after",
263
- endingBefore: "ending_before",
264
- });
3137
+ type: ListAgentsToolChoiceAgentsType$outboundSchema.optional(),
3138
+ function: z.lazy(() => ListAgentsToolChoiceAgentsFunction$outboundSchema),
265
3139
  });
266
3140
 
267
3141
  /**
268
3142
  * @internal
269
3143
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
270
3144
  */
271
- export namespace ListAgentsRequest$ {
272
- /** @deprecated use `ListAgentsRequest$inboundSchema` instead. */
273
- export const inboundSchema = ListAgentsRequest$inboundSchema;
274
- /** @deprecated use `ListAgentsRequest$outboundSchema` instead. */
275
- export const outboundSchema = ListAgentsRequest$outboundSchema;
276
- /** @deprecated use `ListAgentsRequest$Outbound` instead. */
277
- export type Outbound = ListAgentsRequest$Outbound;
3145
+ export namespace ListAgentsToolChoiceAgents2$ {
3146
+ /** @deprecated use `ListAgentsToolChoiceAgents2$inboundSchema` instead. */
3147
+ export const inboundSchema = ListAgentsToolChoiceAgents2$inboundSchema;
3148
+ /** @deprecated use `ListAgentsToolChoiceAgents2$outboundSchema` instead. */
3149
+ export const outboundSchema = ListAgentsToolChoiceAgents2$outboundSchema;
3150
+ /** @deprecated use `ListAgentsToolChoiceAgents2$Outbound` instead. */
3151
+ export type Outbound = ListAgentsToolChoiceAgents2$Outbound;
278
3152
  }
279
3153
 
280
- export function listAgentsRequestToJSON(
281
- listAgentsRequest: ListAgentsRequest,
3154
+ export function listAgentsToolChoiceAgents2ToJSON(
3155
+ listAgentsToolChoiceAgents2: ListAgentsToolChoiceAgents2,
282
3156
  ): string {
283
3157
  return JSON.stringify(
284
- ListAgentsRequest$outboundSchema.parse(listAgentsRequest),
3158
+ ListAgentsToolChoiceAgents2$outboundSchema.parse(
3159
+ listAgentsToolChoiceAgents2,
3160
+ ),
285
3161
  );
286
3162
  }
287
3163
 
288
- export function listAgentsRequestFromJSON(
3164
+ export function listAgentsToolChoiceAgents2FromJSON(
289
3165
  jsonString: string,
290
- ): SafeParseResult<ListAgentsRequest, SDKValidationError> {
3166
+ ): SafeParseResult<ListAgentsToolChoiceAgents2, SDKValidationError> {
291
3167
  return safeParse(
292
3168
  jsonString,
293
- (x) => ListAgentsRequest$inboundSchema.parse(JSON.parse(x)),
294
- `Failed to parse 'ListAgentsRequest' from JSON`,
3169
+ (x) => ListAgentsToolChoiceAgents2$inboundSchema.parse(JSON.parse(x)),
3170
+ `Failed to parse 'ListAgentsToolChoiceAgents2' from JSON`,
295
3171
  );
296
3172
  }
297
3173
 
298
3174
  /** @internal */
299
- export const ListAgentsObject$inboundSchema: z.ZodNativeEnum<
300
- typeof ListAgentsObject
301
- > = z.nativeEnum(ListAgentsObject);
3175
+ export const ListAgentsToolChoiceAgents1$inboundSchema: z.ZodNativeEnum<
3176
+ typeof ListAgentsToolChoiceAgents1
3177
+ > = z.nativeEnum(ListAgentsToolChoiceAgents1);
302
3178
 
303
3179
  /** @internal */
304
- export const ListAgentsObject$outboundSchema: z.ZodNativeEnum<
305
- typeof ListAgentsObject
306
- > = ListAgentsObject$inboundSchema;
3180
+ export const ListAgentsToolChoiceAgents1$outboundSchema: z.ZodNativeEnum<
3181
+ typeof ListAgentsToolChoiceAgents1
3182
+ > = ListAgentsToolChoiceAgents1$inboundSchema;
307
3183
 
308
3184
  /**
309
3185
  * @internal
310
3186
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
311
3187
  */
312
- export namespace ListAgentsObject$ {
313
- /** @deprecated use `ListAgentsObject$inboundSchema` instead. */
314
- export const inboundSchema = ListAgentsObject$inboundSchema;
315
- /** @deprecated use `ListAgentsObject$outboundSchema` instead. */
316
- export const outboundSchema = ListAgentsObject$outboundSchema;
3188
+ export namespace ListAgentsToolChoiceAgents1$ {
3189
+ /** @deprecated use `ListAgentsToolChoiceAgents1$inboundSchema` instead. */
3190
+ export const inboundSchema = ListAgentsToolChoiceAgents1$inboundSchema;
3191
+ /** @deprecated use `ListAgentsToolChoiceAgents1$outboundSchema` instead. */
3192
+ export const outboundSchema = ListAgentsToolChoiceAgents1$outboundSchema;
317
3193
  }
318
3194
 
319
3195
  /** @internal */
320
- export const ListAgentsStatus$inboundSchema: z.ZodNativeEnum<
321
- typeof ListAgentsStatus
322
- > = z.nativeEnum(ListAgentsStatus);
3196
+ export const ListAgentsFallbackModelsToolChoice$inboundSchema: z.ZodType<
3197
+ ListAgentsFallbackModelsToolChoice,
3198
+ z.ZodTypeDef,
3199
+ unknown
3200
+ > = z.union([
3201
+ z.lazy(() => ListAgentsToolChoiceAgents2$inboundSchema),
3202
+ ListAgentsToolChoiceAgents1$inboundSchema,
3203
+ ]);
323
3204
 
324
3205
  /** @internal */
325
- export const ListAgentsStatus$outboundSchema: z.ZodNativeEnum<
326
- typeof ListAgentsStatus
327
- > = ListAgentsStatus$inboundSchema;
3206
+ export type ListAgentsFallbackModelsToolChoice$Outbound =
3207
+ | ListAgentsToolChoiceAgents2$Outbound
3208
+ | string;
3209
+
3210
+ /** @internal */
3211
+ export const ListAgentsFallbackModelsToolChoice$outboundSchema: z.ZodType<
3212
+ ListAgentsFallbackModelsToolChoice$Outbound,
3213
+ z.ZodTypeDef,
3214
+ ListAgentsFallbackModelsToolChoice
3215
+ > = z.union([
3216
+ z.lazy(() => ListAgentsToolChoiceAgents2$outboundSchema),
3217
+ ListAgentsToolChoiceAgents1$outboundSchema,
3218
+ ]);
328
3219
 
329
3220
  /**
330
3221
  * @internal
331
3222
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
332
3223
  */
333
- export namespace ListAgentsStatus$ {
334
- /** @deprecated use `ListAgentsStatus$inboundSchema` instead. */
335
- export const inboundSchema = ListAgentsStatus$inboundSchema;
336
- /** @deprecated use `ListAgentsStatus$outboundSchema` instead. */
337
- export const outboundSchema = ListAgentsStatus$outboundSchema;
3224
+ export namespace ListAgentsFallbackModelsToolChoice$ {
3225
+ /** @deprecated use `ListAgentsFallbackModelsToolChoice$inboundSchema` instead. */
3226
+ export const inboundSchema = ListAgentsFallbackModelsToolChoice$inboundSchema;
3227
+ /** @deprecated use `ListAgentsFallbackModelsToolChoice$outboundSchema` instead. */
3228
+ export const outboundSchema =
3229
+ ListAgentsFallbackModelsToolChoice$outboundSchema;
3230
+ /** @deprecated use `ListAgentsFallbackModelsToolChoice$Outbound` instead. */
3231
+ export type Outbound = ListAgentsFallbackModelsToolChoice$Outbound;
3232
+ }
3233
+
3234
+ export function listAgentsFallbackModelsToolChoiceToJSON(
3235
+ listAgentsFallbackModelsToolChoice: ListAgentsFallbackModelsToolChoice,
3236
+ ): string {
3237
+ return JSON.stringify(
3238
+ ListAgentsFallbackModelsToolChoice$outboundSchema.parse(
3239
+ listAgentsFallbackModelsToolChoice,
3240
+ ),
3241
+ );
3242
+ }
3243
+
3244
+ export function listAgentsFallbackModelsToolChoiceFromJSON(
3245
+ jsonString: string,
3246
+ ): SafeParseResult<ListAgentsFallbackModelsToolChoice, SDKValidationError> {
3247
+ return safeParse(
3248
+ jsonString,
3249
+ (x) =>
3250
+ ListAgentsFallbackModelsToolChoice$inboundSchema.parse(JSON.parse(x)),
3251
+ `Failed to parse 'ListAgentsFallbackModelsToolChoice' from JSON`,
3252
+ );
338
3253
  }
339
3254
 
340
3255
  /** @internal */
341
- export const ListAgentsToolApprovalRequired$inboundSchema: z.ZodNativeEnum<
342
- typeof ListAgentsToolApprovalRequired
343
- > = z.nativeEnum(ListAgentsToolApprovalRequired);
3256
+ export const ListAgentsFallbackModelsModalities$inboundSchema: z.ZodNativeEnum<
3257
+ typeof ListAgentsFallbackModelsModalities
3258
+ > = z.nativeEnum(ListAgentsFallbackModelsModalities);
344
3259
 
345
3260
  /** @internal */
346
- export const ListAgentsToolApprovalRequired$outboundSchema: z.ZodNativeEnum<
347
- typeof ListAgentsToolApprovalRequired
348
- > = ListAgentsToolApprovalRequired$inboundSchema;
3261
+ export const ListAgentsFallbackModelsModalities$outboundSchema: z.ZodNativeEnum<
3262
+ typeof ListAgentsFallbackModelsModalities
3263
+ > = ListAgentsFallbackModelsModalities$inboundSchema;
349
3264
 
350
3265
  /**
351
3266
  * @internal
352
3267
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
353
3268
  */
354
- export namespace ListAgentsToolApprovalRequired$ {
355
- /** @deprecated use `ListAgentsToolApprovalRequired$inboundSchema` instead. */
356
- export const inboundSchema = ListAgentsToolApprovalRequired$inboundSchema;
357
- /** @deprecated use `ListAgentsToolApprovalRequired$outboundSchema` instead. */
358
- export const outboundSchema = ListAgentsToolApprovalRequired$outboundSchema;
3269
+ export namespace ListAgentsFallbackModelsModalities$ {
3270
+ /** @deprecated use `ListAgentsFallbackModelsModalities$inboundSchema` instead. */
3271
+ export const inboundSchema = ListAgentsFallbackModelsModalities$inboundSchema;
3272
+ /** @deprecated use `ListAgentsFallbackModelsModalities$outboundSchema` instead. */
3273
+ export const outboundSchema =
3274
+ ListAgentsFallbackModelsModalities$outboundSchema;
359
3275
  }
360
3276
 
361
3277
  /** @internal */
362
- export const ListAgentsConditions$inboundSchema: z.ZodType<
363
- ListAgentsConditions,
3278
+ export const ListAgentsFallbackModelsWebSearchOptions$inboundSchema: z.ZodType<
3279
+ ListAgentsFallbackModelsWebSearchOptions,
364
3280
  z.ZodTypeDef,
365
3281
  unknown
366
3282
  > = z.object({
367
- condition: z.string(),
368
- operator: z.string(),
369
- value: z.string(),
3283
+ enabled: z.boolean().optional(),
370
3284
  });
371
3285
 
372
3286
  /** @internal */
373
- export type ListAgentsConditions$Outbound = {
374
- condition: string;
375
- operator: string;
376
- value: string;
3287
+ export type ListAgentsFallbackModelsWebSearchOptions$Outbound = {
3288
+ enabled?: boolean | undefined;
377
3289
  };
378
3290
 
379
3291
  /** @internal */
380
- export const ListAgentsConditions$outboundSchema: z.ZodType<
381
- ListAgentsConditions$Outbound,
3292
+ export const ListAgentsFallbackModelsWebSearchOptions$outboundSchema: z.ZodType<
3293
+ ListAgentsFallbackModelsWebSearchOptions$Outbound,
382
3294
  z.ZodTypeDef,
383
- ListAgentsConditions
3295
+ ListAgentsFallbackModelsWebSearchOptions
384
3296
  > = z.object({
385
- condition: z.string(),
386
- operator: z.string(),
387
- value: z.string(),
3297
+ enabled: z.boolean().optional(),
388
3298
  });
389
3299
 
390
3300
  /**
391
3301
  * @internal
392
3302
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
393
3303
  */
394
- export namespace ListAgentsConditions$ {
395
- /** @deprecated use `ListAgentsConditions$inboundSchema` instead. */
396
- export const inboundSchema = ListAgentsConditions$inboundSchema;
397
- /** @deprecated use `ListAgentsConditions$outboundSchema` instead. */
398
- export const outboundSchema = ListAgentsConditions$outboundSchema;
399
- /** @deprecated use `ListAgentsConditions$Outbound` instead. */
400
- export type Outbound = ListAgentsConditions$Outbound;
3304
+ export namespace ListAgentsFallbackModelsWebSearchOptions$ {
3305
+ /** @deprecated use `ListAgentsFallbackModelsWebSearchOptions$inboundSchema` instead. */
3306
+ export const inboundSchema =
3307
+ ListAgentsFallbackModelsWebSearchOptions$inboundSchema;
3308
+ /** @deprecated use `ListAgentsFallbackModelsWebSearchOptions$outboundSchema` instead. */
3309
+ export const outboundSchema =
3310
+ ListAgentsFallbackModelsWebSearchOptions$outboundSchema;
3311
+ /** @deprecated use `ListAgentsFallbackModelsWebSearchOptions$Outbound` instead. */
3312
+ export type Outbound = ListAgentsFallbackModelsWebSearchOptions$Outbound;
401
3313
  }
402
3314
 
403
- export function listAgentsConditionsToJSON(
404
- listAgentsConditions: ListAgentsConditions,
3315
+ export function listAgentsFallbackModelsWebSearchOptionsToJSON(
3316
+ listAgentsFallbackModelsWebSearchOptions:
3317
+ ListAgentsFallbackModelsWebSearchOptions,
405
3318
  ): string {
406
3319
  return JSON.stringify(
407
- ListAgentsConditions$outboundSchema.parse(listAgentsConditions),
3320
+ ListAgentsFallbackModelsWebSearchOptions$outboundSchema.parse(
3321
+ listAgentsFallbackModelsWebSearchOptions,
3322
+ ),
408
3323
  );
409
3324
  }
410
3325
 
411
- export function listAgentsConditionsFromJSON(
3326
+ export function listAgentsFallbackModelsWebSearchOptionsFromJSON(
412
3327
  jsonString: string,
413
- ): SafeParseResult<ListAgentsConditions, SDKValidationError> {
3328
+ ): SafeParseResult<
3329
+ ListAgentsFallbackModelsWebSearchOptions,
3330
+ SDKValidationError
3331
+ > {
414
3332
  return safeParse(
415
3333
  jsonString,
416
- (x) => ListAgentsConditions$inboundSchema.parse(JSON.parse(x)),
417
- `Failed to parse 'ListAgentsConditions' from JSON`,
3334
+ (x) =>
3335
+ ListAgentsFallbackModelsWebSearchOptions$inboundSchema.parse(
3336
+ JSON.parse(x),
3337
+ ),
3338
+ `Failed to parse 'ListAgentsFallbackModelsWebSearchOptions' from JSON`,
418
3339
  );
419
3340
  }
420
3341
 
421
3342
  /** @internal */
422
- export const ListAgentsTools$inboundSchema: z.ZodType<
423
- ListAgentsTools,
3343
+ export const ListAgentsFallbackModelsParameters$inboundSchema: z.ZodType<
3344
+ ListAgentsFallbackModelsParameters,
424
3345
  z.ZodTypeDef,
425
3346
  unknown
426
3347
  > = z.object({
427
- id: z.string(),
428
- key: z.string().optional(),
429
- action_type: z.string(),
430
- display_name: z.string().optional(),
431
- requires_approval: z.boolean().default(false),
432
- conditions: z.array(z.lazy(() => ListAgentsConditions$inboundSchema))
3348
+ audio: z.nullable(z.lazy(() => ListAgentsFallbackModelsAudio$inboundSchema))
433
3349
  .optional(),
434
- mcpServer: z.string().optional(),
435
- timeout: z.number().default(120),
3350
+ frequency_penalty: z.nullable(z.number()).optional(),
3351
+ max_tokens: z.nullable(z.number().int()).optional(),
3352
+ max_completion_tokens: z.nullable(z.number().int()).optional(),
3353
+ logprobs: z.nullable(z.boolean()).optional(),
3354
+ top_logprobs: z.nullable(z.number().int()).optional(),
3355
+ n: z.nullable(z.number().int()).optional(),
3356
+ presence_penalty: z.nullable(z.number()).optional(),
3357
+ response_format: z.union([
3358
+ z.lazy(() => ListAgentsResponseFormatAgents3$inboundSchema),
3359
+ z.lazy(() => ListAgentsResponseFormatAgents1$inboundSchema),
3360
+ z.lazy(() => ListAgentsResponseFormatAgents2$inboundSchema),
3361
+ ]).optional(),
3362
+ reasoning_effort: z.string().optional(),
3363
+ verbosity: z.string().optional(),
3364
+ seed: z.nullable(z.number()).optional(),
3365
+ stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
3366
+ stream_options: z.nullable(
3367
+ z.lazy(() => ListAgentsFallbackModelsStreamOptions$inboundSchema),
3368
+ ).optional(),
3369
+ thinking: z.lazy(() => ListAgentsFallbackModelsThinking$inboundSchema)
3370
+ .optional(),
3371
+ temperature: z.nullable(z.number()).optional(),
3372
+ top_p: z.nullable(z.number()).optional(),
3373
+ top_k: z.nullable(z.number()).optional(),
3374
+ tool_choice: z.union([
3375
+ z.lazy(() => ListAgentsToolChoiceAgents2$inboundSchema),
3376
+ ListAgentsToolChoiceAgents1$inboundSchema,
3377
+ ]).optional(),
3378
+ parallel_tool_calls: z.boolean().optional(),
3379
+ modalities: z.nullable(
3380
+ z.array(ListAgentsFallbackModelsModalities$inboundSchema),
3381
+ ).optional(),
3382
+ web_search_options: z.lazy(() =>
3383
+ ListAgentsFallbackModelsWebSearchOptions$inboundSchema
3384
+ ).optional(),
436
3385
  }).transform((v) => {
437
3386
  return remap$(v, {
438
- "action_type": "actionType",
439
- "display_name": "displayName",
440
- "requires_approval": "requiresApproval",
3387
+ "frequency_penalty": "frequencyPenalty",
3388
+ "max_tokens": "maxTokens",
3389
+ "max_completion_tokens": "maxCompletionTokens",
3390
+ "top_logprobs": "topLogprobs",
3391
+ "presence_penalty": "presencePenalty",
3392
+ "response_format": "responseFormat",
3393
+ "reasoning_effort": "reasoningEffort",
3394
+ "stream_options": "streamOptions",
3395
+ "top_p": "topP",
3396
+ "top_k": "topK",
3397
+ "tool_choice": "toolChoice",
3398
+ "parallel_tool_calls": "parallelToolCalls",
3399
+ "web_search_options": "webSearchOptions",
441
3400
  });
442
3401
  });
443
3402
 
444
3403
  /** @internal */
445
- export type ListAgentsTools$Outbound = {
446
- id: string;
447
- key?: string | undefined;
448
- action_type: string;
449
- display_name?: string | undefined;
450
- requires_approval: boolean;
451
- conditions?: Array<ListAgentsConditions$Outbound> | undefined;
452
- mcpServer?: string | undefined;
453
- timeout: number;
3404
+ export type ListAgentsFallbackModelsParameters$Outbound = {
3405
+ audio?: ListAgentsFallbackModelsAudio$Outbound | null | undefined;
3406
+ frequency_penalty?: number | null | undefined;
3407
+ max_tokens?: number | null | undefined;
3408
+ max_completion_tokens?: number | null | undefined;
3409
+ logprobs?: boolean | null | undefined;
3410
+ top_logprobs?: number | null | undefined;
3411
+ n?: number | null | undefined;
3412
+ presence_penalty?: number | null | undefined;
3413
+ response_format?:
3414
+ | ListAgentsResponseFormatAgents3$Outbound
3415
+ | ListAgentsResponseFormatAgents1$Outbound
3416
+ | ListAgentsResponseFormatAgents2$Outbound
3417
+ | undefined;
3418
+ reasoning_effort?: string | undefined;
3419
+ verbosity?: string | undefined;
3420
+ seed?: number | null | undefined;
3421
+ stop?: string | Array<string> | null | undefined;
3422
+ stream_options?:
3423
+ | ListAgentsFallbackModelsStreamOptions$Outbound
3424
+ | null
3425
+ | undefined;
3426
+ thinking?: ListAgentsFallbackModelsThinking$Outbound | undefined;
3427
+ temperature?: number | null | undefined;
3428
+ top_p?: number | null | undefined;
3429
+ top_k?: number | null | undefined;
3430
+ tool_choice?: ListAgentsToolChoiceAgents2$Outbound | string | undefined;
3431
+ parallel_tool_calls?: boolean | undefined;
3432
+ modalities?: Array<string> | null | undefined;
3433
+ web_search_options?:
3434
+ | ListAgentsFallbackModelsWebSearchOptions$Outbound
3435
+ | undefined;
454
3436
  };
455
3437
 
456
3438
  /** @internal */
457
- export const ListAgentsTools$outboundSchema: z.ZodType<
458
- ListAgentsTools$Outbound,
3439
+ export const ListAgentsFallbackModelsParameters$outboundSchema: z.ZodType<
3440
+ ListAgentsFallbackModelsParameters$Outbound,
459
3441
  z.ZodTypeDef,
460
- ListAgentsTools
3442
+ ListAgentsFallbackModelsParameters
461
3443
  > = z.object({
462
- id: z.string(),
463
- key: z.string().optional(),
464
- actionType: z.string(),
465
- displayName: z.string().optional(),
466
- requiresApproval: z.boolean().default(false),
467
- conditions: z.array(z.lazy(() => ListAgentsConditions$outboundSchema))
3444
+ audio: z.nullable(z.lazy(() => ListAgentsFallbackModelsAudio$outboundSchema))
468
3445
  .optional(),
469
- mcpServer: z.string().optional(),
470
- timeout: z.number().default(120),
3446
+ frequencyPenalty: z.nullable(z.number()).optional(),
3447
+ maxTokens: z.nullable(z.number().int()).optional(),
3448
+ maxCompletionTokens: z.nullable(z.number().int()).optional(),
3449
+ logprobs: z.nullable(z.boolean()).optional(),
3450
+ topLogprobs: z.nullable(z.number().int()).optional(),
3451
+ n: z.nullable(z.number().int()).optional(),
3452
+ presencePenalty: z.nullable(z.number()).optional(),
3453
+ responseFormat: z.union([
3454
+ z.lazy(() => ListAgentsResponseFormatAgents3$outboundSchema),
3455
+ z.lazy(() => ListAgentsResponseFormatAgents1$outboundSchema),
3456
+ z.lazy(() => ListAgentsResponseFormatAgents2$outboundSchema),
3457
+ ]).optional(),
3458
+ reasoningEffort: z.string().optional(),
3459
+ verbosity: z.string().optional(),
3460
+ seed: z.nullable(z.number()).optional(),
3461
+ stop: z.nullable(z.union([z.string(), z.array(z.string())])).optional(),
3462
+ streamOptions: z.nullable(
3463
+ z.lazy(() => ListAgentsFallbackModelsStreamOptions$outboundSchema),
3464
+ ).optional(),
3465
+ thinking: z.lazy(() => ListAgentsFallbackModelsThinking$outboundSchema)
3466
+ .optional(),
3467
+ temperature: z.nullable(z.number()).optional(),
3468
+ topP: z.nullable(z.number()).optional(),
3469
+ topK: z.nullable(z.number()).optional(),
3470
+ toolChoice: z.union([
3471
+ z.lazy(() => ListAgentsToolChoiceAgents2$outboundSchema),
3472
+ ListAgentsToolChoiceAgents1$outboundSchema,
3473
+ ]).optional(),
3474
+ parallelToolCalls: z.boolean().optional(),
3475
+ modalities: z.nullable(
3476
+ z.array(ListAgentsFallbackModelsModalities$outboundSchema),
3477
+ ).optional(),
3478
+ webSearchOptions: z.lazy(() =>
3479
+ ListAgentsFallbackModelsWebSearchOptions$outboundSchema
3480
+ ).optional(),
471
3481
  }).transform((v) => {
472
3482
  return remap$(v, {
473
- actionType: "action_type",
474
- displayName: "display_name",
475
- requiresApproval: "requires_approval",
3483
+ frequencyPenalty: "frequency_penalty",
3484
+ maxTokens: "max_tokens",
3485
+ maxCompletionTokens: "max_completion_tokens",
3486
+ topLogprobs: "top_logprobs",
3487
+ presencePenalty: "presence_penalty",
3488
+ responseFormat: "response_format",
3489
+ reasoningEffort: "reasoning_effort",
3490
+ streamOptions: "stream_options",
3491
+ topP: "top_p",
3492
+ topK: "top_k",
3493
+ toolChoice: "tool_choice",
3494
+ parallelToolCalls: "parallel_tool_calls",
3495
+ webSearchOptions: "web_search_options",
476
3496
  });
477
3497
  });
478
3498
 
@@ -480,76 +3500,73 @@ export const ListAgentsTools$outboundSchema: z.ZodType<
480
3500
  * @internal
481
3501
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
482
3502
  */
483
- export namespace ListAgentsTools$ {
484
- /** @deprecated use `ListAgentsTools$inboundSchema` instead. */
485
- export const inboundSchema = ListAgentsTools$inboundSchema;
486
- /** @deprecated use `ListAgentsTools$outboundSchema` instead. */
487
- export const outboundSchema = ListAgentsTools$outboundSchema;
488
- /** @deprecated use `ListAgentsTools$Outbound` instead. */
489
- export type Outbound = ListAgentsTools$Outbound;
3503
+ export namespace ListAgentsFallbackModelsParameters$ {
3504
+ /** @deprecated use `ListAgentsFallbackModelsParameters$inboundSchema` instead. */
3505
+ export const inboundSchema = ListAgentsFallbackModelsParameters$inboundSchema;
3506
+ /** @deprecated use `ListAgentsFallbackModelsParameters$outboundSchema` instead. */
3507
+ export const outboundSchema =
3508
+ ListAgentsFallbackModelsParameters$outboundSchema;
3509
+ /** @deprecated use `ListAgentsFallbackModelsParameters$Outbound` instead. */
3510
+ export type Outbound = ListAgentsFallbackModelsParameters$Outbound;
490
3511
  }
491
3512
 
492
- export function listAgentsToolsToJSON(
493
- listAgentsTools: ListAgentsTools,
3513
+ export function listAgentsFallbackModelsParametersToJSON(
3514
+ listAgentsFallbackModelsParameters: ListAgentsFallbackModelsParameters,
494
3515
  ): string {
495
- return JSON.stringify(ListAgentsTools$outboundSchema.parse(listAgentsTools));
3516
+ return JSON.stringify(
3517
+ ListAgentsFallbackModelsParameters$outboundSchema.parse(
3518
+ listAgentsFallbackModelsParameters,
3519
+ ),
3520
+ );
496
3521
  }
497
3522
 
498
- export function listAgentsToolsFromJSON(
3523
+ export function listAgentsFallbackModelsParametersFromJSON(
499
3524
  jsonString: string,
500
- ): SafeParseResult<ListAgentsTools, SDKValidationError> {
3525
+ ): SafeParseResult<ListAgentsFallbackModelsParameters, SDKValidationError> {
501
3526
  return safeParse(
502
3527
  jsonString,
503
- (x) => ListAgentsTools$inboundSchema.parse(JSON.parse(x)),
504
- `Failed to parse 'ListAgentsTools' from JSON`,
3528
+ (x) =>
3529
+ ListAgentsFallbackModelsParameters$inboundSchema.parse(JSON.parse(x)),
3530
+ `Failed to parse 'ListAgentsFallbackModelsParameters' from JSON`,
505
3531
  );
506
3532
  }
507
3533
 
508
3534
  /** @internal */
509
- export const ListAgentsSettings$inboundSchema: z.ZodType<
510
- ListAgentsSettings,
3535
+ export const ListAgentsFallbackModels2$inboundSchema: z.ZodType<
3536
+ ListAgentsFallbackModels2,
511
3537
  z.ZodTypeDef,
512
3538
  unknown
513
3539
  > = z.object({
514
- max_iterations: z.number().int().default(15),
515
- max_execution_time: z.number().int().default(300),
516
- tool_approval_required: ListAgentsToolApprovalRequired$inboundSchema.default(
517
- "respect_tool",
518
- ),
519
- tools: z.array(z.lazy(() => ListAgentsTools$inboundSchema)).optional(),
3540
+ id: z.string(),
3541
+ integration_id: z.nullable(z.string()).optional(),
3542
+ parameters: z.lazy(() => ListAgentsFallbackModelsParameters$inboundSchema)
3543
+ .optional(),
520
3544
  }).transform((v) => {
521
3545
  return remap$(v, {
522
- "max_iterations": "maxIterations",
523
- "max_execution_time": "maxExecutionTime",
524
- "tool_approval_required": "toolApprovalRequired",
3546
+ "integration_id": "integrationId",
525
3547
  });
526
3548
  });
527
3549
 
528
3550
  /** @internal */
529
- export type ListAgentsSettings$Outbound = {
530
- max_iterations: number;
531
- max_execution_time: number;
532
- tool_approval_required: string;
533
- tools?: Array<ListAgentsTools$Outbound> | undefined;
3551
+ export type ListAgentsFallbackModels2$Outbound = {
3552
+ id: string;
3553
+ integration_id?: string | null | undefined;
3554
+ parameters?: ListAgentsFallbackModelsParameters$Outbound | undefined;
534
3555
  };
535
3556
 
536
3557
  /** @internal */
537
- export const ListAgentsSettings$outboundSchema: z.ZodType<
538
- ListAgentsSettings$Outbound,
3558
+ export const ListAgentsFallbackModels2$outboundSchema: z.ZodType<
3559
+ ListAgentsFallbackModels2$Outbound,
539
3560
  z.ZodTypeDef,
540
- ListAgentsSettings
3561
+ ListAgentsFallbackModels2
541
3562
  > = z.object({
542
- maxIterations: z.number().int().default(15),
543
- maxExecutionTime: z.number().int().default(300),
544
- toolApprovalRequired: ListAgentsToolApprovalRequired$outboundSchema.default(
545
- "respect_tool",
546
- ),
547
- tools: z.array(z.lazy(() => ListAgentsTools$outboundSchema)).optional(),
3563
+ id: z.string(),
3564
+ integrationId: z.nullable(z.string()).optional(),
3565
+ parameters: z.lazy(() => ListAgentsFallbackModelsParameters$outboundSchema)
3566
+ .optional(),
548
3567
  }).transform((v) => {
549
3568
  return remap$(v, {
550
- maxIterations: "max_iterations",
551
- maxExecutionTime: "max_execution_time",
552
- toolApprovalRequired: "tool_approval_required",
3569
+ integrationId: "integration_id",
553
3570
  });
554
3571
  });
555
3572
 
@@ -557,30 +3574,86 @@ export const ListAgentsSettings$outboundSchema: z.ZodType<
557
3574
  * @internal
558
3575
  * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
559
3576
  */
560
- export namespace ListAgentsSettings$ {
561
- /** @deprecated use `ListAgentsSettings$inboundSchema` instead. */
562
- export const inboundSchema = ListAgentsSettings$inboundSchema;
563
- /** @deprecated use `ListAgentsSettings$outboundSchema` instead. */
564
- export const outboundSchema = ListAgentsSettings$outboundSchema;
565
- /** @deprecated use `ListAgentsSettings$Outbound` instead. */
566
- export type Outbound = ListAgentsSettings$Outbound;
3577
+ export namespace ListAgentsFallbackModels2$ {
3578
+ /** @deprecated use `ListAgentsFallbackModels2$inboundSchema` instead. */
3579
+ export const inboundSchema = ListAgentsFallbackModels2$inboundSchema;
3580
+ /** @deprecated use `ListAgentsFallbackModels2$outboundSchema` instead. */
3581
+ export const outboundSchema = ListAgentsFallbackModels2$outboundSchema;
3582
+ /** @deprecated use `ListAgentsFallbackModels2$Outbound` instead. */
3583
+ export type Outbound = ListAgentsFallbackModels2$Outbound;
567
3584
  }
568
3585
 
569
- export function listAgentsSettingsToJSON(
570
- listAgentsSettings: ListAgentsSettings,
3586
+ export function listAgentsFallbackModels2ToJSON(
3587
+ listAgentsFallbackModels2: ListAgentsFallbackModels2,
571
3588
  ): string {
572
3589
  return JSON.stringify(
573
- ListAgentsSettings$outboundSchema.parse(listAgentsSettings),
3590
+ ListAgentsFallbackModels2$outboundSchema.parse(listAgentsFallbackModels2),
574
3591
  );
575
3592
  }
576
3593
 
577
- export function listAgentsSettingsFromJSON(
3594
+ export function listAgentsFallbackModels2FromJSON(
578
3595
  jsonString: string,
579
- ): SafeParseResult<ListAgentsSettings, SDKValidationError> {
3596
+ ): SafeParseResult<ListAgentsFallbackModels2, SDKValidationError> {
580
3597
  return safeParse(
581
3598
  jsonString,
582
- (x) => ListAgentsSettings$inboundSchema.parse(JSON.parse(x)),
583
- `Failed to parse 'ListAgentsSettings' from JSON`,
3599
+ (x) => ListAgentsFallbackModels2$inboundSchema.parse(JSON.parse(x)),
3600
+ `Failed to parse 'ListAgentsFallbackModels2' from JSON`,
3601
+ );
3602
+ }
3603
+
3604
+ /** @internal */
3605
+ export const ListAgentsFallbackModels$inboundSchema: z.ZodType<
3606
+ ListAgentsFallbackModels,
3607
+ z.ZodTypeDef,
3608
+ unknown
3609
+ > = z.union([
3610
+ z.lazy(() => ListAgentsFallbackModels2$inboundSchema),
3611
+ z.string(),
3612
+ ]);
3613
+
3614
+ /** @internal */
3615
+ export type ListAgentsFallbackModels$Outbound =
3616
+ | ListAgentsFallbackModels2$Outbound
3617
+ | string;
3618
+
3619
+ /** @internal */
3620
+ export const ListAgentsFallbackModels$outboundSchema: z.ZodType<
3621
+ ListAgentsFallbackModels$Outbound,
3622
+ z.ZodTypeDef,
3623
+ ListAgentsFallbackModels
3624
+ > = z.union([
3625
+ z.lazy(() => ListAgentsFallbackModels2$outboundSchema),
3626
+ z.string(),
3627
+ ]);
3628
+
3629
+ /**
3630
+ * @internal
3631
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
3632
+ */
3633
+ export namespace ListAgentsFallbackModels$ {
3634
+ /** @deprecated use `ListAgentsFallbackModels$inboundSchema` instead. */
3635
+ export const inboundSchema = ListAgentsFallbackModels$inboundSchema;
3636
+ /** @deprecated use `ListAgentsFallbackModels$outboundSchema` instead. */
3637
+ export const outboundSchema = ListAgentsFallbackModels$outboundSchema;
3638
+ /** @deprecated use `ListAgentsFallbackModels$Outbound` instead. */
3639
+ export type Outbound = ListAgentsFallbackModels$Outbound;
3640
+ }
3641
+
3642
+ export function listAgentsFallbackModelsToJSON(
3643
+ listAgentsFallbackModels: ListAgentsFallbackModels,
3644
+ ): string {
3645
+ return JSON.stringify(
3646
+ ListAgentsFallbackModels$outboundSchema.parse(listAgentsFallbackModels),
3647
+ );
3648
+ }
3649
+
3650
+ export function listAgentsFallbackModelsFromJSON(
3651
+ jsonString: string,
3652
+ ): SafeParseResult<ListAgentsFallbackModels, SDKValidationError> {
3653
+ return safeParse(
3654
+ jsonString,
3655
+ (x) => ListAgentsFallbackModels$inboundSchema.parse(JSON.parse(x)),
3656
+ `Failed to parse 'ListAgentsFallbackModels' from JSON`,
584
3657
  );
585
3658
  }
586
3659
 
@@ -592,14 +3665,17 @@ export const ListAgentsModel$inboundSchema: z.ZodType<
592
3665
  > = z.object({
593
3666
  id: z.string(),
594
3667
  integration_id: z.nullable(z.string()).optional(),
595
- fallback_models: z.nullable(z.array(z.string())).optional(),
596
- max_tokens: z.number().int().optional(),
597
- temperature: z.number().optional(),
3668
+ parameters: z.lazy(() => ListAgentsParameters$inboundSchema).optional(),
3669
+ fallback_models: z.nullable(
3670
+ z.array(z.union([
3671
+ z.lazy(() => ListAgentsFallbackModels2$inboundSchema),
3672
+ z.string(),
3673
+ ])),
3674
+ ).optional(),
598
3675
  }).transform((v) => {
599
3676
  return remap$(v, {
600
3677
  "integration_id": "integrationId",
601
3678
  "fallback_models": "fallbackModels",
602
- "max_tokens": "maxTokens",
603
3679
  });
604
3680
  });
605
3681
 
@@ -607,9 +3683,11 @@ export const ListAgentsModel$inboundSchema: z.ZodType<
607
3683
  export type ListAgentsModel$Outbound = {
608
3684
  id: string;
609
3685
  integration_id?: string | null | undefined;
610
- fallback_models?: Array<string> | null | undefined;
611
- max_tokens?: number | undefined;
612
- temperature?: number | undefined;
3686
+ parameters?: ListAgentsParameters$Outbound | undefined;
3687
+ fallback_models?:
3688
+ | Array<ListAgentsFallbackModels2$Outbound | string>
3689
+ | null
3690
+ | undefined;
613
3691
  };
614
3692
 
615
3693
  /** @internal */
@@ -620,14 +3698,17 @@ export const ListAgentsModel$outboundSchema: z.ZodType<
620
3698
  > = z.object({
621
3699
  id: z.string(),
622
3700
  integrationId: z.nullable(z.string()).optional(),
623
- fallbackModels: z.nullable(z.array(z.string())).optional(),
624
- maxTokens: z.number().int().optional(),
625
- temperature: z.number().optional(),
3701
+ parameters: z.lazy(() => ListAgentsParameters$outboundSchema).optional(),
3702
+ fallbackModels: z.nullable(
3703
+ z.array(z.union([
3704
+ z.lazy(() => ListAgentsFallbackModels2$outboundSchema),
3705
+ z.string(),
3706
+ ])),
3707
+ ).optional(),
626
3708
  }).transform((v) => {
627
3709
  return remap$(v, {
628
3710
  integrationId: "integration_id",
629
3711
  fallbackModels: "fallback_models",
630
- maxTokens: "max_tokens",
631
3712
  });
632
3713
  });
633
3714