@orq-ai/node 4.11.0-rc.4 → 4.11.0-rc.5

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 (160) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/modelmetadata.d.ts +2 -0
  5. package/models/components/modelmetadata.d.ts.map +1 -1
  6. package/models/components/modelmetadata.js +4 -0
  7. package/models/components/modelmetadata.js.map +1 -1
  8. package/models/components/reasoning.d.ts +40 -2
  9. package/models/components/reasoning.d.ts.map +1 -1
  10. package/models/components/reasoning.js +26 -3
  11. package/models/components/reasoning.js.map +1 -1
  12. package/models/components/reasoningparam.d.ts +40 -2
  13. package/models/components/reasoningparam.d.ts.map +1 -1
  14. package/models/components/reasoningparam.js +28 -3
  15. package/models/components/reasoningparam.js.map +1 -1
  16. package/models/components/reasoningpart.js +1 -1
  17. package/models/operations/createagentrequest.d.ts +298 -4
  18. package/models/operations/createagentrequest.d.ts.map +1 -1
  19. package/models/operations/createagentrequest.js +163 -9
  20. package/models/operations/createagentrequest.js.map +1 -1
  21. package/models/operations/createchatcompletion.d.ts +81 -4
  22. package/models/operations/createchatcompletion.d.ts.map +1 -1
  23. package/models/operations/createchatcompletion.js +45 -7
  24. package/models/operations/createchatcompletion.js.map +1 -1
  25. package/models/operations/createdataset.js +1 -1
  26. package/models/operations/createdatasetitem.js +4 -4
  27. package/models/operations/createdatasource.js +1 -1
  28. package/models/operations/createeval.js +16 -16
  29. package/models/operations/createprompt.d.ts +225 -12
  30. package/models/operations/createprompt.d.ts.map +1 -1
  31. package/models/operations/createprompt.js +124 -13
  32. package/models/operations/createprompt.js.map +1 -1
  33. package/models/operations/createrouterresponse.d.ts +353 -8
  34. package/models/operations/createrouterresponse.d.ts.map +1 -1
  35. package/models/operations/createrouterresponse.js +198 -7
  36. package/models/operations/createrouterresponse.js.map +1 -1
  37. package/models/operations/createtool.js +6 -6
  38. package/models/operations/deploymentgetconfig.d.ts +70 -4
  39. package/models/operations/deploymentgetconfig.d.ts.map +1 -1
  40. package/models/operations/deploymentgetconfig.js +43 -8
  41. package/models/operations/deploymentgetconfig.js.map +1 -1
  42. package/models/operations/deployments.d.ts +74 -8
  43. package/models/operations/deployments.d.ts.map +1 -1
  44. package/models/operations/deployments.js +43 -8
  45. package/models/operations/deployments.js.map +1 -1
  46. package/models/operations/getallprompts.d.ts +140 -4
  47. package/models/operations/getallprompts.d.ts.map +1 -1
  48. package/models/operations/getallprompts.js +79 -6
  49. package/models/operations/getallprompts.js.map +1 -1
  50. package/models/operations/getalltools.js +6 -6
  51. package/models/operations/getevals.js +16 -16
  52. package/models/operations/getoneprompt.d.ts +140 -4
  53. package/models/operations/getoneprompt.d.ts.map +1 -1
  54. package/models/operations/getoneprompt.js +79 -6
  55. package/models/operations/getoneprompt.js.map +1 -1
  56. package/models/operations/getpromptversion.d.ts +140 -4
  57. package/models/operations/getpromptversion.d.ts.map +1 -1
  58. package/models/operations/getpromptversion.js +78 -6
  59. package/models/operations/getpromptversion.js.map +1 -1
  60. package/models/operations/getv2humanevalsets.js +2 -2
  61. package/models/operations/getv2humanevalsetsid.js +2 -2
  62. package/models/operations/listagents.d.ts +140 -0
  63. package/models/operations/listagents.d.ts.map +1 -1
  64. package/models/operations/listagents.js +79 -3
  65. package/models/operations/listagents.js.map +1 -1
  66. package/models/operations/listdatasetdatapoints.js +4 -4
  67. package/models/operations/listdatasets.js +1 -1
  68. package/models/operations/listdatasources.js +1 -1
  69. package/models/operations/listknowledgebases.d.ts +3 -0
  70. package/models/operations/listknowledgebases.d.ts.map +1 -1
  71. package/models/operations/listknowledgebases.js +1 -1
  72. package/models/operations/listknowledgebases.js.map +1 -1
  73. package/models/operations/listpromptversions.d.ts +140 -4
  74. package/models/operations/listpromptversions.d.ts.map +1 -1
  75. package/models/operations/listpromptversions.js +79 -6
  76. package/models/operations/listpromptversions.js.map +1 -1
  77. package/models/operations/patchv2humanevalsetsid.js +2 -2
  78. package/models/operations/postv2feedbackevaluation.js +3 -3
  79. package/models/operations/postv2humanevalsets.js +2 -2
  80. package/models/operations/retrieveagentrequest.d.ts +140 -0
  81. package/models/operations/retrieveagentrequest.d.ts.map +1 -1
  82. package/models/operations/retrieveagentrequest.js +81 -2
  83. package/models/operations/retrieveagentrequest.js.map +1 -1
  84. package/models/operations/retrievedatapoint.js +4 -4
  85. package/models/operations/retrievedataset.js +1 -1
  86. package/models/operations/retrievedatasource.js +1 -1
  87. package/models/operations/retrievetool.js +6 -6
  88. package/models/operations/runagent.d.ts +154 -0
  89. package/models/operations/runagent.d.ts.map +1 -1
  90. package/models/operations/runagent.js +80 -5
  91. package/models/operations/runagent.js.map +1 -1
  92. package/models/operations/streamrunagent.d.ts +154 -0
  93. package/models/operations/streamrunagent.d.ts.map +1 -1
  94. package/models/operations/streamrunagent.js +82 -4
  95. package/models/operations/streamrunagent.js.map +1 -1
  96. package/models/operations/updateagent.d.ts +298 -4
  97. package/models/operations/updateagent.d.ts.map +1 -1
  98. package/models/operations/updateagent.js +162 -9
  99. package/models/operations/updateagent.js.map +1 -1
  100. package/models/operations/updatedatapoint.js +4 -4
  101. package/models/operations/updatedataset.js +1 -1
  102. package/models/operations/updatedatasource.js +1 -1
  103. package/models/operations/updateeval.js +16 -16
  104. package/models/operations/updateprompt.d.ts +225 -12
  105. package/models/operations/updateprompt.d.ts.map +1 -1
  106. package/models/operations/updateprompt.js +125 -14
  107. package/models/operations/updateprompt.js.map +1 -1
  108. package/models/operations/updatetool.js +7 -7
  109. package/package.json +5 -5
  110. package/sdk/feedback.d.ts +1 -4
  111. package/sdk/feedback.d.ts.map +1 -1
  112. package/sdk/feedback.js +1 -4
  113. package/sdk/feedback.js.map +1 -1
  114. package/src/lib/config.ts +2 -2
  115. package/src/models/components/modelmetadata.ts +6 -0
  116. package/src/models/components/reasoning.ts +50 -4
  117. package/src/models/components/reasoningparam.ts +48 -4
  118. package/src/models/components/reasoningpart.ts +1 -1
  119. package/src/models/operations/createagentrequest.ts +460 -8
  120. package/src/models/operations/createchatcompletion.ts +129 -10
  121. package/src/models/operations/createdataset.ts +1 -1
  122. package/src/models/operations/createdatasetitem.ts +4 -4
  123. package/src/models/operations/createdatasource.ts +1 -1
  124. package/src/models/operations/createeval.ts +16 -16
  125. package/src/models/operations/createprompt.ts +356 -27
  126. package/src/models/operations/createrouterresponse.ts +540 -16
  127. package/src/models/operations/createtool.ts +6 -6
  128. package/src/models/operations/deploymentgetconfig.ts +105 -8
  129. package/src/models/operations/deployments.ts +113 -16
  130. package/src/models/operations/getallprompts.ts +210 -8
  131. package/src/models/operations/getalltools.ts +6 -6
  132. package/src/models/operations/getevals.ts +16 -16
  133. package/src/models/operations/getoneprompt.ts +208 -8
  134. package/src/models/operations/getpromptversion.ts +212 -8
  135. package/src/models/operations/getv2humanevalsets.ts +2 -2
  136. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  137. package/src/models/operations/listagents.ts +215 -0
  138. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  139. package/src/models/operations/listdatasets.ts +1 -1
  140. package/src/models/operations/listdatasources.ts +1 -1
  141. package/src/models/operations/listknowledgebases.ts +4 -1
  142. package/src/models/operations/listpromptversions.ts +212 -8
  143. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  144. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  145. package/src/models/operations/postv2humanevalsets.ts +2 -2
  146. package/src/models/operations/retrieveagentrequest.ts +222 -0
  147. package/src/models/operations/retrievedatapoint.ts +4 -4
  148. package/src/models/operations/retrievedataset.ts +1 -1
  149. package/src/models/operations/retrievedatasource.ts +1 -1
  150. package/src/models/operations/retrievetool.ts +6 -6
  151. package/src/models/operations/runagent.ts +236 -1
  152. package/src/models/operations/streamrunagent.ts +242 -1
  153. package/src/models/operations/updateagent.ts +464 -9
  154. package/src/models/operations/updatedatapoint.ts +4 -4
  155. package/src/models/operations/updatedataset.ts +1 -1
  156. package/src/models/operations/updatedatasource.ts +1 -1
  157. package/src/models/operations/updateeval.ts +16 -16
  158. package/src/models/operations/updateprompt.ts +356 -27
  159. package/src/models/operations/updatetool.ts +7 -7
  160. package/src/sdk/feedback.ts +1 -4
