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