Commit Graph
4 Commits
Author SHA1 Message Date
yetone 88b541a25c images: every pointer names Settings › Models › Images, where the page is
The image models moved under Settings › Models, but the Library's Magpie
Image sheet, the MCP server's instructions to agents, the gateway's
"no image model" errors, the video tool's text and the docs still sent
users to "Settings › Images", a tab that no longer exists (the scattered
settings audit after netube99 on X). Every user-facing string now names
Settings › Models › Images in en, zh, zh-TW, ja and de, as do the site's
Qwen docs (en, zh, ja), llms-full.txt, the subsystem pages and comments.

Run in the tree with this change and the rest of the audit's fixes
(mote, base cd0ba05c2):
- go vet ./internal/gui ./internal/gateway ./internal/agent
  ./internal/provider ./internal/settingsapi: ok
- go test -run 'Image|Draw|Video|Hidden|Group|Settings' ./internal/gui
  ./internal/gateway ./internal/settingsapi: ok; ./internal/imagemcp,
  ./internal/library, ./internal/catalog: ok
- GUI: i18n-keys, i18n-en-no-cjk, image-models-hide,
  library-browser-setup: pass in Chromium and WebKit
- gofmt -l: nothing
Not tried: a real agent reading the new MCP instructions (text only).
2026-11-09 21:51:53 +08:00
yetone 2d6939ec64 gateway: Automatic draws with the newest GPT Image, and a ChatGPT account's shows as GPT Image (StarBits on X)
StarBits asked on X whether magpie draws with OpenAI's newest image model,
as the editor showed "gpt-image-2".

- AutoDrawer took the cheapest priced model. An OpenAI key lists
  gpt-image-2.5/2.6 with no price (models.dev prices gpt-image-2 only), so
  Automatic kept an older GPT Image. Now a GPT Image that a newer one set
  up supersedes is never picked (gptImageGenOf: version, then
  base/Sunburst > Flare > mini; dall-e and chatgpt-image-latest under all),
  and an unpriced one is costed as the newest priced one. Another kind of
  model that costs less still wins.
- A ChatGPT (Codex) account's backend ignores the model name (#1865;
  re-checked today with a real account: gpt-image-2, 2.6-sunburst,
  2.5-flare and a bogus id all drew the same 1536x1024 image), so it is
  never superseded, and its chip now reads its name "GPT Image" with the
  id as tooltip (/api/providers drawNames). Unticking still saves the id.
- docs/subsystems/gateway-routing.md says both.

Run (on mote, at this tree):
- go test -tags nogui -run 'AutoDrawer|GPTImageGen|Codex.*Image|ImageGen|Drawer|Draw'
  ./internal/gateway ./internal/gui: ok
- GUI: chatgpt-image-chip (new), image-models-hide, video-models-hide,
  group-pick-drawers, chromium + webkit, en/zh/zh-TW/ja/de, 1000 and
  360px: 100 pass, 0 fail
- gofmt -l: clean
- Full go test ./... -timeout 45m and Linux/Windows vet: running; record
  follows in the next commit or a comment.

Broken by hand: without the supersede filter TestAutoDrawerTakesNewestGPTImage
picks oa/dall-e-3; without the ChatGPT exclusion TestAutoDrawerKeepsChatGPTsOwnPick
picks oa/gpt-image-2.6-sunburst; with the chip label reverted the GUI test
is red.

Not tried: a real OpenAI key's live model list in the app.
2026-11-05 19:56:08 +08:00
yetone 7c5c90f958 provider: a ChatGPT account's GPT Image is tested by drawing, as the gateway draws it (ChangQiu on Discord)
ChangQiu added gpt-image-2.5 to a ChatGPT (Codex) subscription, and the
editor's Test failed. The Test asked every model as a chat on the Codex
backend's /responses, and that endpoint refuses an image model: 400
model_not_found, "The 'gpt-image-2.5' model is not supported when using
Codex with a ChatGPT account" (a real call). Drawing through the gateway
already worked: drawsFamily lets any gpt-image-* draw on
/backend-api/codex/images/generations.

What the vendor's own clients send:
- Codex CLI (codex-rs ext/image-generation tool.rs) names one model,
  IMAGE_MODEL = "gpt-image-2".
- CLIProxyAPI (executor/codex_openai_images.go) passes gpt-image-1.5 to
  2.6 and their -flare/-sunburst variants straight into the same
  /images/generations JSON. magpie sends the same shape.
- Real calls with one account: gpt-image-2.5, gpt-image-2 and the made-up
  gpt-image-9.9-nope each answered 200 with the same thing: 1536x1024, 12
  input / 343 output tokens, x-codex-active-limit imagegen_premium. The
  backend picks the model itself (#1865), so the list keeps one GPT Image.

Changes:
- provider.testOne: a ChatGPT account's gpt-image-* is tested on
  {codex base}/images/generations with a tiny drawing. probeOnce adds
  Codex's image headers (Accept json, x-codex-imagegen-request-id,
  x-codex-image-turn-id), as gateway sendWith does.
