Skip to content

[codex] Add current OpenRouter image models#97505

Open
aditya-vithaldas wants to merge 5 commits into
openclaw:mainfrom
aditya-vithaldas:codex/requested-capability-fix
Open

[codex] Add current OpenRouter image models#97505
aditya-vithaldas wants to merge 5 commits into
openclaw:mainfrom
aditya-vithaldas:codex/requested-capability-fix

Conversation

@aditya-vithaldas

@aditya-vithaldas aditya-vithaldas commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Related #91504.

OpenRouter image generation currently exposes only a small static shortcut list, so users asking for broader OpenRouter image model support do not see current image-output models in OpenClaw's provider metadata or generated model catalog. Current OpenRouter image models are also documented under OpenRouter's dedicated Images API, so exposing them through the old chat-completions path would advertise models that can fail at runtime.

Why This Change Was Made

OpenRouter's public https://openrouter.ai/api/v1/images/models response currently advertises additional image models beyond the existing OpenClaw list, including:

  • google/gemini-3.1-flash-image
  • google/gemini-3-pro-image
  • google/gemini-2.5-flash-image
  • openai/gpt-5-image
  • openai/gpt-5-image-mini
  • microsoft/mai-image-2.5

This PR adds those current model ids to the curated OpenRouter image-generation provider list, routes them through OpenRouter's dedicated /images endpoint, and parses the Images API data[].b64_json response shape. Existing preview/default chat-image model refs remain accepted on the chat-completions path so already configured users are not migrated unexpectedly.

OpenRouter /images supported parameters are model-specific, so this PR also gates the new models before submission:

  • Gemini and Microsoft /images models request one output at a time.
  • Microsoft receives only supported aspect-ratio/reference-image fields and rejects unsupported resolution requests clearly.
  • OpenAI image models reject explicit unsupported Gemini-style aspectRatio/resolution requests instead of silently dropping them.
  • Tool-inferred edit resolution is marked as inferred so OpenRouter can ignore unsupported inferred hints without breaking OpenAI/Microsoft reference-image edits.
  • Legacy/default chat-image models keep their previous 5-reference-image guard while current /images models can use the shared tool cap of 10 when supported.

This intentionally remains a curated-list update, not dynamic catalog discovery; the broader catalog policy can still be considered separately.

User Impact

Users can now discover and configure more current OpenRouter image models for the image_generate tool without relying on undocumented override strings. The linked issue's microsoft/mai-image-2.5 example is included. Unsupported model-specific count, geometry, or reference-image requests fail locally with clear errors instead of being sent to OpenRouter and rejected later.

Existing OpenRouter image configs continue to work because the previous preview ids remain in the list and the default is unchanged.

