feat: add Video Bridge frame sampling - #10483
Merged
Merged
Conversation
tkgo11
pushed a commit
to tkgo11/OmniRoute
that referenced
this pull request
Sep 23, 2026
Implements the secure, opt-in Video Bridge for issue diegosouzapw#9760, including bounded FFmpeg frame extraction, capability-aware routing, telemetry, settings UI, localization, documentation, and regression coverage.
muhamadgalihsaputra
pushed a commit
to niyatna/NiyatnaRoute
that referenced
this pull request
Sep 27, 2026
Implements the secure, opt-in Video Bridge for issue diegosouzapw#9760, including bounded FFmpeg frame extraction, capability-aware routing, telemetry, settings UI, localization, documentation, and regression coverage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
data:video/*;base64,...inputs.x-omniroute-modality-bridge.Architecture
VideoBridgeGuardrailruns after Vision and Audio in the existing pre-call guardrail pipeline.input_video/video_urland Anthropictype: "video"source shapes without inferring video from ordinary filename text.supportsVideo: true | false | nullcontract from registry/spec/catalog modality data rather than model-name heuristics./api/modelsexposes realsupportsVisionvalues through a request-local bulk capability snapshot. Optional custom-model DB overrides fail open and use one bulk read per request instead of N+1 SQLite queries.latencySamples.Security and bounded runtime
/v1request path never imports or launches FFmpeg. It downloads or decodes bounded bytes and self-hops to an internal extraction broker./api/modality-bridge/video/is bothLOCAL_ONLYandSPAWN_CAPABLE, requires trusted stamped loopback plus a timing-safe per-process token, accepts onlyapplication/octet-stream, and exposes no URL/path/executable/argv input.503+Retry-After, client disconnect to499, and broker deadline to504.execFileargument arrays with no shell,-nostdin, one thread, file-only protocols, and a format allowlist that excludes playlists/manifests.-map 0:<index>.finally. Runtime errors are sanitized and do not expose commands, paths, stderr, stacks, or upstream secrets.Related Issues
Validation
Choose the change type and focused loop from the
Contribution Golden Path. The full unit suite,
Vitest, the 60% coverage gate, and the production build all run in CI on this PR (#8329):
npm run lintee221d870c199bc1aa1f3b90303ff2bc7c74509bfab604ad287527eaba18f3318a19e2abef1c51e466a58aa057a520643958933efcad4ccf4b805abf282c087c271aa6fa43012bba349ad5644e22214b; GitHub reports the PR MERGEABLE/CLEAN with no review threadsnpm run check:mutation-test-coverageGREEN (4,031 unit files / 31 mutated modules / zero drift)releaseGreen=true, HARD=0, DRIFT=0Full VPS
.15matrixfab604ad287527eaba18f3318a19e2abef1c51e4(Build App run 31897271838).No TypeScript or functional compiler error was emitted; no incomplete artifact was treated as valid.
The candidate was compared with a pure snapshot of its exact release base. The branch does not absorb unrelated release repairs.
consoleInterceptornotice emission;ServiceSupervisor.typecheck:noimplicit:core: the candidate and pure base produce the same inherited diagnostic set inopen-sse/utils/usageTracking.tsandsrc/shared/services/cliRuntime.ts; normalized diff is empty.Result of the discriminator: zero unit or integration regression attributable to Video Bridge.
Tests Added Or Updated
Added
tests/unit/guardrails/videoBridge.test.tstests/unit/guardrails/videoBridgeHelpers.test.tstests/unit/guardrails/videoBridgeRuntime.test.tstests/unit/modality-bridge-video-i18n.test.tstests/unit/modality-bridge-video-runtime-route.test.tstests/unit/remote-media-fetch.test.tstests/unit/ui/modality-bridge-video-tab.test.tsxtests/unit/video-bridge-broker.test.tstests/unit/video-bridge-header-stats.test.tstests/unit/video-bridge-media-capabilities.test.tstests/unit/video-bridge-route-security.test.tstests/unit/video-bridge-settings.test.tsUpdated
tests/unit/api-models-hide-paid-6328.test.tstests/unit/authz/spawn-capable-prefixes-client-safe.test.tstests/unit/body-size-guard.test.tstests/unit/guardrails-registry.test.tstests/unit/guardrails/visionBridgeHelpers.callVisionModel.test.tstests/unit/ui/modality-bridge-audio-tab.test.tsxtests/unit/ui/modality-bridge-vision-tab.test.tsxCoverage Notes
Reviewer Notes
LOCAL_ONLYandSPAWN_CAPABLE.supportsVideo === trueis untouched. A known text-only target receives descriptions or safe stubs. An unknown-capability target preserves failed/unprocessed original video parts.maxVideoslimits caption work, not detection, so excess raw video cannot silently reach a known text-only target.yt-dlp, persistent video-result caching, and interactive drill-down are intentionally outside feat(backend): Video bridge (frame sampling + captioning) - backlog da série Modality Bridge #9760.