@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
@@ -1898,7 +1898,7 @@ export const ResponseBodyCodeExecutionTool$inboundSchema: z.ZodType<
1898
1898
  z.ZodTypeDef,
1899
1899
  unknown
1900
1900
  > = z.object({
1901
- _id: z.string().default("tool_01KTNKV4EH9KSH06X0P4MYPDG6"),
1901
+ _id: z.string().default("tool_01KTPAB2ZS4H5P6J77TQDD1N3D"),
1902
1902
  path: z.string(),
1903
1903
  key: z.string(),
1904
1904
  display_name: z.string().optional(),
@@ -1995,7 +1995,7 @@ export const ResponseBodyTools$inboundSchema: z.ZodType<
1995
1995
  z.ZodTypeDef,
1996
1996
  unknown
1997
1997
  > = z.object({
1998
- id: z.string().default("01KTNKV4EG99NK249X082VKCQJ"),
1998
+ id: z.string().default("01KTPAB2ZR78YT2GKWST6XF8ZB"),
1999
1999
  name: z.string(),
2000
2000
  description: z.string().optional(),
2001
2001
  schema: z.lazy(() => CreateToolResponseBodySchema$inboundSchema),
@@ -2051,7 +2051,7 @@ export const ResponseBodyMCPTool$inboundSchema: z.ZodType<
2051
2051
  z.ZodTypeDef,
2052
2052
  unknown
2053
2053
  > = z.object({
2054
- _id: z.string().default("tool_01KTNKV4EFNTQTFRG0SADKNV0Z"),
2054
+ _id: z.string().default("tool_01KTPAB2ZPEKZFX6PXPCYSR9XJ"),
2055
2055
  path: z.string(),
2056
2056
  key: z.string(),
2057
2057
  display_name: z.string().optional(),
@@ -2237,7 +2237,7 @@ export const ResponseBodyHTTPTool$inboundSchema: z.ZodType<
2237
2237
  z.ZodTypeDef,
2238
2238
  unknown
2239
2239
  > = z.object({
2240
- _id: z.string().default("tool_01KTNKV4ED12RYN03YVG0J95PT"),
2240
+ _id: z.string().default("tool_01KTPAB2ZK1QAE31MGV0RGFC88"),
2241
2241
  path: z.string(),
2242
2242
  key: z.string(),
2243
2243
  display_name: z.string().optional(),
@@ -2330,7 +2330,7 @@ export const ResponseBodyJSONSchemaTool$inboundSchema: z.ZodType<
2330
2330
  z.ZodTypeDef,
2331
2331
  unknown
2332
2332
  > = z.object({
2333
- _id: z.string().default("tool_01KTNKV4EBCMFRDZFNA58DFFTC"),
2333
+ _id: z.string().default("tool_01KTPAB2ZH53V36Q1S0RYEV45T"),
2334
2334
  path: z.string(),
2335
2335
  key: z.string(),
2336
2336
  display_name: z.string().optional(),
@@ -2431,7 +2431,7 @@ export const ResponseBodyFunctionTool$inboundSchema: z.ZodType<
2431
2431
  z.ZodTypeDef,
2432
2432
  unknown
2433
2433
  > = z.object({
2434
- _id: z.string().default("tool_01KTNKV4E9QQ0GJR4E8TD9ZEK1"),
2434
+ _id: z.string().default("tool_01KTPAB2ZFS19XEJ9H27D3Q4KX"),
2435
2435
  path: z.string(),
2436
2436
  key: z.string(),
2437
2437
  display_name: z.string().optional(),
@@ -1271,11 +1271,11 @@ export type DeploymentGetConfigContent =
1271
1271
  | string
1272
1272
  | Array<Two1 | DeploymentGetConfig22 | Two3>;
1273
1273
 
1274
- export const DeploymentGetConfigDeploymentsResponseType = {
1274
+ export const DeploymentGetConfigDeploymentsResponse200Type = {
1275
1275
  Function: "function",
1276
1276
  } as const;
1277
- export type DeploymentGetConfigDeploymentsResponseType = ClosedEnum<
1278
- typeof DeploymentGetConfigDeploymentsResponseType
1277
+ export type DeploymentGetConfigDeploymentsResponse200Type = ClosedEnum<
1278
+ typeof DeploymentGetConfigDeploymentsResponse200Type
1279
1279
  >;
1280
1280
 
1281
1281
  export type DeploymentGetConfigDeploymentsFunction = {
@@ -1289,7 +1289,7 @@ export type DeploymentGetConfigDeploymentsFunction = {
1289
1289
  export type DeploymentGetConfigToolCalls = {
1290
1290
  id?: string | undefined;
1291
1291
  index?: number | undefined;
1292
- type: DeploymentGetConfigDeploymentsResponseType;
1292
+ type: DeploymentGetConfigDeploymentsResponse200Type;
1293
1293
  function: DeploymentGetConfigDeploymentsFunction;
1294
1294
  };
1295
1295
 
@@ -1407,6 +1407,66 @@ export type DeploymentGetConfigResponseFormat =
1407
1407
  | ResponseFormat5
1408
1408
  | ResponseFormat6;
1409
1409
 
1410
+ /**
1411
+ * Create a cache control breakpoint. Accepts only the value "ephemeral".
1412
+ */
1413
+ export const DeploymentGetConfigDeploymentsResponseType = {
1414
+ Ephemeral: "ephemeral",
1415
+ } as const;
1416
+ /**
1417
+ * Create a cache control breakpoint. Accepts only the value "ephemeral".
1418
+ */
1419
+ export type DeploymentGetConfigDeploymentsResponseType = ClosedEnum<
1420
+ typeof DeploymentGetConfigDeploymentsResponseType
1421
+ >;
1422
+
1423
+ /**
1424
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
1425
+ *
1426
+ * @remarks
1427
+ *
1428
+ * - `5m`: 5 minutes
1429
+ * - `1h`: 1 hour
1430
+ *
1431
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1432
+ */
1433
+ export const DeploymentGetConfigTtl = {
1434
+ Fivem: "5m",
1435
+ Oneh: "1h",
1436
+ } as const;
1437
+ /**
1438
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
1439
+ *
1440
+ * @remarks
1441
+ *
1442
+ * - `5m`: 5 minutes
1443
+ * - `1h`: 1 hour
1444
+ *
1445
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1446
+ */
1447
+ export type DeploymentGetConfigTtl = ClosedEnum<typeof DeploymentGetConfigTtl>;
1448
+
1449
+ /**
1450
+ * Provider-level prompt caching configuration applied to the request. Creates a cache control breakpoint covering the request content. Only supported by `Anthropic` Claude models.
1451
+ */
1452
+ export type DeploymentGetConfigCacheControl = {
1453
+ /**
1454
+ * Create a cache control breakpoint. Accepts only the value "ephemeral".
1455
+ */
1456
+ type: DeploymentGetConfigDeploymentsResponseType;
1457
+ /**
1458
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
1459
+ *
1460
+ * @remarks
1461
+ *
1462
+ * - `5m`: 5 minutes
1463
+ * - `1h`: 1 hour
1464
+ *
1465
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
1466
+ */
1467
+ ttl: DeploymentGetConfigTtl;
1468
+ };
1469
+
1410
1470
  /**
1411
1471
  * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
1412
1472
  */
@@ -1551,6 +1611,10 @@ export type DeploymentGetConfigParameters = {
1551
1611
  | ResponseFormat6
1552
1612
  | null
1553
1613
  | undefined;
1614
+ /**
1615
+ * Provider-level prompt caching configuration applied to the request. Creates a cache control breakpoint covering the request content. Only supported by `Anthropic` Claude models.
1616
+ */
1617
+ cacheControl?: DeploymentGetConfigCacheControl | null | undefined;
1554
1618
  /**
1555
1619
  * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
1556
1620
  */
@@ -4576,9 +4640,9 @@ export function deploymentGetConfigContentFromJSON(
4576
4640
  }
4577
4641
 
4578
4642
  /** @internal */
4579
- export const DeploymentGetConfigDeploymentsResponseType$inboundSchema:
4580
- z.ZodNativeEnum<typeof DeploymentGetConfigDeploymentsResponseType> = z
4581
- .nativeEnum(DeploymentGetConfigDeploymentsResponseType);
4643
+ export const DeploymentGetConfigDeploymentsResponse200Type$inboundSchema:
4644
+ z.ZodNativeEnum<typeof DeploymentGetConfigDeploymentsResponse200Type> = z
4645
+ .nativeEnum(DeploymentGetConfigDeploymentsResponse200Type);
4582
4646
 
4583
4647
  /** @internal */
4584
4648
  export const DeploymentGetConfigDeploymentsFunction$inboundSchema: z.ZodType<
@@ -4609,7 +4673,7 @@ export const DeploymentGetConfigToolCalls$inboundSchema: z.ZodType<
4609
4673
  > = z.object({
4610
4674
  id: z.string().optional(),
4611
4675
  index: z.number().optional(),
4612
- type: DeploymentGetConfigDeploymentsResponseType$inboundSchema,
4676
+ type: DeploymentGetConfigDeploymentsResponse200Type$inboundSchema,
4613
4677
  function: z.lazy(() => DeploymentGetConfigDeploymentsFunction$inboundSchema),
4614
4678
  });
4615
4679
 
@@ -4817,6 +4881,36 @@ export function deploymentGetConfigResponseFormatFromJSON(
4817
4881
  );
4818
4882
  }
4819
4883
 
4884
+ /** @internal */
4885
+ export const DeploymentGetConfigDeploymentsResponseType$inboundSchema:
4886
+ z.ZodNativeEnum<typeof DeploymentGetConfigDeploymentsResponseType> = z
4887
+ .nativeEnum(DeploymentGetConfigDeploymentsResponseType);
4888
+
4889
+ /** @internal */
4890
+ export const DeploymentGetConfigTtl$inboundSchema: z.ZodNativeEnum<
4891
+ typeof DeploymentGetConfigTtl
4892
+ > = z.nativeEnum(DeploymentGetConfigTtl);
4893
+
4894
+ /** @internal */
4895
+ export const DeploymentGetConfigCacheControl$inboundSchema: z.ZodType<
4896
+ DeploymentGetConfigCacheControl,
4897
+ z.ZodTypeDef,
4898
+ unknown
4899
+ > = z.object({
4900
+ type: DeploymentGetConfigDeploymentsResponseType$inboundSchema,
4901
+ ttl: DeploymentGetConfigTtl$inboundSchema.default("5m"),
4902
+ });
4903
+
4904
+ export function deploymentGetConfigCacheControlFromJSON(
4905
+ jsonString: string,
4906
+ ): SafeParseResult<DeploymentGetConfigCacheControl, SDKValidationError> {
4907
+ return safeParse(
4908
+ jsonString,
4909
+ (x) => DeploymentGetConfigCacheControl$inboundSchema.parse(JSON.parse(x)),
4910
+ `Failed to parse 'DeploymentGetConfigCacheControl' from JSON`,
4911
+ );
4912
+ }
4913
+
4820
4914
  /** @internal */
4821
4915
  export const PhotoRealVersion$inboundSchema: z.ZodNativeEnum<
4822
4916
  typeof PhotoRealVersion
@@ -4870,6 +4964,9 @@ export const DeploymentGetConfigParameters$inboundSchema: z.ZodType<
4870
4964
  ResponseFormat6$inboundSchema,
4871
4965
  ]),
4872
4966
  ).optional(),
4967
+ cacheControl: z.nullable(
4968
+ z.lazy(() => DeploymentGetConfigCacheControl$inboundSchema),
4969
+ ).optional(),
4873
4970
  photoRealVersion: PhotoRealVersion$inboundSchema.optional(),
4874
4971
  encoding_format: DeploymentGetConfigEncodingFormat$inboundSchema.optional(),
4875
4972
  reasoningEffort: DeploymentGetConfigReasoningEffort$inboundSchema.optional(),
@@ -40,11 +40,11 @@ export const DeploymentsType = {
40
40
  */
41
41
  export type DeploymentsType = ClosedEnum<typeof DeploymentsType>;
42
42
 
43
- export const DeploymentsDeploymentsResponseType = {
43
+ export const DeploymentsDeploymentsResponse200Type = {
44
44
  Object: "object",
45
45
  } as const;
46
- export type DeploymentsDeploymentsResponseType = ClosedEnum<
47
- typeof DeploymentsDeploymentsResponseType
46
+ export type DeploymentsDeploymentsResponse200Type = ClosedEnum<
47
+ typeof DeploymentsDeploymentsResponse200Type
48
48
  >;
49
49
 
50
50
  /**
@@ -55,7 +55,7 @@ export type DeploymentsDeploymentsResponseType = ClosedEnum<
55
55
  * Omitting `parameters` defines a function with an empty parameter list.
56
56
  */
57
57
  export type DeploymentsParameters = {
58
- type: DeploymentsDeploymentsResponseType;
58
+ type: DeploymentsDeploymentsResponse200Type;
59
59
  properties: { [k: string]: any };
60
60
  required?: Array<string> | undefined;
61
61
  additionalProperties?: false | undefined;
@@ -217,6 +217,66 @@ export type DeploymentsResponseFormat =
217
217
  | DeploymentsResponseFormat5
218
218
  | DeploymentsResponseFormat6;
219
219
 
220
+ /**
221
+ * Create a cache control breakpoint. Accepts only the value "ephemeral".
222
+ */
223
+ export const DeploymentsDeploymentsType = {
224
+ Ephemeral: "ephemeral",
225
+ } as const;
226
+ /**
227
+ * Create a cache control breakpoint. Accepts only the value "ephemeral".
228
+ */
229
+ export type DeploymentsDeploymentsType = ClosedEnum<
230
+ typeof DeploymentsDeploymentsType
231
+ >;
232
+
233
+ /**
234
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
235
+ *
236
+ * @remarks
237
+ *
238
+ * - `5m`: 5 minutes
239
+ * - `1h`: 1 hour
240
+ *
241
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
242
+ */
243
+ export const DeploymentsTtl = {
244
+ Fivem: "5m",
245
+ Oneh: "1h",
246
+ } as const;
247
+ /**
248
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
249
+ *
250
+ * @remarks
251
+ *
252
+ * - `5m`: 5 minutes
253
+ * - `1h`: 1 hour
254
+ *
255
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
256
+ */
257
+ export type DeploymentsTtl = ClosedEnum<typeof DeploymentsTtl>;
258
+
259
+ /**
260
+ * Provider-level prompt caching configuration applied to the request. Creates a cache control breakpoint covering the request content. Only supported by `Anthropic` Claude models.
261
+ */
262
+ export type DeploymentsCacheControl = {
263
+ /**
264
+ * Create a cache control breakpoint. Accepts only the value "ephemeral".
265
+ */
266
+ type: DeploymentsDeploymentsType;
267
+ /**
268
+ * The time-to-live for the cache control breakpoint. This may be one of the following values:
269
+ *
270
+ * @remarks
271
+ *
272
+ * - `5m`: 5 minutes
273
+ * - `1h`: 1 hour
274
+ *
275
+ * Defaults to `5m`. Only supported by `Anthropic` Claude models.
276
+ */
277
+ ttl: DeploymentsTtl;
278
+ };
279
+
220
280
  /**
221
281
  * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
222
282
  */
@@ -363,6 +423,10 @@ export type DeploymentsModelParameters = {
363
423
  | DeploymentsResponseFormat6
364
424
  | null
365
425
  | undefined;
426
+ /**
427
+ * Provider-level prompt caching configuration applied to the request. Creates a cache control breakpoint covering the request content. Only supported by `Anthropic` Claude models.
428
+ */
429
+ cacheControl?: DeploymentsCacheControl | null | undefined;
366
430
  /**
367
431
  * The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
368
432
  */
@@ -514,11 +578,11 @@ export type DeploymentsContent =
514
578
  | string
515
579
  | Array<Deployments21 | Deployments22 | Deployments23>;
516
580
 
517
- export const DeploymentsDeploymentsType = {
581
+ export const DeploymentsDeploymentsResponseType = {
518
582
  Function: "function",
519
583
  } as const;
520
- export type DeploymentsDeploymentsType = ClosedEnum<
521
- typeof DeploymentsDeploymentsType
584
+ export type DeploymentsDeploymentsResponseType = ClosedEnum<
585
+ typeof DeploymentsDeploymentsResponseType
522
586
  >;
523
587
 
524
588
  export type DeploymentsDeploymentsFunction = {
@@ -532,7 +596,7 @@ export type DeploymentsDeploymentsFunction = {
532
596
  export type DeploymentsToolCalls = {
533
597
  id?: string | undefined;
534
598
  index?: number | undefined;
535
- type: DeploymentsDeploymentsType;
599
+ type: DeploymentsDeploymentsResponseType;
536
600
  function: DeploymentsDeploymentsFunction;
537
601
  };
538
602
 
@@ -643,9 +707,10 @@ export const DeploymentsType$inboundSchema: z.ZodNativeEnum<
643
707
  > = z.nativeEnum(DeploymentsType);
644
708
 
645
709
  /** @internal */
646
- export const DeploymentsDeploymentsResponseType$inboundSchema: z.ZodNativeEnum<
647
- typeof DeploymentsDeploymentsResponseType
648
- > = z.nativeEnum(DeploymentsDeploymentsResponseType);
710
+ export const DeploymentsDeploymentsResponse200Type$inboundSchema:
711
+ z.ZodNativeEnum<typeof DeploymentsDeploymentsResponse200Type> = z.nativeEnum(
712
+ DeploymentsDeploymentsResponse200Type,
713
+ );
649
714
 
650
715
  /** @internal */
651
716
  export const DeploymentsParameters$inboundSchema: z.ZodType<
@@ -653,7 +718,7 @@ export const DeploymentsParameters$inboundSchema: z.ZodType<
653
718
  z.ZodTypeDef,
654
719
  unknown
655
720
  > = z.object({
656
- type: DeploymentsDeploymentsResponseType$inboundSchema,
721
+ type: DeploymentsDeploymentsResponse200Type$inboundSchema,
657
722
  properties: z.record(z.any()),
658
723
  required: z.array(z.string()).optional(),
659
724
  additionalProperties: z.literal(false).optional(),
@@ -868,6 +933,36 @@ export function deploymentsResponseFormatFromJSON(
868
933
  );
869
934
  }
870
935
 
936
+ /** @internal */
937
+ export const DeploymentsDeploymentsType$inboundSchema: z.ZodNativeEnum<
938
+ typeof DeploymentsDeploymentsType
939
+ > = z.nativeEnum(DeploymentsDeploymentsType);
940
+
941
+ /** @internal */
942
+ export const DeploymentsTtl$inboundSchema: z.ZodNativeEnum<
943
+ typeof DeploymentsTtl
944
+ > = z.nativeEnum(DeploymentsTtl);
945
+
946
+ /** @internal */
947
+ export const DeploymentsCacheControl$inboundSchema: z.ZodType<
948
+ DeploymentsCacheControl,
949
+ z.ZodTypeDef,
950
+ unknown
951
+ > = z.object({
952
+ type: DeploymentsDeploymentsType$inboundSchema,
953
+ ttl: DeploymentsTtl$inboundSchema.default("5m"),
954
+ });
955
+
956
+ export function deploymentsCacheControlFromJSON(
957
+ jsonString: string,
958
+ ): SafeParseResult<DeploymentsCacheControl, SDKValidationError> {
959
+ return safeParse(
960
+ jsonString,
961
+ (x) => DeploymentsCacheControl$inboundSchema.parse(JSON.parse(x)),
962
+ `Failed to parse 'DeploymentsCacheControl' from JSON`,
963
+ );
964
+ }
965
+
871
966
  /** @internal */
872
967
  export const DeploymentsPhotoRealVersion$inboundSchema: z.ZodNativeEnum<
873
968
  typeof DeploymentsPhotoRealVersion
@@ -921,6 +1016,8 @@ export const DeploymentsModelParameters$inboundSchema: z.ZodType<
921
1016
  DeploymentsResponseFormat6$inboundSchema,
922
1017
  ]),
923
1018
  ).optional(),
1019
+ cacheControl: z.nullable(z.lazy(() => DeploymentsCacheControl$inboundSchema))
1020
+ .optional(),
924
1021
  photoRealVersion: DeploymentsPhotoRealVersion$inboundSchema.optional(),
925
1022
  encoding_format: DeploymentsEncodingFormat$inboundSchema.optional(),
926
1023
  reasoningEffort: DeploymentsReasoningEffort$inboundSchema.optional(),
@@ -1110,9 +1207,9 @@ export function deploymentsContentFromJSON(
1110
1207
  }
1111
1208
 
1112
1209
  /** @internal */
1113
- export const DeploymentsDeploymentsType$inboundSchema: z.ZodNativeEnum<
1114
- typeof DeploymentsDeploymentsType
1115
- > = z.nativeEnum(DeploymentsDeploymentsType);
1210
+ export const DeploymentsDeploymentsResponseType$inboundSchema: z.ZodNativeEnum<
1211
+ typeof DeploymentsDeploymentsResponseType
1212
+ > = z.nativeEnum(DeploymentsDeploymentsResponseType);
1116
1213
 
1117
1214
  /** @internal */
1118
1215
  export const DeploymentsDeploymentsFunction$inboundSchema: z.ZodType<
@@ -1142,7 +1239,7 @@ export const DeploymentsToolCalls$inboundSchema: z.ZodType<
1142
1239
  > = z.object({
1143
1240
  id: z.string().optional(),
1144
1241
  index: z.number().optional(),
1145
- type: DeploymentsDeploymentsType$inboundSchema,
1242
+ type: DeploymentsDeploymentsResponseType$inboundSchema,
1146
1243
  function: z.lazy(() => DeploymentsDeploymentsFunction$inboundSchema),
1147
1244
  });
1148
1245