fix(design): drop gpt-image-2 tool model on gpt-4o orchestrator (#1771)#1773
Open
Pablosinyores wants to merge 1 commit into
Open
fix(design): drop gpt-image-2 tool model on gpt-4o orchestrator (#1771)#1773Pablosinyores wants to merge 1 commit into
Pablosinyores wants to merge 1 commit into
Conversation
…ytan#1771) The Responses API rejects a gpt-4o orchestrator paired with an `image_generation` tool spec'd as `model: "gpt-image-2"` (400 invalid_request_error). `gpt-image-2` is only valid under a gpt-5 orchestrator; with gpt-4o the tool must omit the `model` field (defaults to `gpt-image-1`). This regression landed in v1.43.2.0 (commit 66f3a18, 2026-05-21), which added `model: "gpt-image-2"` to the `image_generation` tool spec while leaving the top-level orchestrator at `gpt-4o`. The pairing took all five `design` subcommands offline with a generic 400 error: `/design-shotgun`, `design variants`, `design generate`, `design iterate`, and `design evolve`. Revert the four call sites to the pre-regression shape (drop the `model` field, fall back to the API default `gpt-image-1`): - design/src/generate.ts:53 - design/src/variants.ts:73 - design/src/iterate.ts:98 (threaded fresh-prompt call) - design/src/iterate.ts:145 (threaded follow-up call) - design/src/evolve.ts:67 Add a static-grep tripwire (`design/test/image-gen-pairing.test.ts`) that scans every `design/src/*.ts` and fails CI if any module contains both the literal `model: "gpt-4o"` and the literal `model: "gpt-image-2"`. The check follows the same shape as the existing tripwires in browse/test/ (cdp-session-cleanup, terminal-agent-pid-identity, server-embedder-terminal-port) — single forbidden source-level pattern, clear remediation in the failure message. To re-enable gpt-image-2 the orchestrator must also be bumped off gpt-4o in the same diff; the tripwire allows that because both literals are no longer present in the same module. Closes garrytan#1771.
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.
Summary
The Responses API rejects pairing a
gpt-4oorchestrator with animage_generationtool spec'd asmodel: "gpt-image-2"with a generic400 invalid_request_error.gpt-image-2is only valid under agpt-5orchestrator; withgpt-4othe tool must omit themodelfield (defaults togpt-image-1).This regression landed in
v1.43.2.0(commit66f3a180, 2026-05-21), which addedmodel: "gpt-image-2"to the tool spec while leaving the orchestrator atgpt-4o. The pairing took all fivedesignsubcommands offline:design generatedesign variantsdesign iteratedesign evolve/design-shotgunCloses #1771.
Fix
Revert the five call sites to the pre-regression shape (drop the tool
modelfield; the API defaults togpt-image-1which works undergpt-4o):design/src/generate.ts:53design/src/variants.ts:73design/src/iterate.ts:98(threaded fresh-prompt call)design/src/iterate.ts:145(threaded follow-up call)design/src/evolve.ts:67Regression tripwire
design/test/image-gen-pairing.test.tsis a static-grep tripwire over everydesign/src/*.ts. It fails CI if any module contains BOTH the literalmodel: "gpt-4o"and the literalmodel: "gpt-image-2"— the unsupported pairing.Same shape as existing tripwires in
browse/test/:cdp-session-cleanup.test.tsterminal-agent-pid-identity.test.tsserver-embedder-terminal-port.test.tsTo re-enable
gpt-image-2later, the orchestrator must also be bumped offgpt-4oin the SAME diff — the tripwire allows that because both literals are no longer co-present in one module.Validation
design/test/feedback-roundtrip*.test.tswere not run locally — they require a Playwright Chromium install which isn't on this machine. They don't touch the orchestrator/tool model literals, so the fix is orthogonal to that path.AI assistance disclosure
Patch was drafted with AI assistance. Diff was hand-reviewed against the regression commit
66f3a180; root cause cross-referenced with the issue body (paired with the maintainer's own correction note); tripwire test inverts the failing condition described in the issue and reproduces the failure when reverted (verified locally whengenerate.tswas initially missed).