@orq-ai/node 4.16.0-rc.57 → 4.16.0-rc.58

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 (138) hide show
  1. package/README.md +68 -52
  2. package/funcs/routerClassifyCreate.d.ts +2 -2
  3. package/funcs/routerClassifyCreate.d.ts.map +1 -1
  4. package/funcs/routerClassifyCreate.js +2 -2
  5. package/funcs/routerClassifyCreate.js.map +1 -1
  6. package/funcs/routerDecisionsCreate.d.ts +18 -0
  7. package/funcs/routerDecisionsCreate.d.ts.map +1 -0
  8. package/funcs/routerDecisionsCreate.js +123 -0
  9. package/funcs/routerDecisionsCreate.js.map +1 -0
  10. package/jsr.json +1 -1
  11. package/lib/config.d.ts +2 -2
  12. package/lib/config.js +2 -2
  13. package/models/components/classifyanswer.d.ts +6 -47
  14. package/models/components/classifyanswer.d.ts.map +1 -1
  15. package/models/components/classifyanswer.js +11 -20
  16. package/models/components/classifyanswer.js.map +1 -1
  17. package/models/components/classifychoiceanswer.d.ts +24 -0
  18. package/models/components/classifychoiceanswer.d.ts.map +1 -0
  19. package/models/components/classifychoiceanswer.js +53 -0
  20. package/models/components/classifychoiceanswer.js.map +1 -0
  21. package/models/components/classifyinputtokensdetails.d.ts +17 -0
  22. package/models/components/classifyinputtokensdetails.d.ts.map +1 -0
  23. package/models/components/classifyinputtokensdetails.js +57 -0
  24. package/models/components/classifyinputtokensdetails.js.map +1 -0
  25. package/models/components/classifynoulanswer.d.ts +14 -0
  26. package/models/components/classifynoulanswer.d.ts.map +1 -0
  27. package/models/components/classifynoulanswer.js +51 -0
  28. package/models/components/classifynoulanswer.js.map +1 -0
  29. package/models/components/classifyrefusalanswer.d.ts +10 -0
  30. package/models/components/classifyrefusalanswer.d.ts.map +1 -0
  31. package/models/components/classifyrefusalanswer.js +50 -0
  32. package/models/components/classifyrefusalanswer.js.map +1 -0
  33. package/models/components/classifyretryconfig.d.ts +4 -4
  34. package/models/components/classifyretryconfig.d.ts.map +1 -1
  35. package/models/components/classifyretryconfig.js +1 -1
  36. package/models/components/classifyretryconfig.js.map +1 -1
  37. package/models/components/classifyscoreanswer.d.ts +30 -0
  38. package/models/components/classifyscoreanswer.d.ts.map +1 -0
  39. package/models/components/classifyscoreanswer.js +54 -0
  40. package/models/components/classifyscoreanswer.js.map +1 -0
  41. package/models/components/classifyusage.d.ts +4 -2
  42. package/models/components/classifyusage.d.ts.map +1 -1
  43. package/models/components/classifyusage.js +3 -0
  44. package/models/components/classifyusage.js.map +1 -1
  45. package/models/components/index.d.ts +5 -0
  46. package/models/components/index.d.ts.map +1 -1
  47. package/models/components/index.js +5 -0
  48. package/models/components/index.js.map +1 -1
  49. package/models/components/model.d.ts +4 -0
  50. package/models/components/model.d.ts.map +1 -1
  51. package/models/components/model.js +1 -0
  52. package/models/components/model.js.map +1 -1
  53. package/models/components/modelmetadata.d.ts +2 -0
  54. package/models/components/modelmetadata.d.ts.map +1 -1
  55. package/models/components/modelmetadata.js +4 -0
  56. package/models/components/modelmetadata.js.map +1 -1
  57. package/models/components/reasoningpart.js +1 -1
  58. package/models/errors/createclassify.d.ts +90 -6
  59. package/models/errors/createclassify.d.ts.map +1 -1
  60. package/models/errors/createclassify.js +116 -4
  61. package/models/errors/createclassify.js.map +1 -1
  62. package/models/errors/createdecisions.d.ts +151 -0
  63. package/models/errors/createdecisions.d.ts.map +1 -0
  64. package/models/errors/createdecisions.js +239 -0
  65. package/models/errors/createdecisions.js.map +1 -0
  66. package/models/errors/index.d.ts +1 -0
  67. package/models/errors/index.d.ts.map +1 -1
  68. package/models/errors/index.js +1 -0
  69. package/models/errors/index.js.map +1 -1
  70. package/models/operations/createclassify.d.ts +9 -4
  71. package/models/operations/createclassify.d.ts.map +1 -1
  72. package/models/operations/createclassify.js +2 -0
  73. package/models/operations/createclassify.js.map +1 -1
  74. package/models/operations/createdecisions.d.ts +237 -0
  75. package/models/operations/createdecisions.d.ts.map +1 -0
  76. package/models/operations/createdecisions.js +148 -0
  77. package/models/operations/createdecisions.js.map +1 -0
  78. package/models/operations/createtool.js +4 -4
  79. package/models/operations/getalltools.js +4 -4
  80. package/models/operations/getv2humanevalsets.js +2 -2
  81. package/models/operations/getv2humanevalsetsid.js +2 -2
  82. package/models/operations/index.d.ts +1 -0
  83. package/models/operations/index.d.ts.map +1 -1
  84. package/models/operations/index.js +1 -0
  85. package/models/operations/index.js.map +1 -1
  86. package/models/operations/patchv2humanevalsetsid.js +2 -2
  87. package/models/operations/postv2feedbackevaluation.js +4 -4
  88. package/models/operations/postv2humanevalsets.js +2 -2
  89. package/models/operations/retrievetool.js +4 -4
  90. package/models/operations/runagent.js +1 -1
  91. package/models/operations/streamrunagent.js +1 -1
  92. package/models/operations/updatetool.js +4 -4
  93. package/package.json +3 -3
  94. package/sdk/classify.d.ts +1 -1
  95. package/sdk/classify.js +1 -1
  96. package/sdk/decisions.d.ts +12 -0
  97. package/sdk/decisions.d.ts.map +1 -0
  98. package/sdk/decisions.js +22 -0
  99. package/sdk/decisions.js.map +1 -0
  100. package/sdk/router.d.ts +3 -0
  101. package/sdk/router.d.ts.map +1 -1
  102. package/sdk/router.js +4 -0
  103. package/sdk/router.js.map +1 -1
  104. package/src/funcs/routerClassifyCreate.ts +31 -3
  105. package/src/funcs/routerDecisionsCreate.ts +218 -0
  106. package/src/lib/config.ts +2 -2
  107. package/src/models/components/classifyanswer.ts +28 -56
  108. package/src/models/components/classifychoiceanswer.ts +46 -0
  109. package/src/models/components/classifyinputtokensdetails.ts +45 -0
  110. package/src/models/components/classifynoulanswer.ts +36 -0
  111. package/src/models/components/classifyrefusalanswer.ts +31 -0
  112. package/src/models/components/classifyretryconfig.ts +5 -5
  113. package/src/models/components/classifyscoreanswer.ts +51 -0
  114. package/src/models/components/classifyusage.ts +9 -2
  115. package/src/models/components/index.ts +5 -0
  116. package/src/models/components/model.ts +5 -0
  117. package/src/models/components/modelmetadata.ts +6 -0
  118. package/src/models/components/reasoningpart.ts +1 -1
  119. package/src/models/errors/createclassify.ts +214 -6
  120. package/src/models/errors/createdecisions.ts +363 -0
  121. package/src/models/errors/index.ts +1 -0
  122. package/src/models/operations/createclassify.ts +11 -4
  123. package/src/models/operations/createdecisions.ts +434 -0
  124. package/src/models/operations/createtool.ts +4 -4
  125. package/src/models/operations/getalltools.ts +4 -4
  126. package/src/models/operations/getv2humanevalsets.ts +2 -2
  127. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  128. package/src/models/operations/index.ts +1 -0
  129. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  130. package/src/models/operations/postv2feedbackevaluation.ts +4 -4
  131. package/src/models/operations/postv2humanevalsets.ts +2 -2
  132. package/src/models/operations/retrievetool.ts +4 -4
  133. package/src/models/operations/runagent.ts +1 -1
  134. package/src/models/operations/streamrunagent.ts +1 -1
  135. package/src/models/operations/updatetool.ts +4 -4
  136. package/src/sdk/classify.ts +1 -1
  137. package/src/sdk/decisions.ts +27 -0
  138. package/src/sdk/router.ts +6 -0