Evidence

  • OpenRouter docs: current image generation uses POST /api/v1/images and returns image data through data[].b64_json: https://openrouter.ai/docs/guides/overview/multimodal/image-generation
  • Queried OpenRouter's live https://openrouter.ai/api/v1/images/models endpoint on 2026-06-28 and confirmed the six added ids are present. Live capability proof showed model-specific n, aspect_ratio, resolution, and input_references support, including Microsoft n.max=1, Microsoft no resolution, OpenAI no aspect_ratio/resolution, and Gemini/Microsoft/OpenAI different reference limits.
  • Built the local CLI runtime with bundled Node: /Users/AdityaWork/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node scripts/build-all.mjs cliStartup.
  • Runtime provider-list proof: /Users/AdityaWork/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node openclaw.mjs capability image providers --json | jq '.[] | select(.id == "openrouter") | {id, defaultModel, models, generate: .capabilities.generate, edit: .capabilities.edit, geometry: .capabilities.geometry}' showed OpenRouter exposing all six added ids, defaultModel: google/gemini-3.1-flash-image-preview, generate.maxCount: 4, edit.maxInputImages: 10, aspect ratios including 1:4, 1:8, 4:1, 8:1, and resolutions 1K, 2K, 4K.
  • Redacted no-paid runtime generation proof using the compiled OpenRouter provider and a local HTTP fixture with explicit test SSRF allowance: provider.generateImage({ model: "google/gemini-3.1-flash-image", count: 1, aspectRatio: "1:4", resolution: "1K" }) posted to /api/v1/images with authorization redacted, body { model: "google/gemini-3.1-flash-image", n: 1, aspect_ratio: "1:4", resolution: "1K" }, parsed an Images API-style { data: [{ b64_json, media_type: "image/png" }] } response, and returned one image/png asset (image-1.png, 68 bytes). This exercises the compiled provider endpoint/body/response path without making a paid live OpenRouter generation request.
  • node scripts/run-vitest.mjs extensions/openrouter/image-generation-provider.test.ts src/image-generation/runtime.test.ts src/agents/tools/image-generate-tool.test.ts
  • node node_modules/oxfmt/bin/oxfmt --check --threads=1 extensions/openrouter/image-generation-provider.ts extensions/openrouter/image-generation-provider.test.ts docs/providers/openrouter.md docs/tools/image-generation.md src/image-generation/types.ts src/image-generation/runtime-types.ts src/image-generation/runtime.ts src/agents/tools/image-generate-tool.ts
  • git diff --check
  • corepack pnpm docs:list
  • .agents/skills/autoreview/scripts/autoreview --mode local --codex-bin /tmp/codex-fast-wrapper -> clean, no accepted/actionable findings after per-model caps, docs alignment, runtime resolutionInferred plumbing, and legacy chat-image reference guard.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: openrouter size: XS labels Jun 28, 2026
@clawsweeper

clawsweeper Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 6, 2026, 7:01 AM ET / 11:01 UTC.

Summary
The PR adds six curated OpenRouter image model IDs, routes those dedicated models through OpenRouter's /images API, adds model-specific capability validation, threads inferred edit resolution through the image runtime, and updates docs/tests.

PR surface: Source +390, Tests +363, Docs +32. Total +785 across 11 files.

Reproducibility: yes. for the source-level feature gap: current main exposes only three static OpenRouter image model shortcuts, while the official OpenRouter Images model endpoint includes the requested IDs. This is feature validation rather than a broken-behavior repro, and I did not run a paid generation call.

Review metrics: 2 noteworthy metrics.

  • OpenRouter model-routing surface: 6 model IDs added; 1 dedicated /images route added; legacy chat route retained. The provider will make different endpoint and capability decisions for user-selected OpenRouter image models.
  • Image-generation contract surface: 2 optional fields added; 2 mode types exported. Optional provider capability/request fields affect bundled and third-party image-generation provider contracts even when backward compatible.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #91504
Summary: This PR is a candidate implementation for the open OpenRouter image-model feature request; the stable-Gemini PR partially overlaps model/default policy but does not replace this broader OpenRouter Images API work.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦐 gold shrimp
Proof: 🐚 platinum hermit
Patch quality: 🦐 gold shrimp
Result: needs maintainer review before merge.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • Rebase onto current main and preserve the current image capability helper behavior.
  • Get maintainer acceptance for curated OpenRouter /images routing versus deferring to the broader catalog policy.

Risk before merge

  • [P1] Existing users who manually configured current OpenRouter image IDs may see those IDs move from an attempted chat-completions path to the dedicated /images endpoint after upgrade; that is likely correct but compatibility-sensitive.
  • [P1] The branch is currently conflicting with main and must be rebased carefully so current-main image capability helpers and model-limit validation are preserved.
  • [P1] The open stable-Gemini PR overlaps OpenRouter Gemini model/default policy, so whichever PR lands second needs a focused rebase and review.
  • [P1] No paid live OpenRouter generation was run; the proof covers live catalog, OpenClaw provider listing, and compiled provider request/response shape.

Maintainer options:

  1. Rebase And Accept Curated Routing (recommended)
    Before merge, rebase onto current main, preserve current image capability helpers, and have maintainers explicitly accept the /images routing behavior for the added OpenRouter IDs.
  2. Narrow To Proven IDs
    Maintainers can reduce the curated list to the model IDs and caps they are ready to support now, leaving broader discovery to the linked catalog issue.
  3. Pause Behind Catalog Policy
    If curated OpenRouter image support is not the desired long-term policy, pause or close this PR and keep the linked issue as the canonical product decision.

