Skip to content

fix(media): keep deferred audio and extraction providers discoverable - #139231

Merged
steipete merged 7 commits into
openclaw:mainfrom
rodrigo-fonseca-oliveira:rodrfons/media-understanding-resolve-requested-provider-by-id
Sep 6, 2026
Merged

steipete merged 7 commits into
openclaw:mainfrom
rodrigo-fonseca-oliveira:rodrfons/media-understanding-resolve-requested-provider-by-id

Conversation

@rodrigo-fonseca-oliveira

@rodrigo-fonseca-oliveira rodrigo-fonseca-oliveira commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Related: #119772, which remains open. The generic structured-extraction fallback requested in #119773 is outside this change.

What Problem This Solves

Fixes an issue where audio transcription and structured extraction lose an enabled provider after another media plugin loads first. Automatic audio can report skipped / no-model; extraction can reject a provider before its hook runs. An image-only model list can also hide eligible automatic audio providers.

Why This Change Was Made

The shared media catalog now merges eligible manifest owners with active providers. It removes the model-list filter from discovery and leaves model/CLI execution selection with the media runner, preserving active instances and plugin eligibility policy.

The CI repair keeps that catalog complete while making capability inference resolve only normalized, deduplicated shared provider entries that lack valid explicit capability tags. CLI and tagged entries need no inferred lookup; a later untagged entry for the same provider still does. Existing singular resolution preserves runtime metadata, policy, aliases, and config-image fallback precedence. The two synthetic audio fixtures now bind matching metadata and runtime registries in one generation, retaining their real file/runner paths, timeouts, and behavior assertions.

Rodrigo Oliveira's original diagnosis and contributor ancestry are preserved. Integrated candidate e0f848cf4a82664261de1e82ff5565c19ffb599c preserves both the contributor's main merge 4cc1e32dc5533d09ff38c62a88d668fc42daab87 and the tested correction 28f6a6192f69b2e4cc02faf19df4eb309f767ac4.

User Impact

Deferred audio and extraction providers remain discoverable without changing explicit execution choices. Capability inference avoids unnecessary known-owner loading for entries that already declare their capabilities. The image tool retains its deliberate selected-provider loading contract.

Across ten files, production is −20 net lines and tests +370. Docs have a one-line clarification with zero net growth; there is no configuration-surface change. The assertion allowance shrinks from 15 to 14 for the deleted assertion.

Evidence

Validation complete: exact-head CI34060063771 is green (141 successful jobs and 16 skipped jobs; 157 completed), and final integrated runtime proof is complete. Native landing verification remains.

  • Pre-integration correction 28f6a619…: 148 passed, zero failed or skipped, across nine files, including the unchanged 22-case inference consumer suite, both audio fixtures, real-loader inference regressions, catalog/selection siblings, and seven image-loading controls. The complete ten-path changed-check gate passed in 961.108 seconds, exit 0, with source/index unchanged.

  • The integrated candidate passed 69 cases across six files, including all three CI-failing surfaces and the provider HTTP error suite. Targeted formatting/lint and the integrated core typecheck passed. Its uncached build passed in 80.719 seconds with source/dependency identity unchanged and a separately verified full artifact seal. Fresh independent review found zero actionable P0–P2 findings.

  • Qualified inference regressions first exposed four unwanted-import failures. A follow-up case exposed one tagged-peer failure with four passing controls. All are included in the final passing suite. The accepted final single-packet independent review reported zero actionable P0–P2 findings.

  • CI run 34054536528 exposed the inference timeout (job 101543979531), audio-disposition timeout/next-case assertion failure (101543981395), and Discord audio-fixture timeout (101543981547). These drove the owner and fixture repairs; that failed run is not reported green or blindly rerun.

  • Earlier built proof at 7c7856901fe20782de836666cd71c3a8d59aeb94, tree-identical to published 12943c7b…, completed eight audio cases/16 SDK requests and four extraction cases/eight requests. The omission scenarios failed on the baseline and reached the intended hooks after repair; exact synthetic inputs, denied/disabled controls, warm registration counts, seals, and cleanup were verified.

  • Final e0f848cf… Gateway proof passed eight audio cases/16 SDK requests and four structured-extraction cases/eight requests with six expected extraction hook calls. Exact inputs, disabled/denied controls, warm registration stability, full artifact seals, process/listener absence, and private-state cleanup were independently checked.

  • Full bundled-inventory proof passed three cases/six SDK requests per build. Each fresh Gateway had all 18 bundled media owners available; the deferred sentinel registered exactly once in discovery mode on the candidate and never activated. Explicit CLI/API execution and budget-only behavior held, with no runtime errors. The two final built plugin-entry import profiles also passed.

SDK operation Baseline first / warm (ms) Integrated first / warm (ms)
Explicit CLI transcription 66.34 / 54.02 191.71 / 51.76
Active API transcription 14.00 / 30.85 133.57 / 4.16
Audio input budget 12.72 / 0.16 104.87 / 1.21

Each row measures one fresh Gateway followed by one warm request. Inventory inspection and seal verification can warm filesystem caches.

Runtime evidence uses ordinary synthetic SDK plugins on real isolated Gateways. It proves discovery and dispatch, not real-model quality, native Codex execution, external-provider services, channel delivery, or a full Logbook run. Complete discovery can load additional eligible owners; unknown singular IDs retain the existing family-wide alias lookup.

The latest review's final-candidate runtime, loading-cost, and warm-reuse requests are all addressed by the completed results above. No candidate source changes followed those measurements.

…ted provider is not already loaded

extractStructuredWithModel built the provider registry without telling it
which provider the caller asked for. On a warm gateway the plural capability
resolve returns only active providers plus tools.media.models owners
(src/plugins/capability-provider-runtime.ts:347-354, :615), so an explicitly
requested owner that is in neither set never reached the registry and the call
threw "Provider does not support structured extraction" before any provider
work started.

Forward the requested id into buildMediaUnderstandingRegistry and resolve it
through resolvePluginCapabilityProvider, the same by-id path the image tool
already uses (src/agents/tools/image-tool.ts:116-125, :618-632). The merge runs
ahead of the config-derived image entries so a plugin's own hooks are not
shadowed by a synthetic entry that only carries describeImage/describeImages.

Refs openclaw#119772

Co-Authored-By: Claude Opus 5 <[email protected]>
@clawsweeper

clawsweeper Bot commented Sep 5, 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.

@rodrigo-fonseca-oliveira
rodrigo-fonseca-oliveira marked this pull request as ready for review September 5, 2026 17:22
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Sep 5, 2026
@clawsweeper

clawsweeper Bot commented Sep 5, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 6, 2026, 5:29 PM ET / 21:29 UTC.

ClawSweeper review

What this changes

Keeps enabled audio and structured-extraction providers discoverable while limiting capability inference to shared model entries that need it, with regression coverage and clarified documentation.

Merge readiness

✅ Ready for maintainer review

This remains a useful fix absent from current main. No actionable introduced defects were found, and the final Gateway evidence addresses the earlier runtime, loading-cost, and warm-reuse concerns.

Priority: P2
Reviewed head: e0f848cf4a82664261de1e82ff5565c19ffb599c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused owner-level repair with strong final Gateway evidence and no actionable introduced findings.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): Final-head real isolated Gateways exercised the shared discovery and dispatch owners through SDK audio and extraction calls, with observed hook execution, denied/disabled controls, explicit-selection preservation, and warm reuse; the updated body resolves the earlier pending-proof requests.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): Final-head real isolated Gateways exercised the shared discovery and dispatch owners through SDK audio and extraction calls, with observed hook execution, denied/disabled controls, explicit-selection preservation, and warm reuse; the updated body resolves the earlier pending-proof requests.
Evidence reviewed 7 items Current main still has the omission: Fetched main excludes media understanding from manifest merging when providers are active and still derives its discovery filter from the shared model list.
Discovery retains existing policy and instance ownership: The introduced media-family change uses the existing manifest eligibility checks, policy-filtered active providers, non-activating load options, and active-first merge. It adds no provider API, persistent state, or authorization mechanism.
Inference and execution remain separate: Inference normalizes and deduplicates only untagged shared provider entries; valid tagged entries and CLI entries need no lookup. The unchanged runner selects explicit entries before automatic audio selection, while structured extraction dispatches the discovered provider hook.
Findings None None.
Security None None.

How this fits together

OpenClaw’s media subsystem discovers eligible plugin providers, selects configured or automatic models, and turns media inputs into transcripts or structured results. This change separates complete provider discovery from model selection and capability inference.

flowchart TD
  A[Plugin metadata and policy] --> B[Eligible provider catalog]
  C[Active providers] --> B
  D[Shared model settings] --> E[Scoped capability inference]
  E --> F[Model selection]
  B --> F
  F --> G[Audio or extraction dispatch]
  G --> H[Transcript or structured result]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -20, Tests +370, Docs 0, Other 0. Total +350 across 10 files.

View PR surface stats
Area Files Added Removed Net
Source 2 35 55 -20
Tests 6 397 27 +370
Docs 1 1 1 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 10 434 84 +350

Review metrics

Metric Value Why it matters
Discovery reuse 18 bundled owners; 0 warm re-registrations The reported final Gateway measurements directly address the earlier concern about repeated provider loading.

Technical review

Best possible solution:

Keep provider discovery complete at its shared owner while preserving explicit execution choices and narrowly resolving capability metadata.

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

Yes: current-main source can return only active media providers when no additional configured owner is requested, omitting an eligible deferred provider. The supplied before/after Gateway evidence exercises that scenario; this review did not execute it.

Is this the best way to solve the issue?

Yes: repairing the shared catalog addresses both affected consumers without adding a competing fallback, and scoped inference avoids unnecessary owner loading.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: Repairs a bounded provider-discovery defect affecting automatic audio and structured extraction.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): Final-head real isolated Gateways exercised the shared discovery and dispatch owners through SDK audio and extraction calls, with observed hook execution, denied/disabled controls, explicit-selection preservation, and warm reuse; the updated body resolves the earlier pending-proof requests.
  • proof: sufficient: Contributor real behavior proof is sufficient. Final-head real isolated Gateways exercised the shared discovery and dispatch owners through SDK audio and extraction calls, with observed hook execution, denied/disabled controls, explicit-selection preservation, and warm reuse; the updated body resolves the earlier pending-proof requests.

Evidence

What I checked:

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

History

Review history (9 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-05T18:03:34.668Z sha d19db13 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-05T19:46:24.103Z sha d19db13 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-05T23:04:55.169Z sha 3008488 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-06T01:40:40.694Z sha a2ba6d6 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-06T19:26:18.505Z sha 12943c7 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-06T20:24:48.845Z sha 4cc1e32 :: blocked before merge. :: none
  • reviewed 2026-09-06T21:15:37.752Z sha e0f848c :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-06T21:22:37.681Z sha e0f848c :: needs maintainer review before merge. :: none

Integrate current main and repair the shared media provider catalog instead
of adding a consumer-only requested-provider fallback. Preserve explicit
model and CLI execution selection and the image tool's deliberate lazy
provider loading.

The final source tree is identical to the independently reviewed and
validated maintainer candidate. Keep the contributor branch ancestry.

Related: openclaw#119772
Co-authored-by: Rodrigo Oliveira <[email protected]>
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: M and removed size: S labels Sep 6, 2026
@steipete steipete changed the title fix(media-understanding): structured extraction fails when the requested provider is not already loaded fix(media): keep deferred audio and extraction providers discoverable Sep 6, 2026
@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. 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. labels Sep 6, 2026
@rodrigo-fonseca-oliveira

Copy link
Copy Markdown
Contributor Author

Heads-up on 12943c7b2164: openclaw/ci-gate is red — run 34054536528 timed out at 120s on src/media-understanding/runtime.audio-disposition.test.ts, src/secrets/runtime-provider-and-media-surfaces.test.ts, and test/transcripts-discord-audio.integration.test.ts.

These look specific to this head rather than the flake this PR hit earlier (that was subagent-spawn.authority and changed-extensions-config-24). Two sibling PR runs on the same main base minutes earlier — 34054200493 and 34054170480 — ran all three files green with no timeouts, and in the failing job the second-slowest test was 3.4s against the failing one's 169s, so it doesn't look environmental.

Plausible mechanism: adding mediaUnderstandingProviders to shouldMergeManifestProvidersWhenActive removes the early return at capability-provider-runtime.ts:556, so media discovery loads the full manifest catalog — pulling plugin imports into cold discovery, and widening the catalog past the configured entry. Happy to dig further if useful.

@clawsweeper clawsweeper Bot added merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. labels Sep 6, 2026
Integrate the verified CI correction with the contributor main merge,
preserving both histories and the exact reviewed integration tree.
Keep model selection separate from complete provider discovery; infer
capabilities only for shared provider entries that need them.

Related: openclaw#119772
@clawsweeper clawsweeper Bot added status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed proof: sufficient ClawSweeper judged the real behavior proof convincing. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Sep 6, 2026
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

@clawsweeper re-review

The CI correction is integrated at e0f848cf4a82664261de1e82ff5565c19ffb599c, preserving the contributor main merge and the tested correction history. The PR body now includes 69 passing integration tests, fresh independent review/build proof, all 12 final audio/extraction Gateway cases, and paired full-inventory cold/warm measurements. The known CI failures were repaired at the capability-inference owner and the synthetic fixture generation boundary; exact-head CI run 34060063771 is still in progress.

@clawsweeper

clawsweeper Bot commented Sep 6, 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 exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete

steipete commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

Final verification on e0f848cf4a82664261de1e82ff5565c19ffb599c is complete. This addresses all three before-merge requests and both rank-up moves in the latest review: final Gateway reruns, full-bundled cold/warm loading measurements, and the updated Evidence section. The review captured the earlier pending-proof body. Source is unchanged. Exact-head CI completed successfully: 141 jobs succeeded and 16 were skipped (157 completed).

Redacted summary of the recorded results:

{
  "head": "e0f848cf4a82664261de1e82ff5565c19ffb599c",
  "ci": {
    "run": 34060063771,
    "conclusion": "success",
    "completedJobs": 157,
    "successfulJobs": 141,
    "skippedJobs": 16
  },
  "audio": {
    "cases": 8,
    "sdkRequests": 16,
    "pass": true
  },
  "structured": {
    "cases": 4,
    "sdkRequests": 8,
    "expectedHookCalls": 6,
    "pass": true
  },
  "fullBundledInventory": {
    "owners": 18,
    "baselineCases": 3,
    "candidateCases": 3,
    "requestsPerBuild": 6,
    "candidateSentinelMode": "discovery",
    "registrationsPerFreshGateway": 1,
    "warmReregistrations": 0,
    "pass": true
  },
  "candidateSdkMs": {
    "cli": [
      191.71,
      51.76
    ],
    "activeApi": [
      133.57,
      4.16
    ],
    "budget": [
      104.87,
      1.21
    ]
  },
  "cleanup": {
    "forcedKills": 0,
    "remainingOwnedListeners": 0,
    "runtimeErrors": 0,
    "privateStateRemoved": true
  },
  "build": {
    "seconds": 80.71866625,
    "fullSealVerified": true
  },
  "scope": "Real isolated Gateways with synthetic provider hooks; no real model/native Codex/channel delivery claim"
}

The first/warm measurements are one pair per fresh isolated Gateway. Every response, registry-mode assertion, source/build seal and cleanup receipt was inspected. Broader #119772 and generic extraction fallback #119773 remain outside this PR.

@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. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 6, 2026
@steipete
steipete merged commit 1873328 into openclaw:main Sep 6, 2026
241 checks passed
@steipete

steipete commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 6, 2026
* commit '294df333c58f2da104eccffc623ccb3c4d43d4d8': (1802 commits)
  fix: clear stale diagnostics after Gateway changes (#140426)
  fix: keep plugin catalogs intact after discovery timeouts (#140441)
  perf(tui): prepare session picker rows once per overlay (#140462)
  refactor(config): reuse environment substitution for write-back (#140460)
  refactor(discord): remove retired auto-presence templates (#140463)
  fix(ui): finish roster refreshes during session activity (#140459)
  fix(setup): match prepared credentials to the model provider (#140461)
  fix: keep MiniMax discovery on the selected credential (#140438)
  refactor(tests): remove unused parent context cache reset (#140456)
  fix: avoid repeated xAI OAuth refresh during discovery (#140434)
  perf(routing): reuse prepared event session targets (#140454)
  fix(media): keep deferred audio and extraction providers discoverable (#139231)
  refactor(codex): remove redundant app-server forwarding (#140451)
  fix(test): avoid false native polling timeouts (#140119)
  test(gateway): retain saved source in reload fixtures (#140453)
  fix(gateway): reduce repeated model work when listing sessions (#140414)
  fix(feishu): fall back to post mode over table limit (#136382)
  fix: use the bundle-compatible Proxyline runtime under Bun (#140411)
  refactor(trace): reuse the canonical usage counter type (#140444)
  refactor(node-host): share execution policy result fields (#140446)
  ...
rodrigo-fonseca-oliveira added a commit to rodrigo-fonseca-oliveira/openclaw that referenced this pull request Sep 7, 2026
…able providers

Root cause: only the bundled Codex plugin implements `extractStructured`, and
registry hydration never bound one for any other image-capable provider, so
`extractStructuredWithModel` failed with "Provider does not support structured
extraction" for every non-Codex `visionModel` even though those providers
already describe images through the shared model runtime.

Owner: media-understanding registry hydration (`provider-registry.ts`) plus the
shared image runtime (`image.ts`, `image-runtime.ts`), which already own the
describeImage/describeImages defaults.

Canonical fix: hydrate `extractStructured` next to those defaults from a new
lazy `extractStructuredWithImageModel` export. `structured-extraction.ts` runs
one completion through `completeImagesWithModel` with the extraction
instructions (including a no-secrets rule) as the prompt, supplemental text as
`userText` in the user message, and `promptDelivery: "system-required"`. That
flag makes the shared runtime refuse, before any request, exactly the routes on
which it would itself demote the prompt into user content (the GitHub Copilot,
OpenRouter, and Alibaba Model Studio endpoint classes and both MiniMax VLM
branches), because the output is persisted. A plugin stream that demoted
`Context.systemPrompt` would break every agent turn on that provider, so that
boundary stays with the plugin install, not this gate.

The shared extractor defaults an empty `agentDir` to the configured default
agent dir. The dispatcher still passes "" through unchanged, so a bespoke
extractor such as Codex - which uses a non-empty agentDir as its thread cwd
(bounded-turn.ts:125) - sees no change. On the shared path that key selects
prepared-model owners and "" matches none on a long-lived gateway; Logbook
never passes one. Regression: structured-extraction.test.ts.

Replies are parsed strictly first; a fenced or prose-wrapped reply falls back
to the first balanced JSON object or array (normalization-core's
extractBalancedJsonPrefix) so model formatting drift does not fail a whole
batch. A reply with no JSON in it is still a controlled error. Regression:
structured-extraction.test.ts (fenced reply; no-JSON reply).

Removed versus the previous head of this branch:
- the by-id provider resolver in `buildMediaUnderstandingRegistry` and its
  runtime call: superseded on main by openclaw#139231
- the `SYSTEM_INSTRUCTION_TRANSPORTS` allowlist and `api` inspection: an
  unverifiable promise about plugin transports; the gate now records only the
  one decision the runtime owns
- `imagePayloadTransform` and the opencode rewrite: opencode-only and separable

Production LOC: +220/-11 (image.ts +55/-8, provider-registry.ts +9/-2,
image-runtime.ts +8/-1, structured-extraction.ts +148); tests +347/-3; docs
and the Logbook manifest help text shortened to the rule above. The config-doc
baseline hash (docs/.generated/config-baseline.sha256) is regenerated for the
help-text change, as its check instructs.

Sibling coverage: describeImage/describeImages hydration is untouched and Codex
keeps its own `extractStructured` hook (provider-registry.test.ts). The boundary
test in image.test.ts asserts the exact `Context` handed to `complete`, and the
refusal cases assert no stream registration, completion, or fetch.

Proof gap: a live gateway run of Logbook against a non-Codex `visionModel` is
still pending. Local proof: focused Vitest suites (media-understanding,
image-tool provider loading, opencode), oxfmt, oxlint,
`plugin-sdk:surface:check`, and the assertion-safety and coercion guards.

Closes openclaw#119772

Co-Authored-By: Claude Fable 5.1 <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 7, 2026
…openclaw#139231)

Keep enabled audio and structured-extraction providers discoverable after another media plugin loads, and when shared models select only images. Merge eligible manifest owners at the shared catalog; leave execution selection with the runner and preserve active instances, policy filtering, and selected image loading.

Resolve capability metadata only for normalized, deduplicated untagged provider entries. Pair synthetic audio fixtures with their matching runtime/metadata generation to avoid unrelated cold plugin imports.

Verified the final integration with 69 focused tests, formatting/lint/core typecheck, a fresh independent review, a sealed build, 12 audio/extraction Gateway cases, and three paired full-inventory discovery cases. Exact-head CI 34060063771 succeeded (141 successful jobs, 16 skipped). Production delta: -20 lines. Related openclaw#119772 remains open; generic extraction fallback openclaw#119773 is outside scope.

Thanks to @rodrigo-fonseca-oliveira for the original diagnosis and fix.

Co-authored-by: Rodrigo Oliveira <[email protected]>
Co-authored-by: Peter Steinberger <[email protected]>
@rodrigo-fonseca-oliveira
rodrigo-fonseca-oliveira deleted the rodrfons/media-understanding-resolve-requested-provider-by-id branch November 29, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: L 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