Skip to content

fix(images): use standalone Images requests for ChatGPT subscriptions - #3741

Merged
kev1n77 merged 1 commit into
openBitFun:mainfrom
kev1n77:codex/chatgpt-standalone-images
Nov 5, 2026
Merged

kev1n77 merged 1 commit into
openBitFun:mainfrom
kev1n77:codex/chatgpt-standalone-images

Conversation

@kev1n77

@kev1n77 kev1n77 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

ChatGPT subscription image generation currently starts a secondary chat completion and asks it to call an image tool. Send a standalone Images JSON request instead, so generation no longer depends on chat-model discovery or orchestration.

The subscription route uses /images/generations with the desktop-capture defaults (gpt-image-2, quality: auto, size: auto, opaque background). Explicit image parameters and supported output formats are preserved. JSON image responses and provider errors use the existing image transport and decoding path.

Type and Areas

Type: Bug fix / protocol compatibility

Areas: AI adapters, image-generation tool results, configuration contracts, model settings, locales, focused tests

Motivation / Impact

  • Reuse the existing in-app subscription login directly for image generation.
  • Adapt saved /responses URLs in memory without rewriting stored services, deleting credentials, or reinterpreting legacy chat-model names as image-model IDs. Keep the chatgpt_codex serialized dialect value.
  • Report the requested image model in tool results and update settings endpoint descriptions and localized guidance.
  • Extend the opt-in live probe with output-file, prompt, and format options.

Verification

Focused checks completed during implementation:

  • cargo test --locked -p openbitfun-ai-adapters --features image-generation,subscription-auth --lib client::image_generation::tests — 24 passed; the billed live probe is ignored by default.
  • cargo test --locked -p openbitfun-core --no-default-features --features agent-runtime,git,tools-image-generation --lib agentic::tools::implementations::generate_image_tool::tests — 8 passed.
  • cargo test --locked -p openbitfun-core-types --lib ai::image_dialect_compatibility — 1 passed.
  • pnpm --dir src/web-ui run test:run src/infrastructure/config/components/image-generation/imageDialects.test.ts src/infrastructure/config/components/image-generation/imageModels.test.ts src/infrastructure/config/components/image-generation/ImageGenerationSettings.test.tsx — 47 passed after rebasing onto upstream main.
  • pnpm run i18n:audit — passed after rebase, zero warnings.
  • pnpm run type-check:web — passed after rebase.
  • git diff --check upstream/main...HEAD — passed.

The post-rebase adapter repeat could not acquire the shared Cargo build lock and was stopped while another workspace build continued. The 24 passing adapter tests above were run before rebase; the adapter source, its Cargo manifest, and Cargo.lock are unchanged by the rebase.

Live provider validation used an existing in-app login and the production adapter: a standalone subscription request returned a valid 1254×1254 PNG in approximately 22.5 seconds. A separate GIF request was explicitly rejected with GIF output is not enabled for this request. GIF parameter forwarding is covered, but live GIF availability is not claimed.

Local repository-wide checks have unrelated blockers:

  • pnpm run check:web: stale MiniApp chat-styles.css projection; the projection check still fails after rebase.
  • node scripts/check-core-boundaries.mjs: EACCES while reading the extension-host node_modules/.bin/download-msgpackr-prebuilds entry.

Reviewer Notes

The model identifier is the requested ID, not a provider-reported effective backend model. No persisted shape, credentials, host commands, or remote protocol requirements are added. Live validation was local to the adapter; GUI, SSH workspaces, Remote Connect, Peer Device Mode, and Detached Dispatch were not exercised. Broader builds and platform validation are left to CI.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

@kev1n77
kev1n77 merged commit 64fb4a1 into openBitFun:main Nov 5, 2026
13 checks passed
@kev1n77
kev1n77 deleted the codex/chatgpt-standalone-images branch November 9, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant