@orq-ai/node 3.14.43 → 3.14.44

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