@cadraos/sdk 0.3.14 → 0.3.15

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.
package/dist/index.cjs CHANGED
@@ -289,6 +289,10 @@ var HttpClient = class {
289
289
  constructor(config) {
290
290
  this.config = config;
291
291
  }
292
+ /** The client-wide request timeout (ms) this client was configured with. */
293
+ get timeoutMs() {
294
+ return this.config.timeout;
295
+ }
292
296
  /**
293
297
  * Get authorization header value
294
298
  */
@@ -3415,7 +3419,7 @@ var RemoteRunnersAPI = class extends BaseResourceAPI {
3415
3419
  };
3416
3420
 
3417
3421
  // src/resources/ai-functions.ts
3418
- var AI_FUNCTION_RUN_TIMEOUT_MS = 6e4;
3422
+ var AI_FUNCTION_RUN_TIMEOUT_MS = 31e4;
3419
3423
  var AI_FUNCTION_DESCRIPTOR_TTL_MS = 6e4;
3420
3424
  function checkAiFunctionParameters(parameters, variables) {
3421
3425
  const issues = [];
@@ -3528,7 +3532,7 @@ var AiFunctionsAPI = class extends BaseResourceAPI {
3528
3532
  try {
3529
3533
  return await this.httpPost("/run", body, {
3530
3534
  skipRetry: true,
3531
- timeoutMs: AI_FUNCTION_RUN_TIMEOUT_MS
3535
+ timeoutMs: Math.max(AI_FUNCTION_RUN_TIMEOUT_MS, this.http.timeoutMs ?? 0)
3532
3536
  });
3533
3537
  } catch (error) {
3534
3538
  throw this.mapRunError(error, functionKey);