@@ -11,10 +11,131 @@ import { Result as SafeParseResult } from "../../types/fp.js";
11
11
  import * as components from "../components/index.js";
12
12
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
13
13
 
14
+ /**
15
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
16
+ *
17
+ * @remarks
18
+ *
19
+ * - `5m`: 5 minutes
20
+ * - `1h`: 1 hour
21
+ *
22
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
23
+ */
24
+ export const CreateRouterResponseTtl = {
25
+ Fivem: "5m",
26
+ Oneh: "1h",
27
+ } as const;
28
+ /**
29
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
30
+ *
31
+ * @remarks
32
+ *
33
+ * - `5m`: 5 minutes
34
+ * - `1h`: 1 hour
35
+ *
36
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
37
+ */
38
+ export type CreateRouterResponseTtl = ClosedEnum<
39
+ typeof CreateRouterResponseTtl
40
+ >;
41
+
42
+ /**
43
+ * Create a cache control breakpoint. Accepts only the value "ephemeral".
44
+ */
45
+ export const CreateRouterResponseType = {
46
+ Ephemeral: "ephemeral",
47
+ } as const;
48
+ /**
49
+ * Create a cache control breakpoint. Accepts only the value "ephemeral".
50
+ */
51
+ export type CreateRouterResponseType = ClosedEnum<
52
+ typeof CreateRouterResponseType
53
+ >;
54
+
55
+ /**
56
+ * Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.
57
+ */
58
+ export type CreateRouterResponseCacheControl = {
59
+ /**
60
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
61
+ *
62
+ * @remarks
63
+ *
64
+ * - `5m`: 5 minutes
65
+ * - `1h`: 1 hour
66
+ *
67
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
68
+ */
69
+ ttl?: CreateRouterResponseTtl | undefined;
70
+ /**
71
+ * Create a cache control breakpoint. Accepts only the value "ephemeral".
72
+ */
73
+ type: CreateRouterResponseType;
74
+ };
75
+
76
+ /**
77
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
78
+ *
79
+ * @remarks
80
+ *
81
+ * - `5m`: 5 minutes
82
+ * - `1h`: 1 hour
83
+ *
84
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
85
+ */
86
+ export const CreateRouterResponse2ResponsesRequestTtl = {
87
+ Fivem: "5m",
88
+ Oneh: "1h",
89
+ } as const;
90
+ /**
91
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
92
+ *
93
+ * @remarks
94
+ *
95
+ * - `5m`: 5 minutes
96
+ * - `1h`: 1 hour
97
+ *
98
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
99
+ */
100
+ export type CreateRouterResponse2ResponsesRequestTtl = ClosedEnum<
101
+ typeof CreateRouterResponse2ResponsesRequestTtl
102
+ >;
103
+
104
+ /**
105
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
106
+ */
107
+ export const CreateRouterResponse2ResponsesRequestRequestBodyInputType = {
108
+ Ephemeral: "ephemeral",
109
+ } as const;
110
+ /**
111
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
112
+ */
113
+ export type CreateRouterResponse2ResponsesRequestRequestBodyInputType =
114
+ ClosedEnum<typeof CreateRouterResponse2ResponsesRequestRequestBodyInputType>;
115
+
116
+ export type CreateRouterResponse2ResponsesRequestCacheControl = {
117
+ /**
118
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
119
+ *
120
+ * @remarks
121
+ *
122
+ * - `5m`: 5 minutes
123
+ * - `1h`: 1 hour
124
+ *
125
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
126
+ */
127
+ ttl?: CreateRouterResponse2ResponsesRequestTtl | undefined;
128
+ /**
129
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
130
+ */
131
+ type: CreateRouterResponse2ResponsesRequestRequestBodyInputType;
132
+ };
133
+
14
134
  /**
15
135
  * A file content part. Provide file_id, file_data (base64), or file_url.
16
136
  */
