fix(google): use stable Gemini image model#93388
Conversation
|
Codex review: needs changes before merge. Reviewed July 9, 2026, 2:59 PM ET / 18:59 UTC. Summary PR surface: Source +22, Tests +38, Docs +1. Total +61 across 26 files. Reproducibility: yes. for source-level review. PR head maps the legacy Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the stable Google Flash default and stable Pro catalog entries, preserve legacy Pro selections as stable Pro, and either route stable OpenRouter Gemini IDs through Do we have a high-confidence way to reproduce the issue? Yes for source-level review. PR head maps the legacy Is this the best way to solve the issue? No as currently implemented. The provider default and doctor migration layers are appropriate, but the patch must preserve Pro intent and align OpenRouter stable IDs with the Images API route or defer that surface. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8656c3b357f6. Label changesLabel justifications:
Evidence reviewedPR surface: Source +22, Tests +38, Docs +1. Total +61 across 26 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (3 earlier review cycles)
|
|
@clawsweeper re-review Updated at
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
Google's preview Gemini image IDs and legacy Imagen 4 IDs are being retired, but OpenClaw still advertised preview/retired IDs across the Google/OpenRouter image-generation defaults and compatibility migration paths. This keeps stable Flash as the default while preserving explicit Pro selections by mapping Pro preview configs and provider catalogs to the stable Pro image IDs. - switch Google and OpenRouter image-generation provider defaults to gemini-3.1-flash-image - preserve stable Pro image models in Google/OpenRouter provider catalogs and lightweight metadata - migrate Flash preview/Imagen refs to stable Flash, while migrating Pro preview refs to stable Pro - update image-generation docs, provider/tool tests, and doctor migration coverage Rebased onto latest main to resolve merge conflicts.
c4ba453 to
bb5b7bd
Compare
|
Rebased onto latest Real behavior proof (post-rebase)
Output confirms Google/OpenRouter still expose stable Flash defaults plus the stable Pro entry, no retired preview/Imagen IDs: No functional changes from the prior revision - this is purely a rebase to resolve the reported merge conflict, reapplying the same model-id fixes onto current |
|
This pull request has been automatically marked as stale due to inactivity. |
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(google): use stable Gemini image model This is item 1/1 in the current shard. Shard 1/4. This placeholder means the worker is alive and reading the current context. I will edit this same comment with the actual review when the claws are done clicking. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
Google's preview Gemini image IDs and legacy Imagen 4 IDs are being retired, but OpenClaw still advertised preview/retired IDs across the Google/OpenRouter image-generation defaults and compatibility migration paths. This keeps stable Flash as the default while preserving explicit Pro selections by mapping Pro preview configs and provider catalogs to the stable Pro image IDs.
Summary
gemini-3.1-flash-imageReal behavior proof
c4ba453f55, using the real source runner and local OpenClaw setup.CI=true node scripts/run-node.mjs infer image providers --json{ "id": "google", "label": "Google", "defaultModel": "gemini-3.1-flash-image", "models": [ "gemini-3.1-flash-image", "gemini-3-pro-image" ] }{ "id": "openrouter", "label": "OpenRouter", "defaultModel": "google/gemini-3.1-flash-image", "models": [ "google/gemini-3.1-flash-image", "google/gemini-3-pro-image", "openai/gpt-5.4-image-2" ] }gemini-3.1-flash-image-preview,gemini-3-pro-image-preview, and Imagen 4 IDs are not advertised in the runtime provider list.node scripts/run-node.mjs infer image providers --jsonattempt failed before execution because stale dist triggered a noninteractive pnpm install prompt. Rerunning withCI=trueallowed the source runner to rebuild and complete the real provider-list command.Verification
node scripts/run-vitest.mjs src/commands/doctor/shared/legacy-config-migrate.test.ts extensions/google/image-generation-provider.test.ts extensions/openrouter/image-generation-provider.test.ts src/image-generation/runtime.test.ts --reporter=verbosenode scripts/run-vitest.mjs src/agents/tools/image-generate-tool.test.ts src/media-generation/runtime-shared.test.ts src/config/plugin-auto-enable.core.test.ts src/plugins/channel-plugin-ids.test.ts --reporter=verbosenode_modules/.bin/oxfmt --check docs/cli/infer.md docs/gateway/config-agents.md docs/help/testing-live.md docs/providers/google.md docs/providers/openrouter.md docs/tools/image-generation.md extensions/google/image-generation-provider.ts extensions/google/image-generation-provider.test.ts extensions/google/index.ts extensions/openrouter/image-generation-provider.ts extensions/openrouter/image-generation-provider.test.ts src/commands/doctor/shared/legacy-config-migrations.runtime.models.ts src/commands/doctor/shared/legacy-config-migrate.test.ts src/agents/tools/image-generate-tool.test.tsgit diff --checkCI=true node scripts/run-node.mjs infer image providers --json