fix(design): bump image-gen timeout to 240s + pin gpt-image-2#1586
Open
matteo-hertel wants to merge 1 commit into
Open
fix(design): bump image-gen timeout to 240s + pin gpt-image-2#1586matteo-hertel wants to merge 1 commit into
matteo-hertel wants to merge 1 commit into
Conversation
|
There's a related PR open for this same issue: #1528 |
The design binary calls /v1/responses (gpt-4o + image_generation tool, quality:high, 1536x1024) but aborted the request after a hardcoded 120s. That class of request consistently takes ~140-160s end-to-end, so every generate/variants/evolve/iterate call aborted before the image returned. In /design-shotgun this cascades: Step 3c launches N parallel agents, each calling `$D generate`, each aborts at 120s and retries, all fail, the comparison board never opens — the skill appears to hang indefinitely. Reproduced the exact API call with a longer budget: HTTP 200, valid image, 143.5s. A real /design-shotgun run after the patch generated 3 variants in parallel at 150.0s / 161.0s / 152.1s, all exit 0 — note the 161s case, which a naive 150s bump would still have failed. - Bump AbortController timeout 120_000 -> 240_000 in generate.ts, variants.ts, evolve.ts, iterate.ts (both call sites) - Pin the image_generation tool to model "gpt-image-2" design/test/variants-retry-after.test.ts: 5 pass, 0 fail. The feedback-roundtrip.test.ts failures are a pre-existing browse-module breakage (session.clearLoadedHtml undefined), unrelated to this change. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
77258cc to
ccbf263
Compare
Author
@badcom the two PRs are fundamentally different. The fact that a PR exists doesn't meant it's the only viable solution. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
/design-shotgun(and any flow using thedesignbinary) appears to hang indefinitely and never opens the comparison board.Root cause: the binary calls
POST /v1/responseswithmodel: gpt-4o+ theimage_generationtool atquality: "high",1536x1024, but aborts the request after a hardcoded 120 000 ms (design/src/generate.ts,variants.ts,evolve.ts,iterate.ts).That class of request consistently takes ~140-160 s end-to-end. Every generation aborts before the image is ready. In
/design-shotgun, Step 3c launches N parallel agents each calling$D generate; every one aborts at 120 s, retries (another 120 s), all N fail, the board never opens, so the skill looks like an infinite hang.Evidence
Reproduced the exact API call the binary makes, with a longer budget:
model: gpt-image-2Then ran a real
/design-shotgunend-to-end with the patched binary, 3 variants generated in parallel:The 161 s case is the key data point: a naive bump to 150 s would still have failed it. 240 s leaves real margin while still bounding a genuinely stuck request.
Change
AbortControllertimeout120_000to240_000ingenerate.ts,variants.ts,evolve.ts,iterate.ts(both call sites initerate.ts).image_generationtool tomodel: "gpt-image-2".Testing
design/test/variants-retry-after.test.ts(exercises the changed retry/timeout path): 5 pass, 0 fail./design-shotgunrun: 3/3 variants generated and passed the vision quality gate, comparison board served.design/test/feedback-roundtrip.test.tsfailures are pre-existing and unrelated: they fail identically on cleanmain(session.clearLoadedHtml is not a function, abrowse-module breakage inwrite-commands.ts). Not touched by this PR.🤖 Generated with Claude Code