- The editor's Image models row, for a provider whose vendor picks the
  drawer (gateway.VendorPicksDrawer, new providerInfo.drawPicks), says
  why only one GPT Image is listed. It reuses an existing string, so
  there are no new keys. After the rebase onto 51bdc985b the core was
  44 bytes over its 1,533,802 budget. renderDrawers' comment line was
  dropped to fit, and the budget is not raised.

Run (mote):
- go vet, GOOS=linux go vet -tags nogui and GOOS=windows go vet, on
  internal/provider and internal/gui; gofmt -l is clean.
- go test -run of TestChatGPTAccountTestsGPTImageByDrawing (at this head),
  TestCoreScriptBudget, TestImageGenCodexOneEntry and
  TestProviderInfoListsImageModels: ok.
- node --test of image-models-hide, video-models-hide and i18n-keys: 77
  of 78. The red is i18n-keys "a plugin's words are its own" (routing's
  "No session ID", usage's "View routing"). It is red the same on a
  fresh origin/main 51bdc985b and filed as #5327/#5332.

Real account: a small main built on mote, run here under a sandbox
HOME holding a copy of ~/.codex/auth.json (the access token had 166h
left, so no refresh). provider.Find("codex").TestModels: gpt-image-2.5
ok 200 in 8.8s, gpt-image-2 ok 200 in 10.4s. The copy matched the live
auth.json byte for byte afterwards.

Broken by hand: with the old test.go, the new test goes red. Its
requests went to /responses with Accept text/event-stream.

Not tried: the editor's Test clicked in the GUI app, and Windows or
Linux runs of the Test. A Copilot account's image models likely have
the same Test gap; that is filed as #5377, not changed here.
2026-11-05 18:31:22 +08:00
yetone 3cd55f6547 images: a ChatGPT account lists one GPT Image, said to be ChatGPT's pick (#1865)
Settings › Models › Image generation offered "GPT Image 2 · Codex" and
"GPT Image 2.5 · Codex". chatgpt.com/backend-api/codex/images/generations
ignores the model (and size): tested with the owner's Pro account, it
answers gpt-image-2, gpt-image-2.5, gpt-image-2.5-sunburst and a made-up
"x" with 200 and the same image (#1865 comment 6131731318), as 3a18ec8e
already suspected. The picker implied a choice that doesn't exist.

What changed:
- gateway: codexDrawers is one entry, gpt-image-2 named "GPT Image" (what
  Codex CLI asks for). VendorPicksDrawer(p) marks a ChatGPT account.
  ListedDrawer(ref) maps any gpt-image-* picked on a ChatGPT account
  (a saved codex/gpt-image-2.5) to that entry, for display only.
  drawsFamily still lets a named or saved gpt-image-2.5 draw there.
- gui: /api/settings sends imageGenShown when the saved ImageGen stands
  for another listed entry, and vendorPicks on the ChatGPT entry. The row
  shows and ticks the entry, picking it again saves nothing (the saved
  value is never rewritten), its option note and a line under the row say
  ChatGPT's image backend picks the model itself. en/zh/zh-TW/ja/de.
- Aside: magpie/codex/gpt-image-2.5, picked when it was offered, is still
  taken as an image model (asideImageOffered maps it via ListedDrawer).
- An API key's gpt-image-2.5 (OpenAI, relays) is listed and drawn as
  before: there the model field matters.

Checked: no doc, site page, MCP tool description or CLI lists these ids.
The remote-magpie list (drawerObjects) follows Drawers and now lists one.

Run, at this head:
- New tests failing on the old code: TestCodexListsOneGPTImage ("codex
  lists [gpt-image-2 gpt-image-2.5], want only gpt-image-2") and
  TestCodexAccountDraws with the old codexDrawers;
  TestAsideCodexOneGPTImage ("magpie/codex/gpt-image-2.5 not offered")
  without the aside mapping; TestImageGenCodexOneEntry ("shown \"\"")
  without the api.go wiring; images-codex-one.test.cjs with the old
  app.js (button "codex/gpt-image-2.5", not "GPT Image · Codex").
- go test -tags nogui ./internal/gateway ./internal/gui ./internal/agent
  ./internal/catalog ./internal/provider under a sandbox HOME: ok.
- gofmt -l (empty), go vet ./..., GOOS=linux go vet -tags nogui ./...,
  GOOS=windows go vet ./..., go build, GOOS=linux go build -tags nogui,
  GOOS=windows go build: clean.
- Playwright (1.62.0), chromium and webkit: images-codex-one (en, zh,
  zh-TW, ja, de at 1000px; en, zh at 360px), images-missing, vision-mcp,
  searcher-pick, routing-vision-why, i18n-keys: all pass.
Not run: the full go test ./... and the whole GUI suite; no new request
was made to chatgpt.com (the backend's behaviour is the #1865 test).
2026-10-13 04:27:40 +08:00