fix(media-understanding): append actionable install hint when media provider is missing#97484
Conversation
…rovider is missing Gates the install hint on the official external provider catalog's `mediaUnderstandingProviders` contract so only true media-provider packages (e.g. groq) emit the actionable hint; channel-only ids (e.g. feishu) and providers without a media-understanding contract (e.g. amazon-bedrock) fall back to the legacy bare error message verbatim. Also tightens the gateway recovery wording from generic 'restart the gateway' to 'stop and start the gateway service' per the canonical issue reporter's actual recovery flow (full systemd stop/start, not hot-reload).
|
@clawsweeper re-review Clean replacement for #96790 (closed). Single 1-commit diff on latest openclaw/main (+121/-8, 2 files):
|
|
Codex review: needs maintainer review before merge. Reviewed June 28, 2026, 9:13 AM ET / 13:13 UTC. Summary PR surface: Source +55, Tests +58. Total +113 across 2 files. Reproducibility: yes. at source level: current main and v2026.6.10 still throw the bare missing-provider error, and the linked user report includes real CLI/Gateway Groq failure logs. I did not run a live packaged Gateway reproduction in this read-only review. Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land the focused diagnostic if maintainers accept the scope, while leaving broader Groq recovery and empty-transcript behavior tracked in #95658. Do we have a high-confidence way to reproduce the issue? Yes, at source level: current main and v2026.6.10 still throw the bare missing-provider error, and the linked user report includes real CLI/Gateway Groq failure logs. I did not run a live packaged Gateway reproduction in this read-only review. Is this the best way to solve the issue? Yes: the absent-provider branch is the narrow diagnostic point, and gating on AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 08d15ec32db3. Label changesLabel justifications:
Evidence reviewedPR surface: Source +55, Tests +58. Total +113 across 2 files. View PR surface stats
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
|
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
@clawsweeper re-review Added real runtime proof per [P1] rank-up move:
Reproduction script ( |
|
Thanks @vincentkoc for the clean merge and for keeping the ClawSweeper rank-up moves actionable (the wording tightening + the production Three things I learned that will change how I open the next replacement PR:
The canonical issue #95658 (broader Groq voice transcription regression) is now diagnosed enough that operators have an actionable recovery path. Closing follow-ups for the underlying fallback behavior will be a separate, scoped PR. |
…rovider is missing (openclaw#97484) Gates the install hint on the official external provider catalog's `mediaUnderstandingProviders` contract so only true media-provider packages (e.g. groq) emit the actionable hint; channel-only ids (e.g. feishu) and providers without a media-understanding contract (e.g. amazon-bedrock) fall back to the legacy bare error message verbatim. Also tightens the gateway recovery wording from generic 'restart the gateway' to 'stop and start the gateway service' per the canonical issue reporter's actual recovery flow (full systemd stop/start, not hot-reload). Co-authored-by: wangmiao0668000666 <[email protected]>
…rovider is missing (openclaw#97484) Gates the install hint on the official external provider catalog's `mediaUnderstandingProviders` contract so only true media-provider packages (e.g. groq) emit the actionable hint; channel-only ids (e.g. feishu) and providers without a media-understanding contract (e.g. amazon-bedrock) fall back to the legacy bare error message verbatim. Also tightens the gateway recovery wording from generic 'restart the gateway' to 'stop and start the gateway service' per the canonical issue reporter's actual recovery flow (full systemd stop/start, not hot-reload). Co-authored-by: wangmiao0668000666 <[email protected]>
…rovider is missing (openclaw#97484) Gates the install hint on the official external provider catalog's `mediaUnderstandingProviders` contract so only true media-provider packages (e.g. groq) emit the actionable hint; channel-only ids (e.g. feishu) and providers without a media-understanding contract (e.g. amazon-bedrock) fall back to the legacy bare error message verbatim. Also tightens the gateway recovery wording from generic 'restart the gateway' to 'stop and start the gateway service' per the canonical issue reporter's actual recovery flow (full systemd stop/start, not hot-reload). Co-authored-by: wangmiao0668000666 <[email protected]>
…rovider is missing (openclaw#97484) Gates the install hint on the official external provider catalog's `mediaUnderstandingProviders` contract so only true media-provider packages (e.g. groq) emit the actionable hint; channel-only ids (e.g. feishu) and providers without a media-understanding contract (e.g. amazon-bedrock) fall back to the legacy bare error message verbatim. Also tightens the gateway recovery wording from generic 'restart the gateway' to 'stop and start the gateway service' per the canonical issue reporter's actual recovery flow (full systemd stop/start, not hot-reload). Co-authored-by: wangmiao0668000666 <[email protected]> (cherry picked from commit 2e5e5e5)
…rovider is missing (openclaw#97484) Gates the install hint on the official external provider catalog's `mediaUnderstandingProviders` contract so only true media-provider packages (e.g. groq) emit the actionable hint; channel-only ids (e.g. feishu) and providers without a media-understanding contract (e.g. amazon-bedrock) fall back to the legacy bare error message verbatim. Also tightens the gateway recovery wording from generic 'restart the gateway' to 'stop and start the gateway service' per the canonical issue reporter's actual recovery flow (full systemd stop/start, not hot-reload). Co-authored-by: wangmiao0668000666 <[email protected]>
What Problem This Solves
When a media-understanding provider (e.g. Groq voice transcription) is not registered in the current install — the most common failure mode reported in #95658 — the runtime throws a bare
Media provider not available: <id>error with no actionable recovery guidance. Operators have to dig through docs to figure out they need to install an external plugin, refresh the registry, and restart the gateway.This appends an actionable install hint to the error, but only for ids that actually own a media-understanding contract in the official external provider catalog. Generic provider entries (Amazon Bedrock, channels like Feishu) fall back to the legacy bare error so the hint never misleads operators about a non-media capability.
Why This Change Was Made
The canonical issue #95658 reporter's actual recovery was a full
systemctl stop openclaw-gateway && systemctl start openclaw-gateway(not a hot reload), so the wording is tightened to "stop and start the gateway service" instead of the generic "restart the gateway" — same instruction, matches the real flow.The first attempt (#96790) was tangled across 4 commits with a 200+ commit stale base and an unintended "restart the gateway" wording. This is a clean rebase on latest
openclaw/mainwith the wording fix baked in.User Impact
Operators hitting "Media provider not available: groq" now see:
Channel-only ids (Feishu), providers without a media-understanding contract (Amazon Bedrock), and unknown ids emit the unchanged legacy message — no false-positive install hints.
Changes
src/media-understanding/runner.entries.ts:675— newformatMissingProviderHint(providerId)helper. Looks up the id only in catalog entries that declarecontracts.mediaUnderstandingProviders, so a media provider id likefeishu(an official channel, not a media provider) never emits a misleading install hint from a media-provider error.src/media-understanding/runner.entries.ts:797—runProviderEntrynow throwsMedia provider not available: ${providerId}${formatMissingProviderHint(providerId)}so unknown ids keep the legacy bare error verbatim.src/media-understanding/runner.entries.ts(imports) — pulls informatCliCommand,getOfficialExternalPluginCatalogManifest,listOfficialExternalProviderCatalogEntries,resolveOfficialExternalPluginRepairHintfrom existing CLI/plugin helpers (no new abstraction).src/media-understanding/runner.entries.guards.test.ts— 9 new tests covering catalog-known (groq), channel-only (feishu), generic-catalog-no-contract (amazon-bedrock), unknown id (mystery-provider), empty/whitespace, malformed-id, and the legacy verbatim preservation paths.Why now
ClawSweeper's [P2] rank-up move on #96790 was: "Have a maintainer decide whether the generic gateway restart wording should be tightened before merge." This PR makes that decision concrete — the wording matches the canonical issue's actual recovery flow (full systemd stop/start). No remaining wording risk.
Evidence
Real runtime proof (production
runProviderEntry, not vitest)Per ClawSweeper's
[P1]rank-up move on this PR ("Add redacted terminal output from a small after-fix runtime invocation that imports productionrunProviderEntryor uses the built CLI path"), this proof exercises the productionrunProviderEntryexported function (not a mock, not a vitest assertion) by calling it with an emptyproviderRegistryto force the missing-provider throw site, and capturing the actualError.messageproduced.Reproduction script (not committed to repo, per checklist #23):
Command run:
Captured output:
Captured error messages (verbatim, produced by production
runProviderEntry):The four captured messages confirm the contract gate end-to-end:
mediaUnderstandingProviderscontract) → full hint with install command, registry refresh, stop and start the gateway service, doctor fixMock-based regression coverage (committed
runner.entries.guards.test.ts)12/12 vitest tests pass on this branch:
formatDecisionSummarytestsformatMissingProviderHinttests covering catalog-known (groq), channel-only (feishu), provider-without-contract (amazon-bedrock), unknown id (mystery-provider), empty/whitespace id, malformed-id, and the legacy verbatim preservation pathsCombined evidence: production
runProviderEntryruntime proof + 12/12 vitest regression tests prove both the contract gate and the full hint composition across all four representative paths.Out of scope
Risk checklist
mediaUnderstandingProvidersid incorrectly could now show the hint. Mitigated by the contract gate (only entries that declare the contract participate in the lookup).Diff stats
Net: +57 lines prod (helper + 3 imports + 1 error-site line change), +60 lines test, 1 commit, 0 unrelated changes.