Skip to content

Ensure we set a higher timeout when generating images#226

Merged
jeffpaul merged 1 commit intoWordPress:developfrom
dkotter:fix/increase-image-timeout
Feb 17, 2026
Merged

Ensure we set a higher timeout when generating images#226
jeffpaul merged 1 commit intoWordPress:developfrom
dkotter:fix/increase-image-timeout

Conversation

@dkotter
Copy link
Collaborator

@dkotter dkotter commented Feb 11, 2026

What?

Increases the timeout from 30s to 90s when generating images

Why?

Image generation can take 60+ seconds, particularly when using more advances modes like gpt-image-1. The default timeout the WP AI Client sets is 30 seconds so you're likely to run into timeouts before the image generation is done.

How?

Uses the using_request_options option to increase the timeout to 90 seconds when generating an image.

This was previously in place but was seemingly accidentally removed while making some other changes 😭

Use of AI Tools

None

Testing Instructions

  1. Turn on the Image Generation Experiment
  2. Ensure you have valid AI credentials
  3. Create a post giving it some content and a title
  4. Click the Generate featured image button in the post status sidebar
  5. Ensure an image is generated and saved properly
Open WordPress Playground Preview

@dkotter dkotter added this to the 0.4.0 milestone Feb 11, 2026
@dkotter dkotter self-assigned this Feb 11, 2026
@dkotter dkotter requested a review from jeffpaul February 11, 2026 20:12
@github-actions
Copy link

github-actions bot commented Feb 11, 2026

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: dkotter <dkotter@git.wordpress.org>
Co-authored-by: jeffpaul <jeffpaul@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.69%. Comparing base (04c2df4) to head (56efce5).
⚠️ Report is 43 commits behind head on develop.

Files with missing lines Patch % Lines
includes/Abilities/Image/Generate_Image.php 0.00% 3 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #226      +/-   ##
=============================================
- Coverage      56.76%   56.69%   -0.07%     
  Complexity       505      505              
=============================================
  Files             32       32              
  Lines           2565     2568       +3     
=============================================
  Hits            1456     1456              
- Misses          1109     1112       +3     
Flag Coverage Δ
unit 56.69% <0.00%> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@jeffpaul
Copy link
Member

This was previously in place but was seemingly accidentally removed while making some other changes 😭

oh sure, sure

Copy link
Member

@jeffpaul jeffpaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works well in testing locally

@jeffpaul jeffpaul merged commit a313cc3 into WordPress:develop Feb 17, 2026
22 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants