Retry-layer audit
A browser request can pass through an application backend, load balancer, reverse proxy and HTTP client before reaching a generation endpoint. Each layer may observe a timeout from a different point in that chain. The existing idempotency guide explains how the application should reuse an approved request key; this guide addresses a replay the application did not explicitly issue. NGINX documents a separate non_idempotent option in upstream retry behavior. That example is a configuration distinction, not evidence that AISwapLab or your current host uses that setting, nor a recommendation to turn it on.
What to do next
- 01
Draw the actual paid-request path
Identify the components that handle a generation POST, including managed gateways whose defaults may be controlled outside your code repository. Record which layer terminates TLS, buffers the request body and handles upstream failure. Use safe request and operation identifiers for correlation; do not collect bearer keys or private prompts. A missing browser retry log does not show that a gateway never forwarded the body again.
- 02
Review retries against the business operation
Check the current vendor documentation and deployed configuration for method-specific retry rules, failure conditions and attempt limits. Avoid assuming a GET policy also applies safely to a generation POST. Ensure the application preserves the approved idempotency identity through any allowed retry, without changing the payload or manufacturing a new key. If the origin may already have accepted the task, prefer the documented reconciliation route instead of automatically treating the transport failure as no work done.
- 03
Rehearse with a fake origin before changing production
Use a local synthetic endpoint that records attempt identifiers and simulates a lost response after acceptance. Send no request to a real model route. Observe the application, proxy and origin logs to determine which layer repeats the body and whether the operation identity survives. Review the result before changing live retry settings. Include normal safe polling traffic separately so the test does not solve duplicate POSTs by making every read unreasonably fragile.
A concrete example
Illustrative incident: the application's log contains one call to create an image. A test gateway forwards it, loses the response and forwards the body again under its retry policy. The fake origin records two transport attempts for one approved operation. A correctly designed integration must not convert those into two independent creative purchases. The test isolates the infrastructure behavior; it does not assert that two real generations occurred, that every gateway retries POSTs by default, or that an idempotency key cures arbitrary payload changes.
Retry-layer audit
| Layer | Evidence to collect | Unsafe assumption |
|---|---|---|
| Application client | Approved operation and attempted call | One log means one origin attempt |
| Proxy or gateway | Method-specific replay configuration | All retries are harmless |
| Origin task | Accepted task identity | A timeout means no task exists |
Before you call it ready
- Every component in the paid-request path has an identified retry policy.
- Transport attempts and approved business actions have separate identifiers.
- Allowed replays retain the same reviewed payload identity.
- A fake origin, not a live paid route, is used for fault rehearsal.
When to stop or choose another method
Stop deploying retry changes that you cannot explain at the operation boundary. An HTTP timeout is not proof of zero supplier work, and changing keys to make the retry succeed can defeat deduplication. Follow the current AISwapLab recovery contract for the existing task. If a managed gateway's retry behavior cannot be controlled or observed, document that limitation before claiming exactly-once business effects.
