Skip to content

release: v0.12.343 — image edits default to gpt-image-2; GPT Image 1 removed - #727

Open
VickyXAI wants to merge 2 commits into
mainfrom
fix/gpt-image-1-retire-default
Open

VickyXAI wants to merge 2 commits into
mainfrom
fix/gpt-image-1-retire-default

Conversation

@VickyXAI

@VickyXAI VickyXAI commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Implements the ClawRouter row of §5 of blockrun spec specs/2026-12-04-gpt-image-1-retire.md (owner-approved 2026-12-04, D5: clients ship before the gateways retire gpt-image-1).

Merge order: after #725 (v0.12.342). This PR bumps to 0.12.343; if #725 lands first, rebase and rebuild dist/ (conflicts are only CHANGELOG top, version lines and dist). Do not merge this ahead of #725, or 0.12.342 would follow 0.12.343.

Why

GPT Image 1's provider shut it down on 2026-10-23. Solana retired it on 2026-11-24; Base, Arc and the API-key rail retire it next with 400 model_retired before payment. ClawRouter still sent it as the default for every unpinned edit off Solana, so those edits would start failing the moment the gateways retire it.

Changes

  • DEFAULT_IMAGE_EDIT_MODEL = "openai/gpt-image-2" replaces defaultImageEditModel(apiBase) (and its isSameGateway helper). Used by /v1/images/image2image, the image_edit tool and /img2img.
  • gpt-image → openai/gpt-image-2 in MODEL_ALIASES, IMAGE_MODEL_ALIASES and the /img2img table. The gpt-image-1 alias is removed, not redirected: a request naming it reaches the gateway as typed and gets model_retired (no charge), instead of silently getting another model.
  • openai/gpt-image-1 removed from IMAGE_PRICING and the OpenClaw image picker; image tool now says 15 models; image_edit floor price $0.05 (nano-banana, nano-banana-2-lite).
  • /cr-imagegen and /img2img help, partners/registry.ts, README, docs/image-generation.md, skills/imagegen/SKILL.md, skills/clawrouter/SKILL.md, scripts/reinstall.sh updated.
  • Tests: default-model test rewritten; new test that gpt-image-1 is not offered, priced or aliased; sample bodies moved to gpt-image-2. The parity test against brand-numbers.json (still 16 until Base deploys) allows for this one id and fails on purpose once a refresh brings models.image to 15, so the allowance gets removed then.
  • Release commit: CHANGELOG v0.12.343, version in package.json / package-lock / desktop runtime.ts, rebuilt dist.

Checks

  • npm run typecheck, npm run lint, prettier --check ., sync-brand-numbers.mjs --check: clean.
  • npm test: 1602 passed, 1 skipped. src/index.lifecycle.test.ts (2 tests) and src/index.plugin-id-migration.test.ts (1 test) are flaky on this machine: they failed on some runs here and also failed on unmodified origin/main in isolation; they pass on rerun.

Left alone

  • CHANGELOG history entries that mention gpt-image-1.
  • README br:models.image markers stay at 16 (brand-synced; they move when blockrun.ai publishes 15).
  • The bundled @blockrun/model-catalog snapshot in dist/ still lists gpt-image-1; that is the model-catalog package's follow-up.

Summary by CodeRabbit

  • New Features

    • Image editing now defaults to GPT Image 2 across gateways. The gpt-image shorthand also routes to GPT Image 2.
    • Sunburst and GPT Image 2.6 Sunburst are included in the documented image-editing options.
  • Changes

    • GPT Image 1 is retired and no longer offered; requests naming it are refused before payment.
    • The minimum image-edit price is now $0.05.

1bcMax added 2 commits December 4, 2026 16:43
gpt-image-1's provider shut it down on 2026-10-23. sol.blockrun.ai retired
it on 2026-11-24, and Base, Arc and the API-key rail retire it next with a
400 `model_retired` before payment (blockrun spec
2026-12-04-gpt-image-1-retire, D5: clients ship first). ClawRouter still
sent it by default for every unpinned edit off Solana.

- DEFAULT_IMAGE_EDIT_MODEL replaces defaultImageEditModel(apiBase): every
  gateway now gets openai/gpt-image-2, the cheapest edit model that takes
  a mask. The per-gateway switch (and isSameGateway) is gone with it.
