Allow compatible providers to opt into standalone image generation
What variant of Codex are you using?
CLI
What feature would you like to see?
Allow model providers that implement the OpenAI-compatible Images API to opt into Codex's standalone image_gen.imagegen tool.
An explicit provider capability could enable the feature:
[model_providers.example]
image_generation_mode = "standalone"
The capability should remain disabled by default for providers that do not declare it. When enabled, standalone image generation and editing would use the active provider's configured OpenAI-compatible base URL and authentication, calling the standard images/generations and images/edits paths.
Additional information
Codex already has the standalone image-generation extension and the Images API request types. The remaining limitation is that tool exposure is tied to the built-in provider/authentication gate, so a provider that implements the same compatible Images API cannot explicitly declare support.
The proposed change keeps the existing ChatGPT backend authentication checks for the built-in OpenAI provider, adds an opt-in capability for compatible providers, carries it through remote thread configuration, and defaults to disabled for backward safety.
A draft implementation with focused tests is available here:
https://github.com/linshuboy/codex/pull/1
Would this direction align with the Codex roadmap? If so, please invite an upstream PR from the linked branch.
2 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
Thanks for flagging the overlap. This request is covered by the earlier canonical proposal in #24465, and #36832 tracks the same CLI symptom.
I am closing this issue in favor of #24465. For reference, a focused draft implementation is available in the contributor fork:
https://github.com/linshuboy/codex/pull/1
The implementation uses an explicit opt-in for providers that implement the OpenAI-compatible Images API, keeps the default disabled, and preserves the existing built-in provider authentication checks.