Next step before merge

  • [P2] Manual review is needed because the branch is currently conflicting and the remaining blocker is provider policy/compatibility acceptance, not a narrow automated repair.

Maintainer decision needed

  • Question: Should OpenClaw accept this curated OpenRouter Images API routing now, or pause the PR behind the broader OpenRouter image catalog policy?
  • Rationale: The PR is more than a mechanical model-list update: it changes provider endpoint routing for current OpenRouter image IDs and adds optional image-generation contract surface, so maintainer intent is needed before merge.
  • Likely owner: steipete — The decision spans provider policy, plugin API compatibility, and image-generation runtime behavior where this person has strong recent adjacent history.
  • Options:
    • Accept After Rebase (recommended): Rebase onto current main, preserve current image capability helpers, and merge the curated /images route with the existing compatibility notes.
    • Narrow The Curated Set: Land only the model IDs and caps maintainers are comfortable owning now, and leave the rest to the broader catalog issue.
    • Pause For Catalog Policy: Keep this PR open or close it in favor of the linked issue if maintainers want dynamic discovery rather than a curated provider table.

Security
Cleared: No concrete security or supply-chain concern was found; the diff changes provider runtime logic, types, docs, and tests without new dependencies, workflows, lockfiles, package metadata, or broader secret access.

Review details

Best possible solution:

Rebase onto current main, preserve the current image capability helper path, and land the provider-local curated /images support only after maintainers accept the endpoint-routing and catalog policy for these OpenRouter IDs.

Do we have a high-confidence way to reproduce the issue?

Yes for the source-level feature gap: current main exposes only three static OpenRouter image model shortcuts, while the official OpenRouter Images model endpoint includes the requested IDs. This is feature validation rather than a broken-behavior repro, and I did not run a paid generation call.

Is this the best way to solve the issue?

Yes, with conditions: a provider-local curated table and /images route is an acceptable bounded solution compared with broad dynamic discovery. It is not merge-ready until rebased onto current main and maintainer intent is clear for the endpoint-routing/catalog policy.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8f2986290d00.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The latest PR evidence includes a live OpenRouter catalog check, OpenClaw runtime provider-list output showing the new models, and compiled provider request/response proof for /images; the missing paid generation call remains a maintainer risk, not a proof-gate blocker here.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The latest PR evidence includes a live OpenRouter catalog check, OpenClaw runtime provider-list output showing the new models, and compiled provider request/response proof for /images; the missing paid generation call remains a maintainer risk, not a proof-gate blocker here.
  • remove rating: 🦪 silver shellfish: Current PR rating is rating: 🦐 gold shrimp, so this older rating label is no longer current.
  • remove status: 🔁 re-review loop: Current PR status label is status: 👀 ready for maintainer look.

Label justifications:

  • P3: This is a low-urgency provider capability improvement, not an urgent regression or broken core workflow.
  • merge-risk: 🚨 compatibility: The PR changes endpoint routing for current OpenRouter image model IDs that users may already have configured manually.
  • merge-risk: 🚨 auth-provider: The diff changes OpenRouter credential-backed image generation model choices, request routing, and provider capability validation.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🐚 platinum hermit and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The latest PR evidence includes a live OpenRouter catalog check, OpenClaw runtime provider-list output showing the new models, and compiled provider request/response proof for /images; the missing paid generation call remains a maintainer risk, not a proof-gate blocker here.
  • proof: sufficient: Contributor real behavior proof is sufficient. The latest PR evidence includes a live OpenRouter catalog check, OpenClaw runtime provider-list output showing the new models, and compiled provider request/response proof for /images; the missing paid generation call remains a maintainer risk, not a proof-gate blocker here.
Evidence reviewed

PR surface:

Source +390, Tests +363, Docs +32. Total +785 across 11 files.

View PR surface stats
Area Files Added Removed Net
Source 7 415 25 +390
Tests 2 366 3 +363
Docs 2 53 21 +32
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 11 834 49 +785