@@ -0,0 +1,434 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import * as components from "../components/index.js";
9
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+
11
+ /**
12
+ * The evaluation prompt for this question. A string, an object or an array.
13
+ */
14
+ export type CreateDecisionsQuestionsRouterDecisionsRequestInstructions =
15
+ | string
16
+ | { [k: string]: any }
17
+ | Array<any>;
18
+
19
+ /**
20
+ * Places the state on an ordered scale and returns the probability of each level.
21
+ */
22
+ export type QuestionsScoreQuestion = {
23
+ /**
24
+ * Ordered level descriptions from lowest to highest. At least two levels.
25
+ */
26
+ criteria: Array<string>;
27
+ /**
28
+ * The evaluation prompt for this question. A string, an object or an array.
29
+ */
30
+ instructions: string | { [k: string]: any } | Array<any>;
31
+ type: "score";
32
+ };
33
+
34
+ /**
35
+ * The evaluation prompt for this question. A string, an object or an array.
36
+ */
37
+ export type CreateDecisionsQuestionsRouterDecisionsInstructions = string | {
38
+ [k: string]: any;
39
+ } | Array<any>;
40
+
41
+ /**
42
+ * Picks one of the given options and returns the probability of each.
43
+ */
44
+ export type QuestionsChoiceQuestion = {
45
+ /**
46
+ * Options keyed by name, each mapped to a description or null.
47
+ */
48
+ criteria: { [k: string]: string | null };
49
+ /**
50
+ * The evaluation prompt for this question. A string, an object or an array.
51
+ */
52
+ instructions: string | { [k: string]: any } | Array<any>;
53
+ type: "choice";
54
+ };
55
+
56
+ /**
57
+ * Optional descriptions of what true and false mean.
58
+ */
59
+ export type QuestionsCriteria = {
60
+ false?: string | undefined;
61
+ true?: string | undefined;
62
+ };
63
+
64
+ /**
65
+ * The evaluation prompt for this question. A string, an object or an array.
66
+ */
67
+ export type CreateDecisionsQuestionsInstructions =
68
+ | string
69
+ | { [k: string]: any }
70
+ | Array<any>;
71
+
72
+ /**
73
+ * Answers with a probability between 0 and 1 that the statement holds.
74
+ */
75
+ export type QuestionsNoulQuestion = {
76
+ /**
77
+ * Optional descriptions of what true and false mean.
78
+ */
79
+ criteria?: QuestionsCriteria | undefined;
80
+ /**
81
+ * The evaluation prompt for this question. A string, an object or an array.
82
+ */
83
+ instructions: string | { [k: string]: any } | Array<any>;
84
+ type: "noul";
85
+ };
86
+
87
+ export type CreateDecisionsQuestions =
88
+ | QuestionsNoulQuestion
89
+ | QuestionsChoiceQuestion
90
+ | QuestionsScoreQuestion;
91
+
92
+ /**
93
+ * The content to evaluate. A string, an object or an array. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
94
+ */
95
+ export type CreateDecisionsState = string | { [k: string]: any } | Array<any>;
96
+
97
+ export type CreateDecisionsRequestBody = {
98
+ /**
99
+ * Up to 10 fallback models in order. The gateway retries a model for matching error codes before trying the next model. Every model must support classification and satisfy access checks. Image requests require native OpenAI image-capable fallbacks.
100
+ */
101
+ fallbacks?: Array<components.FallbackConfig> | null | undefined;
102
+ identity?: components.ResponseIdentity | undefined;
103
+ /**
104
+ * Key-value metadata attached to the trace.
105
+ */
106
+ metadata?: { [k: string]: string } | undefined;
107
+ /**
108
+ * ID of a model that supports native or emulated classify, including openai/gpt-6-luna.
109
+ */
110
+ model: string;
111
+ /**
112
+ * The name to display on the trace. If not specified, the default system name will be used.
113
+ */
114
+ name?: string | undefined;
115
+ /**
116
+ * Typed questions keyed by an identifier of your choice. Each answer is returned under the same key.
117
+ */
118
+ questions: {
119
+ [k: string]:
120
+ | QuestionsNoulQuestion
121
+ | QuestionsChoiceQuestion
122
+ | QuestionsScoreQuestion;
123
+ };
124
+ retry?: components.ClassifyRetryConfig | undefined;
125
+ /**
126
+ * The content to evaluate. A string, an object or an array. For OpenAI GPT-6 Luna, strings are passed as text and objects or ordinary JSON arrays are serialized as text. User-message arrays accept string content or input_text/input_image parts. Images must be inline base64 data URLs, with at most 128 images across the request. Remote image URLs, file IDs, audio, non-user roles, bare content parts and tool items are rejected.
127
+ */
128
+ state: string | { [k: string]: any } | Array<any>;
129
+ };
130
+
131
+ /**
132
+ * Returns one answer per question.
133
+ */
134
+ export type CreateDecisionsResponseBody = {
135
+ /**
136
+ * Answers keyed by the question identifiers from the request.
137
+ */
138
+ answers: { [k: string]: components.ClassifyAnswer };
139
+ /**
140
+ * The requested ID of the model that answered. This can be a fallback model.
141
+ */
142
+ model: string;
143
+ telemetry?: components.ResponseTelemetry | undefined;
144
+ usage: components.ClassifyUsage;
145
+ };
146
+
147
+ /** @internal */
148
+ export type CreateDecisionsQuestionsRouterDecisionsRequestInstructions$Outbound =
149
+ | string
150
+ | { [k: string]: any }
151
+ | Array<any>;
152
+
153
+ /** @internal */
154
+ export const CreateDecisionsQuestionsRouterDecisionsRequestInstructions$outboundSchema:
155
+ z.ZodType<
156
+ CreateDecisionsQuestionsRouterDecisionsRequestInstructions$Outbound,
157
+ z.ZodTypeDef,
158
+ CreateDecisionsQuestionsRouterDecisionsRequestInstructions
159
+ > = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
160
+
161
+ export function createDecisionsQuestionsRouterDecisionsRequestInstructionsToJSON(
162
+ createDecisionsQuestionsRouterDecisionsRequestInstructions:
163
+ CreateDecisionsQuestionsRouterDecisionsRequestInstructions,
164
+ ): string {
165
+ return JSON.stringify(
166
+ CreateDecisionsQuestionsRouterDecisionsRequestInstructions$outboundSchema
167
+ .parse(createDecisionsQuestionsRouterDecisionsRequestInstructions),
168
+ );
169
+ }
170
+
171
+ /** @internal */
172
+ export type QuestionsScoreQuestion$Outbound = {
173
+ criteria: Array<string>;
174
+ instructions: string | { [k: string]: any } | Array<any>;
175
+ type: "score";
176
+ };
177
+
178
+ /** @internal */
179
+ export const QuestionsScoreQuestion$outboundSchema: z.ZodType<
180
+ QuestionsScoreQuestion$Outbound,
181
+ z.ZodTypeDef,
182
+ QuestionsScoreQuestion
183
+ > = z.object({
184
+ criteria: z.array(z.string()),
185
+ instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
186
+ type: z.literal("score"),
187
+ });
188
+
189
+ export function questionsScoreQuestionToJSON(
190
+ questionsScoreQuestion: QuestionsScoreQuestion,
191
+ ): string {
192
+ return JSON.stringify(
193
+ QuestionsScoreQuestion$outboundSchema.parse(questionsScoreQuestion),
194
+ );
195
+ }
196
+
197
+ /** @internal */
198
+ export type CreateDecisionsQuestionsRouterDecisionsInstructions$Outbound =
199
+ | string
200
+ | { [k: string]: any }
201
+ | Array<any>;
202
+
203
+ /** @internal */
204
+ export const CreateDecisionsQuestionsRouterDecisionsInstructions$outboundSchema:
205
+ z.ZodType<
206
+ CreateDecisionsQuestionsRouterDecisionsInstructions$Outbound,
207
+ z.ZodTypeDef,
208
+ CreateDecisionsQuestionsRouterDecisionsInstructions
209
+ > = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
210
+
211
+ export function createDecisionsQuestionsRouterDecisionsInstructionsToJSON(
212
+ createDecisionsQuestionsRouterDecisionsInstructions:
213
+ CreateDecisionsQuestionsRouterDecisionsInstructions,
214
+ ): string {
215
+ return JSON.stringify(
216
+ CreateDecisionsQuestionsRouterDecisionsInstructions$outboundSchema.parse(
217
+ createDecisionsQuestionsRouterDecisionsInstructions,
218
+ ),
219
+ );
220
+ }
221
+
222
+ /** @internal */
223
+ export type QuestionsChoiceQuestion$Outbound = {
224
+ criteria: { [k: string]: string | null };
225
+ instructions: string | { [k: string]: any } | Array<any>;
226
+ type: "choice";
227
+ };
228
+
229
+ /** @internal */
230
+ export const QuestionsChoiceQuestion$outboundSchema: z.ZodType<
231
+ QuestionsChoiceQuestion$Outbound,
232
+ z.ZodTypeDef,
233
+ QuestionsChoiceQuestion
234
+ > = z.object({
235
+ criteria: z.record(z.nullable(z.string())),
236
+ instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
237
+ type: z.literal("choice"),
238
+ });
239
+
240
+ export function questionsChoiceQuestionToJSON(
241
+ questionsChoiceQuestion: QuestionsChoiceQuestion,
242
+ ): string {
243
+ return JSON.stringify(
244
+ QuestionsChoiceQuestion$outboundSchema.parse(questionsChoiceQuestion),
245
+ );
246
+ }
247
+
248
+ /** @internal */
249
+ export type QuestionsCriteria$Outbound = {
250
+ false?: string | undefined;
251
+ true?: string | undefined;
252
+ };
253
+
254
+ /** @internal */
255
+ export const QuestionsCriteria$outboundSchema: z.ZodType<
256
+ QuestionsCriteria$Outbound,
257
+ z.ZodTypeDef,
258
+ QuestionsCriteria
259
+ > = z.object({
260
+ false: z.string().optional(),
261
+ true: z.string().optional(),
262
+ });
263
+
264
+ export function questionsCriteriaToJSON(
265
+ questionsCriteria: QuestionsCriteria,
266
+ ): string {
267
+ return JSON.stringify(
268
+ QuestionsCriteria$outboundSchema.parse(questionsCriteria),
269
+ );
270
+ }
271
+
272
+ /** @internal */
273
+ export type CreateDecisionsQuestionsInstructions$Outbound = string | {
274
+ [k: string]: any;
275
+ } | Array<any>;
276
+
277
+ /** @internal */
278
+ export const CreateDecisionsQuestionsInstructions$outboundSchema: z.ZodType<
279
+ CreateDecisionsQuestionsInstructions$Outbound,
280
+ z.ZodTypeDef,
281
+ CreateDecisionsQuestionsInstructions
282
+ > = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
283
+
284
+ export function createDecisionsQuestionsInstructionsToJSON(
285
+ createDecisionsQuestionsInstructions: CreateDecisionsQuestionsInstructions,
286
+ ): string {
287
+ return JSON.stringify(
288
+ CreateDecisionsQuestionsInstructions$outboundSchema.parse(
289
+ createDecisionsQuestionsInstructions,
290
+ ),
291
+ );
292
+ }
293
+
294
+ /** @internal */
295
+ export type QuestionsNoulQuestion$Outbound = {
296
+ criteria?: QuestionsCriteria$Outbound | undefined;
297
+ instructions: string | { [k: string]: any } | Array<any>;
298
+ type: "noul";
299
+ };
300
+
301
+ /** @internal */
302
+ export const QuestionsNoulQuestion$outboundSchema: z.ZodType<
303
+ QuestionsNoulQuestion$Outbound,
304
+ z.ZodTypeDef,
305
+ QuestionsNoulQuestion
306
+ > = z.object({
307
+ criteria: z.lazy(() => QuestionsCriteria$outboundSchema).optional(),
308
+ instructions: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
309
+ type: z.literal("noul"),
310
+ });
311
+
312
+ export function questionsNoulQuestionToJSON(
313
+ questionsNoulQuestion: QuestionsNoulQuestion,
314
+ ): string {
315
+ return JSON.stringify(
316
+ QuestionsNoulQuestion$outboundSchema.parse(questionsNoulQuestion),
317
+ );
318
+ }
319
+
320
+ /** @internal */
321
+ export type CreateDecisionsQuestions$Outbound =
322
+ | QuestionsNoulQuestion$Outbound
323
+ | QuestionsChoiceQuestion$Outbound
324
+ | QuestionsScoreQuestion$Outbound;
325
+
326
+ /** @internal */
327
+ export const CreateDecisionsQuestions$outboundSchema: z.ZodType<
328
+ CreateDecisionsQuestions$Outbound,
329
+ z.ZodTypeDef,
330
+ CreateDecisionsQuestions
331
+ > = z.union([
332
+ z.lazy(() => QuestionsNoulQuestion$outboundSchema),
333
+ z.lazy(() => QuestionsChoiceQuestion$outboundSchema),
334
+ z.lazy(() => QuestionsScoreQuestion$outboundSchema),
335
+ ]);
336
+
337
+ export function createDecisionsQuestionsToJSON(
338
+ createDecisionsQuestions: CreateDecisionsQuestions,
339
+ ): string {
340
+ return JSON.stringify(
341
+ CreateDecisionsQuestions$outboundSchema.parse(createDecisionsQuestions),
342
+ );
343
+ }
344
+
345
+ /** @internal */
346
+ export type CreateDecisionsState$Outbound =
347
+ | string
348
+ | { [k: string]: any }
349
+ | Array<any>;
350
+
351
+ /** @internal */
352
+ export const CreateDecisionsState$outboundSchema: z.ZodType<
353
+ CreateDecisionsState$Outbound,
354
+ z.ZodTypeDef,
355
+ CreateDecisionsState
356
+ > = z.union([z.string(), z.record(z.any()), z.array(z.any())]);
357
+
358
+ export function createDecisionsStateToJSON(
359
+ createDecisionsState: CreateDecisionsState,
360
+ ): string {
361
+ return JSON.stringify(
362
+ CreateDecisionsState$outboundSchema.parse(createDecisionsState),
363
+ );
364
+ }
365
+
366
+ /** @internal */
367
+ export type CreateDecisionsRequestBody$Outbound = {
368
+ fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
369
+ identity?: components.ResponseIdentity$Outbound | undefined;
370
+ metadata?: { [k: string]: string } | undefined;
371
+ model: string;
372
+ name?: string | undefined;
373
+ questions: {
374
+ [k: string]:
375
+ | QuestionsNoulQuestion$Outbound
376
+ | QuestionsChoiceQuestion$Outbound
377
+ | QuestionsScoreQuestion$Outbound;
378
+ };
379
+ retry?: components.ClassifyRetryConfig$Outbound | undefined;
380
+ state: string | { [k: string]: any } | Array<any>;
381
+ };
382
+
383
+ /** @internal */
384
+ export const CreateDecisionsRequestBody$outboundSchema: z.ZodType<
385
+ CreateDecisionsRequestBody$Outbound,
386
+ z.ZodTypeDef,
387
+ CreateDecisionsRequestBody
388
+ > = z.object({
389
+ fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
390
+ .optional(),
391
+ identity: components.ResponseIdentity$outboundSchema.optional(),
392
+ metadata: z.record(z.string()).optional(),
393
+ model: z.string(),
394
+ name: z.string().optional(),
395
+ questions: z.record(
396
+ z.union([
397
+ z.lazy(() => QuestionsNoulQuestion$outboundSchema),
398
+ z.lazy(() => QuestionsChoiceQuestion$outboundSchema),
399
+ z.lazy(() => QuestionsScoreQuestion$outboundSchema),
400
+ ]),
401
+ ),
402
+ retry: components.ClassifyRetryConfig$outboundSchema.optional(),
403
+ state: z.union([z.string(), z.record(z.any()), z.array(z.any())]),
404
+ });
405
+
406
+ export function createDecisionsRequestBodyToJSON(
407
+ createDecisionsRequestBody: CreateDecisionsRequestBody,
408
+ ): string {
409
+ return JSON.stringify(
410
+ CreateDecisionsRequestBody$outboundSchema.parse(createDecisionsRequestBody),
411
+ );
412
+ }
413
+
414
+ /** @internal */
415
+ export const CreateDecisionsResponseBody$inboundSchema: z.ZodType<
416
+ CreateDecisionsResponseBody,
417
+ z.ZodTypeDef,
418
+ unknown
419
+ > = z.object({
420
+ answers: z.record(components.ClassifyAnswer$inboundSchema),
421
+ model: z.string(),
422
+ telemetry: components.ResponseTelemetry$inboundSchema.optional(),
423
+ usage: components.ClassifyUsage$inboundSchema,
424
+ });
425
+
426
+ export function createDecisionsResponseBodyFromJSON(
427
+ jsonString: string,
428
+ ): SafeParseResult<CreateDecisionsResponseBody, SDKValidationError> {
429
+ return safeParse(
430
+ jsonString,
431
+ (x) => CreateDecisionsResponseBody$inboundSchema.parse(JSON.parse(x)),
432
+ `Failed to parse 'CreateDecisionsResponseBody' from JSON`,
433
+ );
434
+ }
@@ -1575,7 +1575,7 @@ export const ResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
1575
1575
  z.ZodTypeDef,
1576
1576
  unknown
1577
1577
  > = z.object({
1578
- _id: z.string().default("tool_01M4AJD93JFFQKP4JTWBGGBSPK"),
1578
+ _id: z.string().default("tool_01M4AT2CQ97JG9J6H42REYKRQC"),
1579
1579
  path: z.string(),
1580
1580
  key: z.string(),
1581
1581
  display_name: z.string().optional(),
@@ -1761,7 +1761,7 @@ export const ResponseBodyHTTPTool$inboundSchema: z.ZodType<
1761
1761
  z.ZodTypeDef,
1762
1762
  unknown
1763
1763
  > = z.object({
1764
- _id: z.string().default("tool_01M4AJD93HXF92W1EPCPT9FVRG"),
1764
+ _id: z.string().default("tool_01M4AT2CQ9P32A2N0C2RSB3BS2"),
1765
1765
  path: z.string(),
1766
1766
  key: z.string(),
1767
1767
  display_name: z.string().optional(),
@@ -1854,7 +1854,7 @@ export const ResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
1854
1854
  z.ZodTypeDef,
1855
1855
  unknown
1856
1856
  > = z.object({
1857
- _id: z.string().default("tool_01M4AJD93H194XZN9PPW4N5EN0"),
1857
+ _id: z.string().default("tool_01M4AT2CQ87R7SS7W7T16496S5"),
1858
1858
  path: z.string(),
1859
1859
  key: z.string(),
1860
1860
  display_name: z.string().optional(),
@@ -1955,7 +1955,7 @@ export const ResponseBodyFunctionTool$inboundSchema: z.ZodType<
1955
1955
  z.ZodTypeDef,
1956
1956
  unknown
1957
1957
  > = z.object({
1958
- _id: z.string().default("tool_01M4AJD93GT4R2QZZ4C77RJTCW"),
1958
+ _id: z.string().default("tool_01M4AT2CQ8SVP9RBEAV8DXQVMN"),
1959
1959
  path: z.string(),
1960
1960
  key: z.string(),
1961
1961
  display_name: z.string().optional(),
@@ -639,7 +639,7 @@ export const DataCodeExecutionTool$inboundSchema: z.ZodType<
639
639
  z.ZodTypeDef,
640
640
  unknown
641
641
  > = z.object({
642
- _id: z.string().default("tool_01M4AJD93DYEW23KAT0Z9GMB40"),
642
+ _id: z.string().default("tool_01M4AT2CQ4QG8FC3J47XQHRGVG"),
643
643
  path: z.string(),
644
644
  key: z.string(),
645
645
  display_name: z.string().optional(),
@@ -821,7 +821,7 @@ export const DataHTTPTool$inboundSchema: z.ZodType<
821
821
  z.ZodTypeDef,
822
822
  unknown
823
823
  > = z.object({
824
- _id: z.string().default("tool_01M4AJD93C6HR7HR8EAMGX1JW2"),
824
+ _id: z.string().default("tool_01M4AT2CQ3NN1SBKAADYJEGKJ9"),
825
825
  path: z.string(),
826
826
  key: z.string(),
827
827
  display_name: z.string().optional(),
@@ -914,7 +914,7 @@ export const DataJSONSchemaTool$inboundSchema: z.ZodType<
914
914
  z.ZodTypeDef,
915
915
  unknown
916
916
  > = z.object({
917
- _id: z.string().default("tool_01M4AJD93B05ZAX18PSBH51VQA"),
917
+ _id: z.string().default("tool_01M4AT2CQ39Q2WG31RF3R4EDD2"),
918
918
  path: z.string(),
919
919
  key: z.string(),
920
920
  display_name: z.string().optional(),
@@ -1012,7 +1012,7 @@ export const DataFunctionTool$inboundSchema: z.ZodType<
1012
1012
  z.ZodTypeDef,
1013
1013
  unknown
1014
1014
  > = z.object({
1015
- _id: z.string().default("tool_01M4AJD93BVKKFKP5CCGW48QF7"),
1015
+ _id: z.string().default("tool_01M4AT2CQ2FN13C03XNTYYFHNZ"),
1016
1016
  path: z.string(),
1017
1017
  key: z.string(),
1018
1018
  display_name: z.string().optional(),
@@ -140,7 +140,7 @@ export const GetV2HumanEvalSetsResponseBody2$inboundSchema: z.ZodType<
140
140
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
141
141
  .optional(),
142
142
  updated: z.string().datetime({ offset: true }).default(
143
- "2026-10-07T06:56:49.631Z",
143
+ "2026-10-07T09:10:41.835Z",
144
144
  ).transform(v => new Date(v)),
145
145
  filter_type: z.literal("name"),
146
146
  filter_value: z.string(),
@@ -185,7 +185,7 @@ export const GetV2HumanEvalSetsResponseBody1$inboundSchema: z.ZodType<
185
185
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
186
186
  .optional(),
187
187
  updated: z.string().datetime({ offset: true }).default(
188
- "2026-10-07T06:56:49.631Z",
188
+ "2026-10-07T09:10:41.835Z",
189
189
  ).transform(v => new Date(v)),
190
190
  filter_type: z.literal("span_type"),
191
191
  filter_values: z.array(z.string()),
@@ -141,7 +141,7 @@ export const GetV2HumanEvalSetsIdResponseBody2$inboundSchema: z.ZodType<
141
141
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
142
142
  .optional(),
143
143
  updated: z.string().datetime({ offset: true }).default(
144
- "2026-10-07T06:56:49.631Z",
144
+ "2026-10-07T09:10:41.835Z",
145
145
  ).transform(v => new Date(v)),
146
146
  filter_type: z.literal("name"),
147
147
  filter_value: z.string(),
@@ -186,7 +186,7 @@ export const GetV2HumanEvalSetsIdResponseBody1$inboundSchema: z.ZodType<
186
186
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
187
187
  .optional(),
188
188
  updated: z.string().datetime({ offset: true }).default(
189
- "2026-10-07T06:56:49.631Z",
189
+ "2026-10-07T09:10:41.835Z",
190
190
  ).transform(v => new Date(v)),
191
191
  filter_type: z.literal("span_type"),
192
192
  filter_values: z.array(z.string()),
@@ -34,6 +34,7 @@ export * from "./createclassify.js";
34
34
  export * from "./createcompletion.js";
35
35
  export * from "./createdatasetitem.js";
36
36
  export * from "./createdatasource.js";
37
+ export * from "./createdecisions.js";
37
38
  export * from "./createembedding.js";
38
39
  export * from "./createeval.js";
39
40
  export * from "./createfolder.js";
@@ -318,7 +318,7 @@ export const PatchV2HumanEvalSetsIdResponseBody2$inboundSchema: z.ZodType<
318
318
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
319
319
  .optional(),
320
320
  updated: z.string().datetime({ offset: true }).default(
321
- "2026-10-07T06:56:49.631Z",
321
+ "2026-10-07T09:10:41.835Z",
322
322
  ).transform(v => new Date(v)),
323
323
  filter_type: z.literal("name"),
324
324
  filter_value: z.string(),
@@ -364,7 +364,7 @@ export const PatchV2HumanEvalSetsIdResponseBody1$inboundSchema: z.ZodType<
364
364
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
365
365
  .optional(),
366
366
  updated: z.string().datetime({ offset: true }).default(
367
- "2026-10-07T06:56:49.631Z",
367
+ "2026-10-07T09:10:41.835Z",
368
368
  ).transform(v => new Date(v)),
369
369
  filter_type: z.literal("span_type"),
370
370
  filter_values: z.array(z.string()),
@@ -245,7 +245,7 @@ export const RequestBody4$outboundSchema: z.ZodType<
245
245
  PostV2FeedbackEvaluationRequestBodyFeedbackRequestSource$outboundSchema
246
246
  .default("orq"),
247
247
  explanation: z.string().optional(),
248
- reviewedAt: z.date().default(() => new Date("2026-10-07T06:56:56.480Z"))
248
+ reviewedAt: z.date().default(() => new Date("2026-10-07T09:10:48.342Z"))
249
249
  .transform(v => v.toISOString()),
250
250
  type: z.literal("string_array"),
251
251
  values: z.array(z.string()),
@@ -299,7 +299,7 @@ export const Three$outboundSchema: z.ZodType<
299
299
  source: PostV2FeedbackEvaluationRequestBodyFeedbackSource$outboundSchema
300
300
  .default("orq"),
301
301
  explanation: z.string().optional(),
302
- reviewedAt: z.date().default(() => new Date("2026-10-07T06:56:56.480Z"))
302
+ reviewedAt: z.date().default(() => new Date("2026-10-07T09:10:48.342Z"))
303
303
  .transform(v => v.toISOString()),
304
304
  type: z.literal("boolean"),
305
305
  value: z.boolean(),
@@ -353,7 +353,7 @@ export const RequestBody2$outboundSchema: z.ZodType<
353
353
  "orq",
354
354
  ),
355
355
  explanation: z.string().optional(),
356
- reviewedAt: z.date().default(() => new Date("2026-10-07T06:56:56.480Z"))
356
+ reviewedAt: z.date().default(() => new Date("2026-10-07T09:10:48.341Z"))
357
357
  .transform(v => v.toISOString()),
358
358
  type: z.literal("number"),
359
359
  value: z.number(),
@@ -405,7 +405,7 @@ export const RequestBody1$outboundSchema: z.ZodType<
405
405
  humanReviewId: z.string().optional(),
406
406
  source: RequestBodySource$outboundSchema.default("orq"),
407
407
  explanation: z.string().optional(),
408
- reviewedAt: z.date().default(() => new Date("2026-10-07T06:56:56.480Z"))
408
+ reviewedAt: z.date().default(() => new Date("2026-10-07T09:10:48.341Z"))
409
409
  .transform(v => v.toISOString()),
410
410
  type: z.literal("string"),
411
411
  value: z.string(),
@@ -271,7 +271,7 @@ export const PostV2HumanEvalSetsResponseBody2$inboundSchema: z.ZodType<
271
271
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
272
272
  .optional(),
273
273
  updated: z.string().datetime({ offset: true }).default(
274
- "2026-10-07T06:56:49.631Z",
274
+ "2026-10-07T09:10:41.835Z",
275
275
  ).transform(v => new Date(v)),
276
276
  filter_type: z.literal("name"),
277
277
  filter_value: z.string(),
@@ -316,7 +316,7 @@ export const PostV2HumanEvalSetsResponseBody1$inboundSchema: z.ZodType<
316
316
  created: z.string().datetime({ offset: true }).transform(v => new Date(v))
317
317
  .optional(),
318
318
  updated: z.string().datetime({ offset: true }).default(
319
- "2026-10-07T06:56:49.631Z",
319
+ "2026-10-07T09:10:41.835Z",
320
320
  ).transform(v => new Date(v)),
321
321
  filter_type: z.literal("span_type"),
322
322
  filter_values: z.array(z.string()),
@@ -624,7 +624,7 @@ export const RetrieveToolResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
624
624
  z.ZodTypeDef,
625
625
  unknown
626
626
  > = z.object({
627
- _id: z.string().default("tool_01M4AJD93Z7KW9KF7P56SA60P2"),
627
+ _id: z.string().default("tool_01M4AT2CQNC99M1NPTPME1BYYZ"),
628
628
  path: z.string(),
629
629
  key: z.string(),
630
630
  display_name: z.string().optional(),
@@ -820,7 +820,7 @@ export const RetrieveToolResponseBodyHTTPTool$inboundSchema: z.ZodType<
820
820
  z.ZodTypeDef,
821
821
  unknown
822
822
  > = z.object({
823
- _id: z.string().default("tool_01M4AJD93YKY0XJMNKD1A5DWEV"),
823
+ _id: z.string().default("tool_01M4AT2CQM8NKGGMN0J5N977TM"),
824
824
  path: z.string(),
825
825
  key: z.string(),
826
826
  display_name: z.string().optional(),
@@ -916,7 +916,7 @@ export const RetrieveToolResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
916
916
  z.ZodTypeDef,
917
917
  unknown
918
918
  > = z.object({
919
- _id: z.string().default("tool_01M4AJD93XPJHX131BR50GHP95"),
919
+ _id: z.string().default("tool_01M4AT2CQMQ4DYK75CT7EX9821"),
920
920
  path: z.string(),
921
921
  key: z.string(),
922
922
  display_name: z.string().optional(),
@@ -1022,7 +1022,7 @@ export const RetrieveToolResponseBodyFunctionTool$inboundSchema: z.ZodType<
1022
1022
  z.ZodTypeDef,
1023
1023
  unknown
1024
1024
  > = z.object({
1025
- _id: z.string().default("tool_01M4AJD93X3M9817QVMQJXT1R4"),
1025
+ _id: z.string().default("tool_01M4AT2CQKJKRB7QEDWZVFV147"),
1026
1026
  path: z.string(),
1027
1027
  key: z.string(),
1028
1028
  display_name: z.string().optional(),
@@ -3890,7 +3890,7 @@ export const Tools$outboundSchema: z.ZodType<
3890
3890
  z.ZodTypeDef,
3891
3891
  Tools
3892
3892
  > = z.object({
3893
- id: z.string().default("01M4AJD91FQ7T57KBXP4NTXZBS"),
3893
+ id: z.string().default("01M4AT2CNBT9PFKGDH1KEVSMHA"),
3894
3894
  name: z.string(),
3895
3895
  description: z.string().optional(),
3896
3896
  schema: z.lazy(() => AgentToolInputRunSchema$outboundSchema),
@@ -3949,7 +3949,7 @@ export const AgentToolInputRunTools$outboundSchema: z.ZodType<
3949
3949
  z.ZodTypeDef,
3950
3950
  AgentToolInputRunTools
3951
3951
  > = z.object({
3952
- id: z.string().default("01M4AJD9218PFAW8AG9Z3N4VVK"),
3952
+ id: z.string().default("01M4AT2CNWQ4P3B6C584T0PAZ6"),
3953
3953
  name: z.string(),
3954
3954
  description: z.string().optional(),
3955
3955
  schema: z.lazy(() =>