WP Webhooks / Docs / fswa_ai_http_timeout
Filter since v2.1.1

fswa_ai_http_timeout

Sets the HTTP timeout in seconds for calls to AI providers.

$

/ Signature

apply_filters( 'fswa_ai_http_timeout', $seconds )

/ When it fires

Fires each time Build with AI or an AI-drafted notification message makes an HTTP request to an AI provider or to the hosted AI service. The filter is not told which call it is, so returning a fixed number also changes the short trial requests — scale the incoming default if you only want longer model calls.

/ Parameters

NameInTypeReqDescription
$secondsparamintyesTimeout in seconds. The default depends on the call: `120` for model requests through your own Google, OpenAI or Anthropic key and the hosted trial, `150` for Pro's hosted AI, and `15` / `30` for the short trial-status and credit-grant requests.

/ Returns

int Timeout in seconds.

/ Examples

Give slow models more time

add_filter( 'fswa_ai_http_timeout', function ( $seconds ) {
    return $seconds >= 120 ? 240 : $seconds; // only lengthen the model calls
} );

/ Related

Ready

Your next automation is
one sentence away.

$ wp plugin install flowsystems-webhook-actions --activate