What I checked:

  • Repository policy read: Root and scoped docs/extensions/agent-tool AGENTS.md files were read; their provider-boundary, plugin API, compatibility, proof, and docs consistency guidance affected this review. (AGENTS.md:31, 8f2986290d00)
  • Current main still has the feature gap: Current main's OpenRouter image provider still exposes only the preview default, Gemini Pro preview, and openai/gpt-5.4-image-2, so this PR is not obsolete on main. (extensions/openrouter/image-generation-provider.ts:29, 8f2986290d00)
  • PR head adds the curated OpenRouter image models and per-model caps: The PR head adds the requested OpenRouter image model IDs plus a provider-local capability table for count, reference images, aspect ratios, and resolutions. (extensions/openrouter/image-generation-provider.ts:30, 7cfa599bdc3b)
  • PR head routes dedicated models through /images: The OpenRouter provider keeps legacy chat-image models on /chat/completions and sends dedicated Images API models to ${baseUrl}/images with the Images API body shape. (extensions/openrouter/image-generation-provider.ts:549, 7cfa599bdc3b)
  • Official OpenRouter live catalog checked: The unauthenticated OpenRouter Images models endpoint returned 39 models and included all six IDs added by the PR, with model-specific supported-parameter shapes.
  • Current head is not mergeable without a rebase: Live GitHub reports head 7cfa599b against base b5e91790 as mergeable: CONFLICTING and mergeStateStatus: DIRTY; current main also has a different src/image-generation/capabilities.ts helper that must be preserved during rebase. (src/image-generation/capabilities.ts:3, 8f2986290d00)

Likely related people:

  • notamicrodose: Authored the merged OpenRouter image-generation provider PR that introduced the provider surface and original static shortcut list this PR extends. (role: feature introducer; confidence: high; commits: 0f026addaab2; files: extensions/openrouter/image-generation-provider.ts, extensions/openrouter/image-generation-provider.test.ts, docs/providers/openrouter.md)
  • steipete: History shows substantial adjacent image-generation runtime and provider-capability work, including Fal Krea model schemas and image runtime docs that share this capability boundary. (role: adjacent feature owner; confidence: high; commits: d503ec52d895, 0135a0a7803f, 0a09a8f02fcd; files: src/image-generation/runtime.ts, src/agents/tools/image-generate-tool.ts, extensions/openrouter/image-generation-provider.ts)
  • vincentkoc: Recent current-main history touches explicit image model defaults and the current image capability helper that this PR must preserve when rebased. (role: recent area contributor; confidence: medium; commits: 7128fa8832d7, 5e4a160f548a, 8b2e9ddc6427; files: src/agents/tools/image-generate-tool.ts, src/image-generation/capabilities.ts, extensions/openrouter/image-generation-provider.ts)
  • davenicoll: Recent main history changed image-generation endpoint routing for provider-specific image edit behavior, adjacent to this PR's route-selection logic. (role: recent adjacent contributor; confidence: medium; commits: 6e79ca3cbc7d; files: src/image-generation/runtime.ts, src/agents/tools/image-generate-tool.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
Review history (1 earlier review cycle)
  • reviewed 2026-06-28T17:12:53.018Z sha 3a8f4ba :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. labels Jun 28, 2026
@aditya-vithaldas

Copy link
Copy Markdown
Contributor Author

Updated in 11cce475: the current OpenRouter image models now route through OpenRouter's dedicated /images endpoint, the Images API data[].b64_json response shape is parsed, and the linked microsoft/mai-image-2.5 example is included in the curated list. Existing preview/default chat-image refs still use the chat-completions path so configured users are not moved unexpectedly.

The PR body now uses Related #91504 instead of closing the broader catalog-policy issue, and includes official Images API docs, live /api/v1/images/models proof, local provider-list proof, focused tests, docs check, formatting, diff check, and clean local auto-review evidence.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot removed the merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. label Jun 28, 2026
@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M and removed size: S labels Jun 28, 2026
@aditya-vithaldas

Copy link
Copy Markdown
Contributor Author

Updated in 3a8f4bae: OpenRouter /images models now use a provider-local capability table backed by the live Images API supported-parameter shape. The provider validates model-specific count, geometry, and reference-image limits before submission; OpenAI image models reject explicit unsupported Gemini-style geometry, Microsoft rejects unsupported resolution/count/ref combinations, and legacy chat-image models keep the previous 5-reference guard.

This also threads resolutionInferred through the image-generation runtime so OpenRouter can ignore unsupported tool-inferred edit resolution without breaking supported Gemini resolution hints or rejecting normal OpenAI/Microsoft reference-image edits. Shared docs/tools/image-generation.md is updated to match the provider docs.

Evidence in the PR body now includes provider/runtime/tool tests, formatter check, docs list, git diff --check, live OpenRouter capability proof, provider metadata proof, and clean local auto-review.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Jun 28, 2026
@aditya-vithaldas

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updated the PR body evidence with the requested runtime proof:

  • openclaw capability image providers --json now shows the OpenRouter image provider exposing the newly added current model ids and geometry/capability metadata.
  • Added a redacted no-paid generation proof using the compiled OpenRouter provider against a local HTTP fixture with explicit test SSRF allowance. It captured POST /api/v1/images for google/gemini-3.1-flash-image with n: 1, aspect_ratio: "1:4", and resolution: "1K", then parsed an Images API data[].b64_json response into one image/png asset.

No paid live OpenRouter generation request was made; this proof exercises the compiled provider endpoint/body/response path without billing or exposing credentials.

@aditya-vithaldas
aditya-vithaldas marked this pull request as ready for review June 28, 2026 18:06
@aditya-vithaldas

Copy link
Copy Markdown
Contributor Author

Addressed the OpenRouter edit-limit review in b19ea85e.

Changes:

  • Declared maxCountByModel and maxInputImagesByModel for OpenRouter image models, including 5-ref chat-completions models, 3-ref google/gemini-2.5-flash-image, and 1-ref microsoft/mai-image-2.5.
  • Made image_generate list output expose model-specific ref limits and preflight validation use model-specific caps.
  • Preserved configured fallback semantics: preflight rejects only when no resolved runtime candidate can satisfy the request; explicit per-call model overrides remain strict.

Proof:

  • /Users/AdityaWork/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node scripts/run-vitest.mjs extensions/openrouter/image-generation-provider.test.ts src/agents/tools/image-generate-tool.test.ts
  • /Users/AdityaWork/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node node_modules/oxfmt/bin/oxfmt --check --threads=1 src/image-generation/types.ts src/image-generation/capabilities.ts src/agents/tools/image-generate-tool.ts src/agents/tools/image-generate-tool.actions.ts extensions/openrouter/image-generation-provider.ts src/agents/tools/image-generate-tool.test.ts extensions/openrouter/image-generation-provider.test.ts
  • git diff --check
  • .agents/skills/autoreview/scripts/autoreview --mode local --codex-bin /tmp/codex-fast-wrapper -> clean, no accepted/actionable findings

No live/paid provider call was used for this update.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@aditya-vithaldas

Copy link
Copy Markdown
Contributor Author

Follow-up for the fresh check-lint failure after b19ea85e.

Root cause: the new model-specific list summary used Array#sort(), which trips unicorn(no-array-sort).

Fix pushed in 7cfa599b: switched that derived entry ordering to toSorted().

Evidence:

  • PATH=/Users/AdityaWork/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin:$PATH pnpm lint --threads=8
  • /Users/AdityaWork/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node scripts/run-vitest.mjs extensions/openrouter/image-generation-provider.test.ts src/agents/tools/image-generate-tool.test.ts
  • /Users/AdityaWork/.cache/codex-runtimes/codex-primary-runtime/dependencies/node/bin/node node_modules/oxfmt/bin/oxfmt --check --threads=1 src/image-generation/types.ts src/image-generation/capabilities.ts src/agents/tools/image-generate-tool.ts src/agents/tools/image-generate-tool.actions.ts extensions/openrouter/image-generation-provider.ts src/agents/tools/image-generate-tool.test.ts extensions/openrouter/image-generation-provider.test.ts
  • git diff --check
  • .agents/skills/autoreview/scripts/autoreview --mode local --codex-bin /tmp/codex-fast-wrapper -> clean

