[wp-trac] [WordPress Trac] #65094: AI: Prompt construction fails with fatal error when wp_ai_client_default_request_timeout filter returns negative number

WordPress Trac noreply at wordpress.org
Sat Apr 18 18:48:42 UTC 2026


#65094: AI: Prompt construction fails with fatal error when
wp_ai_client_default_request_timeout filter returns negative number
--------------------------------------+--------------------------
 Reporter:  westonruter               |       Owner:  westonruter
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  7.0
Component:  AI                        |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:
--------------------------------------+--------------------------

Comment (by adrmf25):

 Tested this issue in a local WordPress development environment.

 Steps:
 - Set up local WordPress Core
 - Applied the wp_ai_client_default_request_timeout filter
 - Initially placed it in wp-config.php, which caused a fatal error
 (add_filter not available at that stage)
 - Moved the filter to functions.php, where WordPress is fully loaded

 Result:
 - No fatal errors when applied correctly
 - WordPress runs normally

 Conclusion:
 The behavior works as expected when the filter is used in the proper
 context.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/65094#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list