17
137
  export type TwoFile = {
138
+ cacheControl?: CreateRouterResponse2ResponsesRequestCacheControl | undefined;
18
139
  /**
19
140
  * Base64-encoded file content.
20
141
  */
@@ -38,6 +159,65 @@ export type TwoFile = {
38
159
  type: "input_file";
39
160
  };
40
161
 
162
+ /**
163
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
164
+ *
165
+ * @remarks
166
+ *
167
+ * - `5m`: 5 minutes
168
+ * - `1h`: 1 hour
169
+ *
170
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
171
+ */
172
+ export const CreateRouterResponse2ResponsesTtl = {
173
+ Fivem: "5m",
174
+ Oneh: "1h",
175
+ } as const;
176
+ /**
177
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
178
+ *
179
+ * @remarks
180
+ *
181
+ * - `5m`: 5 minutes
182
+ * - `1h`: 1 hour
183
+ *
184
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
185
+ */
186
+ export type CreateRouterResponse2ResponsesTtl = ClosedEnum<
187
+ typeof CreateRouterResponse2ResponsesTtl
188
+ >;
189
+
190
+ /**
191
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
192
+ */
193
+ export const CreateRouterResponse2ResponsesRequestType = {
194
+ Ephemeral: "ephemeral",
195
+ } as const;
196
+ /**
197
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
198
+ */
199
+ export type CreateRouterResponse2ResponsesRequestType = ClosedEnum<
200
+ typeof CreateRouterResponse2ResponsesRequestType
201
+ >;
202
+
203
+ export type CreateRouterResponse2ResponsesCacheControl = {
204
+ /**
205
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
206
+ *
207
+ * @remarks
208
+ *
209
+ * - `5m`: 5 minutes
210
+ * - `1h`: 1 hour
211
+ *
212
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
213
+ */
214
+ ttl?: CreateRouterResponse2ResponsesTtl | undefined;
215
+ /**
216
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
217
+ */
218
+ type: CreateRouterResponse2ResponsesRequestType;
219
+ };
220
+
41
221
  /**
42
222
  * The detail level for image understanding.
43
223
  */
@@ -55,6 +235,7 @@ export type Detail = ClosedEnum<typeof Detail>;
55
235
  * An image content part.
56
236
  */
57
237
  export type Image = {
238
+ cacheControl?: CreateRouterResponse2ResponsesCacheControl | undefined;
58
239
  /**
59
240
  * The detail level for image understanding.
60
241
  */
@@ -70,10 +251,70 @@ export type Image = {
70
251
  type: "input_image";
71
252
  };
72
253
 
254
+ /**
255
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
256
+ *
257
+ * @remarks
258
+ *
259
+ * - `5m`: 5 minutes
260
+ * - `1h`: 1 hour
261
+ *
262
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
263
+ */
264
+ export const CreateRouterResponse2Ttl = {
265
+ Fivem: "5m",
266
+ Oneh: "1h",
267
+ } as const;
268
+ /**
269
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
270
+ *
271
+ * @remarks
272
+ *
273
+ * - `5m`: 5 minutes
274
+ * - `1h`: 1 hour
275
+ *
276
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
277
+ */
278
+ export type CreateRouterResponse2Ttl = ClosedEnum<
279
+ typeof CreateRouterResponse2Ttl
280
+ >;
281
+
282
+ /**
283
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
284
+ */
285
+ export const CreateRouterResponse2Type = {
286
+ Ephemeral: "ephemeral",
287
+ } as const;
288
+ /**
289
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
290
+ */
291
+ export type CreateRouterResponse2Type = ClosedEnum<
292
+ typeof CreateRouterResponse2Type
293
+ >;
294
+
295
+ export type CreateRouterResponse2CacheControl = {
296
+ /**
297
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
298
+ *
299
+ * @remarks
300
+ *
301
+ * - `5m`: 5 minutes
302
+ * - `1h`: 1 hour
303
+ *
304
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
305
+ */
306
+ ttl?: CreateRouterResponse2Ttl | undefined;
307
+ /**
308
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
309
+ */
310
+ type: CreateRouterResponse2Type;
311
+ };
312
+
73
313
  /**
74
314
  * A text content part.
75
315
  */
76
316
  export type TwoText = {
317
+ cacheControl?: CreateRouterResponse2CacheControl | undefined;
77
318
  /**
78
319
  * The text content.
79
320
  */
@@ -193,11 +434,17 @@ export type PlainText = {
193
434
  */
194
435
  export type CreateRouterResponseFormat = PlainText | FormatJSONSchema;
195
436
 
437
+ /**
438
+ * Controls the verbosity of the model output.
439
+ */
196
440
  export const Verbosity = {
197
441
  Low: "low",
198
442
  Medium: "medium",
199
443
  High: "high",
200
444
  } as const;
445
+ /**
446
+ * Controls the verbosity of the model output.
447
+ */
201
448
  export type Verbosity = ClosedEnum<typeof Verbosity>;
202
449
 
203
450
  /**
@@ -208,6 +455,9 @@ export type CreateRouterResponseText = {
208
455
  * The output format: plain text or structured JSON schema.
209
456
  */
210
457
  format?: PlainText | FormatJSONSchema | undefined;
458
+ /**
459
+ * Controls the verbosity of the model output.
460
+ */
211
461
  verbosity?: Verbosity | undefined;
212
462
  };
213
463
 
@@ -291,7 +541,7 @@ export type ToolsMCPTool = {
291
541
  /**
292
542
  * The orq.ai tool type.
293
543
  */
294
- export const CreateRouterResponseToolsType = {
544
+ export const CreateRouterResponseToolsResponsesType = {
295
545
  OrqCurrentDate: "orq:current_date",
296
546
  OrqGoogleSearch: "orq:google_search",
297
547
  OrqWebScraper: "orq:web_scraper",
@@ -302,8 +552,8 @@ export const CreateRouterResponseToolsType = {
302
552
  /**
303
553
  * The orq.ai tool type.
304
554
  */
305
- export type CreateRouterResponseToolsType = ClosedEnum<
306
- typeof CreateRouterResponseToolsType
555
+ export type CreateRouterResponseToolsResponsesType = ClosedEnum<
556
+ typeof CreateRouterResponseToolsResponsesType
307
557
  >;
308
558
 
309
559
  /**
@@ -317,13 +567,69 @@ export type OrqAiTool = {
317
567
  /**
318
568
  * The orq.ai tool type.
319
569
  */
320
- type: CreateRouterResponseToolsType;
570
+ type: CreateRouterResponseToolsResponsesType;
571
+ };
572
+
573
+ /**
574
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
575
+ *
576
+ * @remarks
577
+ *
578
+ * - `5m`: 5 minutes
579
+ * - `1h`: 1 hour
580
+ *
581
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
582
+ */
583
+ export const ToolsTtl = {
584
+ Fivem: "5m",
585
+ Oneh: "1h",
586
+ } as const;
587
+ /**
588
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
589
+ *
590
+ * @remarks
591
+ *
592
+ * - `5m`: 5 minutes
593
+ * - `1h`: 1 hour
594
+ *
595
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
596
+ */
597
+ export type ToolsTtl = ClosedEnum<typeof ToolsTtl>;
598
+
599
+ /**
600
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
601
+ */
602
+ export const ToolsType = {
603
+ Ephemeral: "ephemeral",
604
+ } as const;
605
+ /**
606
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
607
+ */
608
+ export type ToolsType = ClosedEnum<typeof ToolsType>;
609
+
610
+ export type ToolsCacheControl = {
611
+ /**
612
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
613
+ *
614
+ * @remarks
615
+ *
616
+ * - `5m`: 5 minutes
617
+ * - `1h`: 1 hour
618
+ *
619
+ * Defaults to `5m`. Only supported by Anthropic Claude models.
620
+ */
621
+ ttl?: ToolsTtl | undefined;
622
+ /**
623
+ * Create a cache control breakpoint at this content block. Accepts only the value "ephemeral".
624
+ */
625
+ type: ToolsType;
321
626
  };
322
627
 
323
628
  /**
324
629
  * A function tool the model can call.
325
630
  */
326
631
  export type ToolsFunction = {
632
+ cacheControl?: ToolsCacheControl | undefined;
327
633
  /**
328
634
  * A description of what the function does.
329
635
  */
@@ -357,6 +663,10 @@ export type CreateRouterResponseTools =
357
663
  | ToolsMCPTool;
358
664
 
359
665
  export type CreateRouterResponseRequestBody = {
666
+ /**
667
+ * Top-level cache control automatically applies a cache_control marker to the last cacheable block in the request.
668
+ */
669
+ cacheControl?: CreateRouterResponseCacheControl | undefined;
360
670
  conversation?: components.ConversationParam | undefined;
361
671
  /**
362
672
  * Fallback models to try if the primary model fails. Each entry specifies a model in provider/model format.
@@ -477,7 +787,7 @@ export type CreateRouterResponseRequestBody = {
477
787
  /**
478
788
  * The event type.
479
789
  */
480
- export const CreateRouterResponseType = {
790
+ export const CreateRouterResponseResponsesType = {
481
791
  ResponseQueued: "response.queued",
482
792
  ResponseCreated: "response.created",
483
793
  ResponseInProgress: "response.in_progress",
@@ -504,8 +814,8 @@ export const CreateRouterResponseType = {
504
814
  /**
505
815
  * The event type.
506
816
  */
507
- export type CreateRouterResponseType = ClosedEnum<
508
- typeof CreateRouterResponseType
817
+ export type CreateRouterResponseResponsesType = ClosedEnum<
818
+ typeof CreateRouterResponseResponsesType
509
819
  >;
510
820
 
511
821
  /**
@@ -519,7 +829,7 @@ export type CreateRouterResponseData = {
519
829
  /**
520
830
  * The event type.
521
831
  */
522
- type: CreateRouterResponseType;
832
+ type: CreateRouterResponseResponsesType;
523
833
  };
524
834
 
525
835
  /**
@@ -626,8 +936,87 @@ export type CreateRouterResponseResponse =
626
936
  | CreateRouterResponseResponseBody
627
937
  | EventStream<CreateRouterResponseResponsesResponseBody>;
628
938
 
939
+ /** @internal */
940
+ export const CreateRouterResponseTtl$outboundSchema: z.ZodNativeEnum<
941
+ typeof CreateRouterResponseTtl
942
+ > = z.nativeEnum(CreateRouterResponseTtl);
943
+
944
+ /** @internal */
945
+ export const CreateRouterResponseType$outboundSchema: z.ZodNativeEnum<
946
+ typeof CreateRouterResponseType
947
+ > = z.nativeEnum(CreateRouterResponseType);
948
+
949
+ /** @internal */
950
+ export type CreateRouterResponseCacheControl$Outbound = {
951
+ ttl: string;
952
+ type: string;
953
+ };
954
+
955
+ /** @internal */
956
+ export const CreateRouterResponseCacheControl$outboundSchema: z.ZodType<
957
+ CreateRouterResponseCacheControl$Outbound,
958
+ z.ZodTypeDef,
959
+ CreateRouterResponseCacheControl
960
+ > = z.object({
961
+ ttl: CreateRouterResponseTtl$outboundSchema.default("5m"),
962
+ type: CreateRouterResponseType$outboundSchema,
963
+ });
964
+
965
+ export function createRouterResponseCacheControlToJSON(
966
+ createRouterResponseCacheControl: CreateRouterResponseCacheControl,
967
+ ): string {
968
+ return JSON.stringify(
969
+ CreateRouterResponseCacheControl$outboundSchema.parse(
970
+ createRouterResponseCacheControl,
971
+ ),
972
+ );
973
+ }
974
+
975
+ /** @internal */
976
+ export const CreateRouterResponse2ResponsesRequestTtl$outboundSchema:
977
+ z.ZodNativeEnum<typeof CreateRouterResponse2ResponsesRequestTtl> = z
978
+ .nativeEnum(CreateRouterResponse2ResponsesRequestTtl);
979
+
980
+ /** @internal */
981
+ export const CreateRouterResponse2ResponsesRequestRequestBodyInputType$outboundSchema:
982
+ z.ZodNativeEnum<
983
+ typeof CreateRouterResponse2ResponsesRequestRequestBodyInputType
984
+ > = z.nativeEnum(CreateRouterResponse2ResponsesRequestRequestBodyInputType);
985
+
986
+ /** @internal */
987
+ export type CreateRouterResponse2ResponsesRequestCacheControl$Outbound = {
988
+ ttl: string;
989
+ type: string;
990
+ };
991
+
992
+ /** @internal */
993
+ export const CreateRouterResponse2ResponsesRequestCacheControl$outboundSchema:
994
+ z.ZodType<
995
+ CreateRouterResponse2ResponsesRequestCacheControl$Outbound,
996
+ z.ZodTypeDef,
997
+ CreateRouterResponse2ResponsesRequestCacheControl
998
+ > = z.object({
999
+ ttl: CreateRouterResponse2ResponsesRequestTtl$outboundSchema.default("5m"),
1000
+ type:
1001
+ CreateRouterResponse2ResponsesRequestRequestBodyInputType$outboundSchema,
1002
+ });
1003
+
1004
+ export function createRouterResponse2ResponsesRequestCacheControlToJSON(
1005
+ createRouterResponse2ResponsesRequestCacheControl:
1006
+ CreateRouterResponse2ResponsesRequestCacheControl,
1007
+ ): string {
1008
+ return JSON.stringify(
1009
+ CreateRouterResponse2ResponsesRequestCacheControl$outboundSchema.parse(
1010
+ createRouterResponse2ResponsesRequestCacheControl,
1011
+ ),
1012
+ );
1013
+ }
1014
+
629
1015
  /** @internal */
630
1016
  export type TwoFile$Outbound = {
1017
+ cache_control?:
1018
+ | CreateRouterResponse2ResponsesRequestCacheControl$Outbound
1019
+ | undefined;
631
1020
  file_data?: string | undefined;
632
1021
  file_id?: string | undefined;
633
1022
  file_url?: string | undefined;
@@ -642,6 +1031,9 @@ export const TwoFile$outboundSchema: z.ZodType<
642
1031
  z.ZodTypeDef,
643
1032
  TwoFile
644
1033
  > = z.object({
1034
+ cacheControl: z.lazy(() =>
1035
+ CreateRouterResponse2ResponsesRequestCacheControl$outboundSchema
1036
+ ).optional(),
645
1037
  fileData: z.string().optional(),
646
1038
  fileId: z.string().optional(),
647
1039
  fileUrl: z.string().optional(),
@@ -650,6 +1042,7 @@ export const TwoFile$outboundSchema: z.ZodType<
650
1042
  type: z.literal("input_file"),
651
1043
  }).transform((v) => {
652
1044
  return remap$(v, {
1045
+ cacheControl: "cache_control",
653
1046
  fileData: "file_data",
654
1047
  fileId: "file_id",
655
1048
  fileUrl: "file_url",
@@ -661,12 +1054,53 @@ export function twoFileToJSON(twoFile: TwoFile): string {
661
1054
  return JSON.stringify(TwoFile$outboundSchema.parse(twoFile));
662
1055
  }
663
1056
 
1057
+ /** @internal */
1058
+ export const CreateRouterResponse2ResponsesTtl$outboundSchema: z.ZodNativeEnum<
1059
+ typeof CreateRouterResponse2ResponsesTtl
1060
+ > = z.nativeEnum(CreateRouterResponse2ResponsesTtl);
1061
+
1062
+ /** @internal */
1063
+ export const CreateRouterResponse2ResponsesRequestType$outboundSchema:
1064
+ z.ZodNativeEnum<typeof CreateRouterResponse2ResponsesRequestType> = z
1065
+ .nativeEnum(CreateRouterResponse2ResponsesRequestType);
1066
+
1067
+ /** @internal */
1068
+ export type CreateRouterResponse2ResponsesCacheControl$Outbound = {
1069
+ ttl: string;
1070
+ type: string;
1071
+ };
1072
+
1073
+ /** @internal */
1074
+ export const CreateRouterResponse2ResponsesCacheControl$outboundSchema:
1075
+ z.ZodType<
1076
+ CreateRouterResponse2ResponsesCacheControl$Outbound,
1077
+ z.ZodTypeDef,
1078
+ CreateRouterResponse2ResponsesCacheControl
1079
+ > = z.object({
1080
+ ttl: CreateRouterResponse2ResponsesTtl$outboundSchema.default("5m"),
1081
+ type: CreateRouterResponse2ResponsesRequestType$outboundSchema,
1082
+ });
1083
+
1084
+ export function createRouterResponse2ResponsesCacheControlToJSON(
1085
+ createRouterResponse2ResponsesCacheControl:
1086
+ CreateRouterResponse2ResponsesCacheControl,
1087
+ ): string {
1088
+ return JSON.stringify(
1089
+ CreateRouterResponse2ResponsesCacheControl$outboundSchema.parse(
1090
+ createRouterResponse2ResponsesCacheControl,
1091
+ ),
1092
+ );
1093
+ }
1094
+
664
1095
  /** @internal */
665
1096
  export const Detail$outboundSchema: z.ZodNativeEnum<typeof Detail> = z
666
1097
  .nativeEnum(Detail);
667
1098
 
668
1099
  /** @internal */
669
1100
  export type Image$Outbound = {
1101
+ cache_control?:
1102
+ | CreateRouterResponse2ResponsesCacheControl$Outbound
1103
+ | undefined;
670
1104
  detail?: string | undefined;
671
1105
  file_id?: string | undefined;
672
1106
  image_url?: string | undefined;
@@ -679,12 +1113,16 @@ export const Image$outboundSchema: z.ZodType<
679
1113
  z.ZodTypeDef,
680
1114
  Image
681
1115
  > = z.object({
1116
+ cacheControl: z.lazy(() =>
1117
+ CreateRouterResponse2ResponsesCacheControl$outboundSchema
1118
+ ).optional(),
682
1119
  detail: Detail$outboundSchema.optional(),
683
1120
  fileId: z.string().optional(),
684
1121
  imageUrl: z.string().optional(),
685
1122
  type: z.literal("input_image"),
686
1123
  }).transform((v) => {
687
1124
  return remap$(v, {
1125
+ cacheControl: "cache_control",
688
1126
  fileId: "file_id",
689
1127
  imageUrl: "image_url",
690
1128
  });
@@ -694,8 +1132,45 @@ export function imageToJSON(image: Image): string {
694
1132
  return JSON.stringify(Image$outboundSchema.parse(image));
695
1133
  }
696
1134
 
1135
+ /** @internal */
1136
+ export const CreateRouterResponse2Ttl$outboundSchema: z.ZodNativeEnum<
1137
+ typeof CreateRouterResponse2Ttl
1138
+ > = z.nativeEnum(CreateRouterResponse2Ttl);
1139
+
1140
+ /** @internal */
1141
+ export const CreateRouterResponse2Type$outboundSchema: z.ZodNativeEnum<
1142
+ typeof CreateRouterResponse2Type
1143
+ > = z.nativeEnum(CreateRouterResponse2Type);
1144
+
1145
+ /** @internal */
1146
+ export type CreateRouterResponse2CacheControl$Outbound = {
1147
+ ttl: string;
1148
+ type: string;
1149
+ };
1150
+
1151
+ /** @internal */
1152
+ export const CreateRouterResponse2CacheControl$outboundSchema: z.ZodType<
1153
+ CreateRouterResponse2CacheControl$Outbound,
1154
+ z.ZodTypeDef,
1155
+ CreateRouterResponse2CacheControl
1156
+ > = z.object({
1157
+ ttl: CreateRouterResponse2Ttl$outboundSchema.default("5m"),
1158
+ type: CreateRouterResponse2Type$outboundSchema,
1159
+ });
1160
+
1161
+ export function createRouterResponse2CacheControlToJSON(
1162
+ createRouterResponse2CacheControl: CreateRouterResponse2CacheControl,
1163
+ ): string {
1164
+ return JSON.stringify(
1165
+ CreateRouterResponse2CacheControl$outboundSchema.parse(
1166
+ createRouterResponse2CacheControl,
1167
+ ),
1168
+ );
1169
+ }
1170
+
697
1171
  /** @internal */
698
1172
  export type TwoText$Outbound = {
1173
+ cache_control?: CreateRouterResponse2CacheControl$Outbound | undefined;
699
1174
  text: string;
700
1175
  type: "input_text";
701
1176
  };
@@ -706,8 +1181,14 @@ export const TwoText$outboundSchema: z.ZodType<
706
1181
  z.ZodTypeDef,
707
1182
  TwoText
708
1183
  > = z.object({
1184
+ cacheControl: z.lazy(() => CreateRouterResponse2CacheControl$outboundSchema)
1185
+ .optional(),
709
1186
  text: z.string(),
710
1187
  type: z.literal("input_text"),
1188
+ }).transform((v) => {
1189
+ return remap$(v, {
1190
+ cacheControl: "cache_control",
1191
+ });
711
1192
  });
712
1193
 
713
1194
  export function twoTextToJSON(twoText: TwoText): string {
@@ -1080,9 +1561,10 @@ export function toolsMCPToolToJSON(toolsMCPTool: ToolsMCPTool): string {
1080
1561
  }
1081
1562
 
1082
1563
  /** @internal */
1083
- export const CreateRouterResponseToolsType$outboundSchema: z.ZodNativeEnum<
1084
- typeof CreateRouterResponseToolsType
1085
- > = z.nativeEnum(CreateRouterResponseToolsType);
1564
+ export const CreateRouterResponseToolsResponsesType$outboundSchema:
1565
+ z.ZodNativeEnum<typeof CreateRouterResponseToolsResponsesType> = z.nativeEnum(
1566
+ CreateRouterResponseToolsResponsesType,
1567
+ );
1086
1568
 
1087
1569
  /** @internal */
1088
1570
  export type OrqAiTool$Outbound = {
@@ -1097,7 +1579,7 @@ export const OrqAiTool$outboundSchema: z.ZodType<
1097
1579
  OrqAiTool
1098
1580
  > = z.object({
1099
1581
  toolId: z.string().optional(),
1100
- type: CreateRouterResponseToolsType$outboundSchema,
1582
+ type: CreateRouterResponseToolsResponsesType$outboundSchema,
1101
1583
  }).transform((v) => {
1102
1584
  return remap$(v, {
1103
1585
  toolId: "tool_id",
@@ -1108,8 +1590,41 @@ export function orqAiToolToJSON(orqAiTool: OrqAiTool): string {
1108
1590
  return JSON.stringify(OrqAiTool$outboundSchema.parse(orqAiTool));
1109
1591
  }
1110
1592
 
1593
+ /** @internal */
1594
+ export const ToolsTtl$outboundSchema: z.ZodNativeEnum<typeof ToolsTtl> = z
1595
+ .nativeEnum(ToolsTtl);
1596
+
1597
+ /** @internal */
1598
+ export const ToolsType$outboundSchema: z.ZodNativeEnum<typeof ToolsType> = z
1599
+ .nativeEnum(ToolsType);
1600
+
1601
+ /** @internal */
1602
+ export type ToolsCacheControl$Outbound = {
1603
+ ttl: string;
1604
+ type: string;
1605
+ };
1606
+
1607
+ /** @internal */
1608
+ export const ToolsCacheControl$outboundSchema: z.ZodType<
1609
+ ToolsCacheControl$Outbound,
1610
+ z.ZodTypeDef,
1611
+ ToolsCacheControl
1612
+ > = z.object({
1613
+ ttl: ToolsTtl$outboundSchema.default("5m"),
1614
+ type: ToolsType$outboundSchema,
1615
+ });
1616
+
1617
+ export function toolsCacheControlToJSON(
1618
+ toolsCacheControl: ToolsCacheControl,
1619
+ ): string {
1620
+ return JSON.stringify(
1621
+ ToolsCacheControl$outboundSchema.parse(toolsCacheControl),
1622
+ );
1623
+ }
1624
+
1111
1625
  /** @internal */
1112
1626
  export type ToolsFunction$Outbound = {
1627
+ cache_control?: ToolsCacheControl$Outbound | undefined;
1113
1628
  description?: string | undefined;
1114
1629
  name: string;
1115
1630
  parameters?: { [k: string]: any } | undefined;
@@ -1123,11 +1638,16 @@ export const ToolsFunction$outboundSchema: z.ZodType<
1123
1638
  z.ZodTypeDef,
1124
1639
  ToolsFunction
1125
1640
  > = z.object({
1641
+ cacheControl: z.lazy(() => ToolsCacheControl$outboundSchema).optional(),
1126
1642
  description: z.string().optional(),
1127
1643
  name: z.string(),
1128
1644
  parameters: z.record(z.any()).optional(),
1129
1645
  strict: z.boolean().optional(),
1130
1646
  type: z.literal("function"),
1647
+ }).transform((v) => {
1648
+ return remap$(v, {
1649
+ cacheControl: "cache_control",
1650
+ });
1131
1651
  });
1132
1652
 
1133
1653
  export function toolsFunctionToJSON(toolsFunction: ToolsFunction): string {
@@ -1183,6 +1703,7 @@ export function createRouterResponseToolsToJSON(
1183
1703
 
1184
1704
  /** @internal */
1185
1705
  export type CreateRouterResponseRequestBody$Outbound = {
1706
+ cache_control?: CreateRouterResponseCacheControl$Outbound | undefined;
1186
1707
  conversation?: components.ConversationParam$Outbound | undefined;
1187
1708
  fallbacks?: Array<components.FallbackConfig$Outbound> | null | undefined;
1188
1709
  frequency_penalty?: number | undefined;
@@ -1234,6 +1755,8 @@ export const CreateRouterResponseRequestBody$outboundSchema: z.ZodType<
1234
1755
  z.ZodTypeDef,
1235
1756
  CreateRouterResponseRequestBody
1236
1757
  > = z.object({
1758
+ cacheControl: z.lazy(() => CreateRouterResponseCacheControl$outboundSchema)
1759
+ .optional(),
1237
1760
  conversation: components.ConversationParam$outboundSchema.optional(),
1238
1761
  fallbacks: z.nullable(z.array(components.FallbackConfig$outboundSchema))
1239
1762
  .optional(),
@@ -1298,6 +1821,7 @@ export const CreateRouterResponseRequestBody$outboundSchema: z.ZodType<
1298
1821
  variables: z.record(z.any()).optional(),
1299
1822
  }).transform((v) => {
1300
1823
  return remap$(v, {
1824
+ cacheControl: "cache_control",
1301
1825
  frequencyPenalty: "frequency_penalty",
1302
1826
  maxOutputTokens: "max_output_tokens",
1303
1827
  maxToolCalls: "max_tool_calls",
@@ -1325,9 +1849,9 @@ export function createRouterResponseRequestBodyToJSON(
1325
1849
  }
1326
1850
 
1327
1851
  /** @internal */
1328
- export const CreateRouterResponseType$inboundSchema: z.ZodNativeEnum<
1329
- typeof CreateRouterResponseType
1330
- > = z.nativeEnum(CreateRouterResponseType);
1852
+ export const CreateRouterResponseResponsesType$inboundSchema: z.ZodNativeEnum<
1853
+ typeof CreateRouterResponseResponsesType
1854
+ > = z.nativeEnum(CreateRouterResponseResponsesType);
1331
1855
 
1332
1856
  /** @internal */
1333
1857
  export const CreateRouterResponseData$inboundSchema: z.ZodType<
@@ -1336,7 +1860,7 @@ export const CreateRouterResponseData$inboundSchema: z.ZodType<
1336
1860
  unknown
1337
1861
  > = z.object({
1338
1862
  sequence_number: z.number().int(),
1339
- type: CreateRouterResponseType$inboundSchema,
1863
+ type: CreateRouterResponseResponsesType$inboundSchema,
1340
1864
  }).transform((v) => {
1341
1865
  return remap$(v, {
1342
1866
  "sequence_number": "sequenceNumber",