@aditya-vithaldas

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Current head 7cfa599b includes the model-specific capability fix plus the one-line toSorted() lint follow-up documented above.

@clawsweeper

clawsweeper Bot commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

@harjothkhara

Copy link
Copy Markdown
Contributor

Current-head review note: I checked this PR at head 7cfa599bdc3bce627ef9560ebf07aa5239d3cfcb. The visible ClawSweeper verdict/labels are still from 3a8f4baeb2cce21787b12576130aad018fdf9d2d, but the branch has since changed in b19ea85e with the model-specific OpenRouter caps/preflight update and 7cfa599b with the lint fix.

On the current head, the author-supplied runtime proof is also backed by passing checks, including Real behavior proof, check-lint, check-prod-types, check-docs, and check-additional-extension-bundled. I would not treat the old status: 📣 needs proof verdict as current evidence against this SHA; it needs a refresh against 7cfa599b.

The remaining maintainer decision looks narrower now: whether the no-paid compiled-provider fixture proof is sufficient for this provider/catalog routing change, since no paid live OpenRouter image generation was run.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 28, 2026
@aditya-vithaldas

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

After-fix proof for the OpenRouter image-model update:

  • Live OpenRouter catalog check, unauthenticated, against https://openrouter.ai/api/v1/images/models: returned 39 models and included each newly covered requested model I checked: google/gemini-3.1-flash-image, google/gemini-3-pro-image, google/gemini-2.5-flash-image, openai/gpt-5-image, openai/gpt-5-image-mini, and microsoft/mai-image-2.5.
  • OpenClaw runtime provider-list proof: pnpm openclaw capability image providers --json completed after rebuilding stale dist and reported OpenRouter as available with these models present: google/gemini-3.1-flash-image-preview, google/gemini-3.1-flash-image, google/gemini-3-pro-image, google/gemini-3-pro-image-preview, google/gemini-2.5-flash-image, openai/gpt-5-image, openai/gpt-5-image-mini, openai/gpt-5.4-image-2, and microsoft/mai-image-2.5. It also reported OpenRouter image generation/edit capabilities with supportsAspectRatio: true, supportsResolution: true, and per-model count/input-image caps including microsoft/mai-image-2.5 capped at 1.
  • Request-shape proof: extensions/openrouter/image-generation-provider.test.ts exercises the OpenRouter /api/v1/images path for microsoft/mai-image-2.5, including the generated body with model: "microsoft/mai-image-2.5", prompt, n: 1, aspect_ratio: "16:9", and an input reference image data URL. The same test file also covers openai/gpt-5-image through /api/v1/images.
  • Focused tests passed: node scripts/run-vitest.mjs extensions/openrouter/image-generation-provider.test.ts src/agents/tools/image-generate-tool.test.ts passed 2 Vitest shards: 13 OpenRouter provider tests and 51 shared image generation tool tests.
  • Sanity check: git diff --check passed and the branch worktree is clean.

Proof gap: this environment does not have OPENROUTER_API_KEY set, so I did not run a paid live image generation request against OpenRouter. The proof above covers the live catalog, OpenClaw provider metadata, and the provider's outgoing /api/v1/images request construction for the new model IDs.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 🔁 re-review loop A fresh ClawSweeper review was explicitly requested after the latest review. labels Jul 6, 2026
@openclaw-barnacle

Copy link
Copy Markdown

This pull request has been automatically marked as stale due to inactivity.
Please add updates or it will be closed.

@openclaw-barnacle openclaw-barnacle Bot added the stale Marked as stale due to inactivity label Jul 23, 2026
@clawsweeper

clawsweeper Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper status: review started.

I am starting a fresh review of this pull request: [codex] Add current OpenRouter image models 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation extensions: openrouter merge-risk: 🚨 auth-provider 🚨 May break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: L stale Marked as stale due to inactivity status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants