@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.
@@ -312,6 +312,10 @@ var HttpClient = class {
312
312
  constructor(config) {
313
313
  this.config = config;
314
314
  }
315
+ /** The client-wide request timeout (ms) this client was configured with. */
316
+ get timeoutMs() {
317
+ return this.config.timeout;
318
+ }
315
319
  /**
316
320
  * Get authorization header value
317
321
  */
@@ -3428,7 +3432,7 @@ var RemoteRunnersAPI = class extends BaseResourceAPI {
3428
3432
  };
3429
3433
 
3430
3434
  // src/resources/ai-functions.ts
3431
- var AI_FUNCTION_RUN_TIMEOUT_MS = 6e4;
3435
+ var AI_FUNCTION_RUN_TIMEOUT_MS = 31e4;
3432
3436
  var AI_FUNCTION_DESCRIPTOR_TTL_MS = 6e4;
3433
3437
  function checkAiFunctionParameters(parameters, variables) {
3434
3438
  const issues = [];
@@ -3541,7 +3545,7 @@ var AiFunctionsAPI = class extends BaseResourceAPI {
3541
3545
  try {
3542
3546
  return await this.httpPost("/run", body, {
3543
3547
  skipRetry: true,
3544
- timeoutMs: AI_FUNCTION_RUN_TIMEOUT_MS
3548
+ timeoutMs: Math.max(AI_FUNCTION_RUN_TIMEOUT_MS, this.http.timeoutMs ?? 0)
3545
3549
  });
3546
3550
  } catch (error) {
3547
3551
  throw this.mapRunError(error, functionKey);