Commit Graph
2 Commits
Author SHA1 Message Date
yetone e0a7664b53 image: GPT Image 2.6's complexity and 2.5's quality xhigh/max go through
StarBits on X asked whether magpie draws with the newest GPT Image
(v0.1.3055/3056). This follows it: the images API and both image MCPs
take GPT Image 2.6's `complexity` (low, medium, high) and pass it on, and
the tools' quality text names xhigh and max (GPT Image 2.5 and later).

- draw.go: complexity is read from JSON and form bodies (drawingRead) and
  sent, as given, to an images API that takes OpenAI's fields:
  generations (JSON and form) and multipart edits. Not sent to a
  ChatGPT (Codex) account, Copilot, OpenRouter, WorkBuddy, Grok or
  Volcengine. Volcengine used to get an unread complexity through Extra;
  it is now read, so it no longer goes there.
- A ChatGPT account's image backend ignores it. Tried with a real
  account today: complexity none, low and a bogus value drew alike, and
  quality high, xhigh and max all came back quality "low" at the same
  size and tokens. So its request stays the one Codex CLI sends.
- image_mcp.go, imagemcp.go: a `complexity` argument, forwarded; quality
  text lists xhigh and max.

Run on mote at this tree (rebased on origin/main e8df78f33):
- New: TestDrawComplexityAndQualityReachTheVendor (JSON, form, edit,
  none given = none sent), TestCodexDrawSendsNoComplexity; Copilot's
  test and both MCP tests now pass complexity and check it.
- Broken by hand: with the three code files at HEAD, the new test, the
  gateway MCP test and imagemcp's TestGenerateTakesTheModel go red; with
  complexity sent to Codex too, TestCodexDrawSendsNoComplexity goes red.
- Full suite at 11df525f0 + this change (go vet on darwin, linux nogui
  and windows, the three builds, go test -timeout 45m ./...): 85
  packages ok; internal/gui red only on TestMainWindowCorners (#3949,
  macOS 27), internal/provider red only on TestRenewLoginsKeepsClaudeReading
  (#5481, a fixed date, fixed in the next commit).
- Rebased on c6b7bbedf (3 commits, none in gateway or imagemcp): vet on
  all three OSes and the builds ok, internal/gateway (-timeout 45m),
  internal/imagemcp and internal/provider ok.

Not tried: a real OpenAI key drawing with complexity or quality xhigh/max
(no key with GPT Image 2.5/2.6 here).
2026-11-06 18:47:24 +08:00
yetone 68c43bba65 copilot: a Copilot account draws with the image models its /models lists
Copilot CLI draws with an image model (GPT Image 2.5 Flare) at the API
base's /images/generations and /images/edits, OpenAI-shaped. copilotModels
kept chat models only, so such a model was never seen. It is now saved as a
drawer (Draws, so agents' chat lists still leave it out), found by the
entry's capabilities.type or, for an unknown type, by an id that names
images. The gateway lists them in DrawersOf and sends generation as Copilot
CLI does: model, prompt, size, quality (and n).

Run: gofmt; go vet (host, GOOS=linux -tags nogui, GOOS=windows) for
provider, gateway, catalog; go test of the same three packages, all ok, on
mote. New TestCopilotDrawsItsImageModel uses a fake Copilot API.
Broken by hand: copilotDrawsModel returning false turns it red.
Not tried: a real Copilot account. The model's real id, its /models type
value, n and the edits shape on Copilot's side are unconfirmed.
2026-11-04 10:04:53 +08:00