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