- `gpt-image` now means openai/gpt-image-2 in all three alias tables
  (MODEL_ALIASES, IMAGE_MODEL_ALIASES, /img2img). The `gpt-image-1`
  shorthand is removed rather than redirected: a silent swap would sell
  another model under the old name, so the id reaches the gateway as typed
  and the caller gets its model_retired answer.
- openai/gpt-image-1 leaves IMAGE_PRICING and the OpenClaw image picker;
  the image tool now lists 15 models. The edit tool's floor price moves
  to $0.05 (nano-banana, nano-banana-2-lite).
- The parity test against brand-numbers.json allows for the one id
  dropped ahead of blockrun's published count and fails, on purpose, once
  a refresh brings models.image to 15, so the allowance gets removed.
- README, docs/image-generation.md, skills/imagegen and skills/clawrouter,
  /cr-imagegen and /img2img help text, reinstall.sh, and tests that used
  gpt-image-1 as a sample model follow.
@coderabbitai

coderabbitai Bot commented Dec 4, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The change removes GPT Image 1 from the image model catalog and its shorthand alias. Image edits now default to GPT Image 2 across gateways. Tests, registry details, release notes, and user-facing guidance reflect the updated model behavior.

Changes: Image model transition

Layer / File(s) Summary
Retire GPT Image 1 and update the model contract
src/index.ts, src/models.ts, src/proxy.ts, src/partners/registry.ts, src/index.image-provider.test.ts
The model list and alias no longer include GPT Image 1. The registry updates the image model count, image-edit default, and minimum price. Tests verify the updated model list, alias, and default.
Use GPT Image 2 in image-edit request paths
src/proxy.ts, src/local-guard.test.ts, src/proxy.cost-cap-paid-paths.test.ts, src/proxy.image-edit-poll.test.ts, src/proxy.img2img-abort.test.ts, test/test-e2e.ts
Image-edit API and /img2img request paths use GPT Image 2 as the default across gateways. Updated tests use GPT Image 2 in image-edit and image-generation requests.
Update release notes and image-generation guidance
CHANGELOG.md, README.md, docs/image-generation.md, scripts/reinstall.sh, skills/*/SKILL.md, package.json, apps/desktop/electron/core/runtime.ts
The documentation describes GPT Image 2 as the default and GPT Image 1 as retired. The release notes and package version entries identify version 0.12.343.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Possibly related PRs

  • BlockRunAI/ClawRouter#711: Introduced gateway-dependent image-edit defaults and GPT Image 2.6 shorthand behavior that this change updates.

Suggested reviewers: ubounty-app

Merge Risk: Minimal · up to 74cf4 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the release (v0.12.343) and the two main changes: image edits now default to gpt-image-2, and GPT Image 1 is removed. The raw summary and objectives confirm both. The title does not me…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the release (v0.12.343) and the two main changes: image edits now default to gpt-image-2, and GPT Image 1 is removed. The raw summary and objectives confirm both. The title does not mention the price floor change or the docs and test updates, but it does not need to cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between f6f4209 and 74cf410.

Files ignored due to path filters: 7

  • dist/cli.js is excluded by !**/dist/**
  • dist/cli.js.map is excluded by !**/dist/**, !**/*.map
  • dist/index.d.ts is excluded by !**/dist/**
  • dist/index.js is excluded by !**/dist/**
  • dist/index.js.map is excluded by !**/dist/**, !**/*.map
  • dist/metafile-esm.json is excluded by !**/dist/**
  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 18

  • CHANGELOG.md
  • README.md
  • apps/desktop/electron/core/runtime.ts
  • docs/image-generation.md
  • package.json
  • scripts/reinstall.sh
  • skills/clawrouter/SKILL.md
  • skills/imagegen/SKILL.md
  • src/index.image-provider.test.ts
  • src/index.ts
  • src/local-guard.test.ts
  • src/models.ts
  • src/partners/registry.ts
  • src/proxy.cost-cap-paid-paths.test.ts
  • src/proxy.image-edit-poll.test.ts
  • src/proxy.img2img-abort.test.ts
  • src/proxy.ts
  • test/test-e2e.ts
Files with no reviewable changes: 1

  • scripts/reinstall.sh

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

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