DIL.DEV
LOADING0%
DIL.DEV
← ALL NOTES

A Retired Image Model Made a Live Article Look Failed

When OpenAI retired gpt-image-1, an article engine marked a live guide as Failed because the verify loop polled a missing image URL for 300 seconds. Here is what broke and how it was fixed.

n8nautomationcontent-pipelinedebugging

A terminal log showing a 300-second timeout on a verify step next to a live webpage that loaded correctly.

On 23 October 2026, OpenAI shut down gpt-image-1. The article engine running for Drainiacs did not know that. It found out the next morning when the 07:00 run tried to generate a hero image, got back "The model 'gpt-image-1' does not exist.", and then spent the next 300 seconds polling a URL that could never appear. The guide it was trying to publish was already live. The engine marked it Failed anyway.

What the Engine Was Supposed to Do

The pipeline runs in n8n. For each article it:

  • Generates a hero image using the configured model.
  • Commits the image to the repository if generation succeeds.
  • Publishes the article and waits for the deploy.
  • Verifies publication by checking the live URL, including the image route.

Under normal conditions this works fine. The image is there, the route resolves, the run exits the success branch, and the queue record is updated to Live.

Where It Broke

The failure was not a slow deploy. Both pages in that morning's run were live within 30 seconds. The problem was earlier in the chain.

  • Generate Image failed with the retired model error.
  • No image was committed, so no image URL existed anywhere.
  • Verify Published Article did not know that. It checked the image route unconditionally.
  • The route returned nothing. The step kept polling.
  • After exactly 300 seconds, n8n hit its task-runner limit and terminated the run.

That is the first failure mode: a missing image caused an infinite-feeling wait that killed the run.

How a Timed-Out Run Marked the Wrong Article Live

The second failure mode is stranger. There were two runs that morning. Both spent exactly 300 seconds in the verify step. The manhole guide ended up marked Live, not because it passed verification, but because of how n8n handles a timed-out item.

When n8n hits the task-runner limit it routes the timed-out item out of the success output. The next item in the queue picked up that success path. The manhole guide was Live only because the previous run's timeout left the success branch open for it.

This is the kind of bug that is nearly impossible to spot from the queue alone. One article says Live, one says Failed, both pages load correctly. The queue record gave no indication of why.

The Three Fixes in Commit 62b38f9

Fix one: replace the 300-second poll with a bounded loop.

The verify step now runs one check per execution. Between checks there is a Wait Before Recheck node set to 60 seconds. The loop is capped at 15 checks. That gives a maximum wait of 15 minutes, well inside any reasonable deploy window, and it exits cleanly rather than hitting the task-runner wall.

Fix two: gate the image-route check on whether this run committed an image.

A Has Image? node sits before the image-route check. If the current run did not commit an image, the gate skips the image branch entirely. The verify step checks only what this run actually produced. A retired model can no longer cause the verify step to poll a URL that was never going to exist.

Fix three: write the real reason into the queue.

Record Publication Failure now writes the actual error into the Feedback field. "The model 'gpt-image-1' does not exist." is in the queue record, not just in the n8n execution log. Next time a model is retired, the queue will say so immediately rather than showing a generic failure that looks identical to a slow deploy.

The Model Swap

Fixing the loop behaviour does not help if the model is still retired. Commit 2847ae5, same day, moves Generate Image to gpt-image-2 across the Drainiacs engine. The retirement date, 23 October 2026, is recorded in docs/PROJECT-MEMORY.md under "Hero image model, 24 October 2026".

The same model name appeared in several other projects. Same-day commits updated each one. If you share a model name across projects and a provider retires it, every project that uses that name will fail on its next run. There is no grace period and no warning in the output beyond the error message itself.

Why the Verify Step Is the Dangerous Part

It is tempting to think the bug was just "wrong model name". The model swap is one line. But the verify step is where the real damage happened, because it had two assumptions baked in:

  • The image URL will eventually resolve if you wait long enough.
  • Checking the image route is always appropriate, regardless of what the current run produced.

Both assumptions are wrong when image generation fails. The loop fix addresses the first. The Has Image? gate addresses the second. Without both, a future image failure, whether from a retired model, a quota error or a network blip, will cause the same false publication failure.

What I'd do differently

  • Check the model name in a health step before the run starts, not after generation fails. A quick API call to list available models at the top of the workflow would catch a retirement before any content work begins.
  • Record the image commit status explicitly in the run context from the moment generation succeeds or fails. Every downstream step should be able to read "image committed: false" without inferring it from the absence of a URL.
  • Set a task-runner budget per step, not just per workflow. The 300-second limit is a workflow-level ceiling. Individual steps that poll external URLs should have their own shorter budgets so a stuck step cannot consume the entire allowance and corrupt the routing for the next item.
  • Alert on consecutive Failed records in the queue, not just on individual failures. Two Failed records in a row on the same morning would have flagged this immediately. One Failed record looks like a one-off.

NOTES BY EMAIL

Get the next note in your inbox.

One email per note. No spam. Reply “stop” any time and you are off the list.