Repository navigation
feat(ai): add provider video input contract - #121887
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
1915a76 to
6b6a562
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 11, 2026, 5:53 AM ET / 09:53 UTC. ClawSweeper reviewWhat this changesThis PR adds a video-capable provider input type subpath and converts unsupported video to visible omission text before built-in providers use canonical transcript transforms. Merge readinessKeep open for maintainer review: the source supports a clean provider-only boundary, but this publishes a new adapter contract and its Codex compatibility claim could not be independently verified in the available checkout. Priority: P2 Review scores
Verification
How this fits togetherProvider adapters receive model and conversation inputs, then transform them into canonical messages for provider transports. The new dialect permits video only before that boundary; canonical agent, SDK, and transcript contracts remain text-and-image only. flowchart LR
A[Provider adapter input] --> B[Provider media types]
B --> C[Media projection]
C --> D{Video supported here?}
D -->|No| E[Visible omission text]
D -->|Image or text| F[Canonical transcript]
E --> F
F --> G[Provider transport]
Decision needed
Why: Publishing this type subpath establishes a compatibility surface beyond the current built-in adapters, and the available evidence cannot independently validate the related Codex compatibility statement. Before merge
Agent review detailsSecurityNone. PR surfaceSource -12, Tests +136, Config +5, Other +1. Total +130 across 13 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Publish one provider-only contract only after its external API scope is confirmed, the Codex statement is directly verified or removed, and exact-head checks finish green. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR adds an API contract rather than repairing a reported failing user workflow. Is this the best way to solve the issue? Unclear: the provider boundary is coherent and no code defect was found, but maintainers must decide whether to publish this adapter contract now and validate or remove the Codex claim. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4b08d9aa75c1. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (2 earlier review cycles)
|
987ba17 to
4b427bc
Compare
4b427bc to
cf41be3
Compare
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Land-ready proof for Root problem and owner boundary: provider adapters need a typed way to receive user-supplied video, but widening canonical Canonical fix: this head publishes one provider-only dialect at Removed/widened paths: the canonical LLM, agent, plugin, worker, tool-result, image-generation, Codex, Copilot, and runtime-catalog contracts were not widened. The only widening is the provider-specific message/model dialect and its package export. Duplicate transcript-transform policy was consolidated into the shared provider projection. LOC: production/package Focused proof:
Package E2E gap: Codex dependency contract inspected directly:
Latest ClawSweeper review has no code findings. Its rank-up moves are satisfied: the maintainer has explicitly confirmed this durable provider-adapter contract, the Codex compatibility claim is verified from sibling source, and exact-head CI is complete and green. Known non-goals: no native provider route is enabled here; Google and Moonshot wire support, later durability/agent work, and generic runtime-catalog video support remain separate owner slices. |
|
Merged via squash.
|
* feat(llm): add user video input contract * fix(ai): preserve structured tool results * refactor(ai): isolate provider video input types * style(ai): format provider transform imports * chore(ai): register provider type entrypoint
What Problem This Solves
OpenClaw needs a typed way for provider adapters to receive user-supplied video without making video part of every agent transcript, plugin harness, worker message, tool result, image-generation API, or model route. Widening the canonical LLM message types would have changed public Plugin SDK declaration closures and implied support in runtimes that cannot carry video.
Why This Change Was Made
This PR adds a provider-only conversation dialect at
@openclaw/ai/provider-types: user messages and provider model metadata can describe text, image, and video, while canonical@openclaw/llm-coremessages/models remain text-and-image only. Existing built-in providers use a shared projection that converts unsupported video into visible byte-free omission text before their canonical transforms run.The boundary is intentionally narrow:
This is the contract slice extracted from the broader native-video work. Provider-owned Google and Moonshot wire support lands separately.
AI-assisted; implementation and review were performed with coding agents under maintainer supervision.
User Impact
There is no newly enabled provider route in this slice. Developers of provider adapters gain a precise video-capable input contract, and unsupported routes produce an explicit
(video omitted: provider does not support video input)result rather than receiving raw bytes, silently dropping the turn, or coercing video into an image.Evidence
packages/llm-core/**: zero diff against the rebased base.node scripts/check-changed.mjs: passed, including typechecks, lint, dead exports, SDK manifest, package-lock guard, import cycles, and integrity guards.git diff --check: passed.+206/-213, net-7; tooling+1/-0; total non-test/generated/docs/lockfile net-6; tests+139/-3; generated zero.Package E2E gap: the repository's existing dependency install is missing
@lit/context, so the package consumer test could not begin collection. No dependency or timeout workaround was added; exact-head hosted CI remains the package gate.Dependency boundary checked directly: the sibling Codex protocol exposes text, image, and audio inputs, but no video input, so Codex remains intentionally video-disabled.