Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesExplicit audio and video inference model selections become the only attempted backend while retaining an exact matching configured entry’s settings. Example: Run audio transcription with --model openai/whisper-1 while Deepgram nova-3 is configured.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a current CLI selection bug with approved fallback semantics; no actionable introduced defects were found, and current-head CI remains in progress. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe inference CLI passes a file and explicit model into the shared media runtime, which resolves one provider descriptor and returns text with provider/model attribution. flowchart LR
A[Inference CLI] --> B[File media runtime]
B --> C[Media entry resolver]
C --> D[Requested provider descriptor]
D --> E[Provider transport]
E --> F[Attributed text or error]
Technical reviewBest possible solution: Land the approved single-model selection through the existing media resolver once required current-head checks pass. Do we have a high-confidence way to reproduce the issue? Current-main source establishes configured-entry precedence and automatic audio model substitution, consistent with yetval’s report and the supplied before/after CLI traces; this review executed no target code. Is this the best way to solve the issue? The patch repairs explicit selection in the existing resolver, preserves matching descriptor ownership, and leaves automatic channel selection and public plugin runtime contracts intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8a6d3a04ee74. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +35, Tests +32, Docs +1, Other -1. Total +67 across 10 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (3 earlier review cycles)Reviewed November 19, 2026, 6:21 PM ET / 23:21 UTC (Revision 4). |
|
This pull request has been automatically marked as stale after 7 days without qualifying human activity. |
|
Author maintenance update, November 15, 2026: this remains a draft pending the audio/video selection contract. I rechecked official main snapshot The decision needed is whether an explicit audio/video model is strictly pinned, or tried first with configured media fallbacks afterward. This draft implements requested-first with fallback, which can upload the file to another configured provider after failure. It does not claim approval of that policy or the optional public runtime field. I will keep it in draft until the contract is settled. The related issue was closed by inactivity automation, explicitly without confirming the problem fixed. Original report/reproduction credit remains with yetval and #172409. |
- An explicit --model is now the only media attempt: it reuses a configured tools.media.models descriptor only for the same provider/model, and never falls back to other configured entries, CLI backends or provider defaults. - Route the CLI through an internal runMediaFileWithModel entry instead of a new public plugin runtime field; restore the documented pin contract.
|
Proof for head f3d3739 (built CLI, isolated state, local fixture providers that record every upload; no real accounts or keys). Base = merge base 5fb2315. |
|
Marking ready for review: the maintainers decided the fallback contract. It follows docs/cli/infer.md ( |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
- The mock factory changed with runMediaFileWithModel, so the mock-exports ratchet needs an isolation reason; prune its stale grandfathered hash.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Thanks @alkor2000 for the fix and @yetval for the report in #176246. This is merged in 577dd00: |
…openclaw#190287) Root cause: src/cli/capability-cli/media-understanding-command.ts:49 passes `--model` only as `activeModel` (a conversation-model hint), and the media selector never treats it as a choice: `src/media-understanding/runner.ts:727` takes configured `tools.media.models` entries without looking at it, and with no entries, audio swaps the requested model for the provider default (`runner.ts:439`). Related: openclaw#176246 (reported by @yetval; the earlier strict-pin proposal openclaw#172409 was closed in favor of that issue). ## What Problem This Solves `openclaw infer audio transcribe --model provider/model` and `openclaw infer video describe --model provider/model` ignore the flag when `tools.media.models` has an entry, and upload the file to that configured entry, which is often a different provider. With no configured entry, `--model openai/whisper-1` is sent as `gpt-4o-transcribe`. The docs say `--model provider/model` pins a specific backend (`docs/cli/infer.md`). ## User Impact With `--model`, the file goes only to the requested provider and model. If that model fails, its existing error is returned and no configured entry, CLI backend or provider default receives the file. Runs without `--model` keep today's configured selection and fallback chain. ## Why This Change Was Made The maintainers chose strict pinning, as the docs already promise. The requested model becomes the only media attempt. It reuses a configured descriptor (credential owner, base URL, headers) only when that entry is the same provider and model. The CLI reaches this through an internal runtime entry, so the plugin runtime API is unchanged. The earlier revision's optional public `modelOverride` field and its SDK doc are removed. `docs/cli/infer.md` keeps the pin wording and adds one line for audio and video. Thanks @alkor2000 for the original change (kept as the first four commits) and @yetval for the report and repro. ## Evidence Observed proof: openclaw#190287 (comment). The CLI was built from source with isolated state and local fixture providers that record every upload. A is the configured chain (a failing entry, then a working one) for audio and video, B is requested with `--model`, and W is a transcription endpoint for the whisper-1 case. | Run | Base 30c2ded | This PR f3d3739 | |---|---|---| | audio `--model openai/gpt-4o-mini-transcribe` | A ×3 (voxtral-a-broken ×2, voxtral-a), B 0 | B ×1 (gpt-4o-mini-transcribe), A 0 | | video `--model moonshot/kimi-b` | A ×3 (qwen-a-broken ×2, qwen-a), B 0 | B ×1 (kimi-b), A 0 | | audio `--model openai/b-fail` (B returns 500) | A ×3, exit 0 with A's text | B ×2 (500, transport retry), A 0, exit 1 with "Audio transcription failed (HTTP 500)" | | video `--model moonshot/b-fail` (B returns 500) | A ×3, exit 0 with A's text | B ×2 (500), A 0, exit 1 with "Moonshot video description failed (HTTP 500)" | | audio, no `--model` (control) | A ×3, result voxtral-a | A ×3, result voxtral-a (same) | | video, no `--model` (control) | A ×3, result qwen-a | A ×3, result qwen-a (same) | | audio `--model openai/whisper-1`, no `tools.media.models` | W model=gpt-4o-transcribe | W model=whisper-1 | - `src/media-understanding/resolve.test.ts`: the new pin case (audio and video) fails on the merge base and passes here. `src/cli/capability-cli.test.ts` (121 tests) and the media runner/runtime suites pass. - Full build (`--dts`) passes, including the plugin SDK export check. Head 2057fd7 adds only a `// mock-isolation:` comment on the media runtime mock in `capability-cli.test.ts` (the mock-exports ratchet asks for one when a mock factory changes; the mocked runtime would otherwise reach provider uploads and credential lookup), and drops that factory's stale grandfathered hash from `config/test-mock-exports-baseline.txt`, on top of the proven f3d3739; production code is identical. - Deltas against the merge base: production +60/−25, tests +54/−23 (the new regression, plus one CLI case moved to the media CLI test module to stay under its line cap), docs +1. Merge danger: two-way door. A revert restores the old selection; nothing is written or migrated, and the public plugin runtime types are unchanged. Blast radius: only `openclaw infer audio transcribe` and `openclaw infer video describe` runs that pass `--model`. Channel media understanding and runs without `--model` take the same path as before. Co-authored-by: Ayaan Zaidi <[email protected]>
…#190287) Root cause: src/cli/capability-cli/media-understanding-command.ts:49 passes `--model` only as `activeModel` (a conversation-model hint), and the media selector never treats it as a choice: `src/media-understanding/runner.ts:727` takes configured `tools.media.models` entries without looking at it, and with no entries, audio swaps the requested model for the provider default (`runner.ts:439`). Related: #176246 (reported by @yetval; the earlier strict-pin proposal #172409 was closed in favor of that issue). ## What Problem This Solves `openclaw infer audio transcribe --model provider/model` and `openclaw infer video describe --model provider/model` ignore the flag when `tools.media.models` has an entry, and upload the file to that configured entry, which is often a different provider. With no configured entry, `--model openai/whisper-1` is sent as `gpt-4o-transcribe`. The docs say `--model provider/model` pins a specific backend (`docs/cli/infer.md`). ## User Impact With `--model`, the file goes only to the requested provider and model. If that model fails, its existing error is returned and no configured entry, CLI backend or provider default receives the file. Runs without `--model` keep today's configured selection and fallback chain. ## Why This Change Was Made The maintainers chose strict pinning, as the docs already promise. The requested model becomes the only media attempt. It reuses a configured descriptor (credential owner, base URL, headers) only when that entry is the same provider and model. The CLI reaches this through an internal runtime entry, so the plugin runtime API is unchanged. The earlier revision's optional public `modelOverride` field and its SDK doc are removed. `docs/cli/infer.md` keeps the pin wording and adds one line for audio and video. Thanks @alkor2000 for the original change (kept as the first four commits) and @yetval for the report and repro. ## Evidence Observed proof: #190287 (comment). The CLI was built from source with isolated state and local fixture providers that record every upload. A is the configured chain (a failing entry, then a working one) for audio and video, B is requested with `--model`, and W is a transcription endpoint for the whisper-1 case. | Run | Base 5fb2315 | This PR f3d3739 | |---|---|---| | audio `--model openai/gpt-4o-mini-transcribe` | A ×3 (voxtral-a-broken ×2, voxtral-a), B 0 | B ×1 (gpt-4o-mini-transcribe), A 0 | | video `--model moonshot/kimi-b` | A ×3 (qwen-a-broken ×2, qwen-a), B 0 | B ×1 (kimi-b), A 0 | | audio `--model openai/b-fail` (B returns 500) | A ×3, exit 0 with A's text | B ×2 (500, transport retry), A 0, exit 1 with "Audio transcription failed (HTTP 500)" | | video `--model moonshot/b-fail` (B returns 500) | A ×3, exit 0 with A's text | B ×2 (500), A 0, exit 1 with "Moonshot video description failed (HTTP 500)" | | audio, no `--model` (control) | A ×3, result voxtral-a | A ×3, result voxtral-a (same) | | video, no `--model` (control) | A ×3, result qwen-a | A ×3, result qwen-a (same) | | audio `--model openai/whisper-1`, no `tools.media.models` | W model=gpt-4o-transcribe | W model=whisper-1 | - `src/media-understanding/resolve.test.ts`: the new pin case (audio and video) fails on the merge base and passes here. `src/cli/capability-cli.test.ts` (121 tests) and the media runner/runtime suites pass. - Full build (`--dts`) passes, including the plugin SDK export check. Head 2057fd7 adds only a `// mock-isolation:` comment on the media runtime mock in `capability-cli.test.ts` (the mock-exports ratchet asks for one when a mock factory changes; the mocked runtime would otherwise reach provider uploads and credential lookup), and drops that factory's stale grandfathered hash from `config/test-mock-exports-baseline.txt`, on top of the proven f3d3739; production code is identical. - Deltas against the merge base: production +60/−25, tests +54/−23 (the new regression, plus one CLI case moved to the media CLI test module to stay under its line cap), docs +1. Merge danger: two-way door. A revert restores the old selection; nothing is written or migrated, and the public plugin runtime types are unchanged. Blast radius: only `openclaw infer audio transcribe` and `openclaw infer video describe` runs that pass `--model`. Channel media understanding and runs without `--model` take the same path as before. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 577dd00) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit b2c0c30f5eda50b952a59fac964791bbb19eff80) (cherry picked from commit 90c5ede417cb3ae2bcd454a31c4a9d0773c4d28d)
…#190287) Baseline adaptation: Keep stable file runtime entry points and thread a separate explicit model pin to the shared media resolver. Preserve exact configured transport and credentials and implicit fallback. Prove only the requested provider model receives the video even on failure. (cherry picked from commit 577dd00) Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit fd2658eb1004bb8b5be83643648e1329cdddf49b)
…94251) fix(infer): stop video runs on Ctrl+C `openclaw infer video` dropped its execution context, and with it the cancel signal, so Ctrl+C left the provider request open until the CLI was force-killed about 2 seconds later. The existing execution context is now passed through, as audio already does. Uninterrupted runs are unchanged. Evidence: built CLI with a real MP4 against a slow local video-provider fixture, twice per ref. Main needed SIGKILL after about 2,090 ms; with this change the CLI exits with 130 in under 100 ms and the HTTP request closes within 1.1 ms. Uninterrupted output and request bodies are identical. Details: openclaw#194251 (comment). Thanks @Alix-007. Co-authored-by: Ayaan Zaidi <[email protected]> (cherry picked from commit 3af1447) Release adaptation: Forward video execution signal/assertCurrent and move existing guarded fetch/process scope to shared file owner. Retain baseline audio CLI and filesystem resolution: excluded HOLD audio/path migration not imported. Only13-line cancel regression, no fixture refactor. Follow-up dispositions: 577dd00 fix: send infer audio/video --model files only to the requested model (openclaw#190287); bcb47e8 feat(google): add Nano Banana 2.1 image model as the default (openclaw#200468); 6f5d3b3 fix: local path commands pick a neighboring file when a symlinked folder is followed by `..` (openclaw#200031); 3577724 fix(auth): only the running Gateway refreshes shared OAuth sign-ins (openclaw#198214); 81daea9 fix(cli): run infer model run through the Gateway that owns state (openclaw#198141); 22b1aac fix(media): cancel interrupted attachment downloads (openclaw#194399); e43ec1e fix(infer): cancel interrupted image descriptions (openclaw#194391) Validation: Baseline canceled-video assertion fails with16controls passing; candidate17/17passes,194251-green.log. Existing audio cancellation and workspace/cleanup behavior retained. Real MP4/CLI interrupt proof remains upstream-attributed, not locally rerun. Co-authored-by: RomneyDa <[email protected]> (cherry picked from commit 853a96335df6193815789ebcc02d38af11123fcf) (cherry picked from commit 2ea2570de7f13823a8174590bfddfbfabdbcd915)
Root cause: src/cli/capability-cli/media-understanding-command.ts:49 passes
--modelonly asactiveModel(a conversation-model hint), and the media selector never treats it as a choice:src/media-understanding/runner.ts:727takes configuredtools.media.modelsentries without looking at it, and with no entries, audio swaps the requested model for the provider default (runner.ts:439).Related: #176246 (reported by @yetval; the earlier strict-pin proposal #172409 was closed in favor of that issue).
What Problem This Solves
openclaw infer audio transcribe --model provider/modelandopenclaw infer video describe --model provider/modelignore the flag whentools.media.modelshas an entry, and upload the file to that configured entry, which is often a different provider. With no configured entry,--model openai/whisper-1is sent asgpt-4o-transcribe. The docs say--model provider/modelpins a specific backend (docs/cli/infer.md).User Impact
With
--model, the file goes only to the requested provider and model. If that model fails, its existing error is returned and no configured entry, CLI backend or provider default receives the file. Runs without--modelkeep today's configured selection and fallback chain.Why This Change Was Made
The maintainers chose strict pinning, as the docs already promise. The requested model becomes the only media attempt. It reuses a configured descriptor (credential owner, base URL, headers) only when that entry is the same provider and model. The CLI reaches this through an internal runtime entry, so the plugin runtime API is unchanged. The earlier revision's optional public
modelOverridefield and its SDK doc are removed.docs/cli/infer.mdkeeps the pin wording and adds one line for audio and video.Thanks @alkor2000 for the original change (kept as the first four commits) and @yetval for the report and repro.
Evidence
Observed proof: #190287 (comment). The CLI was built from source with isolated state and local fixture providers that record every upload. A is the configured chain (a failing entry, then a working one) for audio and video, B is requested with
--model, and W is a transcription endpoint for the whisper-1 case.--model openai/gpt-4o-mini-transcribe--model moonshot/kimi-b--model openai/b-fail(B returns 500)--model moonshot/b-fail(B returns 500)--model(control)--model(control)--model openai/whisper-1, notools.media.modelssrc/media-understanding/resolve.test.ts: the new pin case (audio and video) fails on the merge base and passes here.src/cli/capability-cli.test.ts(121 tests) and the media runner/runtime suites pass.--dts) passes, including the plugin SDK export check. Head 2057fd7 adds only a// mock-isolation:comment on the media runtime mock incapability-cli.test.ts(the mock-exports ratchet asks for one when a mock factory changes; the mocked runtime would otherwise reach provider uploads and credential lookup), and drops that factory's stale grandfathered hash fromconfig/test-mock-exports-baseline.txt, on top of the proven f3d3739; production code is identical.Merge danger: two-way door. A revert restores the old selection; nothing is written or migrated, and the public plugin runtime types are unchanged. Blast radius: only
openclaw infer audio transcribeandopenclaw infer video describeruns that pass--model. Channel media understanding and runs without--modeltake the same path as before.