Repository navigation
Description
Context
brain image defaults to gpt-image-2.5-sunburst (POLICY_PREFERENCE, packages/module-images/src/evidence.ts:56) and lists only the 2.5 pair (MODELS, packages/module-images/src/providers/openai.ts:67-80). When --quality is absent it sends no quality (packages/module-images/src/providers/openai.ts:263-271), so the API resolves auto per image, and a dry run cannot price it (packages/module-images/src/cli.ts:313-316). There is no way to set GPT Image 2.6's complexity.
The upstream facts are in #3781 and were checked 2026-11-09. The 2.6 IDs are gpt-image-2.6-sunburst and gpt-image-2.6-flare. They share the 2.5 token rates, size rules, transparency and masks. Whether they accept the xhigh and max quality tiers is not verified (next paragraph); low, medium and high are documented for every GPT image model. complexity takes low|medium|high, defaults to high and costs nothing extra. The guide's output-token calculator covers 2.6 and 2.5 alike.
Quality tiers on 2.6 (checked 2026-11-10, OpenAI's public docs, no paid request). The sources disagree:
- The API reference for image generation describes
quality: "high,mediumandloware supported for the GPT image models", and "gpt-image-2.5-sunburstandgpt-image-2.5-flare, including their2026-09-08snapshots, also supportxhighandmax." The 2.6 models are in itsmodellist but not in this description. - The image generation guide's size and quality section says "
gpt-image-2.5-sunburstandgpt-image-2.5-flareaddxhighandmaxquality settings". Its "Calculating costs" section says "For GPT Image 2.6 and 2.5 Sunburst and Flare, the quality options arelow,medium,high,xhigh, andmax." - The 2.6 Sunburst and 2.6 Flare model pages list no quality tiers.
Only the cost calculator puts xhigh/max on 2.6, and the request reference does not, so this brief treats them as unverified. The max default therefore falls back to the highest tier OpenAI accepts (Scope). high is the highest tier every source documents for 2.6.
Maintainer ruling (2026-11-09): switch to 2.6, and default to the highest quality and highest complexity unless the request says otherwise.
Scope
- Add
gpt-image-2.6-sunburst(the new default) andgpt-image-2.6-flare(by name) with their documented capabilities and token rates. Keep both 2.5 models selectable by--model/preferredModels, after the 2.6 pair in the default order. - Add
--complexity low|medium|highand validate it before routing, like--quality. - On OpenAI, a request without
--qualitysendsquality: "max", and a request without--complexitysendscomplexity: "high", on generations and edits alike. An explicit value, including--quality auto, is sent as given. - Send
complexityonly to models that document it (the 2.6 pair). An explicit--complexityon a model that does not take it (2.5, Gemini) is refused before any provider call, naming the models that take it. maxon 2.6 is unverified (Context), so the default has a fallback. When--qualitywas not given and OpenAI answers 400 with an error whoseparamisquality, send the same request again one tier lower,maxthenxhighthenhigh, and surface the provider error ifhighis also refused. This applies to generations and edits and to the 2.5 pair alike.readError(packages/module-images/src/providers/openai.ts:166-211) does not readerror.paramtoday and has to. Any other 400, any other status, and an explicit--quality(includingmax) are never retried with another tier. When a fallback happened, the result'snotenames the tier used, and the reported cost or estimate uses that tier. Nothing is cached or persisted between invocations.- A dry run prices the defaulted quality the same way it prices an explicit one (
estimateOpenAiOutputCost), somaxand a size or aspect give an estimate. - Update
brain image --help, the README, theimage-genskill, the changeset, and the retired-model migration message, which should now point at 2.6. - Add Epic: image generation runs on GPT Image 2.6 and uses its complexity, GIF, SVG and markup features #3781 to the
Modulestrack inscripts/sync-project.ts.
Out of scope
GIF, SVG and markup output (sibling tasks). Retiring the 2.5 pair. Resolution-bucket validation (#1822, a separate open task touching the same files). Gemini quality settings. Streaming. Re-ranking against the arenas: no 2.6 measurement is encoded, so the default remains a maintainer decision.
Acceptance criteria
- With an OpenAI key and no pins, routing resolves
gpt-image-2.6-sunburst.--model gpt-image-2.6-flare,--model gpt-image-2.5-sunburstand--model gpt-image-2.5-flareeach resolve to themselves. - Offline fetch stubs show that a generation without
--quality/--complexitysends"quality":"max"and"complexity":"high"to the 2.6 models. The multipart edit carries the same fields. An explicit--quality low --complexity mediumis sent unchanged. - A 2.5 model receives
quality: "max"by default but never acomplexityfield.--complexitywith a 2.5 or Gemini model refuses with zero fetch calls. An invalid--complexityvalue refuses before routing. - Quality fallback: with
--qualityabsent, an offline stub that answers 400{"error":{"param":"quality",...}}tomaxmakes the provider resend withxhigh, thenhigh. The stubbed JSON and multipart bodies show that order, at most three fetch calls happen, and the result'snotenames the tier used. A 400 on anotherparam, a non-400 error and an explicit--quality maxthat gets the same 400 each make exactly one fetch call and surface the provider error. Removing the fallback, or letting it apply to an explicit--quality, makes a named test fail. -
brain image --dry-run --aspect 1:1on the default route reports a non-null estimate formaxquality, computed from the documented calculator. -
brain image modelslists the 2.6 pair first, and the retired-model message names the 2.6 replacements. - Help, README, skill and changeset describe the new default, the defaults for quality and complexity, and the cost consequence of defaulting to
max. - Each behaviour test fails on the current tree for the stated reason, and a restored mutation of the default and the complexity guard shows that the guard is effective.
Verification
bun run test packages/module-images
bun run typecheck
bun run lint
bun run check:pr --base origin/mainKeyless and offline only, with stubbed fetch and no network. No paid request is made.
Contract impact
The --json envelopes are unchanged. brain image CLI flags and its default model are not in the integration contract index (#586 shipped the same kind of change without one). The new flag and defaults are additive behaviour, so this ships as a minor changeset for @schlessera/brain-module-images. The changeset states that the default output now costs more (max quality) and that the default steps down to xhigh or high when OpenAI refuses max for a model.
Updated 2026-11-10: the quality fallback (Scope, Acceptance criteria) was added after #3786 was opened. #3786 does not implement it, so it needs that change and its failing-first and mutation receipts before it merges. "No code changes remain" above no longer holds.
Activity
schlessera commentedon Nov 9, 2026
Claimed (claim-3782-31219). Branch:
feat/imagegen-gpt-image-2-6. Collision check over the cited module-images sources found closure-level overlap only (sharedtests/unit-test-consumers.test.ts,packages/module-images/tests/module.test.tsvia #3393/#3458); no open PR edits these sources. #1822 touches the same files and stays separate.schlessera commentedon Nov 9, 2026
Status (2026-11-09): implementation complete in #3786, merge paused.
d09e0ed4978963718dbcc51eaec77fd829315880) implements every acceptance criterion. Local preflight passed. The failing-first and mutation receipts are in the PR body.To resume: merge current
maininto the branch (no conflicts are expected outsidepackages/module-images), push, then runbun scripts/integrate.ts confirm 3786 --issues schlessera/brain-kit#3782. No code changes remain.Releasing my assignment so the PR can be landed by whoever resumes.
schlessera commentedon Nov 10, 2026
2026-11-10 triage at main
d79eeed0a: I checked again whether GPT Image 2.6 acceptsxhighandmax, using OpenAI's public docs and no paid request. It is still not confirmed. The API reference'squalitydescription names only the 2.5 pair forxhigh/max, and the guide's size and quality section does too. Both 2.6 model pages list no tiers. One new data point: the guide's "Calculating costs" section says "For GPT Image 2.6 and 2.5 Sunburst and Flare, the quality options arelow,medium,high,xhigh, andmax." The sources still disagree. Quotes and links are now in Context.So that this is safe to build now, I made these changes to the brief. They follow the 2026-11-09 ruling (highest quality unless the request says otherwise) without depending on the unverified tier:
low..maxtiers.paramisquality, the request steps downmax→xhigh→high. An explicit--qualityis never changed. The result'snotenames the tier used.No product ruling is needed. Labels unchanged (
agent-readykept). The #3781 body is not changed, because the result is still "unverified".feat(module-images): default to GPT Image 2.6 at max quality and high…