fix: send infer audio/video --model files only to the requested model (#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: https://github.com/openclaw/openclaw/pull/190287#issuecomment-7023768213. 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 5fb231527f4f | This PR f3d3739a89 | |---|---|---| | 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 2057fd7882 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 f3d3739a89; 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 <hi@obviy.us>
Current
·
C2
·2026-11
fix: send infer audio/video --model files only to the requested model…
Find Your Interest
- A conta não fecha
- Esquerda recua no Brasil e no DF
- fix(release): avoid duplicate receipt scan before recovery dispatch (…
- Stedile, do MST, chama ajuste fiscal de enganação e defende ministros mais jovens e representativos
- Em noite de golaços, Flamengo vira sobre o Athletico-PR e pode ser campeão no sábado
- Seleção termina primeiro ano completo sob Ancelotti com decepções colecionadas
- Crédito privado avança, mas exige gestão ativa e visão de longo prazo, diz Sparta
- Mpox: variante associada a casos mais graves avança no Brasil; sintomas e tratamento mudam?
- Sheinbaum diz que “não há mais nenhuma caravana” de migrantes rumo aos EUA, após ameaça de Trump
- IA reacende aposta em biotecnologia, mas teste decisivo ainda não chegou
Current
·
C2
·2026-11






