Repository navigation
Vouch request: generate_image per-request provider + Codex-subscription images #4628
Closed
insodimension
started this conversation in
General
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi! Asking for a vouch to open a PR (per CONTRIBUTING.md — I had one merged PR before the vouch seed, so I'm not on the list yet: #2260, "Show active OAuth account in usage").
What I'd like to contribute (branch ready, written against current
main):generate_imageonly rides a Codex subscription when the active model is an OpenAI hosted-image model; otherwise it falls back to the meteredOPENAI_API_KEY. This resolves a connectedopenai-codexOAuth credential directly (chatgpt.com/backend-api/codex/responses,chatgpt-account-idheader), so images run on the subscription even when chatting with Claude/Gemini.providers.imagegains anopenai-codexoption;autodetects a connected subscription (priority: active GPT image tool > Codex subscription > Antigravity > xAI > OpenRouter > Gemini).providerparam ongenerate_image(auto | openai | openai-codex | antigravity | xai | gemini | openrouter) — "generate this using gemini/xai" routes a single call without touching the global setting; absent → the setting applies, unchanged semantics.Diff: main...insodimension:oh-my-pi-upstream-pr:feat/image-gen-provider (+312/−14 across
tools/image-gen.ts,config/settings-schema.ts, tests, changelog). 7/7image-gen.test.tsincl. 3 new tests (codex-subscription routing with a non-OpenAI active model, per-request override beating the setting, Responses edit path);check:tsgreen.We run this in production in our downstream fork. Happy to adjust anything in review — e.g. the codex image-capable model priority ladder is a hardcoded const and could be made configurable if you prefer.
All reactions