fix(imagegen): enable native images for Codex OAuth - #1610
Open
DescodeNet wants to merge 1 commit into
Open
DescodeNet wants to merge 1 commit into
DescodeNet wants to merge 1 commit into
Conversation
Keep the Codex Responses transport intact and expose native image guidance without separate image credentials. Ultraworked with [omo](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: sisyphus-dev-ai <sisyphus-dev-ai@users.noreply.github.com>
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
OAuth endpoints while preserving the
openai-codex-responsestransport.opt-out, and the global disable flag.
without requiring a separate image API key.
Reproduction
openai-codex/gpt-6-astrawithout changing its API or endpoint.Before this change, the native gate rejected
openai-codex-responsesbeforechecking its endpoint. With a compatible gateway configured, the client
generate_imagepath could choose that gateway instead of the existing OAuthsession. Without client image credentials, the bundled image skill was also
absent.
The fix stays in the two existing image builtins. It does not change provider
authentication, credential precedence, request transport, image persistence, or
model catalogs. Azure and unrelated API behavior remain unchanged.
Verification
capability assertion; patched passed with the same Codex model.
bun run check: passed.bun run build: passed.get_state: successful.openai-responses: 4/4 checks passed.the outgoing native tool requested
gpt-image-2.5-sunburst, HTTP 200,one generated PNG (1254 x 1254, 1,434,514 bytes), and the real credential file
was unchanged. The observer only inspected the payload; it did not inject or
modify the image tool.
Broader validation did not pass completely on this macOS machine:
when reading
packed.filesafternpm pack --json; reproduced in theoriginal upstream clone and with direct Node execution.
ENOTEMPTYRPC cleanup failures and one 1 ms cold-storage timestamp assertion.The unchanged upstream clone reproduced the RPC cleanup failure class.
The timestamp test passed in that isolated baseline run and remains an
unisolated full-suite timing failure.
These failures are outside the changed image paths. No tests were removed,
skipped, or weakened.
Independent gate review: approved with no blocking findings. The reviewer ran
135 tests across nine relevant files, non-writing Biome checks, and root
typechecking; independently reproduced the base/candidate gate difference; and
validated the live PNG and automatic-injection receipts.
Scope
Regression coverage includes official endpoints, wrong APIs, malformed and
lookalike URLs, explicit capability overrides, OAuth-only skill discovery,
native/client mutual exclusion, and switching away from native generation.
The two existing no-client-credential/native-capable matrix rows now expect the
bundled guidance to be available.
No dependency, lockfile, release changelog, or generated-file changes.
Summary by cubic
Enables native image generation for official OpenAI Codex OAuth sessions without requiring a separate image API key. The gate previously rejected the
openai-codex-responsestransport, so these sessions fell back to the clientgenerate_imagetool and never got the bundled image skill.Bug Fixes
openai-codex-responseson the exactchatgpt.comhost now passes the native image gate without changing the model's transport or base URL.gpt-image-genskill is contributed whenever native generation is active, even without client image credentials.Verification
Written for commit bfbf6eb. Summary will update on new commits.