Skip to content

fix: recognize image input for GPT-6.2 models routed through ClawRouter - #200878

Merged
fuller-stack-dev merged 1 commit into
openclaw:mainfrom
whoisaldo:fix-clawrouter-gpt62-image-input
Nov 18, 2026
Merged

fuller-stack-dev merged 1 commit into
openclaw:mainfrom
whoisaldo:fix-clawrouter-gpt62-image-input

Conversation

@whoisaldo

@whoisaldo whoisaldo commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Related: #200766

What Problem This Solves

OpenClaw leaves prompt images out of requests to GPT-6.2 Sol and Astra through ClawRouter when the router catalog omits input types for both the model and its selected endpoint. The fallback already recognizes image input for gpt-6.1-sol.

User Impact

User impact: OpenClaw can include prompt images in requests to GPT-6.2 Sol and Astra through ClawRouter when the catalog leaves input types unspecified. Input declarations on the model row or selected endpoint still take precedence.

Why This Change Was Made

#200766 added both GPT-6.2 models to the OpenAI catalog. ClawRouter's exact-ID fallback already included gpt-6.1-sol and was missing both new IDs. This change adds them and extends the existing fallback test. The ClawRouter test in #200766 supplies input in its mock row and bypasses the fallback.

Evidence

Checked on macOS 15.7.9 (arm64), Node 24.22.2.

  • With only the test change applied to the branch's base commit, the fallback test (retains known native image inputs without granting unknown OpenAI models) fails because both GPT-6.2 rows come back as ["text"].
  • With the fix, that test passes, and extensions/clawrouter/provider-catalog.test.ts plus extensions/clawrouter/gpt-62-compat.test.ts pass together (10 tests, 47 seconds locally).
  • pnpm tsgo:extensions passes, and oxfmt --check and oxlint are clean on the two touched files. The extension test typecheck (pnpm tsgo:extensions:test) did not finish locally.
  • The original contributor tests did not run a live ClawRouter turn. The fallback test verifies catalog classification, and the compatibility tests check request construction with mocked network calls. The image-loading guard in src/agents/embedded-agent-runner/run/images.ts skips prompt images when the model lacks image input.
Failing output before the fix
$ pnpm test extensions/clawrouter/provider-catalog.test.ts --maxWorkers=1 -t "retains known native image inputs"

 FAIL  |extensions| extensions/clawrouter/provider-catalog.test.ts > ClawRouter provider catalog > retains known native image inputs without granting unknown OpenAI models

    "openai/gpt-6.2-astra": [
      "text",
-     "image",
    ],
    "openai/gpt-6.2-sol": [
      "text",
-     "image",
    ],

 Test Files  1 failed (1)
      Tests  1 failed | 7 skipped (8)

Maintainer verification: real GPT-6.2 image inference

On November 18, 2026, an isolated OpenClaw Gateway ran source f30a86c40da29cd2b4d0b601414820bc597a0d41 (macOS arm64, Node 26.12.1). To reproduce, supply a local discovery fixture with GPT-6.2 Sol and Astra model rows and selected Responses endpoints that both omit input. Disable tools and alternate image understanding. Start a fresh chat.send turn with a synthetic PNG containing a code absent from the prompt text. Record the number of input_image blocks on the serialized Responses request and forward that request body unchanged to ClawRouter production. For the pre-fix control, substitute only the exact base provider-catalog.ts blob.

Routed model Pre-fix control Exact PR head
openai/gpt-6.2-sol HTTP 200; 0 input_image blocks; did not recover the code HTTP 200; image included; returned 6CD29BB9 exactly
openai/gpt-6.2-astra HTTP 200; 0 input_image blocks; returned NO_IMAGE HTTP 200; image included; returned D4275EA1 exactly

Each candidate request contained two byte-identical copies of its single uploaded PNG, verified by SHA-256. The Sol control did not use the literal NO_IMAGE, so the control harness exited nonzero; its wire capture still established that the image was omitted and the code was not recovered. Only catalog discovery was simulated: image upload, hydration, Responses serialization, and model inference were real. This does not establish rollout of the production discovery catalog.

Focused Vitest: 10 passed across provider-catalog.test.ts and gpt-62-compat.test.ts; formatting, lint, and git diff --check passed. Exact-head CI passed (20 jobs passed, 32 skipped); exact-head security review passed.

When neither the selected endpoint nor the model row declares input,
ClawRouter's fallback classified gpt-6.2-sol and gpt-6.2-astra as
text-only. Add both upstream IDs and cover them in the fallback test.
@clawsweeper

clawsweeper Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Adds GPT-6.2 Sol and Astra to ClawRouter’s existing image-input fallback and extends its catalog regression test.

Example: Send an image to clawrouter/openai/gpt-6.2-sol when neither the catalog model nor its selected endpoint declares input types.

  • Before: The discovered model is classified as text-only, so prompt image hydration is skipped.
  • After: The discovered model accepts text and image input, allowing prompt image hydration.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch is focused and source-consistent, but mocked coverage does not satisfy the required real-behavior proof.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Prompt images are omitted for GPT-6.2 Sol and Astra through ClawRouter when catalog input metadata is absent.
Reason: The repair restores the existing known-native-image contract for models already supported on main.

Merge readiness

⛔ Blocked before merge - 1 item remains

Keep open: current main still omits GPT-6.2 image capability when ClawRouter supplies no input metadata, and this PR makes a focused, source-consistent repair with no identified code defects.

Priority: P2
Reviewed head: f30a86c40da29cd2b4d0b601414820bc597a0d41

Before merge

  • Add real behavior proof - The contributor supplies catalog regression results and mocked transport coverage, but no shipped OpenClaw agent or Gateway run exercises the repaired fallback through image inference; provide terminal output or logs and redact IPs, API keys, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.

Findings

None.

Tests

  • Missing end-to-end proof: Provide redacted output from candidate-backed OpenClaw image turns through ClawRouter for both GPT-6.2 models with endpoint and row input omitted, showing the images reach inference.
Agent review details

How this fits together

The bundled ClawRouter provider translates credential-scoped catalog rows into runtime model capabilities; the agent’s prompt-media loader uses those capabilities to decide whether to load images.

flowchart LR
  A[ClawRouter catalog] --> B[Provider catalog translator]
  B --> C[Runtime model capabilities]
  C --> D[Prompt image loader]
  D --> E[Responses request]
  E --> F[ClawRouter inference]
Loading

Technical review

Best possible solution:

Retain the two-ID repair in the existing fallback while preserving explicit catalog input declarations.

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

Source establishes a deterministic path: an OpenAI GPT-6.2 catalog row without endpoint or row input falls through to text-only classification, and the agent skips image loading; no target code was executed during this read-only review.

Is this the best way to solve the issue?

This is the smallest complete repair using the existing owner: both omitted identities gain the established fallback without new state, helpers, APIs, or broader family matching.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against d57603b0b331.

Provenance checked

  • Native image-input fallback keeps the original intent (aab5651: Recognize exact known image-capable native identities when catalogs omit input, without granting unknown siblings image capability.)
  • Selected-endpoint input precedence keeps the original intent (29e5360: Project the selected endpoint’s modalities before model-level declarations or fallback inference.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Jason (Json): Raw commit aab5651 adds extensions/clawrouter/provider-catalog.ts:240 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: aab56517ff20; files: extensions/clawrouter/provider-catalog.ts)

PR surface

Source +2, Tests +4. Total +6 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 2 0 +2
Tests 1 4 0 +4
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 6 0 +6

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: Image input is omitted for two models under catalogs missing modality metadata, a concrete bug with limited scope.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P2: Image input is omitted for two models under catalogs missing modality metadata, a concrete bug with limited scope.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Supply the candidate-backed image-turn evidence described in the proof assessment.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 17, 2026, 7:31 PM ET / November 18, 2026, 00:31 UTC.

@fuller-stack-dev
fuller-stack-dev merged commit 3bc20e2 into openclaw:main Nov 18, 2026
86 of 87 checks passed
tideclaw-bot pushed a commit that referenced this pull request Nov 30, 2026
When neither the selected endpoint nor the model row declares input,
ClawRouter's fallback classified gpt-6.2-sol and gpt-6.2-astra as
text-only. Add both upstream IDs and cover them in the fallback test.

(cherry picked from commit 3bc20e2)

Release adaptation: Cite the original PR’s November 18, 2026 live ClawRouter image proof in the legacy fallback; exact upstream IDs, explicit modality precedence, and text-only behavior for unrecognized models are unchanged.

Follow-up audit: #205137’s catalog clock fixture is already equivalent (70a36ea), and #203898 is already integrated (fec6728). #207768 classifies catalog misses and #192450 adds Bedrock routing; neither is required by the exact-ID fallback. #201434 and #201415 mention the donor SHA as an unrelated verification baseline. Original #200878 has no additional follow-up reference at the pinned scan end.

Co-authored-by: RomneyDa <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: clawrouter Extension: clawrouter P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants