[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
Thu Apr 23 11:24:21 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:  reopened
 Priority:  normal                               |   Milestone:  7.0
Component:  AI                                   |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests commit      |     Focuses:
  dev-feedback                                   |
-------------------------------------------------+-------------------------

Comment (by khushdoms):

 Performed additional edge-case testing on 7.0 RC2:

 - null → handled safely, no fatal error
 - INF → no crash, request proceeds as expected
 - float (0.5) → accepted and applied correctly
 - invalid string → ignored, fallback applied
 - large value → works without issues

 No regressions observed across all cases.

 The fix is robust and handles unexpected filter inputs gracefully.

 Suggestion:
 It may be helpful to document supported return types for this filter
 (float, null, INF) to improve developer clarity.

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


More information about the wp-trac mailing list