# 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.

- Author: Dil Ahdan (https://dil.dev/)
- Published: 2026-11-06
- Updated: 2026-11-06
- Tags: n8n, automation, content-pipeline, debugging
- Canonical: https://dil.dev/notes/retired-image-model-false-publish-failure/

## Key takeaways

- A failed image generation can cascade into a false publication failure if the verify step checks an image route unconditionally.
- n8n's 300-second task-runner limit will silently route a timed-out item out of the success branch, which can accidentally mark a different article as Live.
- Gating the image-route check on whether this run actually committed an image prevents the verify loop from polling a URL that can never exist.
- Writing the real failure reason into the queue record is the only way to distinguish a genuine publish failure from a model retirement.
- Model deprecations can happen overnight; same-day swaps across every project that shares a model name are the only safe response.

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.

## Quick answers

**Why did the article engine mark a live page as Failed?**

The image generation step failed because the model had been retired, so no image was committed. The verify step then polled an image URL that could never exist, hit the 300-second task-runner limit, and the run was marked Failed even though the page itself was live within 30 seconds.

**How did a timed-out run cause a different article to be marked Live?**

When n8n hits its task-runner limit it routes the timed-out item out of the success output. The next item in the queue inherited that success path, so the manhole guide was marked Live not because it passed verification but because the previous run's timeout left the success branch open.

**What is the fix for the verify loop timing out?**

Replace the single long poll with one check per run, a 60-second wait before each recheck, and a hard cap of 15 checks. That keeps the total well inside the task-runner limit and makes a genuine timeout obvious rather than silent.

**How do you stop the verify step checking an image URL that was never committed?**

Add a Has Image? gate before the image-route check. The verify step only checks the image URL when the current run actually committed an image. If image generation failed, the gate skips that branch entirely.

**What should the queue record say when publication fails?**

Record Publication Failure should write the real reason, such as the model name and the error message, into the Feedback field. Without that, every failure looks identical in the queue and you cannot tell a model retirement from a slow deploy.

**How quickly did the model retirement affect other projects?**

The shutdown happened on 23 October. The article engine caught it on the 24 October 07:00 run. Same-day commits moved every affected project off gpt-image-1 that day.
